@elasticpath/js-sdk 3.0.1 → 5.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.
package/dist/index.cjs.js CHANGED
@@ -530,7 +530,7 @@ if (!globalThis.fetch) {
530
530
  globalThis.Response = fetch$1.Response;
531
531
  }
532
532
 
533
- var version = "3.0.1";
533
+ var version = "5.0.0";
534
534
 
535
535
  var LocalStorageFactory = /*#__PURE__*/function () {
536
536
  function LocalStorageFactory() {
@@ -4434,6 +4434,128 @@ var SubscriptionProrationPoliciesEndpoint = /*#__PURE__*/function (_CRUDExtend)
4434
4434
  return SubscriptionProrationPoliciesEndpoint;
4435
4435
  }(CRUDExtend);
4436
4436
 
4437
+ var SubscriptionInvoicesEndpoint = /*#__PURE__*/function () {
4438
+ function SubscriptionInvoicesEndpoint(endpoint) {
4439
+ _classCallCheck(this, SubscriptionInvoicesEndpoint);
4440
+ var config = _objectSpread2({}, endpoint);
4441
+ this.request = new RequestFactory(config);
4442
+ this.endpoint = 'subscriptions/invoices';
4443
+ }
4444
+ _createClass(SubscriptionInvoicesEndpoint, [{
4445
+ key: "All",
4446
+ value: function All() {
4447
+ var filter = this.filter,
4448
+ limit = this.limit,
4449
+ offset = this.offset;
4450
+ return this.request.send(buildURL(this.endpoint, {
4451
+ filter: filter,
4452
+ limit: limit,
4453
+ offset: offset
4454
+ }), 'GET');
4455
+ }
4456
+ }, {
4457
+ key: "Get",
4458
+ value: function Get(id) {
4459
+ return this.request.send("".concat(this.endpoint, "/").concat(id), 'GET');
4460
+ }
4461
+ }, {
4462
+ key: "GetPayments",
4463
+ value: function GetPayments(invoiceId) {
4464
+ return this.request.send("".concat(this.endpoint, "/").concat(invoiceId, "/payments"), 'GET');
4465
+ }
4466
+ }, {
4467
+ key: "GetPayment",
4468
+ value: function GetPayment(invoiceId, paymentId) {
4469
+ return this.request.send("".concat(this.endpoint, "/").concat(invoiceId, "/payments/").concat(paymentId), 'GET');
4470
+ }
4471
+ }, {
4472
+ key: "Filter",
4473
+ value: function Filter(filter) {
4474
+ this.filter = filter;
4475
+ return this;
4476
+ }
4477
+ }, {
4478
+ key: "Limit",
4479
+ value: function Limit(value) {
4480
+ this.limit = value;
4481
+ return this;
4482
+ }
4483
+ }, {
4484
+ key: "Offset",
4485
+ value: function Offset(value) {
4486
+ this.offset = value;
4487
+ return this;
4488
+ }
4489
+ }]);
4490
+ return SubscriptionInvoicesEndpoint;
4491
+ }();
4492
+
4493
+ var CustomRelationshipsEndpoint = /*#__PURE__*/function () {
4494
+ function CustomRelationshipsEndpoint(endpoint) {
4495
+ _classCallCheck(this, CustomRelationshipsEndpoint);
4496
+ var config = _objectSpread2({}, endpoint);
4497
+ config.version = 'pcm';
4498
+ this.request = new RequestFactory(config);
4499
+ this.endpoint = 'custom_relationships';
4500
+ }
4501
+ _createClass(CustomRelationshipsEndpoint, [{
4502
+ key: "All",
4503
+ value: function All() {
4504
+ var filter = this.filter,
4505
+ limit = this.limit,
4506
+ offset = this.offset;
4507
+ return this.request.send(buildURL(this.endpoint, {
4508
+ filter: filter,
4509
+ limit: limit,
4510
+ offset: offset
4511
+ }), 'GET');
4512
+ }
4513
+ }, {
4514
+ key: "Get",
4515
+ value: function Get(slug) {
4516
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'GET');
4517
+ }
4518
+ }, {
4519
+ key: "Create",
4520
+ value: function Create(body) {
4521
+ return this.request.send(this.endpoint, 'POST', _objectSpread2(_objectSpread2({}, body), {}, {
4522
+ type: 'custom-relationship'
4523
+ }));
4524
+ }
4525
+ }, {
4526
+ key: "Update",
4527
+ value: function Update(slug, body) {
4528
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'PUT', _objectSpread2(_objectSpread2({}, body), {}, {
4529
+ type: 'custom-relationship'
4530
+ }));
4531
+ }
4532
+ }, {
4533
+ key: "Delete",
4534
+ value: function Delete(slug) {
4535
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'DELETE');
4536
+ }
4537
+ }, {
4538
+ key: "Filter",
4539
+ value: function Filter(filter) {
4540
+ this.filter = filter;
4541
+ return this;
4542
+ }
4543
+ }, {
4544
+ key: "Limit",
4545
+ value: function Limit(value) {
4546
+ this.limit = value;
4547
+ return this;
4548
+ }
4549
+ }, {
4550
+ key: "Offset",
4551
+ value: function Offset(value) {
4552
+ this.offset = value;
4553
+ return this;
4554
+ }
4555
+ }]);
4556
+ return CustomRelationshipsEndpoint;
4557
+ }();
4558
+
4437
4559
  var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
4438
4560
  _inherits(Nodes, _CRUDExtend);
4439
4561
  var _super = _createSuper(Nodes);
@@ -5323,6 +5445,8 @@ var ElasticPath = /*#__PURE__*/function () {
5323
5445
  this.CustomApis = new CustomApisEndpoint(config);
5324
5446
  this.SubscriptionDunningRules = new SubscriptionDunningRulesEndpoint(config);
5325
5447
  this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
5448
+ this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
5449
+ this.CustomRelationships = new CustomRelationshipsEndpoint(config);
5326
5450
  }
5327
5451
 
5328
5452
  // Expose `Cart` class on ElasticPath class
package/dist/index.d.ts CHANGED
@@ -7411,6 +7411,177 @@ interface OneTimePasswordTokenRequestEndpoint {
7411
7411
 
7412
7412
  }
7413
7413
 
