@vendasta/billing 10.9.2 → 10.10.3

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 (29) hide show
  1. package/esm2020/lib/_internal/billing.api.service.mjs +7 -2
  2. package/esm2020/lib/_internal/enums/billable-item.enum.mjs +13 -0
  3. package/esm2020/lib/_internal/enums/index.mjs +3 -2
  4. package/esm2020/lib/_internal/enums/subscription.enum.mjs +6 -1
  5. package/esm2020/lib/_internal/interfaces/billable-item.interface.mjs +1 -1
  6. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  7. package/esm2020/lib/_internal/interfaces/payment.interface.mjs +1 -1
  8. package/esm2020/lib/_internal/interfaces/subscription.interface.mjs +1 -1
  9. package/esm2020/lib/_internal/objects/billable-item.mjs +112 -1
  10. package/esm2020/lib/_internal/objects/index.mjs +2 -2
  11. package/esm2020/lib/_internal/objects/payment.mjs +4 -1
  12. package/esm2020/lib/_internal/objects/subscription.mjs +13 -1
  13. package/fesm2015/vendasta-billing.mjs +150 -1
  14. package/fesm2015/vendasta-billing.mjs.map +1 -1
  15. package/fesm2020/vendasta-billing.mjs +150 -1
  16. package/fesm2020/vendasta-billing.mjs.map +1 -1
  17. package/lib/_internal/billing.api.service.d.ts +3 -2
  18. package/lib/_internal/enums/billable-item.enum.d.ts +5 -0
  19. package/lib/_internal/enums/index.d.ts +2 -1
  20. package/lib/_internal/enums/subscription.enum.d.ts +4 -0
  21. package/lib/_internal/interfaces/billable-item.interface.d.ts +18 -0
  22. package/lib/_internal/interfaces/index.d.ts +1 -1
  23. package/lib/_internal/interfaces/payment.interface.d.ts +1 -0
  24. package/lib/_internal/interfaces/subscription.interface.d.ts +2 -0
  25. package/lib/_internal/objects/billable-item.d.ts +27 -0
  26. package/lib/_internal/objects/index.d.ts +1 -1
  27. package/lib/_internal/objects/payment.d.ts +1 -0
  28. package/lib/_internal/objects/subscription.d.ts +2 -0
  29. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
