@tomei/finance 0.5.3 → 0.5.5

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 (169) hide show
  1. package/dist/account/account.d.ts +35 -35
  2. package/dist/account/account.js +233 -233
  3. package/dist/account/account.repository.d.ts +5 -5
  4. package/dist/account/account.repository.js +11 -11
  5. package/dist/account/interfaces/account-attr.interface.d.ts +29 -29
  6. package/dist/account/interfaces/account-attr.interface.js +2 -2
  7. package/dist/account/interfaces/account.repository.interface.d.ts +3 -0
  8. package/dist/account/interfaces/account.repository.interface.js +3 -0
  9. package/dist/account/interfaces/account.repository.interface.js.map +1 -0
  10. package/dist/account-system-entity/account-system-entity.d.ts +11 -11
  11. package/dist/account-system-entity/account-system-entity.js +66 -66
  12. package/dist/account-system-entity/post-history.repository.d.ts +5 -5
  13. package/dist/account-system-entity/post-history.repository.js +11 -11
  14. package/dist/config.d.ts +1888 -1888
  15. package/dist/config.js +331 -331
  16. package/dist/customer/customer.d.ts +43 -43
  17. package/dist/customer/customer.js +237 -236
  18. package/dist/customer/customer.js.map +1 -1
  19. package/dist/customer/finance-customer.repository.d.ts +5 -5
  20. package/dist/customer/finance-customer.repository.js +25 -25
  21. package/dist/customer/interfaces/customer.repository.interface.d.ts +3 -3
  22. package/dist/customer/interfaces/customer.repository.interface.js +2 -2
  23. package/dist/customer/interfaces/finance-customer-attr.interface.d.ts +10 -10
  24. package/dist/customer/interfaces/finance-customer-attr.interface.js +2 -2
  25. package/dist/customer/interfaces/finance-customer.repository.interface.d.ts +3 -3
  26. package/dist/customer/interfaces/finance-customer.repository.interface.js +2 -2
  27. package/dist/database.d.ts +4 -4
  28. package/dist/database.js +14 -14
  29. package/dist/document/document-item.d.ts +38 -38
  30. package/dist/document/document-item.js +83 -83
  31. package/dist/document/document-item.repository.d.ts +5 -5
  32. package/dist/document/document-item.repository.js +11 -11
  33. package/dist/document/document.d.ts +76 -76
  34. package/dist/document/document.js +566 -566
  35. package/dist/document/document.js.map +1 -1
  36. package/dist/document/document.repository.d.ts +5 -5
  37. package/dist/document/document.repository.js +11 -11
  38. package/dist/document/interfaces/document-attr.interface.d.ts +27 -27
  39. package/dist/document/interfaces/document-attr.interface.js +6 -6
  40. package/dist/document/interfaces/document-item-attr.interface.d.ts +22 -22
  41. package/dist/document/interfaces/document-item-attr.interface.js +6 -6
  42. package/dist/document/interfaces/document-item.repository.interface.d.ts +3 -3
  43. package/dist/document/interfaces/document-item.repository.interface.js +2 -2
  44. package/dist/document/interfaces/document.repository.interface.d.ts +3 -0
  45. package/dist/document/interfaces/document.repository.interface.js +3 -0
  46. package/dist/document/interfaces/document.repository.interface.js.map +1 -0
  47. package/dist/enum/doc-type.enum.d.ts +8 -8
  48. package/dist/enum/doc-type.enum.js +12 -12
  49. package/dist/enum/document-status.enum.d.ts +6 -6
  50. package/dist/enum/document-status.enum.js +10 -10
  51. package/dist/enum/index.d.ts +8 -8
  52. package/dist/enum/index.js +17 -17
  53. package/dist/enum/payment-method.enum.d.ts +3 -3
  54. package/dist/enum/payment-method.enum.js +7 -7
  55. package/dist/enum/payment-status.enum.d.ts +4 -4
  56. package/dist/enum/payment-status.enum.js +8 -8
  57. package/dist/enum/payment-type.enum.d.ts +4 -4
  58. package/dist/enum/payment-type.enum.js +8 -8
  59. package/dist/enum/quick-book-client-scopes.enum.d.ts +13 -13
  60. package/dist/enum/quick-book-client-scopes.enum.js +18 -18
  61. package/dist/enum/transaction-type.enum.d.ts +4 -4
  62. package/dist/enum/transaction-type.enum.js +8 -8
  63. package/dist/finance-company/finance-company.d.ts +57 -57
  64. package/dist/finance-company/finance-company.js +1191 -1191
  65. package/dist/finance-company/finance-company.repository.d.ts +5 -5
  66. package/dist/finance-company/finance-company.repository.js +11 -11
  67. package/dist/helpers/typeof.d.ts +1 -1
  68. package/dist/helpers/typeof.js +26 -26
  69. package/dist/index.d.ts +17 -17
  70. package/dist/index.js +32 -32
  71. package/dist/interfaces/account-system.interface.d.ts +13 -13
  72. package/dist/interfaces/account-system.interface.js +2 -2
  73. package/dist/interfaces/index.d.ts +2 -2
  74. package/dist/interfaces/index.js +2 -2
  75. package/dist/journal-entry/interfaces/journal-entry-attr.interface.d.ts +11 -11
  76. package/dist/journal-entry/interfaces/journal-entry-attr.interface.js +2 -2
  77. package/dist/journal-entry/interfaces/journal-entry.repository.interface.d.ts +10 -0
  78. package/dist/journal-entry/interfaces/journal-entry.repository.interface.js +3 -0
  79. package/dist/journal-entry/interfaces/journal-entry.repository.interface.js.map +1 -0
  80. package/dist/journal-entry/journal-entry.d.ts +39 -39
  81. package/dist/journal-entry/journal-entry.js +215 -215
  82. package/dist/journal-entry/journal-entry.repository.d.ts +5 -5
  83. package/dist/journal-entry/journal-entry.repository.js +11 -11
  84. package/dist/ledger-transaction/interfaces/ledger-transaction-attr.interface.d.ts +17 -17
  85. package/dist/ledger-transaction/interfaces/ledger-transaction-attr.interface.js +2 -2
  86. package/dist/ledger-transaction/interfaces/ledger-transaction.repository.interface.d.ts +5 -5
  87. package/dist/ledger-transaction/interfaces/ledger-transaction.repository.interface.js +2 -2
  88. package/dist/ledger-transaction/ledger-transaction.d.ts +48 -48
  89. package/dist/ledger-transaction/ledger-transaction.js +155 -155
  90. package/dist/ledger-transaction/ledger-transaction.repository.d.ts +5 -5
  91. package/dist/ledger-transaction/ledger-transaction.repository.js +11 -11
  92. package/dist/models/account.entity.d.ts +30 -30
  93. package/dist/models/account.entity.js +232 -232
  94. package/dist/models/customer.entity.d.ts +13 -13
  95. package/dist/models/customer.entity.js +109 -109
  96. package/dist/models/document-item.entity.d.ts +27 -27
  97. package/dist/models/document-item.entity.js +172 -172
  98. package/dist/models/document.entity.d.ts +36 -36
  99. package/dist/models/document.entity.js +242 -242
  100. package/dist/models/finance-company.entity.d.ts +9 -9
  101. package/dist/models/finance-company.entity.js +44 -44
  102. package/dist/models/journal-entry.entity.d.ts +16 -16
  103. package/dist/models/journal-entry.entity.js +127 -127
  104. package/dist/models/ledger-transaction.entity.d.ts +24 -24
  105. package/dist/models/ledger-transaction.entity.js +172 -172
  106. package/dist/models/payment-item.entity.d.ts +12 -12
  107. package/dist/models/payment-item.entity.js +75 -75
  108. package/dist/models/payment-method-type.entity.d.ts +13 -13
  109. package/dist/models/payment-method-type.entity.js +85 -85
  110. package/dist/models/payment-method.entity.d.ts +10 -10
  111. package/dist/models/payment-method.entity.js +62 -62
  112. package/dist/models/payment-paid-with.entity.d.ts +24 -24
  113. package/dist/models/payment-paid-with.entity.js +158 -158
  114. package/dist/models/payment.entity.d.ts +27 -27
  115. package/dist/models/payment.entity.js +188 -188
  116. package/dist/models/post-history.entity.d.ts +11 -11
  117. package/dist/models/post-history.entity.js +63 -63
  118. package/dist/payment/interfaces/payment-attr.interface.d.ts +22 -22
  119. package/dist/payment/interfaces/payment-attr.interface.js +6 -6
  120. package/dist/payment/interfaces/payment-item-attr.interface.d.ts +7 -0
  121. package/dist/payment/interfaces/payment-item-attr.interface.js +7 -0
  122. package/dist/payment/interfaces/payment-item-attr.interface.js.map +1 -0
  123. package/dist/payment/interfaces/payment-item.repository.interface.d.ts +3 -0
  124. package/dist/payment/interfaces/payment-item.repository.interface.js +3 -0
  125. package/dist/payment/interfaces/payment-item.repository.interface.js.map +1 -0
  126. package/dist/payment/interfaces/payment-params.interface.d.ts +7 -7
  127. package/dist/payment/interfaces/payment-params.interface.js +2 -2
  128. package/dist/payment/interfaces/payment.repository.interface.d.ts +3 -0
  129. package/dist/payment/interfaces/payment.repository.interface.js +3 -0
  130. package/dist/payment/interfaces/payment.repository.interface.js.map +1 -0
  131. package/dist/payment/payment-item.repository.d.ts +17 -0
  132. package/dist/payment/payment-item.repository.js +51 -0
  133. package/dist/payment/payment-item.repository.js.map +1 -0
  134. package/dist/payment/payment.d.ts +51 -51
  135. package/dist/payment/payment.js +179 -179
  136. package/dist/payment/payment.repository.d.ts +5 -5
  137. package/dist/payment/payment.repository.js +11 -11
  138. package/dist/payment-item/interfaces/payment-item-attr.interface.d.ts +10 -10
  139. package/dist/payment-item/interfaces/payment-item-attr.interface.js +6 -6
  140. package/dist/payment-item/payment-item.d.ts +23 -23
  141. package/dist/payment-item/payment-item.js +115 -115
  142. package/dist/payment-item/payment-item.repository.d.ts +5 -5
  143. package/dist/payment-item/payment-item.repository.js +11 -11
  144. package/dist/payment-method/interfaces/payment-method-attr.interface.d.ts +5 -5
  145. package/dist/payment-method/interfaces/payment-method-attr.interface.js +2 -2
  146. package/dist/payment-method/payment-method.d.ts +18 -18
  147. package/dist/payment-method/payment-method.js +98 -98
  148. package/dist/payment-method/payment-method.repository.d.ts +5 -5
  149. package/dist/payment-method/payment-method.repository.js +11 -11
  150. package/dist/payment-method-type/interfaces/payment-method-type-attr.interface.d.ts +8 -8
  151. package/dist/payment-method-type/interfaces/payment-method-type-attr.interface.js +2 -2
  152. package/dist/payment-method-type/payment-method-type.d.ts +16 -16
  153. package/dist/payment-method-type/payment-method-type.js +70 -70
  154. package/dist/payment-method-type/payment-method-type.repository.d.ts +5 -5
  155. package/dist/payment-method-type/payment-method-type.repository.js +11 -11
  156. package/dist/payment-paid-with/interfaces/payment-paid-with.interface.d.ts +19 -19
  157. package/dist/payment-paid-with/interfaces/payment-paid-with.interface.js +6 -6
  158. package/dist/payment-paid-with/payment-paid-with.d.ts +31 -31
  159. package/dist/payment-paid-with/payment-paid-with.js +52 -52
  160. package/dist/payment-paid-with/payment-paid-with.repository.d.ts +5 -5
  161. package/dist/payment-paid-with/payment-paid-with.repository.js +11 -11
  162. package/dist/test-document.d.ts +3 -3
  163. package/dist/test-document.js +18 -18
  164. package/dist/test.d.ts +1 -1
  165. package/dist/test.js +7 -7
  166. package/dist/tsconfig.tsbuildinfo +1 -1
  167. package/package.json +1 -1
  168. package/src/customer/customer.ts +3 -1
  169. package/src/document/document.ts +10 -6