7414
+ /**
7415
+ * Subscription Invoices
7416
+ * Description: Invoices represent the amount a customer owes for a subscription.
7417
+ * Elastic Path Subscriptions generates an invoice for every period in a subscription billing cycle.
7418
+ * DOCS: https://elasticpath.dev/docs/api/subscriptions/invoices
7419
+ */
7420
+
7421
+
7422
+ interface SubscriptionInvoiceItemPrice extends Omit<Price, 'includes_tax'> {
7423
+ includes_tax?: boolean
7424
+ }
7425
+
7426
+ interface SubscriptionInvoiceItem {
7427
+ description: string
7428
+ price: SubscriptionInvoiceItemPrice
7429
+ product_id?: string
7430
+ from_time_period?: string
7431
+ until_time_period?: string
7432
+ }
7433
+
7434
+ /**
7435
+ * Core Subscription Invoice Base Interface
7436
+ * For custom flows, extend this interface
7437
+ * DOCS: https://elasticpath.dev/docs/api/subscriptions/get-invoice#responses
7438
+ */
7439
+
7440
+ interface SubscriptionInvoiceBase {
7441
+ type: 'subscription_invoice'
7442
+ attributes: {
7443
+ billing_period: {
7444
+ start: string
7445
+ end: string
7446
+ }
7447
+ invoice_items: SubscriptionInvoiceItem[]
7448
+ tax_items?: ItemTaxObject[]
7449
+ outstanding: boolean
7450
+ number?: number
7451
+ tax_required: boolean
7452
+ payment_retries_limit_reached: boolean
7453
+ updated_at?: string
7454
+ created_at?: string
7455
+ }
7456
+ }
7457
+
7458
+ interface ProrationEvent {
7459
+ proration_policy_id: string
7460
+ billing_cost_before_proration: number
7461
+ refunded_amount_for_unused_plan: number
7462
+ new_plan_cost: number
7463
+ prorated_at: string
7464
+ }
7465
+
7466
+ interface SubscriptionInvoice
7467
+ extends Identifiable,
7468
+ SubscriptionInvoiceBase {
7469
+ meta: {
7470
+ owner: 'store' | 'organization'
7471
+ subscription_id?: string
7472
+ subscriber_id?: string
7473
+ price?: SubscriptionInvoiceItemPrice
7474
+ timestamps: {
7475
+ updated_at: string
7476
+ created_at: string
7477
+ taxes_added_at?: string
7478
+ }
7479
+ prorated_at: ProrationEvent[]
7480
+ }
7481
+ }
7482
+
7483
+ /**
7484
+ * Core Subscription Invoice Payments Base Interface
7485
+ * DOCS: https://elasticpath.dev/docs/api/subscriptions/get-invoice-payment#responses
7486
+ */
7487
+
7488
+ interface SubscriptionInvoicePaymentBase {
7489
+ type: 'subscription_invoice_payment'
7490
+ attributes: {
7491
+ success: boolean
7492
+ gateway: string
7493
+ external_payment_id?: string
7494
+ failure_detail?: {
7495
+ reason?: string
7496
+ }
7497
+ amount: SubscriptionInvoiceItemPrice
7498
+ }
7499
+ }
7500
+
7501
+ interface SubscriptionInvoicePayment
7502
+ extends Identifiable,
7503
+ SubscriptionInvoicePaymentBase {
7504
+ meta: {
7505
+ owner: 'store' | 'organization'
7506
+ subscription_id: string
7507
+ invoice_id: string
7508
+ job_id: string
7509
+ timestamps: {
7510
+ updated_at: string
7511
+ created_at: string
7512
+ payment_taken_at?: string
7513
+ }
7514
+ }
7515
+ }
7516
+
7517
+ /**
7518
+ * Subscription Invoice Filtering
7519
+ * DOCS: https://elasticpath.dev/docs/api/subscriptions/list-invoices#filtering
7520
+ */
7521
+ interface SubscriptionInvoiceFilter {
7522
+ eq?: {
7523
+ subscriber_id?: string
7524
+ subscription_id?: string
7525
+ outstanding?: string
7526
+ tax_required?: string
7527
+ }
7528
+ }
7529
+
7530
+ /**
7531
+ * Subscription Invoice Endpoints
7532
+ * DOCS: https://elasticpath.dev/docs/api/subscriptions/list-invoices
7533
+ */
7534
+ interface SubscriptionInvoicesEndpoint {
7535
+ endpoint: 'invoices'
7536
+
7537
+ /**
7538
+ * List Invoices
7539
+ * DOCS: https://elasticpath.dev/docs/api/subscriptions/list-invoices
7540
+ * @constructor
7541
+ */
7542
+ All(): Promise<ResourcePage<SubscriptionInvoice>>
7543
+
7544
+ /**
7545
+ * Get Invoice
7546
+ * DOCS: https://elasticpath.dev/docs/api/subscriptions/get-invoice
7547
+ * @param id - The ID of the invoice.
7548
+ * @constructor
7549
+ */
7550
+ Get(id: string): Promise<Resource<SubscriptionInvoice>>
7551
+
7552
+ /**
7553
+ * List Invoice Payments
7554
+ * DOCS: https://elasticpath.dev/docs/api/subscriptions/list-invoice-payments
7555
+ * @param invoiceId - The ID of the invoice to get the payments for.
7556
+ * @constructor
7557
+ */
7558
+ GetPayments(
7559
+ invoiceId: string
7560
+ ): Promise<ResourceList<SubscriptionInvoicePayment>>
7561
+
7562
+ /**
7563
+ * Get Invoice Payment
7564
+ * DOCS: https://elasticpath.dev/docs/api/subscriptions/get-invoice-payment
7565
+ * @param invoiceId - The ID of the invoice to get the payment for.
7566
+ * @param paymentId - The ID of the payment.
7567
+ * @constructor
7568
+ */
7569
+ GetPayment(
7570
+ invoiceId: string,
7571
+ paymentId: string
7572
+ ): Promise<Resource<SubscriptionInvoicePayment>>
7573
+
7574
+ /**
7575
+ * Subscription Invoice Filtering
7576
+ * DOCS: https://elasticpath.dev/docs/api/subscriptions/list-invoices#filtering
7577
+ */
7578
+ Filter(filter: SubscriptionInvoiceFilter): SubscriptionInvoicesEndpoint
7579
+
7580
+ Limit(value: number): SubscriptionInvoicesEndpoint
7581
+
7582
+ Offset(value: number): SubscriptionInvoicesEndpoint
7583
+ }
7584
+
7414
7585
  /**
7415
7586
  * Subscriptions
7416
7587
  * Description: Subscriptions.
@@ -7424,13 +7595,13 @@ interface OneTimePasswordTokenRequestEndpoint {
7424
7595
  * DOCS: TODO: add docs when ready
7425
7596
  */