- import { BillItemRequest, BillMultipleItemsRequest, BillMultipleItemsResponse, CanBillItemRequest, CanCreateSubscriptionsRequest, CanCreateSubscriptionsResponse, ChangeCustomUnitPriceRequest, ChangeFrequencyRequest, ChangeRenewalDateRequest, CreateMeteredComponentRequest, CreatePricingPlanProductRequest, CreatePricingPlanProductResponse, CreatePricingPlanRequest, CreatePricingPlanResponse, CreateSubscriptionRequest, CreateSubscriptionsRequest, CreateSubscriptionsResponse, CreateUsageRequest, DeleteBillableItemRequest, DeletePricingPlanProductRequest, ExpireBillableItemRequest, GenerateBillableItemsCSVRequest, GenerateBillableItemsCSVResponse, GetBillableItemRequest, GetBillableItemResponse, GetMultiContractsRequest, GetMultiContractsResponse, GetMultiPricingPlanProductRequest, GetMultiPricingPlanProductResponse, GetMultiPricingPlanRequest, GetMultiPricingPlanResponse, GetMultiProductPricingRequest, GetMultiProductPricingResponse, GetMultiProductRequest, GetMultiProductResponse, GetMultiSubscriptionsRequest, GetMultiSubscriptionsResponse, GetPricingPlanProductRequest, GetPricingPlanProductResponse, GetProductSummariesTotalRequest, GetProductSummariesTotalResponse, GetPurchaseCostRequest, GetPurchaseCostResponse, ListBillableItemsRequest, ListBillableItemsResponse, ListContractsRequest, ListContractsResponse, ListMerchantBillingReportsRequest, ListMerchantBillingReportsResponse, ListPricingPlanProductsRequest, ListPricingPlanProductsResponse, ListProductSummariesRequest, ListProductSummariesResponse, ListProductsRequest, ListProductsResponse, ResetContractPricingRequest, ReverseSubscriptionRequest, SetRenewalStartRequest, StartRevRecTemplateBackfillRequest, TickComponentUsageRequest, UpdatePricingPlanProductRequest, UpdatePricingPlanProductResponse, UpdatePricingPlanRequest, UpdatePricingPlanResponse } from './objects/';
2
- import { BillItemRequestInterface, BillMultipleItemsRequestInterface, CanBillItemRequestInterface, CanCreateSubscriptionsRequestInterface, ChangeCustomUnitPriceRequestInterface, ChangeFrequencyRequestInterface, ChangeRenewalDateRequestInterface, CreateMeteredComponentRequestInterface, CreatePricingPlanProductRequestInterface, CreatePricingPlanRequestInterface, CreateSubscriptionRequestInterface, CreateSubscriptionsRequestInterface, CreateUsageRequestInterface, DeleteBillableItemRequestInterface, DeletePricingPlanProductRequestInterface, ExpireBillableItemRequestInterface, GenerateBillableItemsCSVRequestInterface, GetBillableItemRequestInterface, GetMultiContractsRequestInterface, GetMultiPricingPlanProductRequestInterface, GetMultiPricingPlanRequestInterface, GetMultiProductPricingRequestInterface, GetMultiProductRequestInterface, GetMultiSubscriptionsRequestInterface, GetPricingPlanProductRequestInterface, GetProductSummariesTotalRequestInterface, GetPurchaseCostRequestInterface, ListBillableItemsRequestInterface, ListContractsRequestInterface, ListMerchantBillingReportsRequestInterface, ListPricingPlanProductsRequestInterface, ListProductSummariesRequestInterface, ListProductsRequestInterface, ResetContractPricingRequestInterface, ReverseSubscriptionRequestInterface, SetRenewalStartRequestInterface, StartRevRecTemplateBackfillRequestInterface, TickComponentUsageRequestInterface, UpdatePricingPlanProductRequestInterface, UpdatePricingPlanRequestInterface } from './interfaces/';
1
+ import { BillItemRequest, BillMultipleItemsRequest, BillMultipleItemsResponse, CanBillItemRequest, CanCreateSubscriptionsRequest, CanCreateSubscriptionsResponse, ChangeCustomUnitPriceRequest, ChangeFrequencyRequest, ChangeRenewalDateRequest, CreateMeteredComponentRequest, CreatePricingPlanProductRequest, CreatePricingPlanProductResponse, CreatePricingPlanRequest, CreatePricingPlanResponse, CreateSubscriptionRequest, CreateSubscriptionsRequest, CreateSubscriptionsResponse, CreateUsageRequest, DeleteBillableItemRequest, DeletePricingPlanProductRequest, ExpireBillableItemRequest, GenerateBillableItemsCSVRequest, GenerateBillableItemsCSVResponse, GetBillableItemRequest, GetBillableItemResponse, GetMultiContractsRequest, GetMultiContractsResponse, GetMultiPricingPlanProductRequest, GetMultiPricingPlanProductResponse, GetMultiPricingPlanRequest, GetMultiPricingPlanResponse, GetMultiProductPricingRequest, GetMultiProductPricingResponse, GetMultiProductRequest, GetMultiProductResponse, GetMultiSubscriptionsRequest, GetMultiSubscriptionsResponse, GetPricingPlanProductRequest, GetPricingPlanProductResponse, GetProductSummariesTotalRequest, GetProductSummariesTotalResponse, GetPurchaseCostRequest, GetPurchaseCostResponse, ListBillableItemsRequest, ListBillableItemsResponse, ListContractsRequest, ListContractsResponse, ListMerchantBillingReportsRequest, ListMerchantBillingReportsResponse, ListPricingPlanProductsRequest, ListPricingPlanProductsResponse, ListProductSummariesRequest, ListProductSummariesResponse, ListProductsRequest, ListProductsResponse, ListSubscriptionsRequest, ListSubscriptionsResponse, ResetContractPricingRequest, ReverseSubscriptionRequest, SetRenewalStartRequest, StartRevRecTemplateBackfillRequest, TickComponentUsageRequest, UpdatePricingPlanProductRequest, UpdatePricingPlanProductResponse, UpdatePricingPlanRequest, UpdatePricingPlanResponse } from './objects/';
2
+ import { BillItemRequestInterface, BillMultipleItemsRequestInterface, CanBillItemRequestInterface, CanCreateSubscriptionsRequestInterface, ChangeCustomUnitPriceRequestInterface, ChangeFrequencyRequestInterface, ChangeRenewalDateRequestInterface, CreateMeteredComponentRequestInterface, CreatePricingPlanProductRequestInterface, CreatePricingPlanRequestInterface, CreateSubscriptionRequestInterface, CreateSubscriptionsRequestInterface, CreateUsageRequestInterface, DeleteBillableItemRequestInterface, DeletePricingPlanProductRequestInterface, ExpireBillableItemRequestInterface, GenerateBillableItemsCSVRequestInterface, GetBillableItemRequestInterface, GetMultiContractsRequestInterface, GetMultiPricingPlanProductRequestInterface, GetMultiPricingPlanRequestInterface, GetMultiProductPricingRequestInterface, GetMultiProductRequestInterface, GetMultiSubscriptionsRequestInterface, GetPricingPlanProductRequestInterface, GetProductSummariesTotalRequestInterface, GetPurchaseCostRequestInterface, ListBillableItemsRequestInterface, ListContractsRequestInterface, ListMerchantBillingReportsRequestInterface, ListPricingPlanProductsRequestInterface, ListProductSummariesRequestInterface, ListProductsRequestInterface, ListSubscriptionsRequestInterface, ResetContractPricingRequestInterface, ReverseSubscriptionRequestInterface, SetRenewalStartRequestInterface, StartRevRecTemplateBackfillRequestInterface, TickComponentUsageRequestInterface, UpdatePricingPlanProductRequestInterface, UpdatePricingPlanRequestInterface } from './interfaces/';
3
3
  import { HttpClient, HttpResponse } from '@angular/common/http';
