@elasticpath/js-sdk 3.0.1 → 4.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 = "4.0.0";
534
534
 
535
535
  var LocalStorageFactory = /*#__PURE__*/function () {
536
536
  function LocalStorageFactory() {
@@ -4434,6 +4434,62 @@ 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
+
4437
4493
  var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
4438
4494
  _inherits(Nodes, _CRUDExtend);
4439
4495
  var _super = _createSuper(Nodes);
@@ -5323,6 +5379,7 @@ var ElasticPath = /*#__PURE__*/function () {
5323
5379
  this.CustomApis = new CustomApisEndpoint(config);
5324
5380
  this.SubscriptionDunningRules = new SubscriptionDunningRulesEndpoint(config);
5325
5381
  this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
5382
+ this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
5326
5383
  }
5327
5384
 
5328
5385
  // 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
  /**
@@ -8137,13 +8284,14 @@ declare class ElasticPath {
8137
8284
  SubscriptionOfferings: SubscriptionOfferingsEndpoint
8138
8285
  OneTimePasswordTokenRequest: OneTimePasswordTokenRequestEndpoint
8139
8286
  Subscriptions: SubscriptionsEndpoint
8140
- RulePromotions : RulePromotionsEndpoint
8141
- SubscriptionSubscribers : SubscriptionSubscribersEndpoint
8142
- SubscriptionJobs : SubscriptionJobsEndpoint
8287
+ RulePromotions: RulePromotionsEndpoint
8288
+ SubscriptionSubscribers: SubscriptionSubscribersEndpoint
8289
+ SubscriptionJobs: SubscriptionJobsEndpoint
8143
8290
  SubscriptionSchedules: SubscriptionSchedulesEndpoint
8144
8291
  CustomApis: CustomApisEndpoint
8145
8292
  SubscriptionDunningRules: SubscriptionDunningRulesEndpoint
8146
8293
  SubscriptionProrationPolicies: SubscriptionProrationPoliciesEndpoint
8294
+ SubscriptionInvoices: SubscriptionInvoicesEndpoint
8147
8295
 
8148
8296
  Cart(id?: string): CartEndpoint // This optional cart id is super worrying when using the SDK in a node server :/
8149
8297
  constructor(config: Config)
@@ -8162,4 +8310,4 @@ declare namespace elasticpath {
8162
8310
  }
8163
8311
  }
8164
8312
 
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 };
8313
+ 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, 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, 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 = "4.0.0";
523
523
 
524
524
  var LocalStorageFactory = /*#__PURE__*/function () {
525
525
  function LocalStorageFactory() {
@@ -4423,6 +4423,62 @@ 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
+
4426
4482
  var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
4427
4483
  _inherits(Nodes, _CRUDExtend);
4428
4484
  var _super = _createSuper(Nodes);
@@ -5312,6 +5368,7 @@ var ElasticPath = /*#__PURE__*/function () {
5312
5368
  this.CustomApis = new CustomApisEndpoint(config);
5313
5369
  this.SubscriptionDunningRules = new SubscriptionDunningRulesEndpoint(config);
5314
5370
  this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
5371
+ this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
5315
5372
  }
5316
5373
 
5317
5374
  // 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 = "4.0.0";
1089
1089
 
1090
1090
  var LocalStorageFactory = /*#__PURE__*/function () {
1091
1091
  function LocalStorageFactory() {
@@ -5595,6 +5595,62 @@
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
+
5598
5654
  var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
5599
5655
  _inherits(Nodes, _CRUDExtend);
5600
5656
  var _super = _createSuper(Nodes);
@@ -6484,6 +6540,7 @@
6484
6540
  this.CustomApis = new CustomApisEndpoint(config);
6485
6541
  this.SubscriptionDunningRules = new SubscriptionDunningRulesEndpoint(config);
6486
6542
  this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
6543
+ this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
6487
6544
  }
6488
6545
 
6489
6546
  // 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": "4.0.0",
5
5
  "homepage": "https://github.com/elasticpath/js-sdk",
6
6
  "author": "Elastic Path (https://elasticpath.com/)",
7
7
  "files": [