7426
7597
  interface SubscriptionBase {
7427
- type: "subscription"
7598
+ type: 'subscription'
7428
7599
  attributes: {
7429
7600
  external_ref?: string
7430
7601
  account_id: string
7431
7602
  offering: {
7432
7603
  id: string
7433
- type: "subscription_offering"
7604
+ type: 'subscription_offering'
7434
7605
  attributes: {
7435
7606
  external_ref?: string
7436
7607
  name: string
@@ -7451,10 +7622,10 @@ interface SubscriptionBase {
7451
7622
  }
7452
7623
 
7453
7624
  interface SubscriptionCreate {
7454
- account_id: string,
7455
- offering_id: string,
7456
- plan_id: string,
7457
- currency: string,
7625
+ account_id: string
7626
+ offering_id: string
7627
+ plan_id: string
7628
+ currency: string
7458
7629
  meta?: {
7459
7630
  owner?: string
7460
7631
  }
@@ -7467,43 +7638,12 @@ interface SubscriptionUpdate extends Identifiable {
7467
7638
  }
7468
7639
  }
7469
7640
 
7470
- interface SubscriptionInvoice extends Identifiable {
7471
- type: "subscription-invoice",
7472
- attributes: {
7473
- billing_period: {
7474
- start: string,
7475
- end: string
7476
- },
7477
- invoice_items: {
7478
- description: string,
7479
- price: {
7480
- currency: string,
7481
- amount: number,
7482
- includes_tax: boolean
7483
- }
7484
- }[],
7485
- outstanding: boolean,
7486
- updated_at: string,
7487
- created_at: string
7488
- },
7489
- meta: {
7490
- owner: string,
7491
- subscription_id: string,
7492
- price: {
7493
- currency: string,
7494
- amount: number,
7495
- includes_tax: boolean
7496
- }
7497
- }
7498
- }
7499
-
7500
7641
  interface SubscriptionFilter {
7501
7642
  eq?: {
7502
7643
  account_id?: string
7503
7644
  }
7504
7645
  }
7505
7646
 
7506
-
7507
7647
  interface Subscription extends Identifiable, SubscriptionBase {
7508
7648
  relationships: {
7509
7649
  subscriber: {
@@ -7529,7 +7669,7 @@ interface Subscription extends Identifiable, SubscriptionBase {
7529
7669
 
7530
7670
  type SubscriptionsInclude = 'plans'
7531
7671
 
7532
- type SubscriptionsStateAction = 'cancel'| 'pause'| 'resume'
7672
+ type SubscriptionsStateAction = 'cancel' | 'pause' | 'resume'
7533
7673
 
7534
7674
  interface SubscriptionsIncluded {
7535
7675
  plans: SubscriptionOfferingPlan[]
@@ -7540,25 +7680,32 @@ interface SubscriptionsIncluded {
7540
7680
  * DOCS: TODO: add docs when ready
7541
7681
  */
7542
7682
  interface SubscriptionsEndpoint
7543
- extends Omit<CrudQueryableResource<
7544
- Subscription,
7545
- SubscriptionCreate,
7546
- SubscriptionUpdate,
7547
- SubscriptionFilter,
7548
- never,
7549
- SubscriptionsInclude
7550
- >, "All" | "Attributes" | "Link" > {
7683
+ extends Omit<
7684
+ CrudQueryableResource<
7685
+ Subscription,
7686
+ SubscriptionCreate,
7687
+ SubscriptionUpdate,
7688
+ SubscriptionFilter,
7689
+ never,
7690
+ SubscriptionsInclude
7691
+ >,
7692
+ 'All' | 'Attributes' | 'Link'
7693
+ > {
7551
7694
  endpoint: 'subscriptions'
7552
7695
 
7553
- All(token?: string): Promise<ResourcePage<Subscription, SubscriptionsIncluded>>
7696
+ All(
7697
+ token?: string
7698
+ ): Promise<ResourcePage<Subscription, SubscriptionsIncluded>>
7554
7699
 
7555
7700
  GetInvoices(id: string): Promise<Resource<SubscriptionInvoice[]>>
7556
7701
 
7557
- GetAttachedProducts(id: string) : Promise<Resource<SubscriptionOfferingProduct[]>>
7702
+ GetAttachedProducts(
7703
+ id: string
7704
+ ): Promise<Resource<SubscriptionOfferingProduct[]>>
7558
7705
 
7559
- GetAttachedPlans(id: string) : Promise<Resource<SubscriptionOfferingPlan[]>>
7706
+ GetAttachedPlans(id: string): Promise<Resource<SubscriptionOfferingPlan[]>>
7560
7707
 
7561
- CreateState(id: string, action: SubscriptionsStateAction) : Promise<void>
7708
+ CreateState(id: string, action: SubscriptionsStateAction): Promise<void>
7562
7709
  }
7563
7710
 
7564
7711
  /**
@@ -8077,6 +8224,107 @@ interface SubscriptionProrationPoliciesEndpoint
8077
8224
  endpoint: 'proration-policies'
8078
8225
  }
8079
8226
 
8227
+ /**
8228
+ * Custom Relationships
8229
+ * Description: Custom Relationships
8230
+ */
8231
+
8232
+
8233
+ interface CustomRelationshipBaseAttributes {
8234
+ name: string
8235
+ description?: string
8236
+ slug: string
8237
+ }
8238
+
8239
+ interface CustomRelationshipBase {
8240
+ type: 'custom-relationship'
8241
+ attributes: CustomRelationshipBaseAttributes
8242
+ meta: {
8243
+ owner: 'organization' | 'store'
8244
+ timestamps: {
8245
+ created_at: string
8246
+ updated_at: string
8247
+ }
8248
+ }
8249
+ }
8250
+
8251
+ interface CustomRelationship
8252
+ extends Identifiable,
8253
+ CustomRelationshipBase {}
8254
+
8255
+ interface CreateCustomRelationshipBody
8256
+ extends Pick<CustomRelationshipBase, 'attributes'> {}
8257
+
8258
+ interface UpdateCustomRelationshipBody
8259
+ extends Identifiable,
8260
+ Pick<CustomRelationshipBase, 'attributes'> {}
8261
+
8262
+ interface CustomRelationshipsFilter {
8263
+ eq?: {
8264
+ owner?: 'organization' | 'store'
8265
+ }
8266
+ }
8267
+
8268
+ interface CustomRelationshipsListResponse
8269
+ extends ResourceList<CustomRelationship> {
8270
+ links?: { [key: string]: string | null } | {}
8271
+ meta: {
8272
+ results: {
8273
+ total: number
8274
+ }
8275
+ }
8276
+ }
8277
+
8278
+ interface CustomRelationshipsEndpoint {
8279
+ endpoint: 'custom_relationships'
8280
+ /**
8281
+ * List Custom Relationships
8282
+ */
8283
+ All(): Promise<CustomRelationshipsListResponse>
8284
+
8285
+ /**
8286
+ * Get Custom Relationship
8287
+ * @param slug - The slug of the Custom Relationship. It should always be prefixed with 'CRP_'
8288
+ */
8289
+ Get(slug: string): Promise<Resource<CustomRelationship>>
8290
+
8291
+ /**
8292
+ * Create Custom Relationship
8293
+ * @param body - The base attributes of the Custom Relationships
8294
+ */
8295
+ Create(
8296
+ body: CreateCustomRelationshipBody
8297
+ ): Promise<Resource<CustomRelationship>>
8298
+
8299
+ /**
8300
+ * Update Custom Relationship
8301
+ * @param slug - The slug of the Custom Relationship. It should always be prefixed with 'CRP_'
8302
+ * @param body - The base attributes of the Custom Relationships.
8303
+ * The Slug attribute cannot be updated and the slug within this object should match this function's first argument.
8304
+ */
8305
+ Update(
8306
+ slug: string,
8307
+ body: UpdateCustomRelationshipBody
8308
+ ): Promise<Resource<CustomRelationship>>
8309
+
8310
+ /**
8311
+ * Delete Custom Relationship
8312
+ * @param slug - The slug of the Custom Relationship. It should always be prefixed with 'CRP_'
8313
+ */
8314
+ Delete(slug: string): Promise<{}>
8315
+
8316
+ /**
8317
+ * Custom Relationship filtering
8318
+ * @param filter - The filter object.
8319
+ * Currently supports the 'eq' filter operator for the 'owner' field of the Custom Relationship.
8320
+ */
8321
+ Filter(filter: CustomRelationshipsFilter): CustomRelationshipsEndpoint
8322
+
8323
+ Limit(value: number): CustomRelationshipsEndpoint
8324
+
8325
+ Offset(value: number): CustomRelationshipsEndpoint
8326
+ }
8327
+
8080
8328
  // Type definitions for @elasticpath/js-sdk
8081
8329
 
8082
8330
 
@@ -8137,13 +8385,15 @@ declare class ElasticPath {
8137
8385
  SubscriptionOfferings: SubscriptionOfferingsEndpoint
8138
8386
  OneTimePasswordTokenRequest: OneTimePasswordTokenRequestEndpoint
8139
8387
  Subscriptions: SubscriptionsEndpoint
8140
- RulePromotions : RulePromotionsEndpoint
8141
- SubscriptionSubscribers : SubscriptionSubscribersEndpoint
8142
- SubscriptionJobs : SubscriptionJobsEndpoint
8388
+ RulePromotions: RulePromotionsEndpoint
8389
+ SubscriptionSubscribers: SubscriptionSubscribersEndpoint
8390
+ SubscriptionJobs: SubscriptionJobsEndpoint
8143
8391
  SubscriptionSchedules: SubscriptionSchedulesEndpoint
8144
8392
  CustomApis: CustomApisEndpoint
8145
8393
  SubscriptionDunningRules: SubscriptionDunningRulesEndpoint
8146
8394
  SubscriptionProrationPolicies: SubscriptionProrationPoliciesEndpoint
8395
+ SubscriptionInvoices: SubscriptionInvoicesEndpoint
8396
+ CustomRelationships: CustomRelationshipsEndpoint
8147
8397
 
8148
8398
  Cart(id?: string): CartEndpoint // This optional cart id is super worrying when using the SDK in a node server :/
8149
8399
  constructor(config: Config)
@@ -8162,4 +8412,4 @@ declare namespace elasticpath {
8162
8412
  }
8163
8413
  }
8164
8414
 
8165
- export { Account, AccountAddress, AccountAddressBase, AccountAddressEdit, AccountAddressesEndpoint, AccountAssociationData, AccountAssociationResponse, AccountAuthenticationSettings, AccountAuthenticationSettingsBase, AccountAuthenticationSettingsEndpoint, AccountBase, AccountEndpoint, AccountFilter, AccountManagementAuthenticationTokenBody, AccountMember, AccountMemberBase, AccountMemberFilter, AccountMembersEndpoint, AccountMembership, AccountMembershipCreateBody, AccountMembershipOnAccountMember, AccountMembershipSettings, AccountMembershipSettingsBase, AccountMembershipSettingsEndpoint, AccountMembershipsEndpoint, AccountMembershipsFilter, AccountMembershipsInclude, AccountMembershipsIncludeAccounts, AccountMembershipsIncluded, AccountMembershipsIncludedAccounts, AccountMembershipsOnAccountMember, AccountMembershipsResponse, AccountTokenBase, AccountUpdateBody, Action, ActionCondition, ActionLimitation, Address, AddressBase, AdyenPayment, AndCondition, AnonymizeOrder, AnonymizeOrderResponse, ApplicationKey, ApplicationKeyBase, ApplicationKeyResponse, ApplicationKeysEndpoint, Attribute, Attributes, AttributesMeta, AuthenticateResponseBody, AuthenticationRealmEndpoint, AuthenticationSettings, AuthenticationSettingsBase, AuthenticationSettingsEndpoint, AuthorizeNetPayment, AuthorizePaymentMethod, BraintreePayment, Brand, BrandBase, BrandEndpoint, BrandFilter, BuildChildProductsJob, BuildRules, BuilderModifier, BulkAddOptions, BulkCustomDiscountOptions, BundleDiscountSchema, BundleGiftSchema, CapturePaymentMethod, CardConnectPayment, Cart, CartAdditionalHeaders, CartCustomDiscount, CartEndpoint, CartInclude, CartIncluded, CartItem, CartItemBase, CartItemObject, CartItemsResponse, CartSettings, CartShippingGroupBase, CartTaxItemObject, Catalog, CatalogBase, CatalogFilter, CatalogReleaseProductFilter, CatalogReleaseProductFilterAttributes, CatalogUpdateBody, CatalogsEndpoint, CatalogsNodesEndpoint, CatalogsProductVariation, CatalogsProductsEndpoint, CatalogsReleasesEndpoint, CatalogsRulesEndpoint, Category, CategoryBase, CategoryEndpoint, CategoryFilter, CheckoutCustomer, CheckoutCustomerObject, CodeFileHref, Collection, CollectionBase, CollectionEndpoint, CollectionFilter, Condition, Conditions, Config, ConfigOptions, ConfirmPaymentBody, ConfirmPaymentBodyWithOptions, ConfirmPaymentResponse, CreateCartObject, CreateChildrenSortOrderBody, CrudQueryableResource, Currency, CurrencyAmount, CurrencyBase, CurrencyEndpoint, CurrencyPercentage, CustomApi, CustomApiBase, CustomApiField, CustomApiFieldBase, CustomApisEndpoint, CustomAuthenticatorResponseBody, CustomDiscount, CustomDiscountResponse, CustomFieldValidation, CustomInputs, CustomInputsValidationRules, Customer, CustomerAddress, CustomerAddressBase, CustomerAddressEdit, CustomerAddressesEndpoint, CustomerBase, CustomerFilter, CustomerInclude, CustomerToken, CustomersEndpoint, CyberSourcePayment, DataEntriesEndpoint, DataEntryRecord, DeletePromotionCodesBodyItem, DeleteRulePromotionCodes, DuplicateHierarchyBody, DuplicateHierarchyJob, ElasticPath, ElasticPathStripePayment, ErasureRequestRecord, ErasureRequestsEndpoint, Exclude$1 as Exclude, Extensions, Field, FieldBase, FieldsEndpoint, File, FileBase, FileEndpoint, FileFilter, FileHref, FixedDiscountSchema, Flow, FlowBase, FlowEndpoint, FlowFilter, FormattedPrice, Gateway, GatewayBase, GatewaysEndpoint, GrantType, HierarchiesEndpoint, HierarchiesShopperCatalogEndpoint, Hierarchy, HierarchyBase, HierarchyFilter, HttpVerbs, Identifiable, Integration, IntegrationBase, IntegrationEndpoint, IntegrationFilter, IntegrationJob, IntegrationLog, IntegrationLogMeta, IntegrationLogsResponse, Inventory, InventoryActionTypes, InventoryBase, InventoryEndpoint, InventoryResponse, InvoicingResult, ItemFixedDiscountSchema, ItemPercentDiscountSchema, ItemTaxObject, ItemTaxObjectResponse, Job, JobBase, JobEndpoint, LocalStorageFactory, Locales, LogIntegration, ManualPayment, MatrixObject, MemoryStorageFactory, MerchantRealmMappings, MerchantRealmMappingsEndpoint, MergeCartOptions, MetricsBase, MetricsEndpoint, MetricsQuery, Modifier, ModifierResponse, ModifierType, ModifierTypeObj, Node, NodeBase, NodeBaseResponse, NodeFilter, NodeProduct, NodeProductResponse, NodeRelationship, NodeRelationshipBase, NodeRelationshipParent, NodeRelationshipsEndpoint, NodesEndpoint, NodesResponse, NodesShopperCatalogEndpoint, OidcProfileEndpoint, OnboardingLinkResponse, OneTimePasswordTokenRequestBody, OneTimePasswordTokenRequestEndpoint, Option, OptionResponse, Order, OrderAddressBase, OrderBase, OrderBillingAddress, OrderFilter, OrderInclude, OrderIncluded, OrderItem, OrderItemBase, OrderResponse, OrderShippingAddress, OrderSort, OrderSortAscend, OrderSortDescend, OrdersEndpoint, PCMVariation, PCMVariationBase, PCMVariationMetaOption, PCMVariationOption, PCMVariationOptionBase, PCMVariationsEndpoint, PartialPcmProductBase, PasswordProfile, PasswordProfileBody, PasswordProfileEndpoint, PasswordProfileListItem, PasswordProfileResponse, PayPalExpressCheckoutPayment, PaymentMethod, PaymentRequestBody, PcmFileRelationship, PcmFileRelationshipEndpoint, PcmJob, PcmJobBase, PcmJobError, PcmJobsEndpoint, PcmMainImageRelationship, PcmMainImageRelationshipEndpoint, PcmProduct, PcmProductAttachmentBody, PcmProductAttachmentResponse, PcmProductBase, PcmProductFilter, PcmProductInclude, PcmProductRelationships, PcmProductResponse, PcmProductUpdateBody, PcmProductsEndpoint, PcmProductsResponse, PcmTemplateRelationship, PcmTemplateRelationshipEndpoint, PcmVariationsRelationshipResource, PcmVariationsRelationships, PcmVariationsRelationshipsEndpoint, PercentDiscountSchema, PersonalDataEndpoint, PersonalDataRecord, Price, PriceBook, PriceBookBase, PriceBookFilter, PriceBookPrice, PriceBookPriceBase, PriceBookPriceModifier, PriceBookPriceModifierBase, PriceBookPriceModifierEndpoint, PriceBookPricesCreateBody, PriceBookPricesEndpoint, PriceBookPricesUpdateBody, PriceBooksEndpoint, PriceBooksUpdateBody, PricesFilter, Product, ProductBase, ProductComponentOption, ProductComponents, ProductFileRelationshipResource, ProductFilter, ProductResponse, ProductTemplateRelationshipResource, ProductsEndpoint, Profile, ProfileBase, ProfileCreateUpdateBody, ProfileListItem, ProfileResponse, ProfileResponseBody, Promotion, PromotionAttribute, PromotionAttributeValues, PromotionBase, PromotionCode, PromotionCodesJob, PromotionFilter, PromotionJob, PromotionMeta, PromotionSettings, PromotionsEndpoint, PurchasePaymentMethod, QueryableResource, Realm, RealmBase, RealmCreateBody, RealmUpdateBody, RefundPaymentMethod, Relationship, RelationshipToMany, RelationshipToOne, ReleaseBase, ReleaseBodyBase, ReleaseResponse, RequestFactory, Requirements, Resource, ResourceIncluded, ResourceList, ResourcePage, Rule, RuleBase, RuleFilter, RulePromotion, RulePromotionBase, RulePromotionCode, RulePromotionMeta, RulePromotionsEndpoint, RuleUpdateBody, Settings, SettingsEndpoint, ShippingGroupBase, ShippingGroupResponse, ShippingIncluded, ShopperCatalogEndpoint, ShopperCatalogProductsEndpoint, ShopperCatalogReleaseBase, ShopperCatalogResource, ShopperCatalogResourceList, ShopperCatalogResourcePage, StorageFactory, StripeConnectPayment, StripeIntentsPayment, StripePayment, StripePaymentBase, StripePaymentOptionBase, Subscription, SubscriptionBase, SubscriptionCreate, SubscriptionDunningRules, SubscriptionDunningRulesBase, SubscriptionDunningRulesCreate, SubscriptionDunningRulesEndpoint, SubscriptionDunningRulesUpdate, SubscriptionFilter, SubscriptionInvoice, SubscriptionJob, SubscriptionJobBase, SubscriptionJobCreate, SubscriptionJobsEndpoint, SubscriptionOffering, SubscriptionOfferingAttachPlanBody, SubscriptionOfferingAttachProductBody, SubscriptionOfferingAttachProrationPolicyBody, SubscriptionOfferingBase, SubscriptionOfferingBuildBody, SubscriptionOfferingBuildProduct, SubscriptionOfferingCreate, SubscriptionOfferingFilter, SubscriptionOfferingPlan, SubscriptionOfferingProduct, SubscriptionOfferingRelationships, SubscriptionOfferingUpdate, SubscriptionOfferingsEndpoint, SubscriptionPlan, SubscriptionPlanBase, SubscriptionPlanCreate, SubscriptionPlanUpdate, SubscriptionPlansEndpoint, SubscriptionProduct, SubscriptionProductBase, SubscriptionProductCreate, SubscriptionProductUpdate, SubscriptionProductsEndpoint, SubscriptionProrationPoliciesEndpoint, SubscriptionProrationPolicy, SubscriptionProrationPolicyBase, SubscriptionProrationPolicyCreate, SubscriptionProrationPolicyUpdate, SubscriptionSchedule, SubscriptionScheduleBase, SubscriptionScheduleCreate, SubscriptionScheduleUpdate, SubscriptionSchedulesEndpoint, SubscriptionSettings, SubscriptionSubscriber, SubscriptionSubscriberBase, SubscriptionSubscriberCreate, SubscriptionSubscriberUpdate, SubscriptionSubscribersEndpoint, SubscriptionUpdate, SubscriptionsEndpoint, SubscriptionsInclude, SubscriptionsIncluded, SubscriptionsStateAction, Subset, TargetCondition, Transaction, TransactionBase, TransactionEndpoint, TransactionsResponse, TtlSettings, UpdateNodeBody, UpdateVariationBody, UpdateVariationOptionBody, UserAuthenticationInfo, UserAuthenticationInfoBody, UserAuthenticationInfoEndpoint, UserAuthenticationInfoFilter, UserAuthenticationInfoResponse, UserAuthenticationPasswordProfile, UserAuthenticationPasswordProfileBody, UserAuthenticationPasswordProfileEndpoint, UserAuthenticationPasswordProfileResponse, UserAuthenticationPasswordProfileUpdateBody, Validation, Variation, VariationBase, VariationsBuilderModifier, VariationsEndpoint, VariationsModifier, VariationsModifierResponse, VariationsModifierType, VariationsModifierTypeObj, XforAmountSchema, XforYSchema, createJob, elasticpath, gateway };
8415
+ export { Account, AccountAddress, AccountAddressBase, AccountAddressEdit, AccountAddressesEndpoint, AccountAssociationData, AccountAssociationResponse, AccountAuthenticationSettings, AccountAuthenticationSettingsBase, AccountAuthenticationSettingsEndpoint, AccountBase, AccountEndpoint, AccountFilter, AccountManagementAuthenticationTokenBody, AccountMember, AccountMemberBase, AccountMemberFilter, AccountMembersEndpoint, AccountMembership, AccountMembershipCreateBody, AccountMembershipOnAccountMember, AccountMembershipSettings, AccountMembershipSettingsBase, AccountMembershipSettingsEndpoint, AccountMembershipsEndpoint, AccountMembershipsFilter, AccountMembershipsInclude, AccountMembershipsIncludeAccounts, AccountMembershipsIncluded, AccountMembershipsIncludedAccounts, AccountMembershipsOnAccountMember, AccountMembershipsResponse, AccountTokenBase, AccountUpdateBody, Action, ActionCondition, ActionLimitation, Address, AddressBase, AdyenPayment, AndCondition, AnonymizeOrder, AnonymizeOrderResponse, ApplicationKey, ApplicationKeyBase, ApplicationKeyResponse, ApplicationKeysEndpoint, Attribute, Attributes, AttributesMeta, AuthenticateResponseBody, AuthenticationRealmEndpoint, AuthenticationSettings, AuthenticationSettingsBase, AuthenticationSettingsEndpoint, AuthorizeNetPayment, AuthorizePaymentMethod, BraintreePayment, Brand, BrandBase, BrandEndpoint, BrandFilter, BuildChildProductsJob, BuildRules, BuilderModifier, BulkAddOptions, BulkCustomDiscountOptions, BundleDiscountSchema, BundleGiftSchema, CapturePaymentMethod, CardConnectPayment, Cart, CartAdditionalHeaders, CartCustomDiscount, CartEndpoint, CartInclude, CartIncluded, CartItem, CartItemBase, CartItemObject, CartItemsResponse, CartSettings, CartShippingGroupBase, CartTaxItemObject, Catalog, CatalogBase, CatalogFilter, CatalogReleaseProductFilter, CatalogReleaseProductFilterAttributes, CatalogUpdateBody, CatalogsEndpoint, CatalogsNodesEndpoint, CatalogsProductVariation, CatalogsProductsEndpoint, CatalogsReleasesEndpoint, CatalogsRulesEndpoint, Category, CategoryBase, CategoryEndpoint, CategoryFilter, CheckoutCustomer, CheckoutCustomerObject, CodeFileHref, Collection, CollectionBase, CollectionEndpoint, CollectionFilter, Condition, Conditions, Config, ConfigOptions, ConfirmPaymentBody, ConfirmPaymentBodyWithOptions, ConfirmPaymentResponse, CreateCartObject, CreateChildrenSortOrderBody, CreateCustomRelationshipBody, CrudQueryableResource, Currency, CurrencyAmount, CurrencyBase, CurrencyEndpoint, CurrencyPercentage, CustomApi, CustomApiBase, CustomApiField, CustomApiFieldBase, CustomApisEndpoint, CustomAuthenticatorResponseBody, CustomDiscount, CustomDiscountResponse, CustomFieldValidation, CustomInputs, CustomInputsValidationRules, CustomRelationship, CustomRelationshipBase, CustomRelationshipBaseAttributes, CustomRelationshipsEndpoint, CustomRelationshipsFilter, CustomRelationshipsListResponse, Customer, CustomerAddress, CustomerAddressBase, CustomerAddressEdit, CustomerAddressesEndpoint, CustomerBase, CustomerFilter, CustomerInclude, CustomerToken, CustomersEndpoint, CyberSourcePayment, DataEntriesEndpoint, DataEntryRecord, DeletePromotionCodesBodyItem, DeleteRulePromotionCodes, DuplicateHierarchyBody, DuplicateHierarchyJob, ElasticPath, ElasticPathStripePayment, ErasureRequestRecord, ErasureRequestsEndpoint, Exclude$1 as Exclude, Extensions, Field, FieldBase, FieldsEndpoint, File, FileBase, FileEndpoint, FileFilter, FileHref, FixedDiscountSchema, Flow, FlowBase, FlowEndpoint, FlowFilter, FormattedPrice, Gateway, GatewayBase, GatewaysEndpoint, GrantType, HierarchiesEndpoint, HierarchiesShopperCatalogEndpoint, Hierarchy, HierarchyBase, HierarchyFilter, HttpVerbs, Identifiable, Integration, IntegrationBase, IntegrationEndpoint, IntegrationFilter, IntegrationJob, IntegrationLog, IntegrationLogMeta, IntegrationLogsResponse, Inventory, InventoryActionTypes, InventoryBase, InventoryEndpoint, InventoryResponse, InvoicingResult, ItemFixedDiscountSchema, ItemPercentDiscountSchema, ItemTaxObject, ItemTaxObjectResponse, Job, JobBase, JobEndpoint, LocalStorageFactory, Locales, LogIntegration, ManualPayment, MatrixObject, MemoryStorageFactory, MerchantRealmMappings, MerchantRealmMappingsEndpoint, MergeCartOptions, MetricsBase, MetricsEndpoint, MetricsQuery, Modifier, ModifierResponse, ModifierType, ModifierTypeObj, Node, NodeBase, NodeBaseResponse, NodeFilter, NodeProduct, NodeProductResponse, NodeRelationship, NodeRelationshipBase, NodeRelationshipParent, NodeRelationshipsEndpoint, NodesEndpoint, NodesResponse, NodesShopperCatalogEndpoint, OidcProfileEndpoint, OnboardingLinkResponse, OneTimePasswordTokenRequestBody, OneTimePasswordTokenRequestEndpoint, Option, OptionResponse, Order, OrderAddressBase, OrderBase, OrderBillingAddress, OrderFilter, OrderInclude, OrderIncluded, OrderItem, OrderItemBase, OrderResponse, OrderShippingAddress, OrderSort, OrderSortAscend, OrderSortDescend, OrdersEndpoint, PCMVariation, PCMVariationBase, PCMVariationMetaOption, PCMVariationOption, PCMVariationOptionBase, PCMVariationsEndpoint, PartialPcmProductBase, PasswordProfile, PasswordProfileBody, PasswordProfileEndpoint, PasswordProfileListItem, PasswordProfileResponse, PayPalExpressCheckoutPayment, PaymentMethod, PaymentRequestBody, PcmFileRelationship, PcmFileRelationshipEndpoint, PcmJob, PcmJobBase, PcmJobError, PcmJobsEndpoint, PcmMainImageRelationship, PcmMainImageRelationshipEndpoint, PcmProduct, PcmProductAttachmentBody, PcmProductAttachmentResponse, PcmProductBase, PcmProductFilter, PcmProductInclude, PcmProductRelationships, PcmProductResponse, PcmProductUpdateBody, PcmProductsEndpoint, PcmProductsResponse, PcmTemplateRelationship, PcmTemplateRelationshipEndpoint, PcmVariationsRelationshipResource, PcmVariationsRelationships, PcmVariationsRelationshipsEndpoint, PercentDiscountSchema, PersonalDataEndpoint, PersonalDataRecord, Price, PriceBook, PriceBookBase, PriceBookFilter, PriceBookPrice, PriceBookPriceBase, PriceBookPriceModifier, PriceBookPriceModifierBase, PriceBookPriceModifierEndpoint, PriceBookPricesCreateBody, PriceBookPricesEndpoint, PriceBookPricesUpdateBody, PriceBooksEndpoint, PriceBooksUpdateBody, PricesFilter, Product, ProductBase, ProductComponentOption, ProductComponents, ProductFileRelationshipResource, ProductFilter, ProductResponse, ProductTemplateRelationshipResource, ProductsEndpoint, Profile, ProfileBase, ProfileCreateUpdateBody, ProfileListItem, ProfileResponse, ProfileResponseBody, Promotion, PromotionAttribute, PromotionAttributeValues, PromotionBase, PromotionCode, PromotionCodesJob, PromotionFilter, PromotionJob, PromotionMeta, PromotionSettings, PromotionsEndpoint, PurchasePaymentMethod, QueryableResource, Realm, RealmBase, RealmCreateBody, RealmUpdateBody, RefundPaymentMethod, Relationship, RelationshipToMany, RelationshipToOne, ReleaseBase, ReleaseBodyBase, ReleaseResponse, RequestFactory, Requirements, Resource, ResourceIncluded, ResourceList, ResourcePage, Rule, RuleBase, RuleFilter, RulePromotion, RulePromotionBase, RulePromotionCode, RulePromotionMeta, RulePromotionsEndpoint, RuleUpdateBody, Settings, SettingsEndpoint, ShippingGroupBase, ShippingGroupResponse, ShippingIncluded, ShopperCatalogEndpoint, ShopperCatalogProductsEndpoint, ShopperCatalogReleaseBase, ShopperCatalogResource, ShopperCatalogResourceList, ShopperCatalogResourcePage, StorageFactory, StripeConnectPayment, StripeIntentsPayment, StripePayment, StripePaymentBase, StripePaymentOptionBase, Subscription, SubscriptionBase, SubscriptionCreate, SubscriptionDunningRules, SubscriptionDunningRulesBase, SubscriptionDunningRulesCreate, SubscriptionDunningRulesEndpoint, SubscriptionDunningRulesUpdate, SubscriptionFilter, SubscriptionInvoice, SubscriptionInvoiceBase, SubscriptionInvoiceFilter, SubscriptionInvoicePayment, SubscriptionInvoicePaymentBase, SubscriptionInvoicesEndpoint, SubscriptionJob, SubscriptionJobBase, SubscriptionJobCreate, SubscriptionJobsEndpoint, SubscriptionOffering, SubscriptionOfferingAttachPlanBody, SubscriptionOfferingAttachProductBody, SubscriptionOfferingAttachProrationPolicyBody, SubscriptionOfferingBase, SubscriptionOfferingBuildBody, SubscriptionOfferingBuildProduct, SubscriptionOfferingCreate, SubscriptionOfferingFilter, SubscriptionOfferingPlan, SubscriptionOfferingProduct, SubscriptionOfferingRelationships, SubscriptionOfferingUpdate, SubscriptionOfferingsEndpoint, SubscriptionPlan, SubscriptionPlanBase, SubscriptionPlanCreate, SubscriptionPlanUpdate, SubscriptionPlansEndpoint, SubscriptionProduct, SubscriptionProductBase, SubscriptionProductCreate, SubscriptionProductUpdate, SubscriptionProductsEndpoint, SubscriptionProrationPoliciesEndpoint, SubscriptionProrationPolicy, SubscriptionProrationPolicyBase, SubscriptionProrationPolicyCreate, SubscriptionProrationPolicyUpdate, SubscriptionSchedule, SubscriptionScheduleBase, SubscriptionScheduleCreate, SubscriptionScheduleUpdate, SubscriptionSchedulesEndpoint, SubscriptionSettings, SubscriptionSubscriber, SubscriptionSubscriberBase, SubscriptionSubscriberCreate, SubscriptionSubscriberUpdate, SubscriptionSubscribersEndpoint, SubscriptionUpdate, SubscriptionsEndpoint, SubscriptionsInclude, SubscriptionsIncluded, SubscriptionsStateAction, Subset, TargetCondition, Transaction, TransactionBase, TransactionEndpoint, TransactionsResponse, TtlSettings, UpdateCustomRelationshipBody, UpdateNodeBody, UpdateVariationBody, UpdateVariationOptionBody, UserAuthenticationInfo, UserAuthenticationInfoBody, UserAuthenticationInfoEndpoint, UserAuthenticationInfoFilter, UserAuthenticationInfoResponse, UserAuthenticationPasswordProfile, UserAuthenticationPasswordProfileBody, UserAuthenticationPasswordProfileEndpoint, UserAuthenticationPasswordProfileResponse, UserAuthenticationPasswordProfileUpdateBody, Validation, Variation, VariationBase, VariationsBuilderModifier, VariationsEndpoint, VariationsModifier, VariationsModifierResponse, VariationsModifierType, VariationsModifierTypeObj, XforAmountSchema, XforYSchema, createJob, elasticpath, gateway };
package/dist/index.esm.js CHANGED
@@ -519,7 +519,7 @@ if (!globalThis.fetch) {
519
519
  globalThis.Response = Response;
520
520
  }
521
521
 
522
- var version = "3.0.1";
522
+ var version = "5.0.0";
523
523
 
524
524
  var LocalStorageFactory = /*#__PURE__*/function () {
525
525
  function LocalStorageFactory() {
@@ -4423,6 +4423,128 @@ var SubscriptionProrationPoliciesEndpoint = /*#__PURE__*/function (_CRUDExtend)
4423
4423
  return SubscriptionProrationPoliciesEndpoint;
4424
4424
  }(CRUDExtend);
4425
4425
 
4426
+ var SubscriptionInvoicesEndpoint = /*#__PURE__*/function () {
4427
+ function SubscriptionInvoicesEndpoint(endpoint) {
4428
+ _classCallCheck(this, SubscriptionInvoicesEndpoint);
4429
+ var config = _objectSpread2({}, endpoint);
4430
+ this.request = new RequestFactory(config);
4431
+ this.endpoint = 'subscriptions/invoices';
4432
+ }
4433
+ _createClass(SubscriptionInvoicesEndpoint, [{
4434
+ key: "All",
4435
+ value: function All() {
4436
+ var filter = this.filter,
4437
+ limit = this.limit,
4438
+ offset = this.offset;
4439
+ return this.request.send(buildURL(this.endpoint, {
4440
+ filter: filter,
4441
+ limit: limit,
4442
+ offset: offset
4443
+ }), 'GET');
4444
+ }
4445
+ }, {
4446
+ key: "Get",
4447
+ value: function Get(id) {
4448
+ return this.request.send("".concat(this.endpoint, "/").concat(id), 'GET');
4449
+ }
4450
+ }, {
4451
+ key: "GetPayments",
4452
+ value: function GetPayments(invoiceId) {
4453
+ return this.request.send("".concat(this.endpoint, "/").concat(invoiceId, "/payments"), 'GET');
4454
+ }
4455
+ }, {
4456
+ key: "GetPayment",
4457
+ value: function GetPayment(invoiceId, paymentId) {
4458
+ return this.request.send("".concat(this.endpoint, "/").concat(invoiceId, "/payments/").concat(paymentId), 'GET');
4459
+ }
4460
+ }, {
4461
+ key: "Filter",
4462
+ value: function Filter(filter) {
4463
+ this.filter = filter;
4464
+ return this;
4465
+ }
4466
+ }, {
4467
+ key: "Limit",
4468
+ value: function Limit(value) {
4469
+ this.limit = value;
4470
+ return this;
4471
+ }
4472
+ }, {
4473
+ key: "Offset",
4474
+ value: function Offset(value) {
4475
+ this.offset = value;
4476
+ return this;
4477
+ }
4478
+ }]);
4479
+ return SubscriptionInvoicesEndpoint;
4480
+ }();
4481
+
4482
+ var CustomRelationshipsEndpoint = /*#__PURE__*/function () {
4483
+ function CustomRelationshipsEndpoint(endpoint) {
4484
+ _classCallCheck(this, CustomRelationshipsEndpoint);
4485
+ var config = _objectSpread2({}, endpoint);
4486
+ config.version = 'pcm';
4487
+ this.request = new RequestFactory(config);
4488
+ this.endpoint = 'custom_relationships';
4489
+ }
4490
+ _createClass(CustomRelationshipsEndpoint, [{
4491
+ key: "All",
4492
+ value: function All() {
4493
+ var filter = this.filter,
4494
+ limit = this.limit,
4495
+ offset = this.offset;
4496
+ return this.request.send(buildURL(this.endpoint, {
4497
+ filter: filter,
4498
+ limit: limit,
4499
+ offset: offset
4500
+ }), 'GET');
4501
+ }
4502
+ }, {
4503
+ key: "Get",
4504
+ value: function Get(slug) {
4505
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'GET');
4506
+ }
4507
+ }, {
4508
+ key: "Create",
4509
+ value: function Create(body) {
4510
+ return this.request.send(this.endpoint, 'POST', _objectSpread2(_objectSpread2({}, body), {}, {
4511
+ type: 'custom-relationship'
4512
+ }));
4513
+ }
4514
+ }, {
4515
+ key: "Update",
4516
+ value: function Update(slug, body) {
4517
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'PUT', _objectSpread2(_objectSpread2({}, body), {}, {
4518
+ type: 'custom-relationship'
4519
+ }));
4520
+ }
4521
+ }, {
4522
+ key: "Delete",
4523
+ value: function Delete(slug) {
4524
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'DELETE');
4525
+ }
4526
+ }, {
4527
+ key: "Filter",
4528
+ value: function Filter(filter) {
4529
+ this.filter = filter;
4530
+ return this;
4531
+ }
4532
+ }, {
4533
+ key: "Limit",
4534
+ value: function Limit(value) {
4535
+ this.limit = value;
4536
+ return this;
4537
+ }
4538
+ }, {
4539
+ key: "Offset",
4540
+ value: function Offset(value) {
4541
+ this.offset = value;
4542
+ return this;
4543
+ }
4544
+ }]);
4545
+ return CustomRelationshipsEndpoint;
4546
+ }();
4547
+
4426
4548
  var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
4427
4549
  _inherits(Nodes, _CRUDExtend);
4428
4550
  var _super = _createSuper(Nodes);
@@ -5312,6 +5434,8 @@ var ElasticPath = /*#__PURE__*/function () {
5312
5434
  this.CustomApis = new CustomApisEndpoint(config);
5313
5435
  this.SubscriptionDunningRules = new SubscriptionDunningRulesEndpoint(config);
5314
5436
  this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
5437
+ this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
5438
+ this.CustomRelationships = new CustomRelationshipsEndpoint(config);
5315
5439
  }
5316
5440
 
5317
5441
  // Expose `Cart` class on ElasticPath class
package/dist/index.js CHANGED
@@ -1085,7 +1085,7 @@
1085
1085
  globalThis.Response = browserPonyfill.exports.Response;
1086
1086
  }
1087
1087
 
1088
- var version = "3.0.1";
1088
+ var version = "5.0.0";
1089
1089
 
1090
1090
  var LocalStorageFactory = /*#__PURE__*/function () {
1091
1091
  function LocalStorageFactory() {
@@ -5595,6 +5595,128 @@
5595
5595
  return SubscriptionProrationPoliciesEndpoint;
5596
5596
  }(CRUDExtend);
5597
5597
 
5598
+ var SubscriptionInvoicesEndpoint = /*#__PURE__*/function () {
5599
+ function SubscriptionInvoicesEndpoint(endpoint) {
5600
+ _classCallCheck(this, SubscriptionInvoicesEndpoint);
5601
+ var config = _objectSpread2({}, endpoint);
5602
+ this.request = new RequestFactory(config);
5603
+ this.endpoint = 'subscriptions/invoices';
5604
+ }
5605
+ _createClass(SubscriptionInvoicesEndpoint, [{
5606
+ key: "All",
5607
+ value: function All() {
5608
+ var filter = this.filter,
5609
+ limit = this.limit,
5610
+ offset = this.offset;
5611
+ return this.request.send(buildURL(this.endpoint, {
5612
+ filter: filter,
5613
+ limit: limit,
5614
+ offset: offset
5615
+ }), 'GET');
5616
+ }
5617
+ }, {
5618
+ key: "Get",
5619
+ value: function Get(id) {
5620
+ return this.request.send("".concat(this.endpoint, "/").concat(id), 'GET');
5621
+ }
5622
+ }, {
5623
+ key: "GetPayments",
5624
+ value: function GetPayments(invoiceId) {
5625
+ return this.request.send("".concat(this.endpoint, "/").concat(invoiceId, "/payments"), 'GET');
5626
+ }
5627
+ }, {
5628
+ key: "GetPayment",
5629
+ value: function GetPayment(invoiceId, paymentId) {
5630
+ return this.request.send("".concat(this.endpoint, "/").concat(invoiceId, "/payments/").concat(paymentId), 'GET');
5631
+ }
5632
+ }, {
5633
+ key: "Filter",
5634
+ value: function Filter(filter) {
5635
+ this.filter = filter;
5636
+ return this;
5637
+ }
5638
+ }, {
5639
+ key: "Limit",
5640
+ value: function Limit(value) {
5641
+ this.limit = value;
5642
+ return this;
5643
+ }
5644
+ }, {
5645
+ key: "Offset",
5646
+ value: function Offset(value) {
5647
+ this.offset = value;
5648
+ return this;
5649
+ }
5650
+ }]);
5651
+ return SubscriptionInvoicesEndpoint;
5652
+ }();
5653
+
5654
+ var CustomRelationshipsEndpoint = /*#__PURE__*/function () {
5655
+ function CustomRelationshipsEndpoint(endpoint) {
5656
+ _classCallCheck(this, CustomRelationshipsEndpoint);
5657
+ var config = _objectSpread2({}, endpoint);
5658
+ config.version = 'pcm';
5659
+ this.request = new RequestFactory(config);
5660
+ this.endpoint = 'custom_relationships';
5661
+ }
5662
+ _createClass(CustomRelationshipsEndpoint, [{
5663
+ key: "All",
5664
+ value: function All() {
5665
+ var filter = this.filter,
5666
+ limit = this.limit,
5667
+ offset = this.offset;
5668
+ return this.request.send(buildURL(this.endpoint, {
5669
+ filter: filter,
5670
+ limit: limit,
5671
+ offset: offset
5672
+ }), 'GET');
5673
+ }
5674
+ }, {
5675
+ key: "Get",
5676
+ value: function Get(slug) {
5677
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'GET');
5678
+ }
5679
+ }, {
5680
+ key: "Create",
5681
+ value: function Create(body) {
5682
+ return this.request.send(this.endpoint, 'POST', _objectSpread2(_objectSpread2({}, body), {}, {
5683
+ type: 'custom-relationship'
5684
+ }));
5685
+ }
5686
+ }, {
5687
+ key: "Update",
5688
+ value: function Update(slug, body) {
5689
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'PUT', _objectSpread2(_objectSpread2({}, body), {}, {
5690
+ type: 'custom-relationship'
5691
+ }));
5692
+ }
5693
+ }, {
5694
+ key: "Delete",
5695
+ value: function Delete(slug) {
5696
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'DELETE');
5697
+ }
5698
+ }, {
5699
+ key: "Filter",
5700
+ value: function Filter(filter) {
5701
+ this.filter = filter;
5702
+ return this;
5703
+ }
5704
+ }, {
5705
+ key: "Limit",
5706
+ value: function Limit(value) {
5707
+ this.limit = value;
5708
+ return this;
5709
+ }
5710
+ }, {
5711
+ key: "Offset",
5712
+ value: function Offset(value) {
5713
+ this.offset = value;
5714
+ return this;
5715
+ }
5716
+ }]);
5717
+ return CustomRelationshipsEndpoint;
5718
+ }();
5719
+
5598
5720
  var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
5599
5721
  _inherits(Nodes, _CRUDExtend);
5600
5722
  var _super = _createSuper(Nodes);
@@ -6484,6 +6606,8 @@
6484
6606
  this.CustomApis = new CustomApisEndpoint(config);
6485
6607
  this.SubscriptionDunningRules = new SubscriptionDunningRulesEndpoint(config);
6486
6608
  this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
6609
+ this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
6610
+ this.CustomRelationships = new CustomRelationshipsEndpoint(config);
6487
6611
  }
6488
6612
 
6489
6613
  // Expose `Cart` class on ElasticPath class
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elasticpath/js-sdk",
3
3
  "description": "SDK for the Elastic Path eCommerce API",
4
- "version": "3.0.1",
4
+ "version": "5.0.0",
5
5
  "homepage": "https://github.com/elasticpath/js-sdk",
6
6
  "author": "Elastic Path (https://elasticpath.com/)",
7
7
  "files": [