@vendasta/billing 6.3.3 → 8.0.0

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 (288) hide show
  1. package/bundles/vendasta-billing.umd.js +121 -75
  2. package/bundles/vendasta-billing.umd.js.map +1 -1
  3. package/bundles/vendasta-billing.umd.min.js +2 -2
  4. package/bundles/vendasta-billing.umd.min.js.map +1 -1
  5. package/esm2015/lib/_generated/host.service.js +1 -1
  6. package/esm2015/lib/_generated/index.js +1 -1
  7. package/esm2015/lib/_internal/bank-reconciliation.api.service.js +1 -1
  8. package/esm2015/lib/_internal/billing.api.service.js +7 -2
  9. package/esm2015/lib/_internal/bundle.api.service.js +1 -1
  10. package/esm2015/lib/_internal/contract-document.api.service.js +1 -1
  11. package/esm2015/lib/_internal/contract.api.service.js +1 -1
  12. package/esm2015/lib/_internal/credit.api.service.js +1 -1
  13. package/esm2015/lib/_internal/discount.api.service.js +1 -1
  14. package/esm2015/lib/_internal/enums/applied-discount.enum.js +1 -1
  15. package/esm2015/lib/_internal/enums/card.enum.js +1 -1
  16. package/esm2015/lib/_internal/enums/contract.enum.js +1 -1
  17. package/esm2015/lib/_internal/enums/currency.enum.js +1 -1
  18. package/esm2015/lib/_internal/enums/frequency.enum.js +1 -1
  19. package/esm2015/lib/_internal/enums/index.js +1 -1
  20. package/esm2015/lib/_internal/enums/invoice.enum.js +1 -1
  21. package/esm2015/lib/_internal/enums/merchant-report.enum.js +1 -1
  22. package/esm2015/lib/_internal/enums/merchant.enum.js +1 -1
  23. package/esm2015/lib/_internal/enums/month.enum.js +1 -1
  24. package/esm2015/lib/_internal/enums/payment-card.enum.js +1 -1
  25. package/esm2015/lib/_internal/enums/payment.enum.js +1 -1
  26. package/esm2015/lib/_internal/enums/payout.enum.js +1 -1
  27. package/esm2015/lib/_internal/enums/pricing-plan.enum.js +1 -1
  28. package/esm2015/lib/_internal/enums/product-summary.enum.js +1 -1
  29. package/esm2015/lib/_internal/enums/product.enum.js +1 -1
  30. package/esm2015/lib/_internal/enums/purchase.enum.js +1 -1
  31. package/esm2015/lib/_internal/enums/refund.enum.js +1 -1
  32. package/esm2015/lib/_internal/enums/sales-credit-note.enum.js +1 -1
  33. package/esm2015/lib/_internal/enums/sales-invoice.enum.js +1 -1
  34. package/esm2015/lib/_internal/enums/sort-direction.enum.js +1 -1
  35. package/esm2015/lib/_internal/enums/subscribe-validation.enum.js +1 -1
  36. package/esm2015/lib/_internal/enums/subscription.enum.js +1 -1
  37. package/esm2015/lib/_internal/index.js +1 -1
  38. package/esm2015/lib/_internal/interfaces/api.interface.js +1 -1
  39. package/esm2015/lib/_internal/interfaces/applied-bundle.interface.js +1 -1
  40. package/esm2015/lib/_internal/interfaces/applied-discount.interface.js +1 -1
  41. package/esm2015/lib/_internal/interfaces/applied-tax-rate.interface.js +1 -1
  42. package/esm2015/lib/_internal/interfaces/balance.interface.js +1 -1
  43. package/esm2015/lib/_internal/interfaces/billable-item.interface.js +1 -1
  44. package/esm2015/lib/_internal/interfaces/bundle.interface.js +1 -1
  45. package/esm2015/lib/_internal/interfaces/card.interface.js +1 -1
  46. package/esm2015/lib/_internal/interfaces/commitment.interface.js +1 -1
  47. package/esm2015/lib/_internal/interfaces/common.interface.js +1 -1
  48. package/esm2015/lib/_internal/interfaces/contract-document.interface.js +1 -1
  49. package/esm2015/lib/_internal/interfaces/contract.interface.js +1 -1
  50. package/esm2015/lib/_internal/interfaces/credit.interface.js +1 -1
  51. package/esm2015/lib/_internal/interfaces/currency.interface.js +1 -1
  52. package/esm2015/lib/_internal/interfaces/customer-summary.interface.js +1 -1
  53. package/esm2015/lib/_internal/interfaces/date-range.interface.js +1 -1
  54. package/esm2015/lib/_internal/interfaces/discount.interface.js +1 -1
  55. package/esm2015/lib/_internal/interfaces/external-account.interface.js +1 -1
  56. package/esm2015/lib/_internal/interfaces/field-mask.interface.js +1 -1
  57. package/esm2015/lib/_internal/interfaces/frequency.interface.js +1 -1
  58. package/esm2015/lib/_internal/interfaces/index.js +1 -1
  59. package/esm2015/lib/_internal/interfaces/invoice-template.interface.js +1 -1
  60. package/esm2015/lib/_internal/interfaces/invoice.interface.js +1 -1
  61. package/esm2015/lib/_internal/interfaces/merchant-report.interface.js +1 -1
  62. package/esm2015/lib/_internal/interfaces/merchant.interface.js +1 -1
  63. package/esm2015/lib/_internal/interfaces/metered-component.interface.js +1 -1
  64. package/esm2015/lib/_internal/interfaces/month.interface.js +1 -1
  65. package/esm2015/lib/_internal/interfaces/payment-card.interface.js +1 -1
  66. package/esm2015/lib/_internal/interfaces/payment.interface.js +1 -1
  67. package/esm2015/lib/_internal/interfaces/payout.interface.js +1 -1
  68. package/esm2015/lib/_internal/interfaces/pricing-plan-product.interface.js +1 -1
  69. package/esm2015/lib/_internal/interfaces/pricing-plan.interface.js +1 -1
  70. package/esm2015/lib/_internal/interfaces/product-pricing.interface.js +1 -1
  71. package/esm2015/lib/_internal/interfaces/product-summary.interface.js +1 -1
  72. package/esm2015/lib/_internal/interfaces/product.interface.js +1 -1
  73. package/esm2015/lib/_internal/interfaces/purchase.interface.js +1 -1
  74. package/esm2015/lib/_internal/interfaces/refund.interface.js +1 -1
  75. package/esm2015/lib/_internal/interfaces/retail-customer-configuration.interface.js +1 -1
  76. package/esm2015/lib/_internal/interfaces/sales-credit-note.interface.js +1 -1
  77. package/esm2015/lib/_internal/interfaces/sales-invoice.interface.js +1 -1
  78. package/esm2015/lib/_internal/interfaces/sort-direction.interface.js +1 -1
  79. package/esm2015/lib/_internal/interfaces/subscribe-validation.interface.js +1 -1
  80. package/esm2015/lib/_internal/interfaces/subscription.interface.js +1 -1
  81. package/esm2015/lib/_internal/interfaces/tax-rate.interface.js +1 -1
  82. package/esm2015/lib/_internal/invoice-template.api.service.js +1 -1
  83. package/esm2015/lib/_internal/invoice.api.service.js +1 -1
  84. package/esm2015/lib/_internal/merchant.api.service.js +1 -1
  85. package/esm2015/lib/_internal/objects/api.js +1 -1
  86. package/esm2015/lib/_internal/objects/applied-bundle.js +1 -1
  87. package/esm2015/lib/_internal/objects/applied-discount.js +1 -1
  88. package/esm2015/lib/_internal/objects/applied-tax-rate.js +1 -1
  89. package/esm2015/lib/_internal/objects/balance.js +1 -1
  90. package/esm2015/lib/_internal/objects/billable-item.js +76 -1
  91. package/esm2015/lib/_internal/objects/bundle.js +1 -1
  92. package/esm2015/lib/_internal/objects/card.js +1 -1
  93. package/esm2015/lib/_internal/objects/commitment.js +1 -1
  94. package/esm2015/lib/_internal/objects/common.js +1 -1
  95. package/esm2015/lib/_internal/objects/contract-document.js +1 -1
  96. package/esm2015/lib/_internal/objects/contract.js +1 -1
  97. package/esm2015/lib/_internal/objects/credit.js +1 -1
  98. package/esm2015/lib/_internal/objects/currency.js +1 -1
  99. package/esm2015/lib/_internal/objects/customer-summary.js +1 -1
  100. package/esm2015/lib/_internal/objects/date-range.js +1 -1
  101. package/esm2015/lib/_internal/objects/discount.js +1 -1
  102. package/esm2015/lib/_internal/objects/external-account.js +1 -1
  103. package/esm2015/lib/_internal/objects/field-mask.js +1 -1
  104. package/esm2015/lib/_internal/objects/frequency.js +1 -1
  105. package/esm2015/lib/_internal/objects/index.js +2 -2
  106. package/esm2015/lib/_internal/objects/invoice-template.js +1 -1
  107. package/esm2015/lib/_internal/objects/invoice.js +7 -1
  108. package/esm2015/lib/_internal/objects/merchant-report.js +1 -1
  109. package/esm2015/lib/_internal/objects/merchant.js +1 -1
  110. package/esm2015/lib/_internal/objects/metered-component.js +1 -1
  111. package/esm2015/lib/_internal/objects/month.js +1 -1
  112. package/esm2015/lib/_internal/objects/payment-card.js +1 -1
  113. package/esm2015/lib/_internal/objects/payment.js +1 -1
  114. package/esm2015/lib/_internal/objects/payout.js +1 -1
  115. package/esm2015/lib/_internal/objects/pricing-plan-product.js +1 -1
  116. package/esm2015/lib/_internal/objects/pricing-plan.js +1 -1
  117. package/esm2015/lib/_internal/objects/product-pricing.js +1 -1
  118. package/esm2015/lib/_internal/objects/product-summary.js +1 -1
  119. package/esm2015/lib/_internal/objects/product.js +1 -1
  120. package/esm2015/lib/_internal/objects/purchase.js +1 -1
  121. package/esm2015/lib/_internal/objects/refund.js +1 -1
  122. package/esm2015/lib/_internal/objects/retail-customer-configuration.js +1 -1
  123. package/esm2015/lib/_internal/objects/sales-credit-note.js +1 -1
  124. package/esm2015/lib/_internal/objects/sales-invoice.js +1 -1
  125. package/esm2015/lib/_internal/objects/sort-direction.js +1 -1
  126. package/esm2015/lib/_internal/objects/subscribe-validation.js +1 -1
  127. package/esm2015/lib/_internal/objects/subscription.js +25 -1
  128. package/esm2015/lib/_internal/objects/tax-rate.js +1 -1
  129. package/esm2015/lib/_internal/payment-method.api.service.js +1 -1
  130. package/esm2015/lib/_internal/payment.api.service.js +1 -1
  131. package/esm2015/lib/_internal/pricing.api.service.js +1 -1
  132. package/esm2015/lib/_internal/product-summary.api.service.js +1 -1
  133. package/esm2015/lib/_internal/product.api.service.js +1 -1
  134. package/esm2015/lib/_internal/purchase.api.service.js +1 -1
  135. package/esm2015/lib/_internal/refund.api.service.js +1 -1
  136. package/esm2015/lib/_internal/retail-customer-configuration.api.service.js +1 -1
  137. package/esm2015/lib/_internal/sales-credit-note.api.service.js +1 -1
  138. package/esm2015/lib/_internal/sales-invoice.api.service.js +1 -1
  139. package/esm2015/lib/_internal/tax.api.service.js +1 -1
  140. package/esm2015/lib/_internal/vendor.api.service.js +1 -1
  141. package/esm2015/lib/applied_bundle/applied_bundle.js +1 -1
  142. package/esm2015/lib/applied_bundle/index.js +1 -1
  143. package/esm2015/lib/applied_discount/applied_discount.js +1 -1
  144. package/esm2015/lib/applied_discount/index.js +1 -1
  145. package/esm2015/lib/bank_account/bank-account.service.js +1 -1
  146. package/esm2015/lib/bank_account/bank_account.js +1 -1
  147. package/esm2015/lib/bank_account/index.js +1 -1
  148. package/esm2015/lib/bank_reconciliation/bank-reconciliation.service.js +1 -1
  149. package/esm2015/lib/bank_reconciliation/index.js +1 -1
  150. package/esm2015/lib/bank_reconciliation/payout.js +1 -1
  151. package/esm2015/lib/billable-item/billable-item.js +1 -1
  152. package/esm2015/lib/billable-item/billable-item.service.js +1 -1
  153. package/esm2015/lib/billable-item/index.js +1 -1
  154. package/esm2015/lib/billing-host.service.js +1 -1
  155. package/esm2015/lib/billing.service.js +1 -1
  156. package/esm2015/lib/bundle/bundle.js +1 -1
  157. package/esm2015/lib/bundle/bundle.service.js +1 -1
  158. package/esm2015/lib/bundle/index.js +1 -1
  159. package/esm2015/lib/contract/contract.js +1 -1
  160. package/esm2015/lib/contract/contract.service.js +1 -1
  161. package/esm2015/lib/contract/dimension.js +1 -1
  162. package/esm2015/lib/contract/index.js +1 -2
  163. package/esm2015/lib/contract/mutations.js +1 -1
  164. package/esm2015/lib/contract-document/contract-document.js +1 -1
  165. package/esm2015/lib/contract-document/contract-document.service.js +1 -1
  166. package/esm2015/lib/contract-document/index.js +1 -1
  167. package/esm2015/lib/contract-document/list-contract-document.js +1 -1
  168. package/esm2015/lib/core/index.js +1 -1
  169. package/esm2015/lib/core/paged-response.js +1 -1
  170. package/esm2015/lib/core/sort-direction.js +1 -1
  171. package/esm2015/lib/credit/credit.js +1 -1
  172. package/esm2015/lib/credit/credit.service.js +1 -1
  173. package/esm2015/lib/credit/index.js +1 -1
  174. package/esm2015/lib/customer_summary/customer-summary.js +1 -1
  175. package/esm2015/lib/discount/discount.js +1 -1
  176. package/esm2015/lib/discount/discount.service.js +1 -1
  177. package/esm2015/lib/discount/discount_type.js +1 -1
  178. package/esm2015/lib/discount/index.js +1 -1
  179. package/esm2015/lib/discount/list-discount.js +1 -1
  180. package/esm2015/lib/http-shared/error-handlers.js +1 -1
  181. package/esm2015/lib/index.js +1 -1
  182. package/esm2015/lib/invoice/index.js +1 -1
  183. package/esm2015/lib/invoice/invoice.js +4 -2
  184. package/esm2015/lib/invoice/invoice.service.js +1 -1
  185. package/esm2015/lib/invoice/list-invoice.js +1 -1
  186. package/esm2015/lib/invoice-template/index.js +1 -1
  187. package/esm2015/lib/invoice-template/invoice-template.js +1 -1
  188. package/esm2015/lib/invoice-template/invoice-template.service.js +2 -3
  189. package/esm2015/lib/merchant/balance.js +1 -1
  190. package/esm2015/lib/merchant/index.js +1 -1
  191. package/esm2015/lib/merchant/merchant.interface.js +1 -1
  192. package/esm2015/lib/merchant/merchant.js +1 -1
  193. package/esm2015/lib/merchant/merchant.service.js +1 -1
  194. package/esm2015/lib/merchant/payout-summary.js +1 -1
  195. package/esm2015/lib/merchant/retail-configuration.js +1 -1
  196. package/esm2015/lib/merchant-report/index.js +1 -1
  197. package/esm2015/lib/merchant-report/merchant-report-status.js +1 -1
  198. package/esm2015/lib/merchant-report/merchant-report.interfaces.js +1 -1
  199. package/esm2015/lib/merchant-report/merchant-report.js +1 -1
  200. package/esm2015/lib/merchant-report/merchant-report.service.js +1 -1
  201. package/esm2015/lib/payment/dispute.js +1 -1
  202. package/esm2015/lib/payment/index.js +1 -1
  203. package/esm2015/lib/payment/payment-allocation-type.js +1 -1
  204. package/esm2015/lib/payment/payment-source.js +1 -1
  205. package/esm2015/lib/payment/payment-status.js +1 -1
  206. package/esm2015/lib/payment/payment.js +1 -1
  207. package/esm2015/lib/payment/payment.service.js +1 -1
  208. package/esm2015/lib/payment/retail-payment.js +1 -1
  209. package/esm2015/lib/payment/retail-status.js +1 -1
  210. package/esm2015/lib/payment-card/index.js +1 -1
  211. package/esm2015/lib/payment-card/payment-card.js +1 -1
  212. package/esm2015/lib/payment-card/payment-card.service.js +1 -1
  213. package/esm2015/lib/payment-method/index.js +1 -1
  214. package/esm2015/lib/payment-method/payment-method.service.js +1 -1
  215. package/esm2015/lib/pricing/billing-strategy.js +1 -1
  216. package/esm2015/lib/pricing/commitment.js +1 -1
  217. package/esm2015/lib/pricing/currency.js +1 -1
  218. package/esm2015/lib/pricing/frequency.js +1 -1
  219. package/esm2015/lib/pricing/index.js +1 -1
  220. package/esm2015/lib/pricing/list-pricing-plan-product-filter.js +1 -1
  221. package/esm2015/lib/pricing/pricing-plan-product.js +1 -1
  222. package/esm2015/lib/pricing/pricing-plan.js +1 -1
  223. package/esm2015/lib/pricing/pricing-plan.service.js +1 -1
  224. package/esm2015/lib/pricing/product-pricing-rules.js +1 -1
  225. package/esm2015/lib/pricing/product-pricing-type.js +1 -1
  226. package/esm2015/lib/pricing/product-pricing.js +1 -1
  227. package/esm2015/lib/pricing/wholesale-pricing.service.js +1 -1
  228. package/esm2015/lib/product/index.js +1 -1
  229. package/esm2015/lib/product/list-products.js +1 -1
  230. package/esm2015/lib/product/product.js +1 -1
  231. package/esm2015/lib/product-summary/index.js +1 -1
  232. package/esm2015/lib/product-summary/product-summary.service.js +1 -1
  233. package/esm2015/lib/product-summary/subscription-retention.js +1 -1
  234. package/esm2015/lib/purchase/index.js +1 -1
  235. package/esm2015/lib/purchase/list-purchases.js +1 -1
  236. package/esm2015/lib/purchase/purchase.js +1 -1
  237. package/esm2015/lib/purchase/purchase.service.js +1 -1
  238. package/esm2015/lib/purchase/purchase_status.js +1 -1
  239. package/esm2015/lib/refund/index.js +1 -1
  240. package/esm2015/lib/refund/refund.js +1 -1
  241. package/esm2015/lib/refund/refund.service.js +1 -1
  242. package/esm2015/lib/retail-customer-configuration/index.js +1 -1
  243. package/esm2015/lib/retail-customer-configuration/retail-customer-configuration.js +1 -1
  244. package/esm2015/lib/retail-customer-configuration/retail-customer-configuration.service.js +1 -1
  245. package/esm2015/lib/revenue/index.js +1 -1
  246. package/esm2015/lib/revenue/revenue.interfaces.js +1 -1
  247. package/esm2015/lib/revenue/revenue.service.js +1 -1
  248. package/esm2015/lib/sales-credit-note/index.js +1 -1
  249. package/esm2015/lib/sales-credit-note/sales-credit-note.js +1 -1
  250. package/esm2015/lib/sales-credit-note/sales-credit-note.service.js +1 -1
  251. package/esm2015/lib/sales-invoice/index.js +1 -1
  252. package/esm2015/lib/sales-invoice/sales-invoice.js +1 -1
  253. package/esm2015/lib/sales-invoice/sales-invoice.service.js +1 -1
  254. package/esm2015/lib/sku.js +1 -1
  255. package/esm2015/lib/stripe-file/file.js +1 -1
  256. package/esm2015/lib/stripe-file/index.js +1 -1
  257. package/esm2015/lib/stripe-file/purpose.js +1 -1
  258. package/esm2015/lib/stripe-file/stripe-file.service.js +1 -1
  259. package/esm2015/lib/subscription/can-create-subscriptions-item.js +1 -1
  260. package/esm2015/lib/subscription/index.js +1 -1
  261. package/esm2015/lib/tax-rate/index.js +1 -1
  262. package/esm2015/lib/tax-rate/tax-rate.js +1 -1
  263. package/esm2015/lib/tax-rate/tax-rate.service.js +1 -1
  264. package/esm2015/public_api.js +1 -1
  265. package/esm2015/vendasta-billing.js +1 -1
  266. package/fesm2015/vendasta-billing.js +115 -71
  267. package/fesm2015/vendasta-billing.js.map +1 -1
  268. package/lib/_internal/billing.api.service.d.ts +3 -2
  269. package/lib/_internal/interfaces/billable-item.interface.d.ts +12 -0
  270. package/lib/_internal/interfaces/index.d.ts +1 -1
  271. package/lib/_internal/interfaces/invoice.interface.d.ts +2 -0
  272. package/lib/_internal/interfaces/subscription.interface.d.ts +4 -0
  273. package/lib/_internal/objects/billable-item.d.ts +21 -0
  274. package/lib/_internal/objects/index.d.ts +1 -1
  275. package/lib/_internal/objects/invoice.d.ts +2 -0
  276. package/lib/_internal/objects/subscription.d.ts +4 -0
  277. package/lib/contract/index.d.ts +0 -1
  278. package/lib/invoice/invoice.d.ts +2 -0
  279. package/lib/invoice-template/invoice-template.service.d.ts +1 -1
  280. package/package.json +1 -1
  281. package/esm2015/lib/contract/contract-pricing/billed-product.js +0 -50
  282. package/esm2015/lib/contract/contract-pricing/billing-model.js +0 -10
  283. package/esm2015/lib/contract/contract-pricing/index.js +0 -4
  284. package/esm2015/lib/contract/contract-pricing/product-category.js +0 -9
  285. package/lib/contract/contract-pricing/billed-product.d.ts +0 -46
  286. package/lib/contract/contract-pricing/billing-model.d.ts +0 -8
  287. package/lib/contract/contract-pricing/index.d.ts +0 -3
  288. package/lib/contract/contract-pricing/product-category.d.ts +0 -7
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@vendasta/core'), require('rxjs/operators'), require('rxjs'), require('@vendasta/core/shared')) :
3
- typeof define === 'function' && define.amd ? define('@vendasta/billing', ['exports', '@angular/core', '@angular/common/http', '@vendasta/core', 'rxjs/operators', 'rxjs', '@vendasta/core/shared'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.vendasta = global.vendasta || {}, global.vendasta.billing = {}), global.ng.core, global.ng.common.http, global.i1, global.rxjs.operators, global.rxjs, global.shared));
5
- }(this, (function (exports, i0, i1$1, i1, operators, rxjs, shared) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@vendasta/core'), require('rxjs/operators'), require('rxjs')) :
3
+ typeof define === 'function' && define.amd ? define('@vendasta/billing', ['exports', '@angular/core', '@angular/common/http', '@vendasta/core', 'rxjs/operators', 'rxjs'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.vendasta = global.vendasta || {}, global.vendasta.billing = {}), global.ng.core, global.ng.common.http, global.i1, global.rxjs.operators, global.rxjs));
5
+ }(this, (function (exports, i0, i1$1, i1, operators, rxjs) { 'use strict';
6
6
 
7
7
  function convertApiAppliedBundle(ab) {
8
8
  if (!ab) {
@@ -889,6 +889,54 @@
889
889
  };
890
890
  return GetBillableItemResponse;
891
891
  }());
892
+ var GetMultiSubscriptionsRequest = /** @class */ (function () {
893
+ function GetMultiSubscriptionsRequest(kwargs) {
894
+ if (!kwargs) {
895
+ return;
896
+ }
897
+ Object.assign(this, kwargs);
898
+ }
899
+ GetMultiSubscriptionsRequest.fromProto = function (proto) {
900
+ var m = new GetMultiSubscriptionsRequest();
901
+ m = Object.assign(m, proto);
902
+ if (proto.subscriptionKeys) {
903
+ m.subscriptionKeys = proto.subscriptionKeys.map(GetMultiSubscriptionsRequestKey.fromProto);
904
+ }
905
+ return m;
906
+ };
907
+ GetMultiSubscriptionsRequest.prototype.toApiJson = function () {
908
+ var toReturn = {};
909
+ if (typeof this.subscriptionKeys !== 'undefined' && this.subscriptionKeys !== null) {
910
+ toReturn['subscriptionKeys'] = 'toApiJson' in this.subscriptionKeys ? this.subscriptionKeys.toApiJson() : this.subscriptionKeys;
911
+ }
912
+ return toReturn;
913
+ };
914
+ return GetMultiSubscriptionsRequest;
915
+ }());
916
+ var GetMultiSubscriptionsResponse = /** @class */ (function () {
917
+ function GetMultiSubscriptionsResponse(kwargs) {
918
+ if (!kwargs) {
919
+ return;
920
+ }
921
+ Object.assign(this, kwargs);
922
+ }
923
+ GetMultiSubscriptionsResponse.fromProto = function (proto) {
924
+ var m = new GetMultiSubscriptionsResponse();
925
+ m = Object.assign(m, proto);
926
+ if (proto.subscriptions) {
927
+ m.subscriptions = proto.subscriptions.map(BillableItem.fromProto);
928
+ }
929
+ return m;
930
+ };
931
+ GetMultiSubscriptionsResponse.prototype.toApiJson = function () {
932
+ var toReturn = {};
933
+ if (typeof this.subscriptions !== 'undefined' && this.subscriptions !== null) {
934
+ toReturn['subscriptions'] = 'toApiJson' in this.subscriptions ? this.subscriptions.toApiJson() : this.subscriptions;
935
+ }
936
+ return toReturn;
937
+ };
938
+ return GetMultiSubscriptionsResponse;
939
+ }());
892
940
  var Item = /** @class */ (function () {
893
941
  function Item(kwargs) {
894
942
  if (!kwargs) {
@@ -922,6 +970,36 @@
922
970
  };
923
971
  return Item;
924
972
  }());
973
+ var GetMultiSubscriptionsRequestKey = /** @class */ (function () {
974
+ function GetMultiSubscriptionsRequestKey(kwargs) {
975
+ if (!kwargs) {
976
+ return;
977
+ }
978
+ Object.assign(this, kwargs);
979
+ }
980
+ GetMultiSubscriptionsRequestKey.fromProto = function (proto) {
981
+ var m = new GetMultiSubscriptionsRequestKey();
982
+ m = Object.assign(m, proto);
983
+ return m;
984
+ };
985
+ GetMultiSubscriptionsRequestKey.prototype.toApiJson = function () {
986
+ var toReturn = {};
987
+ if (typeof this.merchantId !== 'undefined') {
988
+ toReturn['merchantId'] = this.merchantId;
989
+ }
990
+ if (typeof this.sku !== 'undefined') {
991
+ toReturn['sku'] = this.sku;
992
+ }
993
+ if (typeof this.customerId !== 'undefined') {
994
+ toReturn['customerId'] = this.customerId;
995
+ }
996
+ if (typeof this.orderId !== 'undefined') {
997
+ toReturn['orderId'] = this.orderId;
998
+ }
999
+ return toReturn;
1000
+ };
1001
+ return GetMultiSubscriptionsRequestKey;
1002
+ }());
925
1003
  var ListBillableItemsRequest = /** @class */ (function () {
926
1004
  function ListBillableItemsRequest(kwargs) {
927
1005
  if (!kwargs) {
@@ -3814,6 +3892,9 @@
3814
3892
  if (typeof this.country !== 'undefined') {
3815
3893
  toReturn['country'] = this.country;
3816
3894
  }
3895
+ if (typeof this.address2 !== 'undefined') {
3896
+ toReturn['address2'] = this.address2;
3897
+ }
3817
3898
  return toReturn;
3818
3899
  };
3819
3900
  return InvoiceCustomerAddress;
@@ -4219,6 +4300,9 @@
4219
4300
  if (typeof this.customerAddress !== 'undefined' && this.customerAddress !== null) {
4220
4301
  toReturn['customerAddress'] = 'toApiJson' in this.customerAddress ? this.customerAddress.toApiJson() : this.customerAddress;
4221
4302
  }
4303
+ if (typeof this.externalCustomerIdentifier !== 'undefined') {
4304
+ toReturn['externalCustomerIdentifier'] = this.externalCustomerIdentifier;
4305
+ }
4222
4306
  return toReturn;
4223
4307
  };
4224
4308
  return Invoice;
@@ -10551,6 +10635,12 @@
10551
10635
  if (proto.frequency) {
10552
10636
  m.frequency = enumStringToValue$w(exports.GeneratedFrequency, proto.frequency);
10553
10637
  }
10638
+ if (proto.retailAmount) {
10639
+ m.retailAmount = parseInt(proto.retailAmount, 10);
10640
+ }
10641
+ if (proto.retailFrequency) {
10642
+ m.retailFrequency = enumStringToValue$w(exports.GeneratedFrequency, proto.retailFrequency);
10643
+ }
10554
10644
  return m;
10555
10645
  };
10556
10646
  CreateSubscriptionRequest.prototype.toApiJson = function () {
@@ -10591,6 +10681,12 @@
10591
10681
  if (typeof this.frequency !== 'undefined') {
10592
10682
  toReturn['frequency'] = this.frequency;
10593
10683
  }
10684
+ if (typeof this.retailAmount !== 'undefined') {
10685
+ toReturn['retailAmount'] = this.retailAmount;
10686
+ }
10687
+ if (typeof this.retailFrequency !== 'undefined') {
10688
+ toReturn['retailFrequency'] = this.retailFrequency;
10689
+ }
10594
10690
  return toReturn;
10595
10691
  };
10596
10692
  return CreateSubscriptionRequest;
@@ -10764,6 +10860,12 @@
10764
10860
  if (proto.frequency) {
10765
10861
  m.frequency = enumStringToValue$w(exports.GeneratedFrequency, proto.frequency);
10766
10862
  }
10863
+ if (proto.retailAmount) {
10864
+ m.retailAmount = parseInt(proto.retailAmount, 10);
10865
+ }
10866
+ if (proto.retailFrequency) {
10867
+ m.retailFrequency = enumStringToValue$w(exports.GeneratedFrequency, proto.retailFrequency);
10868
+ }
10767
10869
  return m;
10768
10870
  };
10769
10871
  Subscription.prototype.toApiJson = function () {
@@ -10804,6 +10906,12 @@
10804
10906
  if (typeof this.frequency !== 'undefined') {
10805
10907
  toReturn['frequency'] = this.frequency;
10806
10908
  }
10909
+ if (typeof this.retailAmount !== 'undefined') {
10910
+ toReturn['retailAmount'] = this.retailAmount;
10911
+ }
10912
+ if (typeof this.retailFrequency !== 'undefined') {
10913
+ toReturn['retailFrequency'] = this.retailFrequency;
10914
+ }
10807
10915
  return toReturn;
10808
10916
  };
10809
10917
  return Subscription;
@@ -13037,6 +13145,11 @@
13037
13145
  return this.http.post(this.hostService.hostWithScheme() + "/billing.v1.Billing/GetBillableItem", request.toApiJson(), this.apiOptions())
13038
13146
  .pipe(operators.map(function (resp) { return GetBillableItemResponse.fromProto(resp); }), operators.share());
13039
13147
  };
13148
+ BillingApiService.prototype.getMultiSubscriptions = function (r) {
13149
+ var request = (r.toApiJson) ? r : new GetMultiSubscriptionsRequest(r);
13150
+ return this.http.post(this.hostService.hostWithScheme() + "/billing.v1.Billing/GetMultiSubscriptions", request.toApiJson(), this.apiOptions())
13151
+ .pipe(operators.map(function (resp) { return GetMultiSubscriptionsResponse.fromProto(resp); }), operators.share());
13152
+ };
13040
13153
  BillingApiService.prototype.listBillableItems = function (r) {
13041
13154
  var request = (r.toApiJson) ? r : new ListBillableItemsRequest(r);
13042
13155
  return this.http.post(this.hostService.hostWithScheme() + "/billing.v1.Billing/ListBillableItems", request.toApiJson(), this.apiOptions())
@@ -15757,70 +15870,6 @@
15757
15870
  { type: ContractApiService }
15758
15871
  ]; };
15759
15872
 
15760
- /**
15761
- * @deprecated: Use ProductPricingType instead
15762
- **/
15763
- (function (BillingModel) {
15764
- BillingModel["Standard"] = "Standard";
15765
- BillingModel["Stairstep"] = "Stairstep";
15766
- BillingModel["Tiered"] = "Tiered";
15767
- })(exports.BillingModel || (exports.BillingModel = {}));
15768
-
15769
- function pricingTypeToBillingModel(pricingType) {
15770
- switch (pricingType) {
15771
- case exports.ProductPricingType.Stairstep:
15772
- return exports.BillingModel.Stairstep;
15773
- case exports.ProductPricingType.Tiered:
15774
- return exports.BillingModel.Tiered;
15775
- case exports.ProductPricingType.Standard:
15776
- return exports.BillingModel.Standard;
15777
- }
15778
- return exports.BillingModel.Standard;
15779
- }
15780
- function pricingRulesToTiers(rules) {
15781
- return rules.map(function (r) {
15782
- return {
15783
- rangeMin: r.minUnits,
15784
- rangeMax: r.maxUnits,
15785
- price: r.price || 0
15786
- };
15787
- });
15788
- }
15789
- function mapFrequency(frequency) {
15790
- switch (frequency) {
15791
- case exports.Frequency.OneTime:
15792
- return shared.MarketplaceBillingFrequency.OneTime;
15793
- case exports.Frequency.Monthly:
15794
- return shared.MarketplaceBillingFrequency.Monthly;
15795
- case exports.Frequency.Yearly:
15796
- return shared.MarketplaceBillingFrequency.Yearly;
15797
- }
15798
- }
15799
- function buildBilledProductFromProductPricingAndAddon(addon, productPricing) {
15800
- return {
15801
- productName: addon.productName,
15802
- productId: addon.addonId,
15803
- billingModel: pricingTypeToBillingModel(productPricing.pricingType),
15804
- price: undefined,
15805
- notes: [],
15806
- iconURL: addon.productIcon,
15807
- currency: productPricing.currency,
15808
- billingFrequency: mapFrequency(productPricing.frequency),
15809
- pricingTiers: pricingRulesToTiers(productPricing.pricingRules),
15810
- productCategory: undefined,
15811
- commitment: productPricing.commitment,
15812
- setupFee: productPricing.setupFee
15813
- };
15814
- }
15815
-
15816
- (function (ProductCategory) {
15817
- ProductCategory["BUNDLE"] = "bundle";
15818
- ProductCategory["VENDASTA"] = "vendasta_product";
15819
- ProductCategory["PRODUCT"] = "product";
15820
- ProductCategory["SUBSCRIPTION"] = "subscription";
15821
- ProductCategory["FEE"] = "fee";
15822
- })(exports.ProductCategory || (exports.ProductCategory = {}));
15823
-
15824
15873
  var setNetD = function (netD) { return ({ netD: netD }); };
15825
15874
  var setCurrencyCode = function (currencyCode) { return ({ currencyCode: currencyCode }); };
15826
15875
  var setStatus = function (status) { return ({ status: status }); };
@@ -16722,6 +16771,7 @@
16722
16771
  function convertApiCustomerAddress(ca) {
16723
16772
  return {
16724
16773
  address: (ca === null || ca === void 0 ? void 0 : ca.address) || '',
16774
+ address2: (ca === null || ca === void 0 ? void 0 : ca.address2) || '',
16725
16775
  city: (ca === null || ca === void 0 ? void 0 : ca.city) || '',
16726
16776
  state: (ca === null || ca === void 0 ? void 0 : ca.state) || '',
16727
16777
  zip: (ca === null || ca === void 0 ? void 0 : ca.zip) || '',
@@ -16796,7 +16846,8 @@
16796
16846
  collectionMethod: collectionMethodFromApi(i.collectionMethod),
16797
16847
  memo: i.memo || '',
16798
16848
  defaultPaymentMethod: i.defaultPaymentMethod || '',
16799
- customerAddress: convertApiCustomerAddress(i.customerAddress)
16849
+ customerAddress: convertApiCustomerAddress(i.customerAddress),
16850
+ externalCustomerIdentifier: i.externalCustomerIdentifier || '',
16800
16851
  };
16801
16852
  }
16802
16853
  function listInvoiceFiltersToApi(filters) {
@@ -17088,7 +17139,7 @@
17088
17139
  function InvoiceTemplateService(invoiceTemplateApiService) {
17089
17140
  this.invoiceTemplateApiService = invoiceTemplateApiService;
17090
17141
  }
17091
- InvoiceTemplateService.prototype.upsert = function (merchantId, customerId, items, defaultTaxRates, currencyCode) {
17142
+ InvoiceTemplateService.prototype.upsert = function (merchantId, customerId, items, defaultTaxRates) {
17092
17143
  var itemsRequest = (items || []).map(function (item) {
17093
17144
  var appliedDiscounts = (item.appliedDiscounts || []).map(function (ad) { return appliedDiscountToApi(ad); });
17094
17145
  return new UpsertInvoiceTemplateRequestInvoiceTemplateItemRequest({
@@ -17106,7 +17157,6 @@
17106
17157
  customerId: customerId,
17107
17158
  items: itemsRequest || [],
17108
17159
  defaultTaxRates: defaultTaxRates,
17109
- currencyCode: currencyCode
17110
17160
  });
17111
17161
  return this.invoiceTemplateApiService.upsert(req).pipe(operators.map(function (resp) { return convertApiInvoiceTemplate(resp === null || resp === void 0 ? void 0 : resp.invoiceTemplate); }));
17112
17162
  };
@@ -19052,7 +19102,6 @@
19052
19102
  exports.appliedTaxRateFromAPI = appliedTaxRateFromAPI;
19053
19103
  exports.billingStrategyFromAPI = billingStrategyFromAPI;
19054
19104
  exports.billingStrategyToAPI = billingStrategyToAPI;
19055
- exports.buildBilledProductFromProductPricingAndAddon = buildBilledProductFromProductPricingAndAddon;
19056
19105
  exports.collectionMethodFromApi = collectionMethodFromApi;
19057
19106
  exports.collectionMethodToApi = collectionMethodToApi;
19058
19107
  exports.contractFromApi = contractFromApi;
@@ -19067,7 +19116,6 @@
19067
19116
  exports.frequencyToApi = frequencyToApi;
19068
19117
  exports.isBillingStrategyInstant = isBillingStrategyInstant;
19069
19118
  exports.listProductsFilterToApi = listProductsFilterToApi;
19070
- exports.mapFrequency = mapFrequency;
19071
19119
  exports.paymentAllocationFromApi = paymentAllocationFromApi;
19072
19120
  exports.paymentAllocationTypeFromApi = paymentAllocationTypeFromApi;
19073
19121
  exports.paymentFromApi = paymentFromApi;
@@ -19077,8 +19125,6 @@
19077
19125
  exports.pricingPlanFromAPI = pricingPlanFromAPI;
19078
19126
  exports.pricingPlanProductFromApi = pricingPlanProductFromApi;
19079
19127
  exports.pricingPlanProductPricingToApi = pricingPlanProductPricingToApi;
19080
- exports.pricingRulesToTiers = pricingRulesToTiers;
19081
- exports.pricingTypeToBillingModel = pricingTypeToBillingModel;
19082
19128
  exports.productFromApi = productFromApi;
19083
19129
  exports.productPricingFromApi = productPricingFromApi;
19084
19130
  exports.productPricingRulesFromApi = productPricingRulesFromApi;