package/dist/config.js CHANGED
@@ -1,332 +1,332 @@
1
- const dotenv = require('dotenv');
2
- dotenv.config();
3
- const defaultConfig = {
4
- commonApiUrl: process.env.COMMON_API_URL,
5
- accountingSystem: {
6
- quickbooks: {
7
- packageName: process.env.PACKAGE_NAME || '',
8
- accountSystemClass: process.env.ACCOUNT_SYSTEM_CLASS || '',
9
- apiUrl: process.env.API_URL || '',
10
- },
11
- xero: {
12
- packageName: process.env.PACKAGE_NAME || '',
13
- accountSystemClass: process.env.ACCOUNT_SYSTEM_CLASS || '',
14
- apiUrl: process.env.API_URL || '',
15
- },
16
- },
17
- financeCompanies: {
18
- 'TXG-FS': {
19
- companyId: process.env.COMPANYID || 'TXG-FS',
20
- companyName: process.env.COMPANYNAME || 'TXG Financial Solutions Sdn Bhd',
21
- companySystemCode: process.env.COMPSYSTEMCODE || 'Tomei-SSO',
22
- companySystemRefId: process.env.COMPSYSTEMREFID || '',
23
- accountSystemCode: process.env.ACCSYSTEMCODE || '',
24
- accountingSystem: 'quickbooks',
25
- apiKey: process.env.QUICKBOOK_API_KEY,
26
- redirectUrl: process.env.EZGOLD_REDIRECT_URL,
27
- apiSecret: process.env.QUICKBOOK_API_SECRET,
28
- paymentMethods: {
29
- cash: {
30
- id: 'CS',
31
- name: 'Cash',
32
- types: {
33
- cash: {
34
- id: 'CS-CASH',
35
- name: 'Cash',
36
- accountNo: 'CASH',
37
- processingFeeRate: 0.0,
38
- processingFeeAccountNo: 'CASH-FEE',
39
- },
40
- },
41
- },
42
- cheque: {
43
- id: 'CQ',
44
- name: 'Cheque',
45
- types: {
46
- cash: {
47
- id: 'CQ-Cheque',
48
- name: 'Cheque',
49
- accountNo: 'CHEQUE',
50
- processingFeeRate: 0.0,
51
- processingFeeAccountNo: 'CASH-FEE',
52
- },
53
- },
54
- },
55
- bankTransfer: {
56
- id: 'BT',
57
- name: 'Bank Transfer',
58
- types: {
59
- bankTransfer: {
60
- id: 'BT-RHB',
61
- name: 'RHB',
62
- accountNo: '19GKBA20900-01',
63
- processingFeeRate: 1.0,
64
- processingFeeAccountNo: 'RHB-FEE',
65
- },
66
- },
67
- },
68
- debitCard: {
69
- id: 'DC',
70
- name: 'Debit Card',
71
- types: {
72
- mastercard: {
73
- id: 'DC-MSC',
74
- name: 'Mastercard',
75
- accountNo: 'CURLEC',
76
- processingFeeRate: 1.5,
77
- processingFeeAccountNo: 'CURLEC-FEE',
78
- },
79
- visa: {
80
- id: 'DC-VISA',
81
- name: 'Visa',
82
- accountNo: 'CURLEC',
83
- processingFeeRate: 1.5,
84
- processingFeeAccountNo: 'CURLEC-FEE',
85
- },
86
- },
87
- },
88
- creditCard: {
89
- id: 'CC',
90
- name: 'Credit Card',
91
- types: {
92
- mastercard: {
93
- id: 'CC-MSC',
94
- name: 'Mastercard',
95
- accountNo: 'CURLEC',
96
- processingFeeRate: 2.5,
97
- processingFeeAccountNo: 'CURLEC-FEE',
98
- },
99
- visa: {
100
- id: 'CC-VISA',
101
- name: 'Visa',
102
- accountNo: 'CURLEC',
103
- processingFeeRate: 2.5,
104
- processingFeeAccountNo: 'CURLEC-FEE',
105
- },
106
- amex: {
107
- id: 'CC-AMEX',
108
- name: 'American Express',
109
- accountNo: 'CURLEC',
110
- processingFeeRate: 3.5,
111
- processingFeeAccountNo: 'CURLEC-FEE',
112
- },
113
- },
114
- },
115
- mandate: {
116
- id: 'MD',
117
- name: 'Mandate',
118
- types: {
119
- RHB: {
120
- id: 'MD-RHB',
121
- name: 'RHB Mandate',
122
- accountNo: '19GKBA20900-01',
123
- processingFeeRate: 1.0,
124
- processingFeeAccountNo: 'RHB-FEE',
125
- },
126
- },
127
- },
128
- },
129
- },
130
- 'TXG-B': {
131
- companyId: 'TXG-B',
132
- companyName: 'TXG Bullion Sdn Bhd',
133
- companySystemCode: 'Tomei-SSO',
134
- companySystemRefId: '',
135
- accountingSystem: 'quickbooks',
136
- accountSystemCode: '',
137
- apiKey: '',
138
- apiSecret: '',
139
- redirectUrl: process.env.EZGOLD_REDIRECT_URL,
140
- paymentMethods: {
141
- cash: {
142
- id: 'CS',
143
- name: 'Cash',
144
- types: {
145
- cash: {
146
- id: 'CS-CASH',
147
- name: 'Cash',
148
- accountno: '',
149
- processingFeeRate: 0.0,
150
- processingFeeAccountNo: '',
151
- },
152
- },
153
- },
154
- bankTransfer: {
155
- id: 'BT',
156
- name: 'Bank Transfer',
157
- types: {
158
- banktransfer: {
159
- id: 'BT-RHB',
160
- name: 'RHB',
161
- accountno: '',
162
- processingFeeRate: 1.0,
163
- processingFeeAccountNo: '',
164
- },
165
- },
166
- },
167
- debitCard: {
168
- id: 'DC',
169
- name: 'Debit Card',
170
- types: {
171
- mastercard: {
172
- id: 'DC-MSC',
173
- name: 'Mastercard',
174
- accountno: '',
175
- processingFeeRate: 1.5,
176
- processingFeeAccountNo: '',
177
- },
178
- visa: {
179
- id: 'DC-VISA',
180
- name: 'Visa',
181
- accountno: '',
182
- processingFeeRate: 1.5,
183
- processingFeeAccountNo: '',
184
- },
185
- },
186
- },
187
- creditCard: {
188
- id: 'CC',
189
- name: 'Credit Card',
190
- types: {
191
- mastercard: {
192
- id: 'CC-MSC',
193
- name: 'Mastercard',
194
- accountno: '',
195
- processingFeeRate: 2.5,
196
- processingFeeAccountNo: '',
197
- },
198
- visa: {
199
- id: 'CC-VISA',
200
- name: 'Visa',
201
- accountno: '',
202
- processingFeeRate: 2.5,
203
- processingFeeAccountNo: '',
204
- },
205
- amex: {
206
- id: 'CC-AMEX',
207
- name: 'American Express',
208
- accountno: '',
209
- processingFeeRate: 3.5,
210
- processingFeeAccountNo: '',
211
- },
212
- },
213
- },
214
- eWallet: {
215
- id: 'EW',
216
- name: 'E-Wallet',
217
- types: {
218
- touchngo: {
219
- id: 'EW-T&G',
220
- name: 'Touch & Go',
221
- accountno: '',
222
- processingFeeRate: 1.5,
223
- processingFeeAccountNo: '',
224
- },
225
- Boost: {
226
- id: 'EW-BOOST',
227
- name: 'Boost',
228
- accountno: '',
229
- processingFeeRate: 2.5,
230
- processingFeeAccountNo: '',
231
- },
232
- GrabPay: {
233
- id: 'EW-GRAB',
234
- name: 'GrabPay',
235
- accountno: '',
236
- processingFeeRate: 2.5,
237
- processingFeeAccountNo: '',
238
- },
239
- ShopeePay: {
240
- id: 'EW-SHOPEE',
241
- name: 'ShopeePay',
242
- accountno: '',
243
- processingFeeRate: 2.5,
244
- processingFeeAccountNo: '',
245
- },
246
- },
247
- },
248
- mandate: {
249
- id: 'MD',
250
- name: 'Mandate',
251
- types: {
252
- RHB: {
253
- id: 'MD-RHB',
254
- name: 'RHB Mandate',
255
- accountno: '',
256
- processingFeeRate: 1.0,
257
- processingFeeAccountNo: '',
258
- },
259
- },
260
- },
261
- storeCredit: {
262
- id: 'SC',
263
- name: 'Store Credit',
264
- types: {
265
- scTomei: {
266
- id: 'SC-TOMEI',
267
- name: 'Tomei Store Credit',
268
- accountno: '',
269
- processingFeeRate: 0.0,
270
- processingFeeAccountNo: '',
271
- },
272
- },
273
- },
274
- pointsRedemption: {
275
- id: 'PR',
276
- name: 'Points Redemption',
277
- types: {
278
- prTomei: {
279
- id: 'PR-TOMEI',
280
- name: 'Tomei Points Redemption',
281
- accountno: '',
282
- processingFeeRate: 0.0,
283
- processingFeeAccountNo: '',
284
- },
285
- },
286
- },
287
- voucher: {
288
- id: 'VC',
289
- name: 'Voucher',
290
- types: {
291
- gift: {
292
- id: 'VC-GF',
293
- name: 'Gift Voucher',
294
- accountno: '',
295
- processingFeeRate: 0.0,
296
- processingFeeAccountNo: '',
297
- },
298
- cash: {
299
- id: 'VC-CS',
300
- name: 'Cash Voucher',
301
- accountno: '',
302
- processingFeeRate: 0.0,
303
- processingFeeAccountNo: '',
304
- },
305
- },
306
- },
307
- },
308
- },
309
- },
310
- };
311
- const config = {
312
- development: Object.assign({ environment: 'development' }, defaultConfig),
313
- test: Object.assign({ environment: 'test' }, defaultConfig),
314
- staging: Object.assign({ environment: 'staging' }, defaultConfig),
315
- production: Object.assign({ environment: 'production' }, defaultConfig),
316
- };
317
- const getConfig = () => {
318
- switch (process.env.NODE_ENV) {
319
- case 'development':
320
- return config['development'];
321
- case 'test':
322
- return config['test'];
323
- case 'staging':
324
- return config['staging'];
325
- case 'production':
326
- return config['production'];
327
- default:
328
- break;
329
- }
330
- };
331
- module.exports = () => getConfig();
1
+ const dotenv = require('dotenv');
2
+ dotenv.config();
3
+ const defaultConfig = {
4
+ commonApiUrl: process.env.COMMON_API_URL,
5
+ accountingSystem: {
6
+ quickbooks: {
7
+ packageName: process.env.PACKAGE_NAME || '',
8
+ accountSystemClass: process.env.ACCOUNT_SYSTEM_CLASS || '',
9
+ apiUrl: process.env.API_URL || '',
10
+ },
11
+ xero: {
12
+ packageName: process.env.PACKAGE_NAME || '',
13
+ accountSystemClass: process.env.ACCOUNT_SYSTEM_CLASS || '',
14
+ apiUrl: process.env.API_URL || '',
15
+ },
16
+ },
17
+ financeCompanies: {
18
+ 'TXG-FS': {
19
+ companyId: process.env.COMPANYID || 'TXG-FS',
20
+ companyName: process.env.COMPANYNAME || 'TXG Financial Solutions Sdn Bhd',
21
+ companySystemCode: process.env.COMPSYSTEMCODE || 'Tomei-SSO',
22
+ companySystemRefId: process.env.COMPSYSTEMREFID || '',
23
+ accountSystemCode: process.env.ACCSYSTEMCODE || '',
24
+ accountingSystem: 'quickbooks',
25
+ apiKey: process.env.QUICKBOOK_API_KEY,
26
+ redirectUrl: process.env.EZGOLD_REDIRECT_URL,
27
+ apiSecret: process.env.QUICKBOOK_API_SECRET,
28
+ paymentMethods: {
29
+ cash: {
30
+ id: 'CS',
31
+ name: 'Cash',
32
+ types: {
33
+ cash: {
34
+ id: 'CS-CASH',
35
+ name: 'Cash',
36
+ accountNo: 'CASH',
37
+ processingFeeRate: 0.0,
38
+ processingFeeAccountNo: 'CASH-FEE',
39
+ },
40
+ },
41
+ },
42
+ cheque: {
43
+ id: 'CQ',
44
+ name: 'Cheque',
45
+ types: {
46
+ cash: {
47
+ id: 'CQ-Cheque',
48
+ name: 'Cheque',
49
+ accountNo: 'CHEQUE',
50
+ processingFeeRate: 0.0,
51
+ processingFeeAccountNo: 'CASH-FEE',
52
+ },
53
+ },
54
+ },
55
+ bankTransfer: {
56
+ id: 'BT',
57
+ name: 'Bank Transfer',
58
+ types: {
59
+ bankTransfer: {
60
+ id: 'BT-RHB',
61
+ name: 'RHB',
62
+ accountNo: '19GKBA20900-01',
63
+ processingFeeRate: 1.0,
64
+ processingFeeAccountNo: 'RHB-FEE',
65
+ },
66
+ },
67
+ },
68
+ debitCard: {
69
+ id: 'DC',
70
+ name: 'Debit Card',
71
+ types: {
72
+ mastercard: {
73
+ id: 'DC-MSC',
74
+ name: 'Mastercard',
75
+ accountNo: 'CURLEC',
76
+ processingFeeRate: 1.5,
77
+ processingFeeAccountNo: 'CURLEC-FEE',
78
+ },
79
+ visa: {
80
+ id: 'DC-VISA',
81
+ name: 'Visa',
82
+ accountNo: 'CURLEC',
83
+ processingFeeRate: 1.5,
84
+ processingFeeAccountNo: 'CURLEC-FEE',
85
+ },
86
+ },
87
+ },
88
+ creditCard: {
89
+ id: 'CC',
90
+ name: 'Credit Card',
91
+ types: {
92
+ mastercard: {
93
+ id: 'CC-MSC',
94
+ name: 'Mastercard',
95
+ accountNo: 'CURLEC',
96
+ processingFeeRate: 2.5,
97
+ processingFeeAccountNo: 'CURLEC-FEE',
98
+ },
99
+ visa: {
100
+ id: 'CC-VISA',
101
+ name: 'Visa',
102
+ accountNo: 'CURLEC',
103
+ processingFeeRate: 2.5,
104
+ processingFeeAccountNo: 'CURLEC-FEE',
105
+ },
106
+ amex: {
107
+ id: 'CC-AMEX',
108
+ name: 'American Express',
109
+ accountNo: 'CURLEC',
110
+ processingFeeRate: 3.5,
111
+ processingFeeAccountNo: 'CURLEC-FEE',
112
+ },
113
+ },
114
+ },
115
+ mandate: {
116
+ id: 'MD',
117
+ name: 'Mandate',
118
+ types: {
119
+ RHB: {
120
+ id: 'MD-RHB',
121
+ name: 'RHB Mandate',
122
+ accountNo: '19GKBA20900-01',
123
+ processingFeeRate: 1.0,
124
+ processingFeeAccountNo: 'RHB-FEE',
125
+ },
126
+ },
127
+ },
128
+ },
129
+ },
130
+ 'TXG-B': {
131
+ companyId: 'TXG-B',
132
+ companyName: 'TXG Bullion Sdn Bhd',
133
+ companySystemCode: 'Tomei-SSO',
134
+ companySystemRefId: '',
135
+ accountingSystem: 'quickbooks',
136
+ accountSystemCode: '',
137
+ apiKey: '',
138
+ apiSecret: '',
139
+ redirectUrl: process.env.EZGOLD_REDIRECT_URL,
140
+ paymentMethods: {
141
+ cash: {
142
+ id: 'CS',
143
+ name: 'Cash',
144
+ types: {
145
+ cash: {
146
+ id: 'CS-CASH',
147
+ name: 'Cash',
148
+ accountno: '',
149
+ processingFeeRate: 0.0,
150
+ processingFeeAccountNo: '',
151
+ },
152
+ },
153
+ },
154
+ bankTransfer: {
155
+ id: 'BT',
156
+ name: 'Bank Transfer',
157
+ types: {
158
+ banktransfer: {
159
+ id: 'BT-RHB',
160
+ name: 'RHB',
161
+ accountno: '',
162
+ processingFeeRate: 1.0,
163
+ processingFeeAccountNo: '',
164
+ },
165
+ },
166
+ },
167
+ debitCard: {
168
+ id: 'DC',
169
+ name: 'Debit Card',
170
+ types: {
171
+ mastercard: {
172
+ id: 'DC-MSC',
173
+ name: 'Mastercard',
174
+ accountno: '',
175
+ processingFeeRate: 1.5,
176
+ processingFeeAccountNo: '',
177
+ },
178
+ visa: {
179
+ id: 'DC-VISA',
180
+ name: 'Visa',
181
+ accountno: '',
182
+ processingFeeRate: 1.5,
183
+ processingFeeAccountNo: '',
184
+ },
185
+ },
186
+ },
187
+ creditCard: {
188
+ id: 'CC',
189
+ name: 'Credit Card',
190
+ types: {
191
+ mastercard: {
192
+ id: 'CC-MSC',
193
+ name: 'Mastercard',
194
+ accountno: '',
195
+ processingFeeRate: 2.5,
196
+ processingFeeAccountNo: '',
197
+ },
198
+ visa: {
199
+ id: 'CC-VISA',
200
+ name: 'Visa',
201
+ accountno: '',
202
+ processingFeeRate: 2.5,
203
+ processingFeeAccountNo: '',
204
+ },
205
+ amex: {
206
+ id: 'CC-AMEX',
207
+ name: 'American Express',
208
+ accountno: '',
209
+ processingFeeRate: 3.5,
210
+ processingFeeAccountNo: '',
211
+ },
212
+ },
213
+ },
214
+ eWallet: {
215
+ id: 'EW',
216
+ name: 'E-Wallet',
217
+ types: {
218
+ touchngo: {
219
+ id: 'EW-T&G',
220
+ name: 'Touch & Go',
221
+ accountno: '',
222
+ processingFeeRate: 1.5,
223
+ processingFeeAccountNo: '',
224
+ },
225
+ Boost: {
226
+ id: 'EW-BOOST',
227
+ name: 'Boost',
228
+ accountno: '',
229
+ processingFeeRate: 2.5,
230
+ processingFeeAccountNo: '',
231
+ },
232
+ GrabPay: {
233
+ id: 'EW-GRAB',
234
+ name: 'GrabPay',
235
+ accountno: '',
236
+ processingFeeRate: 2.5,
237
+ processingFeeAccountNo: '',
238
+ },
239
+ ShopeePay: {
240
+ id: 'EW-SHOPEE',
241
+ name: 'ShopeePay',
242
+ accountno: '',
243
+ processingFeeRate: 2.5,
244
+ processingFeeAccountNo: '',
245
+ },
246
+ },
247
+ },
248
+ mandate: {
249
+ id: 'MD',
250
+ name: 'Mandate',
251
+ types: {
252
+ RHB: {
253
+ id: 'MD-RHB',
254
+ name: 'RHB Mandate',
255
+ accountno: '',
256
+ processingFeeRate: 1.0,
257
+ processingFeeAccountNo: '',
258
+ },
259
+ },
260
+ },
261
+ storeCredit: {
262
+ id: 'SC',
263
+ name: 'Store Credit',
264
+ types: {
265
+ scTomei: {
266
+ id: 'SC-TOMEI',
267
+ name: 'Tomei Store Credit',
268
+ accountno: '',
269
+ processingFeeRate: 0.0,
270
+ processingFeeAccountNo: '',
271
+ },
272
+ },
273
+ },
274
+ pointsRedemption: {
275
+ id: 'PR',
276
+ name: 'Points Redemption',
277
+ types: {
278
+ prTomei: {
279
+ id: 'PR-TOMEI',
280
+ name: 'Tomei Points Redemption',
281
+ accountno: '',
282
+ processingFeeRate: 0.0,
283
+ processingFeeAccountNo: '',
284
+ },
285
+ },
286
+ },
287
+ voucher: {
288
+ id: 'VC',
289
+ name: 'Voucher',
290
+ types: {
291
+ gift: {
292
+ id: 'VC-GF',
293
+ name: 'Gift Voucher',
294
+ accountno: '',
295
+ processingFeeRate: 0.0,
296
+ processingFeeAccountNo: '',
297
+ },
298
+ cash: {
299
+ id: 'VC-CS',
300
+ name: 'Cash Voucher',
301
+ accountno: '',
302
+ processingFeeRate: 0.0,
303
+ processingFeeAccountNo: '',
304
+ },
305
+ },
306
+ },
307
+ },
308
+ },
309
+ },
310
+ };
311
+ const config = {
312
+ development: Object.assign({ environment: 'development' }, defaultConfig),
313
+ test: Object.assign({ environment: 'test' }, defaultConfig),
314
+ staging: Object.assign({ environment: 'staging' }, defaultConfig),
315
+ production: Object.assign({ environment: 'production' }, defaultConfig),
316
+ };
317
+ const getConfig = () => {
318
+ switch (process.env.NODE_ENV) {
319
+ case 'development':
320
+ return config['development'];
321
+ case 'test':
322
+ return config['test'];
323
+ case 'staging':
324
+ return config['staging'];
325
+ case 'production':
326
+ return config['production'];
327
+ default:
328
+ break;
329
+ }
330
+ };
331
+ module.exports = () => getConfig();
332
332
  //# sourceMappingURL=config.js.map