4
4
  import { HostService } from '../_generated/host.service';
5
5
  import { Observable } from 'rxjs';
@@ -20,6 +20,7 @@ export declare class BillingApiService {
20
20
  billMultipleItems(r: BillMultipleItemsRequest | BillMultipleItemsRequestInterface): Observable<BillMultipleItemsResponse>;
21
21
  getBillableItem(r: GetBillableItemRequest | GetBillableItemRequestInterface): Observable<GetBillableItemResponse>;
22
22
  getMultiSubscriptions(r: GetMultiSubscriptionsRequest | GetMultiSubscriptionsRequestInterface): Observable<GetMultiSubscriptionsResponse>;
23
+ listSubscriptions(r: ListSubscriptionsRequest | ListSubscriptionsRequestInterface): Observable<ListSubscriptionsResponse>;
23
24
  listBillableItems(r: ListBillableItemsRequest | ListBillableItemsRequestInterface): Observable<ListBillableItemsResponse>;
24
25
  expireBillableItem(r: ExpireBillableItemRequest | ExpireBillableItemRequestInterface): Observable<HttpResponse<null>>;
25
26
  deleteBillableItem(r: DeleteBillableItemRequest | DeleteBillableItemRequestInterface): Observable<HttpResponse<null>>;
@@ -0,0 +1,5 @@
1
+ export declare enum SubscriptionStatus {
2
+ SUBSCRIPTION_STATUS_UNSET = 0,
3
+ SUBSCRIPTION_STATUS_ACTIVE = 1,
4
+ SUBSCRIPTION_STATUS_EXPIRED = 2
5
+ }
@@ -1,4 +1,5 @@
1
1
  export { Frequency, } from './frequency.enum';
2
+ export { SubscriptionStatus, } from './billable-item.enum';
2
3
  export { DiscountType, } from './applied-discount.enum';
3
4
  export { Currency, } from './currency.enum';
4
5
  export { ContractSubscriptionStatus, } from './contract.enum';
@@ -20,7 +21,7 @@ export { ReferenceType, RefundReason, RefundStatus, } from './refund.enum';
20
21
  export { SalesCreditNoteStatus, } from './sales-credit-note.enum';
21
22
  export { PaymentStatuses, SalesInvoiceStatus, SalesInvoiceType, } from './sales-invoice.enum';
22
23
  export { SubscribeValidationStatus, } from './subscribe-validation.enum';
23
- export { RenewalState, } from './subscription.enum';
24
+ export { Consumer, RenewalState, } from './subscription.enum';
24
25
  export { PaymentProcessor, } from './payment-processor.enum';
25
26
  export { CollectionMethod, Interval, RecurringInvoiceStatus, } from './recurring-invoice.enum';
26
27
  export { MerchantServicesReportRunStatus, MerchantServicesReportRunType, } from './report-run.enum';
@@ -1,3 +1,7 @@
1
+ export declare enum Consumer {
2
+ CONSUMER_WHOLESALE = 0,
3
+ CONSUMER_RETAIL = 1
4
+ }
1
5
  export declare enum RenewalState {
2
6
  RENEWAL_STATE_IMMEDIATE = 0,
3
7
  RENEWAL_STATE_DELAYED = 1
@@ -33,6 +33,7 @@ export interface BillableItemInterface {
33
33
  retailFrequency?: e.Frequency;
34
34
  nextRetailRenewal?: Date;
35
35
  retailUnitPrice?: number;
36
+ status?: e.SubscriptionStatus;
36
37
  }
37
38
  export interface CanBillItemRequestInterface {
38
39
  merchantId?: string;
@@ -66,6 +67,15 @@ export interface ExpireBillableItemRequestInterface {
66
67
  orderId?: string;
67
68
  expiry?: Date;
68
69
  }
70
+ export interface ListSubscriptionsRequestFiltersInterface {
71
+ skus?: string[];
72
+ merchantId?: string;
73
+ customerId?: string;
74
+ searchTerm?: string;
75
+ status?: e.SubscriptionStatus;
76
+ expiredDateGte?: Date;
77
+ expiredDateLte?: Date;
78
+ }
69
79
  export interface ListBillableItemsRequestFiltersInterface {
70
80
  skus?: string[];
71
81
  merchantId?: string;
@@ -107,3 +117,11 @@ export interface ListBillableItemsResponseInterface {
107
117
  items?: BillableItemInterface[];
108
118
  pagingMetadata?: PagedResponseMetadataInterface;
109
119
  }
120
+ export interface ListSubscriptionsRequestInterface {
121
+ filters?: ListSubscriptionsRequestFiltersInterface;
122
+ pagingOptions?: PagedRequestOptionsInterface;
123
+ }
124
+ export interface ListSubscriptionsResponseInterface {
125
+ subscriptions?: BillableItemInterface[];
126
+ pagingMetadata?: PagedResponseMetadataInterface;
127
+ }
@@ -1,5 +1,5 @@
1
1
  export { PagedRequestOptionsInterface, PagedResponseMetadataInterface, } from './common.interface';
2
- export { BillItemRequestInterface, BillMultipleItemsRequestInterface, BillMultipleItemsResponseInterface, BillableItemInterface, CanBillItemRequestInterface, CreateUsageRequestInterface, BillableItemCustomerAddressInterface, DeleteBillableItemRequestInterface, ExpireBillableItemRequestInterface, ListBillableItemsRequestFiltersInterface, GetBillableItemRequestInterface, GetBillableItemResponseInterface, GetMultiSubscriptionsRequestInterface, GetMultiSubscriptionsResponseInterface, ItemInterface, GetMultiSubscriptionsRequestKeyInterface, ListBillableItemsRequestInterface, ListBillableItemsResponseInterface, } from './billable-item.interface';
2
+ export { BillItemRequestInterface, BillMultipleItemsRequestInterface, BillMultipleItemsResponseInterface, BillableItemInterface, CanBillItemRequestInterface, CreateUsageRequestInterface, BillableItemCustomerAddressInterface, DeleteBillableItemRequestInterface, ExpireBillableItemRequestInterface, ListSubscriptionsRequestFiltersInterface, ListBillableItemsRequestFiltersInterface, GetBillableItemRequestInterface, GetBillableItemResponseInterface, GetMultiSubscriptionsRequestInterface, GetMultiSubscriptionsResponseInterface, ItemInterface, GetMultiSubscriptionsRequestKeyInterface, ListBillableItemsRequestInterface, ListBillableItemsResponseInterface, ListSubscriptionsRequestInterface, ListSubscriptionsResponseInterface, } from './billable-item.interface';
3
3
  export { AppliedDiscountInterface, } from './applied-discount.interface';
4
4
  export { BundleInterface, BundleItemInterface, BundlePricingInterface, GetMultiBundleResponseBundlesEntryInterface, ListBundlesRequestFiltersInterface, GetMultiBundleRequestInterface, GetMultiBundleResponseInterface, ListBundlesRequestInterface, ListBundlesResponseInterface, BundleItemPriceInterface, BundlePricingPriceAndFrequencyInterface, UpsertBundleRequestInterface, } from './bundle.interface';
5
5
  export { CommitmentInterface, } from './commitment.interface';
@@ -151,6 +151,7 @@ export interface ListRetailTransactionsRequestListRetailTransactionsFiltersInter
151
151
  createdDateGte?: Date;
152
152
  createdDateLte?: Date;
153
153
  type?: e.RetailTransactionType;
154
+ customerId?: string;
154
155
  }
155
156
  export interface ListRetailTransactionsRequestInterface {
156
157
  merchantId?: string;
@@ -51,6 +51,7 @@ export interface CreateSubscriptionRequestInterface {
51
51
  frequency?: e.Frequency;
52
52
  retailAmount?: number;
53
53
  retailFrequency?: e.Frequency;
54
+ consumer?: e.Consumer;
54
55
  }
55
56
  export interface CreateSubscriptionsRequestInterface {
56
57
  merchantId?: string;
@@ -91,6 +92,7 @@ export interface SubscriptionInterface {
91
92
  frequency?: e.Frequency;
92
93
  retailAmount?: number;
93
94
  retailFrequency?: e.Frequency;
95
+ consumer?: e.Consumer;
94
96
  }
95
97
  export interface CanCreateSubscriptionsRequestSubscriptionItemInterface {
96
98
  sku?: string;
@@ -44,6 +44,7 @@ export declare class BillableItem implements i.BillableItemInterface {
44
44
  retailFrequency: e.Frequency;
45
45
  nextRetailRenewal: Date;
46
46
  retailUnitPrice: number;
47
+ status: e.SubscriptionStatus;
47
48
  static fromProto(proto: any): BillableItem;
48
49
  constructor(kwargs?: i.BillableItemInterface);
49
50
  toApiJson(): object;
@@ -95,6 +96,18 @@ export declare class ExpireBillableItemRequest implements i.ExpireBillableItemRe
95
96
  constructor(kwargs?: i.ExpireBillableItemRequestInterface);
96
97
  toApiJson(): object;
97
98
  }
99
+ export declare class ListSubscriptionsRequestFilters implements i.ListSubscriptionsRequestFiltersInterface {
100
+ skus: string[];
101
+ merchantId: string;
102
+ customerId: string;
103
+ searchTerm: string;
104
+ status: e.SubscriptionStatus;
105
+ expiredDateGte: Date;
106
+ expiredDateLte: Date;
107
+ static fromProto(proto: any): ListSubscriptionsRequestFilters;
108
+ constructor(kwargs?: i.ListSubscriptionsRequestFiltersInterface);
109
+ toApiJson(): object;
110
+ }
98
111
  export declare class ListBillableItemsRequestFilters implements i.ListBillableItemsRequestFiltersInterface {
99
112
  skus: string[];
100
113
  merchantId: string;
@@ -163,3 +176,17 @@ export declare class ListBillableItemsResponse implements i.ListBillableItemsRes
163
176
  constructor(kwargs?: i.ListBillableItemsResponseInterface);
164
177
  toApiJson(): object;
165
178
  }
179
+ export declare class ListSubscriptionsRequest implements i.ListSubscriptionsRequestInterface {
180
+ filters: ListSubscriptionsRequestFilters;
181
+ pagingOptions: PagedRequestOptions;
182
+ static fromProto(proto: any): ListSubscriptionsRequest;
183
+ constructor(kwargs?: i.ListSubscriptionsRequestInterface);
184
+ toApiJson(): object;
185
+ }
186
+ export declare class ListSubscriptionsResponse implements i.ListSubscriptionsResponseInterface {
187
+ subscriptions: BillableItem[];
188
+ pagingMetadata: PagedResponseMetadata;
189
+ static fromProto(proto: any): ListSubscriptionsResponse;
190
+ constructor(kwargs?: i.ListSubscriptionsResponseInterface);
191
+ toApiJson(): object;
192
+ }
@@ -1,5 +1,5 @@
1
1
  export { PagedRequestOptions, PagedResponseMetadata, } from './common';
2
- export { BillItemRequest, BillMultipleItemsRequest, BillMultipleItemsResponse, BillableItem, CanBillItemRequest, CreateUsageRequest, BillableItemCustomerAddress, DeleteBillableItemRequest, ExpireBillableItemRequest, ListBillableItemsRequestFilters, GetBillableItemRequest, GetBillableItemResponse, GetMultiSubscriptionsRequest, GetMultiSubscriptionsResponse, Item, GetMultiSubscriptionsRequestKey, ListBillableItemsRequest, ListBillableItemsResponse, } from './billable-item';
2
+ export { BillItemRequest, BillMultipleItemsRequest, BillMultipleItemsResponse, BillableItem, CanBillItemRequest, CreateUsageRequest, BillableItemCustomerAddress, DeleteBillableItemRequest, ExpireBillableItemRequest, ListSubscriptionsRequestFilters, ListBillableItemsRequestFilters, GetBillableItemRequest, GetBillableItemResponse, GetMultiSubscriptionsRequest, GetMultiSubscriptionsResponse, Item, GetMultiSubscriptionsRequestKey, ListBillableItemsRequest, ListBillableItemsResponse, ListSubscriptionsRequest, ListSubscriptionsResponse, } from './billable-item';
3
3
  export { AppliedDiscount, } from './applied-discount';
4
4
  export { Bundle, BundleItem, BundlePricing, GetMultiBundleResponseBundlesEntry, ListBundlesRequestFilters, GetMultiBundleRequest, GetMultiBundleResponse, ListBundlesRequest, ListBundlesResponse, BundleItemPrice, BundlePricingPriceAndFrequency, UpsertBundleRequest, } from './bundle';
5
5
  export { Commitment, } from './commitment';
@@ -234,6 +234,7 @@ export declare class ListRetailTransactionsRequestListRetailTransactionsFilters
234
234
  createdDateGte: Date;
235
235
  createdDateLte: Date;
236
236
  type: e.RetailTransactionType;
237
+ customerId: string;
237
238
  static fromProto(proto: any): ListRetailTransactionsRequestListRetailTransactionsFilters;
238
239
  constructor(kwargs?: i.ListRetailTransactionsRequestListRetailTransactionsFiltersInterface);
239
240
  toApiJson(): object;
@@ -71,6 +71,7 @@ export declare class CreateSubscriptionRequest implements i.CreateSubscriptionRe
71
71
  frequency: e.Frequency;
72
72
  retailAmount: number;
73
73
  retailFrequency: e.Frequency;
74
+ consumer: e.Consumer;
74
75
  static fromProto(proto: any): CreateSubscriptionRequest;
75
76
  constructor(kwargs?: i.CreateSubscriptionRequestInterface);
76
77
  toApiJson(): object;
@@ -129,6 +130,7 @@ export declare class Subscription implements i.SubscriptionInterface {
129
130
  frequency: e.Frequency;
130
131
  retailAmount: number;
131
132
  retailFrequency: e.Frequency;
133
+ consumer: e.Consumer;
132
134
  static fromProto(proto: any): Subscription;
133
135
  constructor(kwargs?: i.SubscriptionInterface);
134
136
  toApiJson(): object;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@vendasta/billing",
3
- "version": "10.9.2",
3
+ "version": "10.10.3",
4
4
  "peerDependencies": {
5
- "@angular/common": "^14.0.1",
6
- "@angular/core": "^14.0.1"
5
+ "@angular/common": "^13.0.0",
6
+ "@angular/core": "^13.0.0"
7
7
  },
8
8
  "author": "Vendasta R&D",
9
9
  "description": "SDK to interact with the billing service",