"use strict"; /** * Magento Community * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: 2.4 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.BundleProductOptionRepositoryV1ApiFp = exports.BundleProductOptionRepositoryV1ApiFetchParamCreator = exports.BundleProductOptionManagementV1Api = exports.BundleProductOptionManagementV1ApiFactory = exports.BundleProductOptionManagementV1ApiFp = exports.BundleProductOptionManagementV1ApiFetchParamCreator = exports.BundleProductLinkManagementV1Api = exports.BundleProductLinkManagementV1ApiFactory = exports.BundleProductLinkManagementV1ApiFp = exports.BundleProductLinkManagementV1ApiFetchParamCreator = exports.BackendModuleServiceV1Api = exports.BackendModuleServiceV1ApiFactory = exports.BackendModuleServiceV1ApiFp = exports.BackendModuleServiceV1ApiFetchParamCreator = exports.AsynchronousOperationsOperationRepositoryV1Api = exports.AsynchronousOperationsOperationRepositoryV1ApiFactory = exports.AsynchronousOperationsOperationRepositoryV1ApiFp = exports.AsynchronousOperationsOperationRepositoryV1ApiFetchParamCreator = exports.AsynchronousOperationsBulkStatusV1Api = exports.AsynchronousOperationsBulkStatusV1ApiFactory = exports.AsynchronousOperationsBulkStatusV1ApiFp = exports.AsynchronousOperationsBulkStatusV1ApiFetchParamCreator = exports.AnalyticsLinkProviderV1Api = exports.AnalyticsLinkProviderV1ApiFactory = exports.AnalyticsLinkProviderV1ApiFp = exports.AnalyticsLinkProviderV1ApiFetchParamCreator = exports.AmazonPaymentOrderInformationManagementV1Api = exports.AmazonPaymentOrderInformationManagementV1ApiFactory = exports.AmazonPaymentOrderInformationManagementV1ApiFp = exports.AmazonPaymentOrderInformationManagementV1ApiFetchParamCreator = exports.AmazonPaymentAddressManagementV1Api = exports.AmazonPaymentAddressManagementV1ApiFactory = exports.AmazonPaymentAddressManagementV1ApiFp = exports.AmazonPaymentAddressManagementV1ApiFetchParamCreator = exports.AdobeStockImageApiGetImageListV1Api = exports.AdobeStockImageApiGetImageListV1ApiFactory = exports.AdobeStockImageApiGetImageListV1ApiFp = exports.AdobeStockImageApiGetImageListV1ApiFetchParamCreator = exports.AdobeStockAssetApiGetAssetListV1Api = exports.AdobeStockAssetApiGetAssetListV1ApiFactory = exports.AdobeStockAssetApiGetAssetListV1ApiFp = exports.AdobeStockAssetApiGetAssetListV1ApiFetchParamCreator = exports.AdobeStockAssetApiAssetRepositoryV1Api = exports.AdobeStockAssetApiAssetRepositoryV1ApiFactory = exports.AdobeStockAssetApiAssetRepositoryV1ApiFp = exports.AdobeStockAssetApiAssetRepositoryV1ApiFetchParamCreator = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.setAuth = void 0; exports.CatalogCostStorageV1Api = exports.CatalogCostStorageV1ApiFactory = exports.CatalogCostStorageV1ApiFp = exports.CatalogCostStorageV1ApiFetchParamCreator = exports.CatalogCategoryRepositoryV1Api = exports.CatalogCategoryRepositoryV1ApiFactory = exports.CatalogCategoryRepositoryV1ApiFp = exports.CatalogCategoryRepositoryV1ApiFetchParamCreator = exports.CatalogCategoryManagementV1Api = exports.CatalogCategoryManagementV1ApiFactory = exports.CatalogCategoryManagementV1ApiFp = exports.CatalogCategoryManagementV1ApiFetchParamCreator = exports.CatalogCategoryListV1Api = exports.CatalogCategoryListV1ApiFactory = exports.CatalogCategoryListV1ApiFp = exports.CatalogCategoryListV1ApiFetchParamCreator = exports.CatalogCategoryLinkRepositoryV1Api = exports.CatalogCategoryLinkRepositoryV1ApiFactory = exports.CatalogCategoryLinkRepositoryV1ApiFp = exports.CatalogCategoryLinkRepositoryV1ApiFetchParamCreator = exports.CatalogCategoryLinkManagementV1Api = exports.CatalogCategoryLinkManagementV1ApiFactory = exports.CatalogCategoryLinkManagementV1ApiFp = exports.CatalogCategoryLinkManagementV1ApiFetchParamCreator = exports.CatalogCategoryAttributeRepositoryV1Api = exports.CatalogCategoryAttributeRepositoryV1ApiFactory = exports.CatalogCategoryAttributeRepositoryV1ApiFp = exports.CatalogCategoryAttributeRepositoryV1ApiFetchParamCreator = exports.CatalogCategoryAttributeOptionManagementV1Api = exports.CatalogCategoryAttributeOptionManagementV1ApiFactory = exports.CatalogCategoryAttributeOptionManagementV1ApiFp = exports.CatalogCategoryAttributeOptionManagementV1ApiFetchParamCreator = exports.CatalogBasePriceStorageV1Api = exports.CatalogBasePriceStorageV1ApiFactory = exports.CatalogBasePriceStorageV1ApiFp = exports.CatalogBasePriceStorageV1ApiFetchParamCreator = exports.CatalogAttributeSetRepositoryV1Api = exports.CatalogAttributeSetRepositoryV1ApiFactory = exports.CatalogAttributeSetRepositoryV1ApiFp = exports.CatalogAttributeSetRepositoryV1ApiFetchParamCreator = exports.CatalogAttributeSetManagementV1Api = exports.CatalogAttributeSetManagementV1ApiFactory = exports.CatalogAttributeSetManagementV1ApiFp = exports.CatalogAttributeSetManagementV1ApiFetchParamCreator = exports.BundleProductOptionTypeListV1Api = exports.BundleProductOptionTypeListV1ApiFactory = exports.BundleProductOptionTypeListV1ApiFp = exports.BundleProductOptionTypeListV1ApiFetchParamCreator = exports.BundleProductOptionRepositoryV1Api = exports.BundleProductOptionRepositoryV1ApiFactory = void 0; exports.CatalogProductLinkTypeListV1ApiFp = exports.CatalogProductLinkTypeListV1ApiFetchParamCreator = exports.CatalogProductLinkRepositoryV1Api = exports.CatalogProductLinkRepositoryV1ApiFactory = exports.CatalogProductLinkRepositoryV1ApiFp = exports.CatalogProductLinkRepositoryV1ApiFetchParamCreator = exports.CatalogProductLinkManagementV1Api = exports.CatalogProductLinkManagementV1ApiFactory = exports.CatalogProductLinkManagementV1ApiFp = exports.CatalogProductLinkManagementV1ApiFetchParamCreator = exports.CatalogProductCustomOptionTypeListV1Api = exports.CatalogProductCustomOptionTypeListV1ApiFactory = exports.CatalogProductCustomOptionTypeListV1ApiFp = exports.CatalogProductCustomOptionTypeListV1ApiFetchParamCreator = exports.CatalogProductCustomOptionRepositoryV1Api = exports.CatalogProductCustomOptionRepositoryV1ApiFactory = exports.CatalogProductCustomOptionRepositoryV1ApiFp = exports.CatalogProductCustomOptionRepositoryV1ApiFetchParamCreator = exports.CatalogProductAttributeTypesListV1Api = exports.CatalogProductAttributeTypesListV1ApiFactory = exports.CatalogProductAttributeTypesListV1ApiFp = exports.CatalogProductAttributeTypesListV1ApiFetchParamCreator = exports.CatalogProductAttributeRepositoryV1Api = exports.CatalogProductAttributeRepositoryV1ApiFactory = exports.CatalogProductAttributeRepositoryV1ApiFp = exports.CatalogProductAttributeRepositoryV1ApiFetchParamCreator = exports.CatalogProductAttributeOptionUpdateV1Api = exports.CatalogProductAttributeOptionUpdateV1ApiFactory = exports.CatalogProductAttributeOptionUpdateV1ApiFp = exports.CatalogProductAttributeOptionUpdateV1ApiFetchParamCreator = exports.CatalogProductAttributeOptionManagementV1Api = exports.CatalogProductAttributeOptionManagementV1ApiFactory = exports.CatalogProductAttributeOptionManagementV1ApiFp = exports.CatalogProductAttributeOptionManagementV1ApiFetchParamCreator = exports.CatalogProductAttributeMediaGalleryManagementV1Api = exports.CatalogProductAttributeMediaGalleryManagementV1ApiFactory = exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp = exports.CatalogProductAttributeMediaGalleryManagementV1ApiFetchParamCreator = exports.CatalogProductAttributeManagementV1Api = exports.CatalogProductAttributeManagementV1ApiFactory = exports.CatalogProductAttributeManagementV1ApiFp = exports.CatalogProductAttributeManagementV1ApiFetchParamCreator = exports.CatalogProductAttributeGroupRepositoryV1Api = exports.CatalogProductAttributeGroupRepositoryV1ApiFactory = exports.CatalogProductAttributeGroupRepositoryV1ApiFp = exports.CatalogProductAttributeGroupRepositoryV1ApiFetchParamCreator = exports.CatalogInventoryStockRegistryV1Api = exports.CatalogInventoryStockRegistryV1ApiFactory = exports.CatalogInventoryStockRegistryV1ApiFp = exports.CatalogInventoryStockRegistryV1ApiFetchParamCreator = void 0; exports.CheckoutGuestShippingInformationManagementV1Api = exports.CheckoutGuestShippingInformationManagementV1ApiFactory = exports.CheckoutGuestShippingInformationManagementV1ApiFp = exports.CheckoutGuestShippingInformationManagementV1ApiFetchParamCreator = exports.CheckoutGuestPaymentInformationManagementV1Api = exports.CheckoutGuestPaymentInformationManagementV1ApiFactory = exports.CheckoutGuestPaymentInformationManagementV1ApiFp = exports.CheckoutGuestPaymentInformationManagementV1ApiFetchParamCreator = exports.CheckoutAgreementsCheckoutAgreementsRepositoryV1Api = exports.CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFactory = exports.CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFp = exports.CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFetchParamCreator = exports.CheckoutAgreementsCheckoutAgreementsListV1Api = exports.CheckoutAgreementsCheckoutAgreementsListV1ApiFactory = exports.CheckoutAgreementsCheckoutAgreementsListV1ApiFp = exports.CheckoutAgreementsCheckoutAgreementsListV1ApiFetchParamCreator = exports.CatalogTierPriceStorageV1Api = exports.CatalogTierPriceStorageV1ApiFactory = exports.CatalogTierPriceStorageV1ApiFp = exports.CatalogTierPriceStorageV1ApiFetchParamCreator = exports.CatalogSpecialPriceStorageV1Api = exports.CatalogSpecialPriceStorageV1ApiFactory = exports.CatalogSpecialPriceStorageV1ApiFp = exports.CatalogSpecialPriceStorageV1ApiFetchParamCreator = exports.CatalogProductWebsiteLinkRepositoryV1Api = exports.CatalogProductWebsiteLinkRepositoryV1ApiFactory = exports.CatalogProductWebsiteLinkRepositoryV1ApiFp = exports.CatalogProductWebsiteLinkRepositoryV1ApiFetchParamCreator = exports.CatalogProductTypeListV1Api = exports.CatalogProductTypeListV1ApiFactory = exports.CatalogProductTypeListV1ApiFp = exports.CatalogProductTypeListV1ApiFetchParamCreator = exports.CatalogProductTierPriceManagementV1Api = exports.CatalogProductTierPriceManagementV1ApiFactory = exports.CatalogProductTierPriceManagementV1ApiFp = exports.CatalogProductTierPriceManagementV1ApiFetchParamCreator = exports.CatalogProductRepositoryV1Api = exports.CatalogProductRepositoryV1ApiFactory = exports.CatalogProductRepositoryV1ApiFp = exports.CatalogProductRepositoryV1ApiFetchParamCreator = exports.CatalogProductRenderListV1Api = exports.CatalogProductRenderListV1ApiFactory = exports.CatalogProductRenderListV1ApiFp = exports.CatalogProductRenderListV1ApiFetchParamCreator = exports.CatalogProductMediaAttributeManagementV1Api = exports.CatalogProductMediaAttributeManagementV1ApiFactory = exports.CatalogProductMediaAttributeManagementV1ApiFp = exports.CatalogProductMediaAttributeManagementV1ApiFetchParamCreator = exports.CatalogProductLinkTypeListV1Api = exports.CatalogProductLinkTypeListV1ApiFactory = void 0; exports.CustomerCustomerGroupConfigV1ApiFp = exports.CustomerCustomerGroupConfigV1ApiFetchParamCreator = exports.CustomerAddressRepositoryV1Api = exports.CustomerAddressRepositoryV1ApiFactory = exports.CustomerAddressRepositoryV1ApiFp = exports.CustomerAddressRepositoryV1ApiFetchParamCreator = exports.CustomerAddressMetadataV1Api = exports.CustomerAddressMetadataV1ApiFactory = exports.CustomerAddressMetadataV1ApiFp = exports.CustomerAddressMetadataV1ApiFetchParamCreator = exports.CustomerAccountManagementV1Api = exports.CustomerAccountManagementV1ApiFactory = exports.CustomerAccountManagementV1ApiFp = exports.CustomerAccountManagementV1ApiFetchParamCreator = exports.ConfigurableProductOptionRepositoryV1Api = exports.ConfigurableProductOptionRepositoryV1ApiFactory = exports.ConfigurableProductOptionRepositoryV1ApiFp = exports.ConfigurableProductOptionRepositoryV1ApiFetchParamCreator = exports.ConfigurableProductLinkManagementV1Api = exports.ConfigurableProductLinkManagementV1ApiFactory = exports.ConfigurableProductLinkManagementV1ApiFp = exports.ConfigurableProductLinkManagementV1ApiFetchParamCreator = exports.ConfigurableProductConfigurableProductManagementV1Api = exports.ConfigurableProductConfigurableProductManagementV1ApiFactory = exports.ConfigurableProductConfigurableProductManagementV1ApiFp = exports.ConfigurableProductConfigurableProductManagementV1ApiFetchParamCreator = exports.CmsPageRepositoryV1Api = exports.CmsPageRepositoryV1ApiFactory = exports.CmsPageRepositoryV1ApiFp = exports.CmsPageRepositoryV1ApiFetchParamCreator = exports.CmsBlockRepositoryV1Api = exports.CmsBlockRepositoryV1ApiFactory = exports.CmsBlockRepositoryV1ApiFp = exports.CmsBlockRepositoryV1ApiFetchParamCreator = exports.CheckoutTotalsInformationManagementV1Api = exports.CheckoutTotalsInformationManagementV1ApiFactory = exports.CheckoutTotalsInformationManagementV1ApiFp = exports.CheckoutTotalsInformationManagementV1ApiFetchParamCreator = exports.CheckoutShippingInformationManagementV1Api = exports.CheckoutShippingInformationManagementV1ApiFactory = exports.CheckoutShippingInformationManagementV1ApiFp = exports.CheckoutShippingInformationManagementV1ApiFetchParamCreator = exports.CheckoutPaymentInformationManagementV1Api = exports.CheckoutPaymentInformationManagementV1ApiFactory = exports.CheckoutPaymentInformationManagementV1ApiFp = exports.CheckoutPaymentInformationManagementV1ApiFetchParamCreator = exports.CheckoutGuestTotalsInformationManagementV1Api = exports.CheckoutGuestTotalsInformationManagementV1ApiFactory = exports.CheckoutGuestTotalsInformationManagementV1ApiFp = exports.CheckoutGuestTotalsInformationManagementV1ApiFetchParamCreator = void 0; exports.GiftMessageGuestCartRepositoryV1Api = exports.GiftMessageGuestCartRepositoryV1ApiFactory = exports.GiftMessageGuestCartRepositoryV1ApiFp = exports.GiftMessageGuestCartRepositoryV1ApiFetchParamCreator = exports.GiftMessageCartRepositoryV1Api = exports.GiftMessageCartRepositoryV1ApiFactory = exports.GiftMessageCartRepositoryV1ApiFp = exports.GiftMessageCartRepositoryV1ApiFetchParamCreator = exports.EavAttributeSetRepositoryV1Api = exports.EavAttributeSetRepositoryV1ApiFactory = exports.EavAttributeSetRepositoryV1ApiFp = exports.EavAttributeSetRepositoryV1ApiFetchParamCreator = exports.EavAttributeSetManagementV1Api = exports.EavAttributeSetManagementV1ApiFactory = exports.EavAttributeSetManagementV1ApiFp = exports.EavAttributeSetManagementV1ApiFetchParamCreator = exports.DownloadableSampleRepositoryV1Api = exports.DownloadableSampleRepositoryV1ApiFactory = exports.DownloadableSampleRepositoryV1ApiFp = exports.DownloadableSampleRepositoryV1ApiFetchParamCreator = exports.DownloadableLinkRepositoryV1Api = exports.DownloadableLinkRepositoryV1ApiFactory = exports.DownloadableLinkRepositoryV1ApiFp = exports.DownloadableLinkRepositoryV1ApiFetchParamCreator = exports.DirectoryCurrencyInformationAcquirerV1Api = exports.DirectoryCurrencyInformationAcquirerV1ApiFactory = exports.DirectoryCurrencyInformationAcquirerV1ApiFp = exports.DirectoryCurrencyInformationAcquirerV1ApiFetchParamCreator = exports.DirectoryCountryInformationAcquirerV1Api = exports.DirectoryCountryInformationAcquirerV1ApiFactory = exports.DirectoryCountryInformationAcquirerV1ApiFp = exports.DirectoryCountryInformationAcquirerV1ApiFetchParamCreator = exports.CustomerGroupRepositoryV1Api = exports.CustomerGroupRepositoryV1ApiFactory = exports.CustomerGroupRepositoryV1ApiFp = exports.CustomerGroupRepositoryV1ApiFetchParamCreator = exports.CustomerGroupManagementV1Api = exports.CustomerGroupManagementV1ApiFactory = exports.CustomerGroupManagementV1ApiFp = exports.CustomerGroupManagementV1ApiFetchParamCreator = exports.CustomerCustomerRepositoryV1Api = exports.CustomerCustomerRepositoryV1ApiFactory = exports.CustomerCustomerRepositoryV1ApiFp = exports.CustomerCustomerRepositoryV1ApiFetchParamCreator = exports.CustomerCustomerMetadataV1Api = exports.CustomerCustomerMetadataV1ApiFactory = exports.CustomerCustomerMetadataV1ApiFp = exports.CustomerCustomerMetadataV1ApiFetchParamCreator = exports.CustomerCustomerGroupConfigV1Api = exports.CustomerCustomerGroupConfigV1ApiFactory = void 0; exports.InventoryApiStockSourceLinksSaveV1ApiFp = exports.InventoryApiStockSourceLinksSaveV1ApiFetchParamCreator = exports.InventoryApiStockSourceLinksDeleteV1Api = exports.InventoryApiStockSourceLinksDeleteV1ApiFactory = exports.InventoryApiStockSourceLinksDeleteV1ApiFp = exports.InventoryApiStockSourceLinksDeleteV1ApiFetchParamCreator = exports.InventoryApiStockRepositoryV1Api = exports.InventoryApiStockRepositoryV1ApiFactory = exports.InventoryApiStockRepositoryV1ApiFp = exports.InventoryApiStockRepositoryV1ApiFetchParamCreator = exports.InventoryApiSourceRepositoryV1Api = exports.InventoryApiSourceRepositoryV1ApiFactory = exports.InventoryApiSourceRepositoryV1ApiFp = exports.InventoryApiSourceRepositoryV1ApiFetchParamCreator = exports.InventoryApiSourceItemsSaveV1Api = exports.InventoryApiSourceItemsSaveV1ApiFactory = exports.InventoryApiSourceItemsSaveV1ApiFp = exports.InventoryApiSourceItemsSaveV1ApiFetchParamCreator = exports.InventoryApiSourceItemsDeleteV1Api = exports.InventoryApiSourceItemsDeleteV1ApiFactory = exports.InventoryApiSourceItemsDeleteV1ApiFp = exports.InventoryApiSourceItemsDeleteV1ApiFetchParamCreator = exports.InventoryApiSourceItemRepositoryV1Api = exports.InventoryApiSourceItemRepositoryV1ApiFactory = exports.InventoryApiSourceItemRepositoryV1ApiFp = exports.InventoryApiSourceItemRepositoryV1ApiFetchParamCreator = exports.InventoryApiGetStockSourceLinksV1Api = exports.InventoryApiGetStockSourceLinksV1ApiFactory = exports.InventoryApiGetStockSourceLinksV1ApiFp = exports.InventoryApiGetStockSourceLinksV1ApiFetchParamCreator = exports.InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1Api = exports.InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFactory = exports.InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFp = exports.InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFetchParamCreator = exports.IntegrationCustomerTokenServiceV1Api = exports.IntegrationCustomerTokenServiceV1ApiFactory = exports.IntegrationCustomerTokenServiceV1ApiFp = exports.IntegrationCustomerTokenServiceV1ApiFetchParamCreator = exports.IntegrationAdminTokenServiceV1Api = exports.IntegrationAdminTokenServiceV1ApiFactory = exports.IntegrationAdminTokenServiceV1ApiFp = exports.IntegrationAdminTokenServiceV1ApiFetchParamCreator = exports.GiftMessageItemRepositoryV1Api = exports.GiftMessageItemRepositoryV1ApiFactory = exports.GiftMessageItemRepositoryV1ApiFp = exports.GiftMessageItemRepositoryV1ApiFetchParamCreator = exports.GiftMessageGuestItemRepositoryV1Api = exports.GiftMessageGuestItemRepositoryV1ApiFactory = exports.GiftMessageGuestItemRepositoryV1ApiFp = exports.GiftMessageGuestItemRepositoryV1ApiFetchParamCreator = void 0; exports.InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1Api = exports.InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFactory = exports.InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFp = exports.InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFetchParamCreator = exports.InventoryInStorePickupApiGetPickupLocationsV1Api = exports.InventoryInStorePickupApiGetPickupLocationsV1ApiFactory = exports.InventoryInStorePickupApiGetPickupLocationsV1ApiFp = exports.InventoryInStorePickupApiGetPickupLocationsV1ApiFetchParamCreator = exports.InventoryExportStockApiExportStockSalableQtyV1Api = exports.InventoryExportStockApiExportStockSalableQtyV1ApiFactory = exports.InventoryExportStockApiExportStockSalableQtyV1ApiFp = exports.InventoryExportStockApiExportStockSalableQtyV1ApiFetchParamCreator = exports.InventoryExportStockApiExportStockIndexDataV1Api = exports.InventoryExportStockApiExportStockIndexDataV1ApiFactory = exports.InventoryExportStockApiExportStockIndexDataV1ApiFp = exports.InventoryExportStockApiExportStockIndexDataV1ApiFetchParamCreator = exports.InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1Api = exports.InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFactory = exports.InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFp = exports.InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFetchParamCreator = exports.InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1Api = exports.InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFactory = exports.InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFp = exports.InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFetchParamCreator = exports.InventoryDistanceBasedSourceSelectionApiGetDistanceV1Api = exports.InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFactory = exports.InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFp = exports.InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFetchParamCreator = exports.InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1Api = exports.InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFactory = exports.InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFp = exports.InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFetchParamCreator = exports.InventoryCatalogApiBulkSourceUnassignV1Api = exports.InventoryCatalogApiBulkSourceUnassignV1ApiFactory = exports.InventoryCatalogApiBulkSourceUnassignV1ApiFp = exports.InventoryCatalogApiBulkSourceUnassignV1ApiFetchParamCreator = exports.InventoryCatalogApiBulkSourceAssignV1Api = exports.InventoryCatalogApiBulkSourceAssignV1ApiFactory = exports.InventoryCatalogApiBulkSourceAssignV1ApiFp = exports.InventoryCatalogApiBulkSourceAssignV1ApiFetchParamCreator = exports.InventoryCatalogApiBulkPartialInventoryTransferV1Api = exports.InventoryCatalogApiBulkPartialInventoryTransferV1ApiFactory = exports.InventoryCatalogApiBulkPartialInventoryTransferV1ApiFp = exports.InventoryCatalogApiBulkPartialInventoryTransferV1ApiFetchParamCreator = exports.InventoryCatalogApiBulkInventoryTransferV1Api = exports.InventoryCatalogApiBulkInventoryTransferV1ApiFactory = exports.InventoryCatalogApiBulkInventoryTransferV1ApiFp = exports.InventoryCatalogApiBulkInventoryTransferV1ApiFetchParamCreator = exports.InventoryApiStockSourceLinksSaveV1Api = exports.InventoryApiStockSourceLinksSaveV1ApiFactory = void 0; exports.QuoteBillingAddressManagementV1ApiFp = exports.QuoteBillingAddressManagementV1ApiFetchParamCreator = exports.MageplazaSmtpCheckoutManagementV1Api = exports.MageplazaSmtpCheckoutManagementV1ApiFactory = exports.MageplazaSmtpCheckoutManagementV1ApiFp = exports.MageplazaSmtpCheckoutManagementV1ApiFetchParamCreator = exports.InventorySourceSelectionApiSourceSelectionServiceV1Api = exports.InventorySourceSelectionApiSourceSelectionServiceV1ApiFactory = exports.InventorySourceSelectionApiSourceSelectionServiceV1ApiFp = exports.InventorySourceSelectionApiSourceSelectionServiceV1ApiFetchParamCreator = exports.InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1Api = exports.InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFactory = exports.InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFp = exports.InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFetchParamCreator = exports.InventorySalesApiStockResolverV1Api = exports.InventorySalesApiStockResolverV1ApiFactory = exports.InventorySalesApiStockResolverV1ApiFp = exports.InventorySalesApiStockResolverV1ApiFetchParamCreator = exports.InventorySalesApiIsProductSalableV1Api = exports.InventorySalesApiIsProductSalableV1ApiFactory = exports.InventorySalesApiIsProductSalableV1ApiFp = exports.InventorySalesApiIsProductSalableV1ApiFetchParamCreator = exports.InventorySalesApiIsProductSalableForRequestedQtyV1Api = exports.InventorySalesApiIsProductSalableForRequestedQtyV1ApiFactory = exports.InventorySalesApiIsProductSalableForRequestedQtyV1ApiFp = exports.InventorySalesApiIsProductSalableForRequestedQtyV1ApiFetchParamCreator = exports.InventorySalesApiGetProductSalableQtyV1Api = exports.InventorySalesApiGetProductSalableQtyV1ApiFactory = exports.InventorySalesApiGetProductSalableQtyV1ApiFp = exports.InventorySalesApiGetProductSalableQtyV1ApiFetchParamCreator = exports.InventorySalesApiAreProductsSalableV1Api = exports.InventorySalesApiAreProductsSalableV1ApiFactory = exports.InventorySalesApiAreProductsSalableV1ApiFp = exports.InventorySalesApiAreProductsSalableV1ApiFetchParamCreator = exports.InventorySalesApiAreProductsSalableForRequestedQtyV1Api = exports.InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFactory = exports.InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFp = exports.InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFetchParamCreator = exports.InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1Api = exports.InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFactory = exports.InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFp = exports.InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFetchParamCreator = exports.InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1Api = exports.InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFactory = exports.InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFp = exports.InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFetchParamCreator = exports.InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1Api = exports.InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFactory = exports.InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFp = exports.InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFetchParamCreator = void 0; exports.QuoteGuestCartTotalRepositoryV1Api = exports.QuoteGuestCartTotalRepositoryV1ApiFactory = exports.QuoteGuestCartTotalRepositoryV1ApiFp = exports.QuoteGuestCartTotalRepositoryV1ApiFetchParamCreator = exports.QuoteGuestCartTotalManagementV1Api = exports.QuoteGuestCartTotalManagementV1ApiFactory = exports.QuoteGuestCartTotalManagementV1ApiFp = exports.QuoteGuestCartTotalManagementV1ApiFetchParamCreator = exports.QuoteGuestCartRepositoryV1Api = exports.QuoteGuestCartRepositoryV1ApiFactory = exports.QuoteGuestCartRepositoryV1ApiFp = exports.QuoteGuestCartRepositoryV1ApiFetchParamCreator = exports.QuoteGuestCartManagementV1Api = exports.QuoteGuestCartManagementV1ApiFactory = exports.QuoteGuestCartManagementV1ApiFp = exports.QuoteGuestCartManagementV1ApiFetchParamCreator = exports.QuoteGuestCartItemRepositoryV1Api = exports.QuoteGuestCartItemRepositoryV1ApiFactory = exports.QuoteGuestCartItemRepositoryV1ApiFp = exports.QuoteGuestCartItemRepositoryV1ApiFetchParamCreator = exports.QuoteGuestBillingAddressManagementV1Api = exports.QuoteGuestBillingAddressManagementV1ApiFactory = exports.QuoteGuestBillingAddressManagementV1ApiFp = exports.QuoteGuestBillingAddressManagementV1ApiFetchParamCreator = exports.QuoteCouponManagementV1Api = exports.QuoteCouponManagementV1ApiFactory = exports.QuoteCouponManagementV1ApiFp = exports.QuoteCouponManagementV1ApiFetchParamCreator = exports.QuoteCartTotalRepositoryV1Api = exports.QuoteCartTotalRepositoryV1ApiFactory = exports.QuoteCartTotalRepositoryV1ApiFp = exports.QuoteCartTotalRepositoryV1ApiFetchParamCreator = exports.QuoteCartTotalManagementV1Api = exports.QuoteCartTotalManagementV1ApiFactory = exports.QuoteCartTotalManagementV1ApiFp = exports.QuoteCartTotalManagementV1ApiFetchParamCreator = exports.QuoteCartRepositoryV1Api = exports.QuoteCartRepositoryV1ApiFactory = exports.QuoteCartRepositoryV1ApiFp = exports.QuoteCartRepositoryV1ApiFetchParamCreator = exports.QuoteCartManagementV1Api = exports.QuoteCartManagementV1ApiFactory = exports.QuoteCartManagementV1ApiFp = exports.QuoteCartManagementV1ApiFetchParamCreator = exports.QuoteCartItemRepositoryV1Api = exports.QuoteCartItemRepositoryV1ApiFactory = exports.QuoteCartItemRepositoryV1ApiFp = exports.QuoteCartItemRepositoryV1ApiFetchParamCreator = exports.QuoteBillingAddressManagementV1Api = exports.QuoteBillingAddressManagementV1ApiFactory = void 0; exports.SalesInvoiceOrderV1ApiFp = exports.SalesInvoiceOrderV1ApiFetchParamCreator = exports.SalesInvoiceManagementV1Api = exports.SalesInvoiceManagementV1ApiFactory = exports.SalesInvoiceManagementV1ApiFp = exports.SalesInvoiceManagementV1ApiFetchParamCreator = exports.SalesInvoiceCommentRepositoryV1Api = exports.SalesInvoiceCommentRepositoryV1ApiFactory = exports.SalesInvoiceCommentRepositoryV1ApiFp = exports.SalesInvoiceCommentRepositoryV1ApiFetchParamCreator = exports.SalesCreditmemoRepositoryV1Api = exports.SalesCreditmemoRepositoryV1ApiFactory = exports.SalesCreditmemoRepositoryV1ApiFp = exports.SalesCreditmemoRepositoryV1ApiFetchParamCreator = exports.SalesCreditmemoManagementV1Api = exports.SalesCreditmemoManagementV1ApiFactory = exports.SalesCreditmemoManagementV1ApiFp = exports.SalesCreditmemoManagementV1ApiFetchParamCreator = exports.SalesCreditmemoCommentRepositoryV1Api = exports.SalesCreditmemoCommentRepositoryV1ApiFactory = exports.SalesCreditmemoCommentRepositoryV1ApiFp = exports.SalesCreditmemoCommentRepositoryV1ApiFetchParamCreator = exports.QuoteShippingMethodManagementV1Api = exports.QuoteShippingMethodManagementV1ApiFactory = exports.QuoteShippingMethodManagementV1ApiFp = exports.QuoteShippingMethodManagementV1ApiFetchParamCreator = exports.QuoteShipmentEstimationV1Api = exports.QuoteShipmentEstimationV1ApiFactory = exports.QuoteShipmentEstimationV1ApiFp = exports.QuoteShipmentEstimationV1ApiFetchParamCreator = exports.QuotePaymentMethodManagementV1Api = exports.QuotePaymentMethodManagementV1ApiFactory = exports.QuotePaymentMethodManagementV1ApiFp = exports.QuotePaymentMethodManagementV1ApiFetchParamCreator = exports.QuoteGuestShippingMethodManagementV1Api = exports.QuoteGuestShippingMethodManagementV1ApiFactory = exports.QuoteGuestShippingMethodManagementV1ApiFp = exports.QuoteGuestShippingMethodManagementV1ApiFetchParamCreator = exports.QuoteGuestShipmentEstimationV1Api = exports.QuoteGuestShipmentEstimationV1ApiFactory = exports.QuoteGuestShipmentEstimationV1ApiFp = exports.QuoteGuestShipmentEstimationV1ApiFetchParamCreator = exports.QuoteGuestPaymentMethodManagementV1Api = exports.QuoteGuestPaymentMethodManagementV1ApiFactory = exports.QuoteGuestPaymentMethodManagementV1ApiFp = exports.QuoteGuestPaymentMethodManagementV1ApiFetchParamCreator = exports.QuoteGuestCouponManagementV1Api = exports.QuoteGuestCouponManagementV1ApiFactory = exports.QuoteGuestCouponManagementV1ApiFp = exports.QuoteGuestCouponManagementV1ApiFetchParamCreator = void 0; exports.SalesShipmentCommentRepositoryV1Api = exports.SalesShipmentCommentRepositoryV1ApiFactory = exports.SalesShipmentCommentRepositoryV1ApiFp = exports.SalesShipmentCommentRepositoryV1ApiFetchParamCreator = exports.SalesShipOrderV1Api = exports.SalesShipOrderV1ApiFactory = exports.SalesShipOrderV1ApiFp = exports.SalesShipOrderV1ApiFetchParamCreator = exports.SalesRuleRuleRepositoryV1Api = exports.SalesRuleRuleRepositoryV1ApiFactory = exports.SalesRuleRuleRepositoryV1ApiFp = exports.SalesRuleRuleRepositoryV1ApiFetchParamCreator = exports.SalesRuleCouponRepositoryV1Api = exports.SalesRuleCouponRepositoryV1ApiFactory = exports.SalesRuleCouponRepositoryV1ApiFp = exports.SalesRuleCouponRepositoryV1ApiFetchParamCreator = exports.SalesRuleCouponManagementV1Api = exports.SalesRuleCouponManagementV1ApiFactory = exports.SalesRuleCouponManagementV1ApiFp = exports.SalesRuleCouponManagementV1ApiFetchParamCreator = exports.SalesRefundOrderV1Api = exports.SalesRefundOrderV1ApiFactory = exports.SalesRefundOrderV1ApiFp = exports.SalesRefundOrderV1ApiFetchParamCreator = exports.SalesRefundInvoiceV1Api = exports.SalesRefundInvoiceV1ApiFactory = exports.SalesRefundInvoiceV1ApiFp = exports.SalesRefundInvoiceV1ApiFetchParamCreator = exports.SalesOrderRepositoryV1Api = exports.SalesOrderRepositoryV1ApiFactory = exports.SalesOrderRepositoryV1ApiFp = exports.SalesOrderRepositoryV1ApiFetchParamCreator = exports.SalesOrderManagementV1Api = exports.SalesOrderManagementV1ApiFactory = exports.SalesOrderManagementV1ApiFp = exports.SalesOrderManagementV1ApiFetchParamCreator = exports.SalesOrderItemRepositoryV1Api = exports.SalesOrderItemRepositoryV1ApiFactory = exports.SalesOrderItemRepositoryV1ApiFp = exports.SalesOrderItemRepositoryV1ApiFetchParamCreator = exports.SalesOrderAddressRepositoryV1Api = exports.SalesOrderAddressRepositoryV1ApiFactory = exports.SalesOrderAddressRepositoryV1ApiFp = exports.SalesOrderAddressRepositoryV1ApiFetchParamCreator = exports.SalesInvoiceRepositoryV1Api = exports.SalesInvoiceRepositoryV1ApiFactory = exports.SalesInvoiceRepositoryV1ApiFp = exports.SalesInvoiceRepositoryV1ApiFetchParamCreator = exports.SalesInvoiceOrderV1Api = exports.SalesInvoiceOrderV1ApiFactory = void 0; exports.VertexAddressValidationAddressManagementV1ApiFp = exports.VertexAddressValidationAddressManagementV1ApiFetchParamCreator = exports.TaxTaxRuleRepositoryV1Api = exports.TaxTaxRuleRepositoryV1ApiFactory = exports.TaxTaxRuleRepositoryV1ApiFp = exports.TaxTaxRuleRepositoryV1ApiFetchParamCreator = exports.TaxTaxRateRepositoryV1Api = exports.TaxTaxRateRepositoryV1ApiFactory = exports.TaxTaxRateRepositoryV1ApiFp = exports.TaxTaxRateRepositoryV1ApiFetchParamCreator = exports.TaxTaxClassRepositoryV1Api = exports.TaxTaxClassRepositoryV1ApiFactory = exports.TaxTaxClassRepositoryV1ApiFp = exports.TaxTaxClassRepositoryV1ApiFetchParamCreator = exports.StoreWebsiteRepositoryV1Api = exports.StoreWebsiteRepositoryV1ApiFactory = exports.StoreWebsiteRepositoryV1ApiFp = exports.StoreWebsiteRepositoryV1ApiFetchParamCreator = exports.StoreStoreRepositoryV1Api = exports.StoreStoreRepositoryV1ApiFactory = exports.StoreStoreRepositoryV1ApiFp = exports.StoreStoreRepositoryV1ApiFetchParamCreator = exports.StoreStoreConfigManagerV1Api = exports.StoreStoreConfigManagerV1ApiFactory = exports.StoreStoreConfigManagerV1ApiFp = exports.StoreStoreConfigManagerV1ApiFetchParamCreator = exports.StoreGroupRepositoryV1Api = exports.StoreGroupRepositoryV1ApiFactory = exports.StoreGroupRepositoryV1ApiFp = exports.StoreGroupRepositoryV1ApiFetchParamCreator = exports.SearchV1Api = exports.SearchV1ApiFactory = exports.SearchV1ApiFp = exports.SearchV1ApiFetchParamCreator = exports.SalesTransactionRepositoryV1Api = exports.SalesTransactionRepositoryV1ApiFactory = exports.SalesTransactionRepositoryV1ApiFp = exports.SalesTransactionRepositoryV1ApiFetchParamCreator = exports.SalesShipmentTrackRepositoryV1Api = exports.SalesShipmentTrackRepositoryV1ApiFactory = exports.SalesShipmentTrackRepositoryV1ApiFp = exports.SalesShipmentTrackRepositoryV1ApiFetchParamCreator = exports.SalesShipmentRepositoryV1Api = exports.SalesShipmentRepositoryV1ApiFactory = exports.SalesShipmentRepositoryV1ApiFp = exports.SalesShipmentRepositoryV1ApiFetchParamCreator = exports.SalesShipmentManagementV1Api = exports.SalesShipmentManagementV1ApiFactory = exports.SalesShipmentManagementV1ApiFp = exports.SalesShipmentManagementV1ApiFetchParamCreator = void 0; exports.VertexAddressValidationApiGuestCleanseAddressV1Api = exports.VertexAddressValidationApiGuestCleanseAddressV1ApiFactory = exports.VertexAddressValidationApiGuestCleanseAddressV1ApiFp = exports.VertexAddressValidationApiGuestCleanseAddressV1ApiFetchParamCreator = exports.VertexAddressValidationApiCleanseAddressV1Api = exports.VertexAddressValidationApiCleanseAddressV1ApiFactory = exports.VertexAddressValidationApiCleanseAddressV1ApiFp = exports.VertexAddressValidationApiCleanseAddressV1ApiFetchParamCreator = exports.VertexAddressValidationAddressManagementV1Api = exports.VertexAddressValidationAddressManagementV1ApiFactory = void 0; const url = require("url"); const realFetch = require('node-fetch'); let auth = {}; const setAuth = (options) => { auth = options; }; exports.setAuth = setAuth; const portableFetch = (url, options) => realFetch.call(this, url, Object.assign(Object.assign({}, options), auth)); const BASE_PATH = "https://shop.plastic-hub.com/rest/all".replace(/\/+$/, ""); /** * * @export */ exports.COLLECTION_FORMATS = { csv: ",", ssv: " ", tsv: "\t", pipes: "|", }; /** * * @export * @class BaseAPI */ class BaseAPI { constructor(configuration, basePath = BASE_PATH, fetch = portableFetch) { this.basePath = basePath; this.fetch = fetch; if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; } } } exports.BaseAPI = BaseAPI; ; /** * * @export * @class RequiredError * @extends {Error} */ class RequiredError extends Error { constructor(field, msg) { super(msg); this.field = field; } } exports.RequiredError = RequiredError; /** * AdobeStockAssetApiAssetRepositoryV1Api - fetch parameter creator * @export */ const AdobeStockAssetApiAssetRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete asset * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiAssetRepositoryV1DeleteByIdDelete(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling adobeStockAssetApiAssetRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/adobestock/asset/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get asset by id * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiAssetRepositoryV1GetByIdGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling adobeStockAssetApiAssetRepositoryV1GetByIdGet.'); } const localVarPath = `/V1/adobestock/asset/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get a list of assets * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiAssetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/adobestock/asset/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.AdobeStockAssetApiAssetRepositoryV1ApiFetchParamCreator = AdobeStockAssetApiAssetRepositoryV1ApiFetchParamCreator; /** * AdobeStockAssetApiAssetRepositoryV1Api - functional programming interface * @export */ const AdobeStockAssetApiAssetRepositoryV1ApiFp = function (configuration) { return { /** * Delete asset * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiAssetRepositoryV1DeleteByIdDelete(id, options) { const localVarFetchArgs = exports.AdobeStockAssetApiAssetRepositoryV1ApiFetchParamCreator(configuration).adobeStockAssetApiAssetRepositoryV1DeleteByIdDelete(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get asset by id * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiAssetRepositoryV1GetByIdGet(id, options) { const localVarFetchArgs = exports.AdobeStockAssetApiAssetRepositoryV1ApiFetchParamCreator(configuration).adobeStockAssetApiAssetRepositoryV1GetByIdGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get a list of assets * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiAssetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.AdobeStockAssetApiAssetRepositoryV1ApiFetchParamCreator(configuration).adobeStockAssetApiAssetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.AdobeStockAssetApiAssetRepositoryV1ApiFp = AdobeStockAssetApiAssetRepositoryV1ApiFp; /** * AdobeStockAssetApiAssetRepositoryV1Api - factory interface * @export */ const AdobeStockAssetApiAssetRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete asset * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiAssetRepositoryV1DeleteByIdDelete(id, options) { return exports.AdobeStockAssetApiAssetRepositoryV1ApiFp(configuration).adobeStockAssetApiAssetRepositoryV1DeleteByIdDelete(id, options)(fetch, basePath); }, /** * Get asset by id * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiAssetRepositoryV1GetByIdGet(id, options) { return exports.AdobeStockAssetApiAssetRepositoryV1ApiFp(configuration).adobeStockAssetApiAssetRepositoryV1GetByIdGet(id, options)(fetch, basePath); }, /** * Get a list of assets * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiAssetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.AdobeStockAssetApiAssetRepositoryV1ApiFp(configuration).adobeStockAssetApiAssetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.AdobeStockAssetApiAssetRepositoryV1ApiFactory = AdobeStockAssetApiAssetRepositoryV1ApiFactory; /** * AdobeStockAssetApiAssetRepositoryV1Api - object-oriented interface * @export * @class AdobeStockAssetApiAssetRepositoryV1Api * @extends {BaseAPI} */ class AdobeStockAssetApiAssetRepositoryV1Api extends BaseAPI { /** * Delete asset * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdobeStockAssetApiAssetRepositoryV1Api */ adobeStockAssetApiAssetRepositoryV1DeleteByIdDelete(id, options) { return exports.AdobeStockAssetApiAssetRepositoryV1ApiFp(this.configuration).adobeStockAssetApiAssetRepositoryV1DeleteByIdDelete(id, options)(this.fetch, this.basePath); } /** * Get asset by id * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdobeStockAssetApiAssetRepositoryV1Api */ adobeStockAssetApiAssetRepositoryV1GetByIdGet(id, options) { return exports.AdobeStockAssetApiAssetRepositoryV1ApiFp(this.configuration).adobeStockAssetApiAssetRepositoryV1GetByIdGet(id, options)(this.fetch, this.basePath); } /** * Get a list of assets * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdobeStockAssetApiAssetRepositoryV1Api */ adobeStockAssetApiAssetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.AdobeStockAssetApiAssetRepositoryV1ApiFp(this.configuration).adobeStockAssetApiAssetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.AdobeStockAssetApiAssetRepositoryV1Api = AdobeStockAssetApiAssetRepositoryV1Api; /** * AdobeStockAssetApiGetAssetListV1Api - fetch parameter creator * @export */ const AdobeStockAssetApiGetAssetListV1ApiFetchParamCreator = function (configuration) { return { /** * Search for images based on search criteria * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiGetAssetListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/adobestock/asset/list`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaRequestName !== undefined) { localVarQueryParameter['searchCriteria[requestName]'] = searchCriteriaRequestName; } if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.AdobeStockAssetApiGetAssetListV1ApiFetchParamCreator = AdobeStockAssetApiGetAssetListV1ApiFetchParamCreator; /** * AdobeStockAssetApiGetAssetListV1Api - functional programming interface * @export */ const AdobeStockAssetApiGetAssetListV1ApiFp = function (configuration) { return { /** * Search for images based on search criteria * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiGetAssetListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.AdobeStockAssetApiGetAssetListV1ApiFetchParamCreator(configuration).adobeStockAssetApiGetAssetListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.AdobeStockAssetApiGetAssetListV1ApiFp = AdobeStockAssetApiGetAssetListV1ApiFp; /** * AdobeStockAssetApiGetAssetListV1Api - factory interface * @export */ const AdobeStockAssetApiGetAssetListV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Search for images based on search criteria * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockAssetApiGetAssetListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.AdobeStockAssetApiGetAssetListV1ApiFp(configuration).adobeStockAssetApiGetAssetListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.AdobeStockAssetApiGetAssetListV1ApiFactory = AdobeStockAssetApiGetAssetListV1ApiFactory; /** * AdobeStockAssetApiGetAssetListV1Api - object-oriented interface * @export * @class AdobeStockAssetApiGetAssetListV1Api * @extends {BaseAPI} */ class AdobeStockAssetApiGetAssetListV1Api extends BaseAPI { /** * Search for images based on search criteria * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdobeStockAssetApiGetAssetListV1Api */ adobeStockAssetApiGetAssetListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.AdobeStockAssetApiGetAssetListV1ApiFp(this.configuration).adobeStockAssetApiGetAssetListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.AdobeStockAssetApiGetAssetListV1Api = AdobeStockAssetApiGetAssetListV1Api; /** * AdobeStockImageApiGetImageListV1Api - fetch parameter creator * @export */ const AdobeStockImageApiGetImageListV1ApiFetchParamCreator = function (configuration) { return { /** * Search for images based on search criteria * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockImageApiGetImageListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/adobestock/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaRequestName !== undefined) { localVarQueryParameter['searchCriteria[requestName]'] = searchCriteriaRequestName; } if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.AdobeStockImageApiGetImageListV1ApiFetchParamCreator = AdobeStockImageApiGetImageListV1ApiFetchParamCreator; /** * AdobeStockImageApiGetImageListV1Api - functional programming interface * @export */ const AdobeStockImageApiGetImageListV1ApiFp = function (configuration) { return { /** * Search for images based on search criteria * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockImageApiGetImageListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.AdobeStockImageApiGetImageListV1ApiFetchParamCreator(configuration).adobeStockImageApiGetImageListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.AdobeStockImageApiGetImageListV1ApiFp = AdobeStockImageApiGetImageListV1ApiFp; /** * AdobeStockImageApiGetImageListV1Api - factory interface * @export */ const AdobeStockImageApiGetImageListV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Search for images based on search criteria * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adobeStockImageApiGetImageListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.AdobeStockImageApiGetImageListV1ApiFp(configuration).adobeStockImageApiGetImageListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.AdobeStockImageApiGetImageListV1ApiFactory = AdobeStockImageApiGetImageListV1ApiFactory; /** * AdobeStockImageApiGetImageListV1Api - object-oriented interface * @export * @class AdobeStockImageApiGetImageListV1Api * @extends {BaseAPI} */ class AdobeStockImageApiGetImageListV1Api extends BaseAPI { /** * Search for images based on search criteria * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdobeStockImageApiGetImageListV1Api */ adobeStockImageApiGetImageListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.AdobeStockImageApiGetImageListV1ApiFp(this.configuration).adobeStockImageApiGetImageListV1ExecuteGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.AdobeStockImageApiGetImageListV1Api = AdobeStockImageApiGetImageListV1Api; /** * AmazonPaymentAddressManagementV1Api - fetch parameter creator * @export */ const AmazonPaymentAddressManagementV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {string} amazonOrderReferenceId * @param {any} [amazonPaymentAddressManagementV1GetBillingAddressPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ amazonPaymentAddressManagementV1GetBillingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetBillingAddressPutBody, options = {}) { // verify required parameter 'amazonOrderReferenceId' is not null or undefined if (amazonOrderReferenceId === null || amazonOrderReferenceId === undefined) { throw new RequiredError('amazonOrderReferenceId', 'Required parameter amazonOrderReferenceId was null or undefined when calling amazonPaymentAddressManagementV1GetBillingAddressPut.'); } const localVarPath = `/V1/amazon-billing-address/{amazonOrderReferenceId}` .replace(`{${"amazonOrderReferenceId"}}`, encodeURIComponent(String(amazonOrderReferenceId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(amazonPaymentAddressManagementV1GetBillingAddressPutBody || {}) : (amazonPaymentAddressManagementV1GetBillingAddressPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {string} amazonOrderReferenceId * @param {any} [amazonPaymentAddressManagementV1GetShippingAddressPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ amazonPaymentAddressManagementV1GetShippingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetShippingAddressPutBody, options = {}) { // verify required parameter 'amazonOrderReferenceId' is not null or undefined if (amazonOrderReferenceId === null || amazonOrderReferenceId === undefined) { throw new RequiredError('amazonOrderReferenceId', 'Required parameter amazonOrderReferenceId was null or undefined when calling amazonPaymentAddressManagementV1GetShippingAddressPut.'); } const localVarPath = `/V1/amazon-shipping-address/{amazonOrderReferenceId}` .replace(`{${"amazonOrderReferenceId"}}`, encodeURIComponent(String(amazonOrderReferenceId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(amazonPaymentAddressManagementV1GetShippingAddressPutBody || {}) : (amazonPaymentAddressManagementV1GetShippingAddressPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.AmazonPaymentAddressManagementV1ApiFetchParamCreator = AmazonPaymentAddressManagementV1ApiFetchParamCreator; /** * AmazonPaymentAddressManagementV1Api - functional programming interface * @export */ const AmazonPaymentAddressManagementV1ApiFp = function (configuration) { return { /** * * @param {string} amazonOrderReferenceId * @param {any} [amazonPaymentAddressManagementV1GetBillingAddressPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ amazonPaymentAddressManagementV1GetBillingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetBillingAddressPutBody, options) { const localVarFetchArgs = exports.AmazonPaymentAddressManagementV1ApiFetchParamCreator(configuration).amazonPaymentAddressManagementV1GetBillingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetBillingAddressPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * * @param {string} amazonOrderReferenceId * @param {any} [amazonPaymentAddressManagementV1GetShippingAddressPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ amazonPaymentAddressManagementV1GetShippingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetShippingAddressPutBody, options) { const localVarFetchArgs = exports.AmazonPaymentAddressManagementV1ApiFetchParamCreator(configuration).amazonPaymentAddressManagementV1GetShippingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetShippingAddressPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.AmazonPaymentAddressManagementV1ApiFp = AmazonPaymentAddressManagementV1ApiFp; /** * AmazonPaymentAddressManagementV1Api - factory interface * @export */ const AmazonPaymentAddressManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {string} amazonOrderReferenceId * @param {any} [amazonPaymentAddressManagementV1GetBillingAddressPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ amazonPaymentAddressManagementV1GetBillingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetBillingAddressPutBody, options) { return exports.AmazonPaymentAddressManagementV1ApiFp(configuration).amazonPaymentAddressManagementV1GetBillingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetBillingAddressPutBody, options)(fetch, basePath); }, /** * * @param {string} amazonOrderReferenceId * @param {any} [amazonPaymentAddressManagementV1GetShippingAddressPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ amazonPaymentAddressManagementV1GetShippingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetShippingAddressPutBody, options) { return exports.AmazonPaymentAddressManagementV1ApiFp(configuration).amazonPaymentAddressManagementV1GetShippingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetShippingAddressPutBody, options)(fetch, basePath); }, }; }; exports.AmazonPaymentAddressManagementV1ApiFactory = AmazonPaymentAddressManagementV1ApiFactory; /** * AmazonPaymentAddressManagementV1Api - object-oriented interface * @export * @class AmazonPaymentAddressManagementV1Api * @extends {BaseAPI} */ class AmazonPaymentAddressManagementV1Api extends BaseAPI { /** * * @param {string} amazonOrderReferenceId * @param {any} [amazonPaymentAddressManagementV1GetBillingAddressPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AmazonPaymentAddressManagementV1Api */ amazonPaymentAddressManagementV1GetBillingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetBillingAddressPutBody, options) { return exports.AmazonPaymentAddressManagementV1ApiFp(this.configuration).amazonPaymentAddressManagementV1GetBillingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetBillingAddressPutBody, options)(this.fetch, this.basePath); } /** * * @param {string} amazonOrderReferenceId * @param {any} [amazonPaymentAddressManagementV1GetShippingAddressPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AmazonPaymentAddressManagementV1Api */ amazonPaymentAddressManagementV1GetShippingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetShippingAddressPutBody, options) { return exports.AmazonPaymentAddressManagementV1ApiFp(this.configuration).amazonPaymentAddressManagementV1GetShippingAddressPut(amazonOrderReferenceId, amazonPaymentAddressManagementV1GetShippingAddressPutBody, options)(this.fetch, this.basePath); } } exports.AmazonPaymentAddressManagementV1Api = AmazonPaymentAddressManagementV1Api; /** * AmazonPaymentOrderInformationManagementV1Api - fetch parameter creator * @export */ const AmazonPaymentOrderInformationManagementV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ amazonPaymentOrderInformationManagementV1RemoveOrderReferenceDelete(options = {}) { const localVarPath = `/V1/amazon/order-ref`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.AmazonPaymentOrderInformationManagementV1ApiFetchParamCreator = AmazonPaymentOrderInformationManagementV1ApiFetchParamCreator; /** * AmazonPaymentOrderInformationManagementV1Api - functional programming interface * @export */ const AmazonPaymentOrderInformationManagementV1ApiFp = function (configuration) { return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ amazonPaymentOrderInformationManagementV1RemoveOrderReferenceDelete(options) { const localVarFetchArgs = exports.AmazonPaymentOrderInformationManagementV1ApiFetchParamCreator(configuration).amazonPaymentOrderInformationManagementV1RemoveOrderReferenceDelete(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.AmazonPaymentOrderInformationManagementV1ApiFp = AmazonPaymentOrderInformationManagementV1ApiFp; /** * AmazonPaymentOrderInformationManagementV1Api - factory interface * @export */ const AmazonPaymentOrderInformationManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ amazonPaymentOrderInformationManagementV1RemoveOrderReferenceDelete(options) { return exports.AmazonPaymentOrderInformationManagementV1ApiFp(configuration).amazonPaymentOrderInformationManagementV1RemoveOrderReferenceDelete(options)(fetch, basePath); }, }; }; exports.AmazonPaymentOrderInformationManagementV1ApiFactory = AmazonPaymentOrderInformationManagementV1ApiFactory; /** * AmazonPaymentOrderInformationManagementV1Api - object-oriented interface * @export * @class AmazonPaymentOrderInformationManagementV1Api * @extends {BaseAPI} */ class AmazonPaymentOrderInformationManagementV1Api extends BaseAPI { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AmazonPaymentOrderInformationManagementV1Api */ amazonPaymentOrderInformationManagementV1RemoveOrderReferenceDelete(options) { return exports.AmazonPaymentOrderInformationManagementV1ApiFp(this.configuration).amazonPaymentOrderInformationManagementV1RemoveOrderReferenceDelete(options)(this.fetch, this.basePath); } } exports.AmazonPaymentOrderInformationManagementV1Api = AmazonPaymentOrderInformationManagementV1Api; /** * AnalyticsLinkProviderV1Api - fetch parameter creator * @export */ const AnalyticsLinkProviderV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ analyticsLinkProviderV1GetGet(options = {}) { const localVarPath = `/V1/analytics/link`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.AnalyticsLinkProviderV1ApiFetchParamCreator = AnalyticsLinkProviderV1ApiFetchParamCreator; /** * AnalyticsLinkProviderV1Api - functional programming interface * @export */ const AnalyticsLinkProviderV1ApiFp = function (configuration) { return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ analyticsLinkProviderV1GetGet(options) { const localVarFetchArgs = exports.AnalyticsLinkProviderV1ApiFetchParamCreator(configuration).analyticsLinkProviderV1GetGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.AnalyticsLinkProviderV1ApiFp = AnalyticsLinkProviderV1ApiFp; /** * AnalyticsLinkProviderV1Api - factory interface * @export */ const AnalyticsLinkProviderV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ analyticsLinkProviderV1GetGet(options) { return exports.AnalyticsLinkProviderV1ApiFp(configuration).analyticsLinkProviderV1GetGet(options)(fetch, basePath); }, }; }; exports.AnalyticsLinkProviderV1ApiFactory = AnalyticsLinkProviderV1ApiFactory; /** * AnalyticsLinkProviderV1Api - object-oriented interface * @export * @class AnalyticsLinkProviderV1Api * @extends {BaseAPI} */ class AnalyticsLinkProviderV1Api extends BaseAPI { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AnalyticsLinkProviderV1Api */ analyticsLinkProviderV1GetGet(options) { return exports.AnalyticsLinkProviderV1ApiFp(this.configuration).analyticsLinkProviderV1GetGet(options)(this.fetch, this.basePath); } } exports.AnalyticsLinkProviderV1Api = AnalyticsLinkProviderV1Api; /** * AsynchronousOperationsBulkStatusV1Api - fetch parameter creator * @export */ const AsynchronousOperationsBulkStatusV1ApiFetchParamCreator = function (configuration) { return { /** * Get Bulk summary data with list of operations items full data. * @param {string} bulkUuid * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsBulkStatusV1GetBulkDetailedStatusGet(bulkUuid, options = {}) { // verify required parameter 'bulkUuid' is not null or undefined if (bulkUuid === null || bulkUuid === undefined) { throw new RequiredError('bulkUuid', 'Required parameter bulkUuid was null or undefined when calling asynchronousOperationsBulkStatusV1GetBulkDetailedStatusGet.'); } const localVarPath = `/V1/bulk/{bulkUuid}/detailed-status` .replace(`{${"bulkUuid"}}`, encodeURIComponent(String(bulkUuid))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get Bulk summary data with list of operations items short data. * @param {string} bulkUuid * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsBulkStatusV1GetBulkShortStatusGet(bulkUuid, options = {}) { // verify required parameter 'bulkUuid' is not null or undefined if (bulkUuid === null || bulkUuid === undefined) { throw new RequiredError('bulkUuid', 'Required parameter bulkUuid was null or undefined when calling asynchronousOperationsBulkStatusV1GetBulkShortStatusGet.'); } const localVarPath = `/V1/bulk/{bulkUuid}/status` .replace(`{${"bulkUuid"}}`, encodeURIComponent(String(bulkUuid))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get operations count by bulk uuid and status. * @param {string} bulkUuid * @param {number} status * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsBulkStatusV1GetOperationsCountByBulkIdAndStatusGet(bulkUuid, status, options = {}) { // verify required parameter 'bulkUuid' is not null or undefined if (bulkUuid === null || bulkUuid === undefined) { throw new RequiredError('bulkUuid', 'Required parameter bulkUuid was null or undefined when calling asynchronousOperationsBulkStatusV1GetOperationsCountByBulkIdAndStatusGet.'); } // verify required parameter 'status' is not null or undefined if (status === null || status === undefined) { throw new RequiredError('status', 'Required parameter status was null or undefined when calling asynchronousOperationsBulkStatusV1GetOperationsCountByBulkIdAndStatusGet.'); } const localVarPath = `/V1/bulk/{bulkUuid}/operation-status/{status}` .replace(`{${"bulkUuid"}}`, encodeURIComponent(String(bulkUuid))) .replace(`{${"status"}}`, encodeURIComponent(String(status))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.AsynchronousOperationsBulkStatusV1ApiFetchParamCreator = AsynchronousOperationsBulkStatusV1ApiFetchParamCreator; /** * AsynchronousOperationsBulkStatusV1Api - functional programming interface * @export */ const AsynchronousOperationsBulkStatusV1ApiFp = function (configuration) { return { /** * Get Bulk summary data with list of operations items full data. * @param {string} bulkUuid * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsBulkStatusV1GetBulkDetailedStatusGet(bulkUuid, options) { const localVarFetchArgs = exports.AsynchronousOperationsBulkStatusV1ApiFetchParamCreator(configuration).asynchronousOperationsBulkStatusV1GetBulkDetailedStatusGet(bulkUuid, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get Bulk summary data with list of operations items short data. * @param {string} bulkUuid * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsBulkStatusV1GetBulkShortStatusGet(bulkUuid, options) { const localVarFetchArgs = exports.AsynchronousOperationsBulkStatusV1ApiFetchParamCreator(configuration).asynchronousOperationsBulkStatusV1GetBulkShortStatusGet(bulkUuid, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get operations count by bulk uuid and status. * @param {string} bulkUuid * @param {number} status * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsBulkStatusV1GetOperationsCountByBulkIdAndStatusGet(bulkUuid, status, options) { const localVarFetchArgs = exports.AsynchronousOperationsBulkStatusV1ApiFetchParamCreator(configuration).asynchronousOperationsBulkStatusV1GetOperationsCountByBulkIdAndStatusGet(bulkUuid, status, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.AsynchronousOperationsBulkStatusV1ApiFp = AsynchronousOperationsBulkStatusV1ApiFp; /** * AsynchronousOperationsBulkStatusV1Api - factory interface * @export */ const AsynchronousOperationsBulkStatusV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get Bulk summary data with list of operations items full data. * @param {string} bulkUuid * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsBulkStatusV1GetBulkDetailedStatusGet(bulkUuid, options) { return exports.AsynchronousOperationsBulkStatusV1ApiFp(configuration).asynchronousOperationsBulkStatusV1GetBulkDetailedStatusGet(bulkUuid, options)(fetch, basePath); }, /** * Get Bulk summary data with list of operations items short data. * @param {string} bulkUuid * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsBulkStatusV1GetBulkShortStatusGet(bulkUuid, options) { return exports.AsynchronousOperationsBulkStatusV1ApiFp(configuration).asynchronousOperationsBulkStatusV1GetBulkShortStatusGet(bulkUuid, options)(fetch, basePath); }, /** * Get operations count by bulk uuid and status. * @param {string} bulkUuid * @param {number} status * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsBulkStatusV1GetOperationsCountByBulkIdAndStatusGet(bulkUuid, status, options) { return exports.AsynchronousOperationsBulkStatusV1ApiFp(configuration).asynchronousOperationsBulkStatusV1GetOperationsCountByBulkIdAndStatusGet(bulkUuid, status, options)(fetch, basePath); }, }; }; exports.AsynchronousOperationsBulkStatusV1ApiFactory = AsynchronousOperationsBulkStatusV1ApiFactory; /** * AsynchronousOperationsBulkStatusV1Api - object-oriented interface * @export * @class AsynchronousOperationsBulkStatusV1Api * @extends {BaseAPI} */ class AsynchronousOperationsBulkStatusV1Api extends BaseAPI { /** * Get Bulk summary data with list of operations items full data. * @param {string} bulkUuid * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AsynchronousOperationsBulkStatusV1Api */ asynchronousOperationsBulkStatusV1GetBulkDetailedStatusGet(bulkUuid, options) { return exports.AsynchronousOperationsBulkStatusV1ApiFp(this.configuration).asynchronousOperationsBulkStatusV1GetBulkDetailedStatusGet(bulkUuid, options)(this.fetch, this.basePath); } /** * Get Bulk summary data with list of operations items short data. * @param {string} bulkUuid * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AsynchronousOperationsBulkStatusV1Api */ asynchronousOperationsBulkStatusV1GetBulkShortStatusGet(bulkUuid, options) { return exports.AsynchronousOperationsBulkStatusV1ApiFp(this.configuration).asynchronousOperationsBulkStatusV1GetBulkShortStatusGet(bulkUuid, options)(this.fetch, this.basePath); } /** * Get operations count by bulk uuid and status. * @param {string} bulkUuid * @param {number} status * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AsynchronousOperationsBulkStatusV1Api */ asynchronousOperationsBulkStatusV1GetOperationsCountByBulkIdAndStatusGet(bulkUuid, status, options) { return exports.AsynchronousOperationsBulkStatusV1ApiFp(this.configuration).asynchronousOperationsBulkStatusV1GetOperationsCountByBulkIdAndStatusGet(bulkUuid, status, options)(this.fetch, this.basePath); } } exports.AsynchronousOperationsBulkStatusV1Api = AsynchronousOperationsBulkStatusV1Api; /** * AsynchronousOperationsOperationRepositoryV1Api - fetch parameter creator * @export */ const AsynchronousOperationsOperationRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Lists the bulk operation items that match specified search criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsOperationRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/bulk`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.AsynchronousOperationsOperationRepositoryV1ApiFetchParamCreator = AsynchronousOperationsOperationRepositoryV1ApiFetchParamCreator; /** * AsynchronousOperationsOperationRepositoryV1Api - functional programming interface * @export */ const AsynchronousOperationsOperationRepositoryV1ApiFp = function (configuration) { return { /** * Lists the bulk operation items that match specified search criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsOperationRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.AsynchronousOperationsOperationRepositoryV1ApiFetchParamCreator(configuration).asynchronousOperationsOperationRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.AsynchronousOperationsOperationRepositoryV1ApiFp = AsynchronousOperationsOperationRepositoryV1ApiFp; /** * AsynchronousOperationsOperationRepositoryV1Api - factory interface * @export */ const AsynchronousOperationsOperationRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Lists the bulk operation items that match specified search criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ asynchronousOperationsOperationRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.AsynchronousOperationsOperationRepositoryV1ApiFp(configuration).asynchronousOperationsOperationRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.AsynchronousOperationsOperationRepositoryV1ApiFactory = AsynchronousOperationsOperationRepositoryV1ApiFactory; /** * AsynchronousOperationsOperationRepositoryV1Api - object-oriented interface * @export * @class AsynchronousOperationsOperationRepositoryV1Api * @extends {BaseAPI} */ class AsynchronousOperationsOperationRepositoryV1Api extends BaseAPI { /** * Lists the bulk operation items that match specified search criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AsynchronousOperationsOperationRepositoryV1Api */ asynchronousOperationsOperationRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.AsynchronousOperationsOperationRepositoryV1ApiFp(this.configuration).asynchronousOperationsOperationRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.AsynchronousOperationsOperationRepositoryV1Api = AsynchronousOperationsOperationRepositoryV1Api; /** * BackendModuleServiceV1Api - fetch parameter creator * @export */ const BackendModuleServiceV1ApiFetchParamCreator = function (configuration) { return { /** * Returns an array of enabled modules * @param {*} [options] Override http request option. * @throws {RequiredError} */ backendModuleServiceV1GetModulesGet(options = {}) { const localVarPath = `/V1/modules`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.BackendModuleServiceV1ApiFetchParamCreator = BackendModuleServiceV1ApiFetchParamCreator; /** * BackendModuleServiceV1Api - functional programming interface * @export */ const BackendModuleServiceV1ApiFp = function (configuration) { return { /** * Returns an array of enabled modules * @param {*} [options] Override http request option. * @throws {RequiredError} */ backendModuleServiceV1GetModulesGet(options) { const localVarFetchArgs = exports.BackendModuleServiceV1ApiFetchParamCreator(configuration).backendModuleServiceV1GetModulesGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.BackendModuleServiceV1ApiFp = BackendModuleServiceV1ApiFp; /** * BackendModuleServiceV1Api - factory interface * @export */ const BackendModuleServiceV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Returns an array of enabled modules * @param {*} [options] Override http request option. * @throws {RequiredError} */ backendModuleServiceV1GetModulesGet(options) { return exports.BackendModuleServiceV1ApiFp(configuration).backendModuleServiceV1GetModulesGet(options)(fetch, basePath); }, }; }; exports.BackendModuleServiceV1ApiFactory = BackendModuleServiceV1ApiFactory; /** * BackendModuleServiceV1Api - object-oriented interface * @export * @class BackendModuleServiceV1Api * @extends {BaseAPI} */ class BackendModuleServiceV1Api extends BaseAPI { /** * Returns an array of enabled modules * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackendModuleServiceV1Api */ backendModuleServiceV1GetModulesGet(options) { return exports.BackendModuleServiceV1ApiFp(this.configuration).backendModuleServiceV1GetModulesGet(options)(this.fetch, this.basePath); } } exports.BackendModuleServiceV1Api = BackendModuleServiceV1Api; /** * BundleProductLinkManagementV1Api - fetch parameter creator * @export */ const BundleProductLinkManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Add child product to specified Bundle option by product sku * @param {string} sku * @param {number} optionId * @param {any} [bundleProductLinkManagementV1AddChildByProductSkuPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1AddChildByProductSkuPost(sku, optionId, bundleProductLinkManagementV1AddChildByProductSkuPostBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling bundleProductLinkManagementV1AddChildByProductSkuPost.'); } // verify required parameter 'optionId' is not null or undefined if (optionId === null || optionId === undefined) { throw new RequiredError('optionId', 'Required parameter optionId was null or undefined when calling bundleProductLinkManagementV1AddChildByProductSkuPost.'); } const localVarPath = `/V1/bundle-products/{sku}/links/{optionId}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"optionId"}}`, encodeURIComponent(String(optionId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(bundleProductLinkManagementV1AddChildByProductSkuPostBody || {}) : (bundleProductLinkManagementV1AddChildByProductSkuPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get all children for Bundle product * @param {string} productSku * @param {number} [optionId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1GetChildrenGet(productSku, optionId, options = {}) { // verify required parameter 'productSku' is not null or undefined if (productSku === null || productSku === undefined) { throw new RequiredError('productSku', 'Required parameter productSku was null or undefined when calling bundleProductLinkManagementV1GetChildrenGet.'); } const localVarPath = `/V1/bundle-products/{productSku}/children` .replace(`{${"productSku"}}`, encodeURIComponent(String(productSku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (optionId !== undefined) { localVarQueryParameter['optionId'] = optionId; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Remove product from Bundle product option * @param {string} sku * @param {number} optionId * @param {string} childSku * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1RemoveChildDelete(sku, optionId, childSku, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling bundleProductLinkManagementV1RemoveChildDelete.'); } // verify required parameter 'optionId' is not null or undefined if (optionId === null || optionId === undefined) { throw new RequiredError('optionId', 'Required parameter optionId was null or undefined when calling bundleProductLinkManagementV1RemoveChildDelete.'); } // verify required parameter 'childSku' is not null or undefined if (childSku === null || childSku === undefined) { throw new RequiredError('childSku', 'Required parameter childSku was null or undefined when calling bundleProductLinkManagementV1RemoveChildDelete.'); } const localVarPath = `/V1/bundle-products/{sku}/options/{optionId}/children/{childSku}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"optionId"}}`, encodeURIComponent(String(optionId))) .replace(`{${"childSku"}}`, encodeURIComponent(String(childSku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {string} sku * @param {string} id * @param {any} [bundleProductLinkManagementV1SaveChildPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1SaveChildPut(sku, id, bundleProductLinkManagementV1SaveChildPutBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling bundleProductLinkManagementV1SaveChildPut.'); } // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling bundleProductLinkManagementV1SaveChildPut.'); } const localVarPath = `/V1/bundle-products/{sku}/links/{id}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(bundleProductLinkManagementV1SaveChildPutBody || {}) : (bundleProductLinkManagementV1SaveChildPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.BundleProductLinkManagementV1ApiFetchParamCreator = BundleProductLinkManagementV1ApiFetchParamCreator; /** * BundleProductLinkManagementV1Api - functional programming interface * @export */ const BundleProductLinkManagementV1ApiFp = function (configuration) { return { /** * Add child product to specified Bundle option by product sku * @param {string} sku * @param {number} optionId * @param {any} [bundleProductLinkManagementV1AddChildByProductSkuPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1AddChildByProductSkuPost(sku, optionId, bundleProductLinkManagementV1AddChildByProductSkuPostBody, options) { const localVarFetchArgs = exports.BundleProductLinkManagementV1ApiFetchParamCreator(configuration).bundleProductLinkManagementV1AddChildByProductSkuPost(sku, optionId, bundleProductLinkManagementV1AddChildByProductSkuPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get all children for Bundle product * @param {string} productSku * @param {number} [optionId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1GetChildrenGet(productSku, optionId, options) { const localVarFetchArgs = exports.BundleProductLinkManagementV1ApiFetchParamCreator(configuration).bundleProductLinkManagementV1GetChildrenGet(productSku, optionId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Remove product from Bundle product option * @param {string} sku * @param {number} optionId * @param {string} childSku * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1RemoveChildDelete(sku, optionId, childSku, options) { const localVarFetchArgs = exports.BundleProductLinkManagementV1ApiFetchParamCreator(configuration).bundleProductLinkManagementV1RemoveChildDelete(sku, optionId, childSku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * * @param {string} sku * @param {string} id * @param {any} [bundleProductLinkManagementV1SaveChildPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1SaveChildPut(sku, id, bundleProductLinkManagementV1SaveChildPutBody, options) { const localVarFetchArgs = exports.BundleProductLinkManagementV1ApiFetchParamCreator(configuration).bundleProductLinkManagementV1SaveChildPut(sku, id, bundleProductLinkManagementV1SaveChildPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.BundleProductLinkManagementV1ApiFp = BundleProductLinkManagementV1ApiFp; /** * BundleProductLinkManagementV1Api - factory interface * @export */ const BundleProductLinkManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Add child product to specified Bundle option by product sku * @param {string} sku * @param {number} optionId * @param {any} [bundleProductLinkManagementV1AddChildByProductSkuPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1AddChildByProductSkuPost(sku, optionId, bundleProductLinkManagementV1AddChildByProductSkuPostBody, options) { return exports.BundleProductLinkManagementV1ApiFp(configuration).bundleProductLinkManagementV1AddChildByProductSkuPost(sku, optionId, bundleProductLinkManagementV1AddChildByProductSkuPostBody, options)(fetch, basePath); }, /** * Get all children for Bundle product * @param {string} productSku * @param {number} [optionId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1GetChildrenGet(productSku, optionId, options) { return exports.BundleProductLinkManagementV1ApiFp(configuration).bundleProductLinkManagementV1GetChildrenGet(productSku, optionId, options)(fetch, basePath); }, /** * Remove product from Bundle product option * @param {string} sku * @param {number} optionId * @param {string} childSku * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1RemoveChildDelete(sku, optionId, childSku, options) { return exports.BundleProductLinkManagementV1ApiFp(configuration).bundleProductLinkManagementV1RemoveChildDelete(sku, optionId, childSku, options)(fetch, basePath); }, /** * * @param {string} sku * @param {string} id * @param {any} [bundleProductLinkManagementV1SaveChildPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductLinkManagementV1SaveChildPut(sku, id, bundleProductLinkManagementV1SaveChildPutBody, options) { return exports.BundleProductLinkManagementV1ApiFp(configuration).bundleProductLinkManagementV1SaveChildPut(sku, id, bundleProductLinkManagementV1SaveChildPutBody, options)(fetch, basePath); }, }; }; exports.BundleProductLinkManagementV1ApiFactory = BundleProductLinkManagementV1ApiFactory; /** * BundleProductLinkManagementV1Api - object-oriented interface * @export * @class BundleProductLinkManagementV1Api * @extends {BaseAPI} */ class BundleProductLinkManagementV1Api extends BaseAPI { /** * Add child product to specified Bundle option by product sku * @param {string} sku * @param {number} optionId * @param {any} [bundleProductLinkManagementV1AddChildByProductSkuPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BundleProductLinkManagementV1Api */ bundleProductLinkManagementV1AddChildByProductSkuPost(sku, optionId, bundleProductLinkManagementV1AddChildByProductSkuPostBody, options) { return exports.BundleProductLinkManagementV1ApiFp(this.configuration).bundleProductLinkManagementV1AddChildByProductSkuPost(sku, optionId, bundleProductLinkManagementV1AddChildByProductSkuPostBody, options)(this.fetch, this.basePath); } /** * Get all children for Bundle product * @param {string} productSku * @param {number} [optionId] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BundleProductLinkManagementV1Api */ bundleProductLinkManagementV1GetChildrenGet(productSku, optionId, options) { return exports.BundleProductLinkManagementV1ApiFp(this.configuration).bundleProductLinkManagementV1GetChildrenGet(productSku, optionId, options)(this.fetch, this.basePath); } /** * Remove product from Bundle product option * @param {string} sku * @param {number} optionId * @param {string} childSku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BundleProductLinkManagementV1Api */ bundleProductLinkManagementV1RemoveChildDelete(sku, optionId, childSku, options) { return exports.BundleProductLinkManagementV1ApiFp(this.configuration).bundleProductLinkManagementV1RemoveChildDelete(sku, optionId, childSku, options)(this.fetch, this.basePath); } /** * * @param {string} sku * @param {string} id * @param {any} [bundleProductLinkManagementV1SaveChildPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BundleProductLinkManagementV1Api */ bundleProductLinkManagementV1SaveChildPut(sku, id, bundleProductLinkManagementV1SaveChildPutBody, options) { return exports.BundleProductLinkManagementV1ApiFp(this.configuration).bundleProductLinkManagementV1SaveChildPut(sku, id, bundleProductLinkManagementV1SaveChildPutBody, options)(this.fetch, this.basePath); } } exports.BundleProductLinkManagementV1Api = BundleProductLinkManagementV1Api; /** * BundleProductOptionManagementV1Api - fetch parameter creator * @export */ const BundleProductOptionManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Add new option for bundle product * @param {any} [bundleProductOptionManagementV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionManagementV1SavePost(bundleProductOptionManagementV1SavePostBody, options = {}) { const localVarPath = `/V1/bundle-products/options/add`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(bundleProductOptionManagementV1SavePostBody || {}) : (bundleProductOptionManagementV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add new option for bundle product * @param {string} optionId * @param {any} [bundleProductOptionManagementV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionManagementV1SavePut(optionId, bundleProductOptionManagementV1SavePutBody, options = {}) { // verify required parameter 'optionId' is not null or undefined if (optionId === null || optionId === undefined) { throw new RequiredError('optionId', 'Required parameter optionId was null or undefined when calling bundleProductOptionManagementV1SavePut.'); } const localVarPath = `/V1/bundle-products/options/{optionId}` .replace(`{${"optionId"}}`, encodeURIComponent(String(optionId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(bundleProductOptionManagementV1SavePutBody || {}) : (bundleProductOptionManagementV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.BundleProductOptionManagementV1ApiFetchParamCreator = BundleProductOptionManagementV1ApiFetchParamCreator; /** * BundleProductOptionManagementV1Api - functional programming interface * @export */ const BundleProductOptionManagementV1ApiFp = function (configuration) { return { /** * Add new option for bundle product * @param {any} [bundleProductOptionManagementV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionManagementV1SavePost(bundleProductOptionManagementV1SavePostBody, options) { const localVarFetchArgs = exports.BundleProductOptionManagementV1ApiFetchParamCreator(configuration).bundleProductOptionManagementV1SavePost(bundleProductOptionManagementV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add new option for bundle product * @param {string} optionId * @param {any} [bundleProductOptionManagementV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionManagementV1SavePut(optionId, bundleProductOptionManagementV1SavePutBody, options) { const localVarFetchArgs = exports.BundleProductOptionManagementV1ApiFetchParamCreator(configuration).bundleProductOptionManagementV1SavePut(optionId, bundleProductOptionManagementV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.BundleProductOptionManagementV1ApiFp = BundleProductOptionManagementV1ApiFp; /** * BundleProductOptionManagementV1Api - factory interface * @export */ const BundleProductOptionManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Add new option for bundle product * @param {any} [bundleProductOptionManagementV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionManagementV1SavePost(bundleProductOptionManagementV1SavePostBody, options) { return exports.BundleProductOptionManagementV1ApiFp(configuration).bundleProductOptionManagementV1SavePost(bundleProductOptionManagementV1SavePostBody, options)(fetch, basePath); }, /** * Add new option for bundle product * @param {string} optionId * @param {any} [bundleProductOptionManagementV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionManagementV1SavePut(optionId, bundleProductOptionManagementV1SavePutBody, options) { return exports.BundleProductOptionManagementV1ApiFp(configuration).bundleProductOptionManagementV1SavePut(optionId, bundleProductOptionManagementV1SavePutBody, options)(fetch, basePath); }, }; }; exports.BundleProductOptionManagementV1ApiFactory = BundleProductOptionManagementV1ApiFactory; /** * BundleProductOptionManagementV1Api - object-oriented interface * @export * @class BundleProductOptionManagementV1Api * @extends {BaseAPI} */ class BundleProductOptionManagementV1Api extends BaseAPI { /** * Add new option for bundle product * @param {any} [bundleProductOptionManagementV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BundleProductOptionManagementV1Api */ bundleProductOptionManagementV1SavePost(bundleProductOptionManagementV1SavePostBody, options) { return exports.BundleProductOptionManagementV1ApiFp(this.configuration).bundleProductOptionManagementV1SavePost(bundleProductOptionManagementV1SavePostBody, options)(this.fetch, this.basePath); } /** * Add new option for bundle product * @param {string} optionId * @param {any} [bundleProductOptionManagementV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BundleProductOptionManagementV1Api */ bundleProductOptionManagementV1SavePut(optionId, bundleProductOptionManagementV1SavePutBody, options) { return exports.BundleProductOptionManagementV1ApiFp(this.configuration).bundleProductOptionManagementV1SavePut(optionId, bundleProductOptionManagementV1SavePutBody, options)(this.fetch, this.basePath); } } exports.BundleProductOptionManagementV1Api = BundleProductOptionManagementV1Api; /** * BundleProductOptionRepositoryV1Api - fetch parameter creator * @export */ const BundleProductOptionRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Remove bundle option * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionRepositoryV1DeleteByIdDelete(sku, optionId, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling bundleProductOptionRepositoryV1DeleteByIdDelete.'); } // verify required parameter 'optionId' is not null or undefined if (optionId === null || optionId === undefined) { throw new RequiredError('optionId', 'Required parameter optionId was null or undefined when calling bundleProductOptionRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/bundle-products/{sku}/options/{optionId}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"optionId"}}`, encodeURIComponent(String(optionId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get option for bundle product * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionRepositoryV1GetGet(sku, optionId, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling bundleProductOptionRepositoryV1GetGet.'); } // verify required parameter 'optionId' is not null or undefined if (optionId === null || optionId === undefined) { throw new RequiredError('optionId', 'Required parameter optionId was null or undefined when calling bundleProductOptionRepositoryV1GetGet.'); } const localVarPath = `/V1/bundle-products/{sku}/options/{optionId}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"optionId"}}`, encodeURIComponent(String(optionId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get all options for bundle product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionRepositoryV1GetListGet(sku, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling bundleProductOptionRepositoryV1GetListGet.'); } const localVarPath = `/V1/bundle-products/{sku}/options/all` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.BundleProductOptionRepositoryV1ApiFetchParamCreator = BundleProductOptionRepositoryV1ApiFetchParamCreator; /** * BundleProductOptionRepositoryV1Api - functional programming interface * @export */ const BundleProductOptionRepositoryV1ApiFp = function (configuration) { return { /** * Remove bundle option * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionRepositoryV1DeleteByIdDelete(sku, optionId, options) { const localVarFetchArgs = exports.BundleProductOptionRepositoryV1ApiFetchParamCreator(configuration).bundleProductOptionRepositoryV1DeleteByIdDelete(sku, optionId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get option for bundle product * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionRepositoryV1GetGet(sku, optionId, options) { const localVarFetchArgs = exports.BundleProductOptionRepositoryV1ApiFetchParamCreator(configuration).bundleProductOptionRepositoryV1GetGet(sku, optionId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get all options for bundle product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionRepositoryV1GetListGet(sku, options) { const localVarFetchArgs = exports.BundleProductOptionRepositoryV1ApiFetchParamCreator(configuration).bundleProductOptionRepositoryV1GetListGet(sku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.BundleProductOptionRepositoryV1ApiFp = BundleProductOptionRepositoryV1ApiFp; /** * BundleProductOptionRepositoryV1Api - factory interface * @export */ const BundleProductOptionRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Remove bundle option * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionRepositoryV1DeleteByIdDelete(sku, optionId, options) { return exports.BundleProductOptionRepositoryV1ApiFp(configuration).bundleProductOptionRepositoryV1DeleteByIdDelete(sku, optionId, options)(fetch, basePath); }, /** * Get option for bundle product * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionRepositoryV1GetGet(sku, optionId, options) { return exports.BundleProductOptionRepositoryV1ApiFp(configuration).bundleProductOptionRepositoryV1GetGet(sku, optionId, options)(fetch, basePath); }, /** * Get all options for bundle product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionRepositoryV1GetListGet(sku, options) { return exports.BundleProductOptionRepositoryV1ApiFp(configuration).bundleProductOptionRepositoryV1GetListGet(sku, options)(fetch, basePath); }, }; }; exports.BundleProductOptionRepositoryV1ApiFactory = BundleProductOptionRepositoryV1ApiFactory; /** * BundleProductOptionRepositoryV1Api - object-oriented interface * @export * @class BundleProductOptionRepositoryV1Api * @extends {BaseAPI} */ class BundleProductOptionRepositoryV1Api extends BaseAPI { /** * Remove bundle option * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BundleProductOptionRepositoryV1Api */ bundleProductOptionRepositoryV1DeleteByIdDelete(sku, optionId, options) { return exports.BundleProductOptionRepositoryV1ApiFp(this.configuration).bundleProductOptionRepositoryV1DeleteByIdDelete(sku, optionId, options)(this.fetch, this.basePath); } /** * Get option for bundle product * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BundleProductOptionRepositoryV1Api */ bundleProductOptionRepositoryV1GetGet(sku, optionId, options) { return exports.BundleProductOptionRepositoryV1ApiFp(this.configuration).bundleProductOptionRepositoryV1GetGet(sku, optionId, options)(this.fetch, this.basePath); } /** * Get all options for bundle product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BundleProductOptionRepositoryV1Api */ bundleProductOptionRepositoryV1GetListGet(sku, options) { return exports.BundleProductOptionRepositoryV1ApiFp(this.configuration).bundleProductOptionRepositoryV1GetListGet(sku, options)(this.fetch, this.basePath); } } exports.BundleProductOptionRepositoryV1Api = BundleProductOptionRepositoryV1Api; /** * BundleProductOptionTypeListV1Api - fetch parameter creator * @export */ const BundleProductOptionTypeListV1ApiFetchParamCreator = function (configuration) { return { /** * Get all types for options for bundle products * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionTypeListV1GetItemsGet(options = {}) { const localVarPath = `/V1/bundle-products/options/types`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.BundleProductOptionTypeListV1ApiFetchParamCreator = BundleProductOptionTypeListV1ApiFetchParamCreator; /** * BundleProductOptionTypeListV1Api - functional programming interface * @export */ const BundleProductOptionTypeListV1ApiFp = function (configuration) { return { /** * Get all types for options for bundle products * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionTypeListV1GetItemsGet(options) { const localVarFetchArgs = exports.BundleProductOptionTypeListV1ApiFetchParamCreator(configuration).bundleProductOptionTypeListV1GetItemsGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.BundleProductOptionTypeListV1ApiFp = BundleProductOptionTypeListV1ApiFp; /** * BundleProductOptionTypeListV1Api - factory interface * @export */ const BundleProductOptionTypeListV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get all types for options for bundle products * @param {*} [options] Override http request option. * @throws {RequiredError} */ bundleProductOptionTypeListV1GetItemsGet(options) { return exports.BundleProductOptionTypeListV1ApiFp(configuration).bundleProductOptionTypeListV1GetItemsGet(options)(fetch, basePath); }, }; }; exports.BundleProductOptionTypeListV1ApiFactory = BundleProductOptionTypeListV1ApiFactory; /** * BundleProductOptionTypeListV1Api - object-oriented interface * @export * @class BundleProductOptionTypeListV1Api * @extends {BaseAPI} */ class BundleProductOptionTypeListV1Api extends BaseAPI { /** * Get all types for options for bundle products * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BundleProductOptionTypeListV1Api */ bundleProductOptionTypeListV1GetItemsGet(options) { return exports.BundleProductOptionTypeListV1ApiFp(this.configuration).bundleProductOptionTypeListV1GetItemsGet(options)(this.fetch, this.basePath); } } exports.BundleProductOptionTypeListV1Api = BundleProductOptionTypeListV1Api; /** * CatalogAttributeSetManagementV1Api - fetch parameter creator * @export */ const CatalogAttributeSetManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Create attribute set from data * @param {any} [catalogAttributeSetManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetManagementV1CreatePost(catalogAttributeSetManagementV1CreatePostBody, options = {}) { const localVarPath = `/V1/products/attribute-sets`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogAttributeSetManagementV1CreatePostBody || {}) : (catalogAttributeSetManagementV1CreatePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogAttributeSetManagementV1ApiFetchParamCreator = CatalogAttributeSetManagementV1ApiFetchParamCreator; /** * CatalogAttributeSetManagementV1Api - functional programming interface * @export */ const CatalogAttributeSetManagementV1ApiFp = function (configuration) { return { /** * Create attribute set from data * @param {any} [catalogAttributeSetManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetManagementV1CreatePost(catalogAttributeSetManagementV1CreatePostBody, options) { const localVarFetchArgs = exports.CatalogAttributeSetManagementV1ApiFetchParamCreator(configuration).catalogAttributeSetManagementV1CreatePost(catalogAttributeSetManagementV1CreatePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogAttributeSetManagementV1ApiFp = CatalogAttributeSetManagementV1ApiFp; /** * CatalogAttributeSetManagementV1Api - factory interface * @export */ const CatalogAttributeSetManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Create attribute set from data * @param {any} [catalogAttributeSetManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetManagementV1CreatePost(catalogAttributeSetManagementV1CreatePostBody, options) { return exports.CatalogAttributeSetManagementV1ApiFp(configuration).catalogAttributeSetManagementV1CreatePost(catalogAttributeSetManagementV1CreatePostBody, options)(fetch, basePath); }, }; }; exports.CatalogAttributeSetManagementV1ApiFactory = CatalogAttributeSetManagementV1ApiFactory; /** * CatalogAttributeSetManagementV1Api - object-oriented interface * @export * @class CatalogAttributeSetManagementV1Api * @extends {BaseAPI} */ class CatalogAttributeSetManagementV1Api extends BaseAPI { /** * Create attribute set from data * @param {any} [catalogAttributeSetManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogAttributeSetManagementV1Api */ catalogAttributeSetManagementV1CreatePost(catalogAttributeSetManagementV1CreatePostBody, options) { return exports.CatalogAttributeSetManagementV1ApiFp(this.configuration).catalogAttributeSetManagementV1CreatePost(catalogAttributeSetManagementV1CreatePostBody, options)(this.fetch, this.basePath); } } exports.CatalogAttributeSetManagementV1Api = CatalogAttributeSetManagementV1Api; /** * CatalogAttributeSetRepositoryV1Api - fetch parameter creator * @export */ const CatalogAttributeSetRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Remove attribute set by given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options = {}) { // verify required parameter 'attributeSetId' is not null or undefined if (attributeSetId === null || attributeSetId === undefined) { throw new RequiredError('attributeSetId', 'Required parameter attributeSetId was null or undefined when calling catalogAttributeSetRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/products/attribute-sets/{attributeSetId}` .replace(`{${"attributeSetId"}}`, encodeURIComponent(String(attributeSetId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve attribute set information based on given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1GetGet(attributeSetId, options = {}) { // verify required parameter 'attributeSetId' is not null or undefined if (attributeSetId === null || attributeSetId === undefined) { throw new RequiredError('attributeSetId', 'Required parameter attributeSetId was null or undefined when calling catalogAttributeSetRepositoryV1GetGet.'); } const localVarPath = `/V1/products/attribute-sets/{attributeSetId}` .replace(`{${"attributeSetId"}}`, encodeURIComponent(String(attributeSetId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve list of Attribute Sets * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/products/attribute-sets/sets/list`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save attribute set data * @param {string} attributeSetId * @param {any} [catalogAttributeSetRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1SavePut(attributeSetId, catalogAttributeSetRepositoryV1SavePutBody, options = {}) { // verify required parameter 'attributeSetId' is not null or undefined if (attributeSetId === null || attributeSetId === undefined) { throw new RequiredError('attributeSetId', 'Required parameter attributeSetId was null or undefined when calling catalogAttributeSetRepositoryV1SavePut.'); } const localVarPath = `/V1/products/attribute-sets/{attributeSetId}` .replace(`{${"attributeSetId"}}`, encodeURIComponent(String(attributeSetId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogAttributeSetRepositoryV1SavePutBody || {}) : (catalogAttributeSetRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogAttributeSetRepositoryV1ApiFetchParamCreator = CatalogAttributeSetRepositoryV1ApiFetchParamCreator; /** * CatalogAttributeSetRepositoryV1Api - functional programming interface * @export */ const CatalogAttributeSetRepositoryV1ApiFp = function (configuration) { return { /** * Remove attribute set by given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options) { const localVarFetchArgs = exports.CatalogAttributeSetRepositoryV1ApiFetchParamCreator(configuration).catalogAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve attribute set information based on given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1GetGet(attributeSetId, options) { const localVarFetchArgs = exports.CatalogAttributeSetRepositoryV1ApiFetchParamCreator(configuration).catalogAttributeSetRepositoryV1GetGet(attributeSetId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve list of Attribute Sets * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CatalogAttributeSetRepositoryV1ApiFetchParamCreator(configuration).catalogAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save attribute set data * @param {string} attributeSetId * @param {any} [catalogAttributeSetRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1SavePut(attributeSetId, catalogAttributeSetRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CatalogAttributeSetRepositoryV1ApiFetchParamCreator(configuration).catalogAttributeSetRepositoryV1SavePut(attributeSetId, catalogAttributeSetRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogAttributeSetRepositoryV1ApiFp = CatalogAttributeSetRepositoryV1ApiFp; /** * CatalogAttributeSetRepositoryV1Api - factory interface * @export */ const CatalogAttributeSetRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Remove attribute set by given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options) { return exports.CatalogAttributeSetRepositoryV1ApiFp(configuration).catalogAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options)(fetch, basePath); }, /** * Retrieve attribute set information based on given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1GetGet(attributeSetId, options) { return exports.CatalogAttributeSetRepositoryV1ApiFp(configuration).catalogAttributeSetRepositoryV1GetGet(attributeSetId, options)(fetch, basePath); }, /** * Retrieve list of Attribute Sets * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogAttributeSetRepositoryV1ApiFp(configuration).catalogAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save attribute set data * @param {string} attributeSetId * @param {any} [catalogAttributeSetRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogAttributeSetRepositoryV1SavePut(attributeSetId, catalogAttributeSetRepositoryV1SavePutBody, options) { return exports.CatalogAttributeSetRepositoryV1ApiFp(configuration).catalogAttributeSetRepositoryV1SavePut(attributeSetId, catalogAttributeSetRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CatalogAttributeSetRepositoryV1ApiFactory = CatalogAttributeSetRepositoryV1ApiFactory; /** * CatalogAttributeSetRepositoryV1Api - object-oriented interface * @export * @class CatalogAttributeSetRepositoryV1Api * @extends {BaseAPI} */ class CatalogAttributeSetRepositoryV1Api extends BaseAPI { /** * Remove attribute set by given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogAttributeSetRepositoryV1Api */ catalogAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options) { return exports.CatalogAttributeSetRepositoryV1ApiFp(this.configuration).catalogAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options)(this.fetch, this.basePath); } /** * Retrieve attribute set information based on given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogAttributeSetRepositoryV1Api */ catalogAttributeSetRepositoryV1GetGet(attributeSetId, options) { return exports.CatalogAttributeSetRepositoryV1ApiFp(this.configuration).catalogAttributeSetRepositoryV1GetGet(attributeSetId, options)(this.fetch, this.basePath); } /** * Retrieve list of Attribute Sets * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogAttributeSetRepositoryV1Api */ catalogAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogAttributeSetRepositoryV1ApiFp(this.configuration).catalogAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save attribute set data * @param {string} attributeSetId * @param {any} [catalogAttributeSetRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogAttributeSetRepositoryV1Api */ catalogAttributeSetRepositoryV1SavePut(attributeSetId, catalogAttributeSetRepositoryV1SavePutBody, options) { return exports.CatalogAttributeSetRepositoryV1ApiFp(this.configuration).catalogAttributeSetRepositoryV1SavePut(attributeSetId, catalogAttributeSetRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CatalogAttributeSetRepositoryV1Api = CatalogAttributeSetRepositoryV1Api; /** * CatalogBasePriceStorageV1Api - fetch parameter creator * @export */ const CatalogBasePriceStorageV1ApiFetchParamCreator = function (configuration) { return { /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogBasePriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogBasePriceStorageV1GetPost(catalogBasePriceStorageV1GetPostBody, options = {}) { const localVarPath = `/V1/products/base-prices-information`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogBasePriceStorageV1GetPostBody || {}) : (catalogBasePriceStorageV1GetPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add or update product prices. Input item should correspond \\Magento\\Catalog\\Api\\Data\\CostInterface. If any items will have invalid price, store id or sku, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogBasePriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogBasePriceStorageV1UpdatePost(catalogBasePriceStorageV1UpdatePostBody, options = {}) { const localVarPath = `/V1/products/base-prices`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogBasePriceStorageV1UpdatePostBody || {}) : (catalogBasePriceStorageV1UpdatePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogBasePriceStorageV1ApiFetchParamCreator = CatalogBasePriceStorageV1ApiFetchParamCreator; /** * CatalogBasePriceStorageV1Api - functional programming interface * @export */ const CatalogBasePriceStorageV1ApiFp = function (configuration) { return { /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogBasePriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogBasePriceStorageV1GetPost(catalogBasePriceStorageV1GetPostBody, options) { const localVarFetchArgs = exports.CatalogBasePriceStorageV1ApiFetchParamCreator(configuration).catalogBasePriceStorageV1GetPost(catalogBasePriceStorageV1GetPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add or update product prices. Input item should correspond \\Magento\\Catalog\\Api\\Data\\CostInterface. If any items will have invalid price, store id or sku, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogBasePriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogBasePriceStorageV1UpdatePost(catalogBasePriceStorageV1UpdatePostBody, options) { const localVarFetchArgs = exports.CatalogBasePriceStorageV1ApiFetchParamCreator(configuration).catalogBasePriceStorageV1UpdatePost(catalogBasePriceStorageV1UpdatePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogBasePriceStorageV1ApiFp = CatalogBasePriceStorageV1ApiFp; /** * CatalogBasePriceStorageV1Api - factory interface * @export */ const CatalogBasePriceStorageV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogBasePriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogBasePriceStorageV1GetPost(catalogBasePriceStorageV1GetPostBody, options) { return exports.CatalogBasePriceStorageV1ApiFp(configuration).catalogBasePriceStorageV1GetPost(catalogBasePriceStorageV1GetPostBody, options)(fetch, basePath); }, /** * Add or update product prices. Input item should correspond \\Magento\\Catalog\\Api\\Data\\CostInterface. If any items will have invalid price, store id or sku, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogBasePriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogBasePriceStorageV1UpdatePost(catalogBasePriceStorageV1UpdatePostBody, options) { return exports.CatalogBasePriceStorageV1ApiFp(configuration).catalogBasePriceStorageV1UpdatePost(catalogBasePriceStorageV1UpdatePostBody, options)(fetch, basePath); }, }; }; exports.CatalogBasePriceStorageV1ApiFactory = CatalogBasePriceStorageV1ApiFactory; /** * CatalogBasePriceStorageV1Api - object-oriented interface * @export * @class CatalogBasePriceStorageV1Api * @extends {BaseAPI} */ class CatalogBasePriceStorageV1Api extends BaseAPI { /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogBasePriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogBasePriceStorageV1Api */ catalogBasePriceStorageV1GetPost(catalogBasePriceStorageV1GetPostBody, options) { return exports.CatalogBasePriceStorageV1ApiFp(this.configuration).catalogBasePriceStorageV1GetPost(catalogBasePriceStorageV1GetPostBody, options)(this.fetch, this.basePath); } /** * Add or update product prices. Input item should correspond \\Magento\\Catalog\\Api\\Data\\CostInterface. If any items will have invalid price, store id or sku, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogBasePriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogBasePriceStorageV1Api */ catalogBasePriceStorageV1UpdatePost(catalogBasePriceStorageV1UpdatePostBody, options) { return exports.CatalogBasePriceStorageV1ApiFp(this.configuration).catalogBasePriceStorageV1UpdatePost(catalogBasePriceStorageV1UpdatePostBody, options)(this.fetch, this.basePath); } } exports.CatalogBasePriceStorageV1Api = CatalogBasePriceStorageV1Api; /** * CatalogCategoryAttributeOptionManagementV1Api - fetch parameter creator * @export */ const CatalogCategoryAttributeOptionManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Retrieve list of attribute options * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryAttributeOptionManagementV1GetItemsGet(attributeCode, options = {}) { // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling catalogCategoryAttributeOptionManagementV1GetItemsGet.'); } const localVarPath = `/V1/categories/attributes/{attributeCode}/options` .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogCategoryAttributeOptionManagementV1ApiFetchParamCreator = CatalogCategoryAttributeOptionManagementV1ApiFetchParamCreator; /** * CatalogCategoryAttributeOptionManagementV1Api - functional programming interface * @export */ const CatalogCategoryAttributeOptionManagementV1ApiFp = function (configuration) { return { /** * Retrieve list of attribute options * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryAttributeOptionManagementV1GetItemsGet(attributeCode, options) { const localVarFetchArgs = exports.CatalogCategoryAttributeOptionManagementV1ApiFetchParamCreator(configuration).catalogCategoryAttributeOptionManagementV1GetItemsGet(attributeCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogCategoryAttributeOptionManagementV1ApiFp = CatalogCategoryAttributeOptionManagementV1ApiFp; /** * CatalogCategoryAttributeOptionManagementV1Api - factory interface * @export */ const CatalogCategoryAttributeOptionManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Retrieve list of attribute options * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryAttributeOptionManagementV1GetItemsGet(attributeCode, options) { return exports.CatalogCategoryAttributeOptionManagementV1ApiFp(configuration).catalogCategoryAttributeOptionManagementV1GetItemsGet(attributeCode, options)(fetch, basePath); }, }; }; exports.CatalogCategoryAttributeOptionManagementV1ApiFactory = CatalogCategoryAttributeOptionManagementV1ApiFactory; /** * CatalogCategoryAttributeOptionManagementV1Api - object-oriented interface * @export * @class CatalogCategoryAttributeOptionManagementV1Api * @extends {BaseAPI} */ class CatalogCategoryAttributeOptionManagementV1Api extends BaseAPI { /** * Retrieve list of attribute options * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryAttributeOptionManagementV1Api */ catalogCategoryAttributeOptionManagementV1GetItemsGet(attributeCode, options) { return exports.CatalogCategoryAttributeOptionManagementV1ApiFp(this.configuration).catalogCategoryAttributeOptionManagementV1GetItemsGet(attributeCode, options)(this.fetch, this.basePath); } } exports.CatalogCategoryAttributeOptionManagementV1Api = CatalogCategoryAttributeOptionManagementV1Api; /** * CatalogCategoryAttributeRepositoryV1Api - fetch parameter creator * @export */ const CatalogCategoryAttributeRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Retrieve specific attribute * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryAttributeRepositoryV1GetGet(attributeCode, options = {}) { // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling catalogCategoryAttributeRepositoryV1GetGet.'); } const localVarPath = `/V1/categories/attributes/{attributeCode}` .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve all attributes for entity type * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/categories/attributes`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogCategoryAttributeRepositoryV1ApiFetchParamCreator = CatalogCategoryAttributeRepositoryV1ApiFetchParamCreator; /** * CatalogCategoryAttributeRepositoryV1Api - functional programming interface * @export */ const CatalogCategoryAttributeRepositoryV1ApiFp = function (configuration) { return { /** * Retrieve specific attribute * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryAttributeRepositoryV1GetGet(attributeCode, options) { const localVarFetchArgs = exports.CatalogCategoryAttributeRepositoryV1ApiFetchParamCreator(configuration).catalogCategoryAttributeRepositoryV1GetGet(attributeCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve all attributes for entity type * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CatalogCategoryAttributeRepositoryV1ApiFetchParamCreator(configuration).catalogCategoryAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogCategoryAttributeRepositoryV1ApiFp = CatalogCategoryAttributeRepositoryV1ApiFp; /** * CatalogCategoryAttributeRepositoryV1Api - factory interface * @export */ const CatalogCategoryAttributeRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Retrieve specific attribute * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryAttributeRepositoryV1GetGet(attributeCode, options) { return exports.CatalogCategoryAttributeRepositoryV1ApiFp(configuration).catalogCategoryAttributeRepositoryV1GetGet(attributeCode, options)(fetch, basePath); }, /** * Retrieve all attributes for entity type * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogCategoryAttributeRepositoryV1ApiFp(configuration).catalogCategoryAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.CatalogCategoryAttributeRepositoryV1ApiFactory = CatalogCategoryAttributeRepositoryV1ApiFactory; /** * CatalogCategoryAttributeRepositoryV1Api - object-oriented interface * @export * @class CatalogCategoryAttributeRepositoryV1Api * @extends {BaseAPI} */ class CatalogCategoryAttributeRepositoryV1Api extends BaseAPI { /** * Retrieve specific attribute * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryAttributeRepositoryV1Api */ catalogCategoryAttributeRepositoryV1GetGet(attributeCode, options) { return exports.CatalogCategoryAttributeRepositoryV1ApiFp(this.configuration).catalogCategoryAttributeRepositoryV1GetGet(attributeCode, options)(this.fetch, this.basePath); } /** * Retrieve all attributes for entity type * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryAttributeRepositoryV1Api */ catalogCategoryAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogCategoryAttributeRepositoryV1ApiFp(this.configuration).catalogCategoryAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.CatalogCategoryAttributeRepositoryV1Api = CatalogCategoryAttributeRepositoryV1Api; /** * CatalogCategoryLinkManagementV1Api - fetch parameter creator * @export */ const CatalogCategoryLinkManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Get products assigned to category * @param {number} categoryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkManagementV1GetAssignedProductsGet(categoryId, options = {}) { // verify required parameter 'categoryId' is not null or undefined if (categoryId === null || categoryId === undefined) { throw new RequiredError('categoryId', 'Required parameter categoryId was null or undefined when calling catalogCategoryLinkManagementV1GetAssignedProductsGet.'); } const localVarPath = `/V1/categories/{categoryId}/products` .replace(`{${"categoryId"}}`, encodeURIComponent(String(categoryId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogCategoryLinkManagementV1ApiFetchParamCreator = CatalogCategoryLinkManagementV1ApiFetchParamCreator; /** * CatalogCategoryLinkManagementV1Api - functional programming interface * @export */ const CatalogCategoryLinkManagementV1ApiFp = function (configuration) { return { /** * Get products assigned to category * @param {number} categoryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkManagementV1GetAssignedProductsGet(categoryId, options) { const localVarFetchArgs = exports.CatalogCategoryLinkManagementV1ApiFetchParamCreator(configuration).catalogCategoryLinkManagementV1GetAssignedProductsGet(categoryId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogCategoryLinkManagementV1ApiFp = CatalogCategoryLinkManagementV1ApiFp; /** * CatalogCategoryLinkManagementV1Api - factory interface * @export */ const CatalogCategoryLinkManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get products assigned to category * @param {number} categoryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkManagementV1GetAssignedProductsGet(categoryId, options) { return exports.CatalogCategoryLinkManagementV1ApiFp(configuration).catalogCategoryLinkManagementV1GetAssignedProductsGet(categoryId, options)(fetch, basePath); }, }; }; exports.CatalogCategoryLinkManagementV1ApiFactory = CatalogCategoryLinkManagementV1ApiFactory; /** * CatalogCategoryLinkManagementV1Api - object-oriented interface * @export * @class CatalogCategoryLinkManagementV1Api * @extends {BaseAPI} */ class CatalogCategoryLinkManagementV1Api extends BaseAPI { /** * Get products assigned to category * @param {number} categoryId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryLinkManagementV1Api */ catalogCategoryLinkManagementV1GetAssignedProductsGet(categoryId, options) { return exports.CatalogCategoryLinkManagementV1ApiFp(this.configuration).catalogCategoryLinkManagementV1GetAssignedProductsGet(categoryId, options)(this.fetch, this.basePath); } } exports.CatalogCategoryLinkManagementV1Api = CatalogCategoryLinkManagementV1Api; /** * CatalogCategoryLinkRepositoryV1Api - fetch parameter creator * @export */ const CatalogCategoryLinkRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Remove the product assignment from the category by category id and sku * @param {number} categoryId * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkRepositoryV1DeleteByIdsDelete(categoryId, sku, options = {}) { // verify required parameter 'categoryId' is not null or undefined if (categoryId === null || categoryId === undefined) { throw new RequiredError('categoryId', 'Required parameter categoryId was null or undefined when calling catalogCategoryLinkRepositoryV1DeleteByIdsDelete.'); } // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogCategoryLinkRepositoryV1DeleteByIdsDelete.'); } const localVarPath = `/V1/categories/{categoryId}/products/{sku}` .replace(`{${"categoryId"}}`, encodeURIComponent(String(categoryId))) .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Assign a product to the required category * @param {string} categoryId * @param {any} [catalogCategoryLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkRepositoryV1SavePost(categoryId, catalogCategoryLinkRepositoryV1SavePostBody, options = {}) { // verify required parameter 'categoryId' is not null or undefined if (categoryId === null || categoryId === undefined) { throw new RequiredError('categoryId', 'Required parameter categoryId was null or undefined when calling catalogCategoryLinkRepositoryV1SavePost.'); } const localVarPath = `/V1/categories/{categoryId}/products` .replace(`{${"categoryId"}}`, encodeURIComponent(String(categoryId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogCategoryLinkRepositoryV1SavePostBody || {}) : (catalogCategoryLinkRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Assign a product to the required category * @param {string} categoryId * @param {any} [catalogCategoryLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkRepositoryV1SavePut(categoryId, catalogCategoryLinkRepositoryV1SavePutBody, options = {}) { // verify required parameter 'categoryId' is not null or undefined if (categoryId === null || categoryId === undefined) { throw new RequiredError('categoryId', 'Required parameter categoryId was null or undefined when calling catalogCategoryLinkRepositoryV1SavePut.'); } const localVarPath = `/V1/categories/{categoryId}/products` .replace(`{${"categoryId"}}`, encodeURIComponent(String(categoryId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogCategoryLinkRepositoryV1SavePutBody || {}) : (catalogCategoryLinkRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogCategoryLinkRepositoryV1ApiFetchParamCreator = CatalogCategoryLinkRepositoryV1ApiFetchParamCreator; /** * CatalogCategoryLinkRepositoryV1Api - functional programming interface * @export */ const CatalogCategoryLinkRepositoryV1ApiFp = function (configuration) { return { /** * Remove the product assignment from the category by category id and sku * @param {number} categoryId * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkRepositoryV1DeleteByIdsDelete(categoryId, sku, options) { const localVarFetchArgs = exports.CatalogCategoryLinkRepositoryV1ApiFetchParamCreator(configuration).catalogCategoryLinkRepositoryV1DeleteByIdsDelete(categoryId, sku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Assign a product to the required category * @param {string} categoryId * @param {any} [catalogCategoryLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkRepositoryV1SavePost(categoryId, catalogCategoryLinkRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.CatalogCategoryLinkRepositoryV1ApiFetchParamCreator(configuration).catalogCategoryLinkRepositoryV1SavePost(categoryId, catalogCategoryLinkRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Assign a product to the required category * @param {string} categoryId * @param {any} [catalogCategoryLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkRepositoryV1SavePut(categoryId, catalogCategoryLinkRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CatalogCategoryLinkRepositoryV1ApiFetchParamCreator(configuration).catalogCategoryLinkRepositoryV1SavePut(categoryId, catalogCategoryLinkRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogCategoryLinkRepositoryV1ApiFp = CatalogCategoryLinkRepositoryV1ApiFp; /** * CatalogCategoryLinkRepositoryV1Api - factory interface * @export */ const CatalogCategoryLinkRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Remove the product assignment from the category by category id and sku * @param {number} categoryId * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkRepositoryV1DeleteByIdsDelete(categoryId, sku, options) { return exports.CatalogCategoryLinkRepositoryV1ApiFp(configuration).catalogCategoryLinkRepositoryV1DeleteByIdsDelete(categoryId, sku, options)(fetch, basePath); }, /** * Assign a product to the required category * @param {string} categoryId * @param {any} [catalogCategoryLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkRepositoryV1SavePost(categoryId, catalogCategoryLinkRepositoryV1SavePostBody, options) { return exports.CatalogCategoryLinkRepositoryV1ApiFp(configuration).catalogCategoryLinkRepositoryV1SavePost(categoryId, catalogCategoryLinkRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Assign a product to the required category * @param {string} categoryId * @param {any} [catalogCategoryLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryLinkRepositoryV1SavePut(categoryId, catalogCategoryLinkRepositoryV1SavePutBody, options) { return exports.CatalogCategoryLinkRepositoryV1ApiFp(configuration).catalogCategoryLinkRepositoryV1SavePut(categoryId, catalogCategoryLinkRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CatalogCategoryLinkRepositoryV1ApiFactory = CatalogCategoryLinkRepositoryV1ApiFactory; /** * CatalogCategoryLinkRepositoryV1Api - object-oriented interface * @export * @class CatalogCategoryLinkRepositoryV1Api * @extends {BaseAPI} */ class CatalogCategoryLinkRepositoryV1Api extends BaseAPI { /** * Remove the product assignment from the category by category id and sku * @param {number} categoryId * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryLinkRepositoryV1Api */ catalogCategoryLinkRepositoryV1DeleteByIdsDelete(categoryId, sku, options) { return exports.CatalogCategoryLinkRepositoryV1ApiFp(this.configuration).catalogCategoryLinkRepositoryV1DeleteByIdsDelete(categoryId, sku, options)(this.fetch, this.basePath); } /** * Assign a product to the required category * @param {string} categoryId * @param {any} [catalogCategoryLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryLinkRepositoryV1Api */ catalogCategoryLinkRepositoryV1SavePost(categoryId, catalogCategoryLinkRepositoryV1SavePostBody, options) { return exports.CatalogCategoryLinkRepositoryV1ApiFp(this.configuration).catalogCategoryLinkRepositoryV1SavePost(categoryId, catalogCategoryLinkRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Assign a product to the required category * @param {string} categoryId * @param {any} [catalogCategoryLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryLinkRepositoryV1Api */ catalogCategoryLinkRepositoryV1SavePut(categoryId, catalogCategoryLinkRepositoryV1SavePutBody, options) { return exports.CatalogCategoryLinkRepositoryV1ApiFp(this.configuration).catalogCategoryLinkRepositoryV1SavePut(categoryId, catalogCategoryLinkRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CatalogCategoryLinkRepositoryV1Api = CatalogCategoryLinkRepositoryV1Api; /** * CatalogCategoryListV1Api - fetch parameter creator * @export */ const CatalogCategoryListV1ApiFetchParamCreator = function (configuration) { return { /** * Get category list * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/categories/list`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogCategoryListV1ApiFetchParamCreator = CatalogCategoryListV1ApiFetchParamCreator; /** * CatalogCategoryListV1Api - functional programming interface * @export */ const CatalogCategoryListV1ApiFp = function (configuration) { return { /** * Get category list * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CatalogCategoryListV1ApiFetchParamCreator(configuration).catalogCategoryListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogCategoryListV1ApiFp = CatalogCategoryListV1ApiFp; /** * CatalogCategoryListV1Api - factory interface * @export */ const CatalogCategoryListV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get category list * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogCategoryListV1ApiFp(configuration).catalogCategoryListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.CatalogCategoryListV1ApiFactory = CatalogCategoryListV1ApiFactory; /** * CatalogCategoryListV1Api - object-oriented interface * @export * @class CatalogCategoryListV1Api * @extends {BaseAPI} */ class CatalogCategoryListV1Api extends BaseAPI { /** * Get category list * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryListV1Api */ catalogCategoryListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogCategoryListV1ApiFp(this.configuration).catalogCategoryListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.CatalogCategoryListV1Api = CatalogCategoryListV1Api; /** * CatalogCategoryManagementV1Api - fetch parameter creator * @export */ const CatalogCategoryManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Retrieve list of categories * @param {number} [rootCategoryId] * @param {number} [depth] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryManagementV1GetTreeGet(rootCategoryId, depth, options = {}) { const localVarPath = `/V1/categories`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (rootCategoryId !== undefined) { localVarQueryParameter['rootCategoryId'] = rootCategoryId; } if (depth !== undefined) { localVarQueryParameter['depth'] = depth; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Move category * @param {number} categoryId * @param {any} [catalogCategoryManagementV1MovePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryManagementV1MovePut(categoryId, catalogCategoryManagementV1MovePutBody, options = {}) { // verify required parameter 'categoryId' is not null or undefined if (categoryId === null || categoryId === undefined) { throw new RequiredError('categoryId', 'Required parameter categoryId was null or undefined when calling catalogCategoryManagementV1MovePut.'); } const localVarPath = `/V1/categories/{categoryId}/move` .replace(`{${"categoryId"}}`, encodeURIComponent(String(categoryId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogCategoryManagementV1MovePutBody || {}) : (catalogCategoryManagementV1MovePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogCategoryManagementV1ApiFetchParamCreator = CatalogCategoryManagementV1ApiFetchParamCreator; /** * CatalogCategoryManagementV1Api - functional programming interface * @export */ const CatalogCategoryManagementV1ApiFp = function (configuration) { return { /** * Retrieve list of categories * @param {number} [rootCategoryId] * @param {number} [depth] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryManagementV1GetTreeGet(rootCategoryId, depth, options) { const localVarFetchArgs = exports.CatalogCategoryManagementV1ApiFetchParamCreator(configuration).catalogCategoryManagementV1GetTreeGet(rootCategoryId, depth, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Move category * @param {number} categoryId * @param {any} [catalogCategoryManagementV1MovePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryManagementV1MovePut(categoryId, catalogCategoryManagementV1MovePutBody, options) { const localVarFetchArgs = exports.CatalogCategoryManagementV1ApiFetchParamCreator(configuration).catalogCategoryManagementV1MovePut(categoryId, catalogCategoryManagementV1MovePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogCategoryManagementV1ApiFp = CatalogCategoryManagementV1ApiFp; /** * CatalogCategoryManagementV1Api - factory interface * @export */ const CatalogCategoryManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Retrieve list of categories * @param {number} [rootCategoryId] * @param {number} [depth] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryManagementV1GetTreeGet(rootCategoryId, depth, options) { return exports.CatalogCategoryManagementV1ApiFp(configuration).catalogCategoryManagementV1GetTreeGet(rootCategoryId, depth, options)(fetch, basePath); }, /** * Move category * @param {number} categoryId * @param {any} [catalogCategoryManagementV1MovePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryManagementV1MovePut(categoryId, catalogCategoryManagementV1MovePutBody, options) { return exports.CatalogCategoryManagementV1ApiFp(configuration).catalogCategoryManagementV1MovePut(categoryId, catalogCategoryManagementV1MovePutBody, options)(fetch, basePath); }, }; }; exports.CatalogCategoryManagementV1ApiFactory = CatalogCategoryManagementV1ApiFactory; /** * CatalogCategoryManagementV1Api - object-oriented interface * @export * @class CatalogCategoryManagementV1Api * @extends {BaseAPI} */ class CatalogCategoryManagementV1Api extends BaseAPI { /** * Retrieve list of categories * @param {number} [rootCategoryId] * @param {number} [depth] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryManagementV1Api */ catalogCategoryManagementV1GetTreeGet(rootCategoryId, depth, options) { return exports.CatalogCategoryManagementV1ApiFp(this.configuration).catalogCategoryManagementV1GetTreeGet(rootCategoryId, depth, options)(this.fetch, this.basePath); } /** * Move category * @param {number} categoryId * @param {any} [catalogCategoryManagementV1MovePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryManagementV1Api */ catalogCategoryManagementV1MovePut(categoryId, catalogCategoryManagementV1MovePutBody, options) { return exports.CatalogCategoryManagementV1ApiFp(this.configuration).catalogCategoryManagementV1MovePut(categoryId, catalogCategoryManagementV1MovePutBody, options)(this.fetch, this.basePath); } } exports.CatalogCategoryManagementV1Api = CatalogCategoryManagementV1Api; /** * CatalogCategoryRepositoryV1Api - fetch parameter creator * @export */ const CatalogCategoryRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete category by identifier * @param {number} categoryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1DeleteByIdentifierDelete(categoryId, options = {}) { // verify required parameter 'categoryId' is not null or undefined if (categoryId === null || categoryId === undefined) { throw new RequiredError('categoryId', 'Required parameter categoryId was null or undefined when calling catalogCategoryRepositoryV1DeleteByIdentifierDelete.'); } const localVarPath = `/V1/categories/{categoryId}` .replace(`{${"categoryId"}}`, encodeURIComponent(String(categoryId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get info about category by category id * @param {number} categoryId * @param {number} [storeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1GetGet(categoryId, storeId, options = {}) { // verify required parameter 'categoryId' is not null or undefined if (categoryId === null || categoryId === undefined) { throw new RequiredError('categoryId', 'Required parameter categoryId was null or undefined when calling catalogCategoryRepositoryV1GetGet.'); } const localVarPath = `/V1/categories/{categoryId}` .replace(`{${"categoryId"}}`, encodeURIComponent(String(categoryId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (storeId !== undefined) { localVarQueryParameter['storeId'] = storeId; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create category service * @param {any} [catalogCategoryRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1SavePost(catalogCategoryRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/categories`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogCategoryRepositoryV1SavePostBody || {}) : (catalogCategoryRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create category service * @param {string} id * @param {any} [catalogCategoryRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1SavePut(id, catalogCategoryRepositoryV1SavePutBody, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling catalogCategoryRepositoryV1SavePut.'); } const localVarPath = `/V1/categories/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogCategoryRepositoryV1SavePutBody || {}) : (catalogCategoryRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogCategoryRepositoryV1ApiFetchParamCreator = CatalogCategoryRepositoryV1ApiFetchParamCreator; /** * CatalogCategoryRepositoryV1Api - functional programming interface * @export */ const CatalogCategoryRepositoryV1ApiFp = function (configuration) { return { /** * Delete category by identifier * @param {number} categoryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1DeleteByIdentifierDelete(categoryId, options) { const localVarFetchArgs = exports.CatalogCategoryRepositoryV1ApiFetchParamCreator(configuration).catalogCategoryRepositoryV1DeleteByIdentifierDelete(categoryId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get info about category by category id * @param {number} categoryId * @param {number} [storeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1GetGet(categoryId, storeId, options) { const localVarFetchArgs = exports.CatalogCategoryRepositoryV1ApiFetchParamCreator(configuration).catalogCategoryRepositoryV1GetGet(categoryId, storeId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Create category service * @param {any} [catalogCategoryRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1SavePost(catalogCategoryRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.CatalogCategoryRepositoryV1ApiFetchParamCreator(configuration).catalogCategoryRepositoryV1SavePost(catalogCategoryRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Create category service * @param {string} id * @param {any} [catalogCategoryRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1SavePut(id, catalogCategoryRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CatalogCategoryRepositoryV1ApiFetchParamCreator(configuration).catalogCategoryRepositoryV1SavePut(id, catalogCategoryRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogCategoryRepositoryV1ApiFp = CatalogCategoryRepositoryV1ApiFp; /** * CatalogCategoryRepositoryV1Api - factory interface * @export */ const CatalogCategoryRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete category by identifier * @param {number} categoryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1DeleteByIdentifierDelete(categoryId, options) { return exports.CatalogCategoryRepositoryV1ApiFp(configuration).catalogCategoryRepositoryV1DeleteByIdentifierDelete(categoryId, options)(fetch, basePath); }, /** * Get info about category by category id * @param {number} categoryId * @param {number} [storeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1GetGet(categoryId, storeId, options) { return exports.CatalogCategoryRepositoryV1ApiFp(configuration).catalogCategoryRepositoryV1GetGet(categoryId, storeId, options)(fetch, basePath); }, /** * Create category service * @param {any} [catalogCategoryRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1SavePost(catalogCategoryRepositoryV1SavePostBody, options) { return exports.CatalogCategoryRepositoryV1ApiFp(configuration).catalogCategoryRepositoryV1SavePost(catalogCategoryRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Create category service * @param {string} id * @param {any} [catalogCategoryRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCategoryRepositoryV1SavePut(id, catalogCategoryRepositoryV1SavePutBody, options) { return exports.CatalogCategoryRepositoryV1ApiFp(configuration).catalogCategoryRepositoryV1SavePut(id, catalogCategoryRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CatalogCategoryRepositoryV1ApiFactory = CatalogCategoryRepositoryV1ApiFactory; /** * CatalogCategoryRepositoryV1Api - object-oriented interface * @export * @class CatalogCategoryRepositoryV1Api * @extends {BaseAPI} */ class CatalogCategoryRepositoryV1Api extends BaseAPI { /** * Delete category by identifier * @param {number} categoryId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryRepositoryV1Api */ catalogCategoryRepositoryV1DeleteByIdentifierDelete(categoryId, options) { return exports.CatalogCategoryRepositoryV1ApiFp(this.configuration).catalogCategoryRepositoryV1DeleteByIdentifierDelete(categoryId, options)(this.fetch, this.basePath); } /** * Get info about category by category id * @param {number} categoryId * @param {number} [storeId] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryRepositoryV1Api */ catalogCategoryRepositoryV1GetGet(categoryId, storeId, options) { return exports.CatalogCategoryRepositoryV1ApiFp(this.configuration).catalogCategoryRepositoryV1GetGet(categoryId, storeId, options)(this.fetch, this.basePath); } /** * Create category service * @param {any} [catalogCategoryRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryRepositoryV1Api */ catalogCategoryRepositoryV1SavePost(catalogCategoryRepositoryV1SavePostBody, options) { return exports.CatalogCategoryRepositoryV1ApiFp(this.configuration).catalogCategoryRepositoryV1SavePost(catalogCategoryRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Create category service * @param {string} id * @param {any} [catalogCategoryRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCategoryRepositoryV1Api */ catalogCategoryRepositoryV1SavePut(id, catalogCategoryRepositoryV1SavePutBody, options) { return exports.CatalogCategoryRepositoryV1ApiFp(this.configuration).catalogCategoryRepositoryV1SavePut(id, catalogCategoryRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CatalogCategoryRepositoryV1Api = CatalogCategoryRepositoryV1Api; /** * CatalogCostStorageV1Api - fetch parameter creator * @export */ const CatalogCostStorageV1ApiFetchParamCreator = function (configuration) { return { /** * Delete product cost. In case of at least one of skus is not found exception will be thrown. If error occurred during the delete exception will be thrown. * @param {any} [catalogCostStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCostStorageV1DeletePost(catalogCostStorageV1DeletePostBody, options = {}) { const localVarPath = `/V1/products/cost-delete`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogCostStorageV1DeletePostBody || {}) : (catalogCostStorageV1DeletePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogCostStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCostStorageV1GetPost(catalogCostStorageV1GetPostBody, options = {}) { const localVarPath = `/V1/products/cost-information`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogCostStorageV1GetPostBody || {}) : (catalogCostStorageV1GetPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add or update product cost. Input item should correspond to \\Magento\\Catalog\\Api\\Data\\CostInterface. If any items will have invalid cost, store id or sku, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogCostStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCostStorageV1UpdatePost(catalogCostStorageV1UpdatePostBody, options = {}) { const localVarPath = `/V1/products/cost`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogCostStorageV1UpdatePostBody || {}) : (catalogCostStorageV1UpdatePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogCostStorageV1ApiFetchParamCreator = CatalogCostStorageV1ApiFetchParamCreator; /** * CatalogCostStorageV1Api - functional programming interface * @export */ const CatalogCostStorageV1ApiFp = function (configuration) { return { /** * Delete product cost. In case of at least one of skus is not found exception will be thrown. If error occurred during the delete exception will be thrown. * @param {any} [catalogCostStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCostStorageV1DeletePost(catalogCostStorageV1DeletePostBody, options) { const localVarFetchArgs = exports.CatalogCostStorageV1ApiFetchParamCreator(configuration).catalogCostStorageV1DeletePost(catalogCostStorageV1DeletePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogCostStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCostStorageV1GetPost(catalogCostStorageV1GetPostBody, options) { const localVarFetchArgs = exports.CatalogCostStorageV1ApiFetchParamCreator(configuration).catalogCostStorageV1GetPost(catalogCostStorageV1GetPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add or update product cost. Input item should correspond to \\Magento\\Catalog\\Api\\Data\\CostInterface. If any items will have invalid cost, store id or sku, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogCostStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCostStorageV1UpdatePost(catalogCostStorageV1UpdatePostBody, options) { const localVarFetchArgs = exports.CatalogCostStorageV1ApiFetchParamCreator(configuration).catalogCostStorageV1UpdatePost(catalogCostStorageV1UpdatePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogCostStorageV1ApiFp = CatalogCostStorageV1ApiFp; /** * CatalogCostStorageV1Api - factory interface * @export */ const CatalogCostStorageV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete product cost. In case of at least one of skus is not found exception will be thrown. If error occurred during the delete exception will be thrown. * @param {any} [catalogCostStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCostStorageV1DeletePost(catalogCostStorageV1DeletePostBody, options) { return exports.CatalogCostStorageV1ApiFp(configuration).catalogCostStorageV1DeletePost(catalogCostStorageV1DeletePostBody, options)(fetch, basePath); }, /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogCostStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCostStorageV1GetPost(catalogCostStorageV1GetPostBody, options) { return exports.CatalogCostStorageV1ApiFp(configuration).catalogCostStorageV1GetPost(catalogCostStorageV1GetPostBody, options)(fetch, basePath); }, /** * Add or update product cost. Input item should correspond to \\Magento\\Catalog\\Api\\Data\\CostInterface. If any items will have invalid cost, store id or sku, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogCostStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogCostStorageV1UpdatePost(catalogCostStorageV1UpdatePostBody, options) { return exports.CatalogCostStorageV1ApiFp(configuration).catalogCostStorageV1UpdatePost(catalogCostStorageV1UpdatePostBody, options)(fetch, basePath); }, }; }; exports.CatalogCostStorageV1ApiFactory = CatalogCostStorageV1ApiFactory; /** * CatalogCostStorageV1Api - object-oriented interface * @export * @class CatalogCostStorageV1Api * @extends {BaseAPI} */ class CatalogCostStorageV1Api extends BaseAPI { /** * Delete product cost. In case of at least one of skus is not found exception will be thrown. If error occurred during the delete exception will be thrown. * @param {any} [catalogCostStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCostStorageV1Api */ catalogCostStorageV1DeletePost(catalogCostStorageV1DeletePostBody, options) { return exports.CatalogCostStorageV1ApiFp(this.configuration).catalogCostStorageV1DeletePost(catalogCostStorageV1DeletePostBody, options)(this.fetch, this.basePath); } /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogCostStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCostStorageV1Api */ catalogCostStorageV1GetPost(catalogCostStorageV1GetPostBody, options) { return exports.CatalogCostStorageV1ApiFp(this.configuration).catalogCostStorageV1GetPost(catalogCostStorageV1GetPostBody, options)(this.fetch, this.basePath); } /** * Add or update product cost. Input item should correspond to \\Magento\\Catalog\\Api\\Data\\CostInterface. If any items will have invalid cost, store id or sku, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogCostStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogCostStorageV1Api */ catalogCostStorageV1UpdatePost(catalogCostStorageV1UpdatePostBody, options) { return exports.CatalogCostStorageV1ApiFp(this.configuration).catalogCostStorageV1UpdatePost(catalogCostStorageV1UpdatePostBody, options)(this.fetch, this.basePath); } } exports.CatalogCostStorageV1Api = CatalogCostStorageV1Api; /** * CatalogInventoryStockRegistryV1Api - fetch parameter creator * @export */ const CatalogInventoryStockRegistryV1ApiFetchParamCreator = function (configuration) { return { /** * Retrieves a list of SKU's with low inventory qty * @param {number} scopeId * @param {number} qty * @param {number} [currentPage] * @param {number} [pageSize] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1GetLowStockItemsGet(scopeId, qty, currentPage, pageSize, options = {}) { // verify required parameter 'scopeId' is not null or undefined if (scopeId === null || scopeId === undefined) { throw new RequiredError('scopeId', 'Required parameter scopeId was null or undefined when calling catalogInventoryStockRegistryV1GetLowStockItemsGet.'); } // verify required parameter 'qty' is not null or undefined if (qty === null || qty === undefined) { throw new RequiredError('qty', 'Required parameter qty was null or undefined when calling catalogInventoryStockRegistryV1GetLowStockItemsGet.'); } const localVarPath = `/V1/stockItems/lowStock/`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (scopeId !== undefined) { localVarQueryParameter['scopeId'] = scopeId; } if (qty !== undefined) { localVarQueryParameter['qty'] = qty; } if (currentPage !== undefined) { localVarQueryParameter['currentPage'] = currentPage; } if (pageSize !== undefined) { localVarQueryParameter['pageSize'] = pageSize; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {string} productSku * @param {number} [scopeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1GetStockItemBySkuGet(productSku, scopeId, options = {}) { // verify required parameter 'productSku' is not null or undefined if (productSku === null || productSku === undefined) { throw new RequiredError('productSku', 'Required parameter productSku was null or undefined when calling catalogInventoryStockRegistryV1GetStockItemBySkuGet.'); } const localVarPath = `/V1/stockItems/{productSku}` .replace(`{${"productSku"}}`, encodeURIComponent(String(productSku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (scopeId !== undefined) { localVarQueryParameter['scopeId'] = scopeId; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {string} productSku * @param {number} [scopeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1GetStockStatusBySkuGet(productSku, scopeId, options = {}) { // verify required parameter 'productSku' is not null or undefined if (productSku === null || productSku === undefined) { throw new RequiredError('productSku', 'Required parameter productSku was null or undefined when calling catalogInventoryStockRegistryV1GetStockStatusBySkuGet.'); } const localVarPath = `/V1/stockStatuses/{productSku}` .replace(`{${"productSku"}}`, encodeURIComponent(String(productSku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (scopeId !== undefined) { localVarQueryParameter['scopeId'] = scopeId; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {string} productSku * @param {string} itemId * @param {any} [catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1UpdateStockItemBySkuPut(productSku, itemId, catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody, options = {}) { // verify required parameter 'productSku' is not null or undefined if (productSku === null || productSku === undefined) { throw new RequiredError('productSku', 'Required parameter productSku was null or undefined when calling catalogInventoryStockRegistryV1UpdateStockItemBySkuPut.'); } // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling catalogInventoryStockRegistryV1UpdateStockItemBySkuPut.'); } const localVarPath = `/V1/products/{productSku}/stockItems/{itemId}` .replace(`{${"productSku"}}`, encodeURIComponent(String(productSku))) .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody || {}) : (catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogInventoryStockRegistryV1ApiFetchParamCreator = CatalogInventoryStockRegistryV1ApiFetchParamCreator; /** * CatalogInventoryStockRegistryV1Api - functional programming interface * @export */ const CatalogInventoryStockRegistryV1ApiFp = function (configuration) { return { /** * Retrieves a list of SKU's with low inventory qty * @param {number} scopeId * @param {number} qty * @param {number} [currentPage] * @param {number} [pageSize] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1GetLowStockItemsGet(scopeId, qty, currentPage, pageSize, options) { const localVarFetchArgs = exports.CatalogInventoryStockRegistryV1ApiFetchParamCreator(configuration).catalogInventoryStockRegistryV1GetLowStockItemsGet(scopeId, qty, currentPage, pageSize, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * * @param {string} productSku * @param {number} [scopeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1GetStockItemBySkuGet(productSku, scopeId, options) { const localVarFetchArgs = exports.CatalogInventoryStockRegistryV1ApiFetchParamCreator(configuration).catalogInventoryStockRegistryV1GetStockItemBySkuGet(productSku, scopeId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * * @param {string} productSku * @param {number} [scopeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1GetStockStatusBySkuGet(productSku, scopeId, options) { const localVarFetchArgs = exports.CatalogInventoryStockRegistryV1ApiFetchParamCreator(configuration).catalogInventoryStockRegistryV1GetStockStatusBySkuGet(productSku, scopeId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * * @param {string} productSku * @param {string} itemId * @param {any} [catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1UpdateStockItemBySkuPut(productSku, itemId, catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody, options) { const localVarFetchArgs = exports.CatalogInventoryStockRegistryV1ApiFetchParamCreator(configuration).catalogInventoryStockRegistryV1UpdateStockItemBySkuPut(productSku, itemId, catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogInventoryStockRegistryV1ApiFp = CatalogInventoryStockRegistryV1ApiFp; /** * CatalogInventoryStockRegistryV1Api - factory interface * @export */ const CatalogInventoryStockRegistryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Retrieves a list of SKU's with low inventory qty * @param {number} scopeId * @param {number} qty * @param {number} [currentPage] * @param {number} [pageSize] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1GetLowStockItemsGet(scopeId, qty, currentPage, pageSize, options) { return exports.CatalogInventoryStockRegistryV1ApiFp(configuration).catalogInventoryStockRegistryV1GetLowStockItemsGet(scopeId, qty, currentPage, pageSize, options)(fetch, basePath); }, /** * * @param {string} productSku * @param {number} [scopeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1GetStockItemBySkuGet(productSku, scopeId, options) { return exports.CatalogInventoryStockRegistryV1ApiFp(configuration).catalogInventoryStockRegistryV1GetStockItemBySkuGet(productSku, scopeId, options)(fetch, basePath); }, /** * * @param {string} productSku * @param {number} [scopeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1GetStockStatusBySkuGet(productSku, scopeId, options) { return exports.CatalogInventoryStockRegistryV1ApiFp(configuration).catalogInventoryStockRegistryV1GetStockStatusBySkuGet(productSku, scopeId, options)(fetch, basePath); }, /** * * @param {string} productSku * @param {string} itemId * @param {any} [catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogInventoryStockRegistryV1UpdateStockItemBySkuPut(productSku, itemId, catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody, options) { return exports.CatalogInventoryStockRegistryV1ApiFp(configuration).catalogInventoryStockRegistryV1UpdateStockItemBySkuPut(productSku, itemId, catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody, options)(fetch, basePath); }, }; }; exports.CatalogInventoryStockRegistryV1ApiFactory = CatalogInventoryStockRegistryV1ApiFactory; /** * CatalogInventoryStockRegistryV1Api - object-oriented interface * @export * @class CatalogInventoryStockRegistryV1Api * @extends {BaseAPI} */ class CatalogInventoryStockRegistryV1Api extends BaseAPI { /** * Retrieves a list of SKU's with low inventory qty * @param {number} scopeId * @param {number} qty * @param {number} [currentPage] * @param {number} [pageSize] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogInventoryStockRegistryV1Api */ catalogInventoryStockRegistryV1GetLowStockItemsGet(scopeId, qty, currentPage, pageSize, options) { return exports.CatalogInventoryStockRegistryV1ApiFp(this.configuration).catalogInventoryStockRegistryV1GetLowStockItemsGet(scopeId, qty, currentPage, pageSize, options)(this.fetch, this.basePath); } /** * * @param {string} productSku * @param {number} [scopeId] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogInventoryStockRegistryV1Api */ catalogInventoryStockRegistryV1GetStockItemBySkuGet(productSku, scopeId, options) { return exports.CatalogInventoryStockRegistryV1ApiFp(this.configuration).catalogInventoryStockRegistryV1GetStockItemBySkuGet(productSku, scopeId, options)(this.fetch, this.basePath); } /** * * @param {string} productSku * @param {number} [scopeId] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogInventoryStockRegistryV1Api */ catalogInventoryStockRegistryV1GetStockStatusBySkuGet(productSku, scopeId, options) { return exports.CatalogInventoryStockRegistryV1ApiFp(this.configuration).catalogInventoryStockRegistryV1GetStockStatusBySkuGet(productSku, scopeId, options)(this.fetch, this.basePath); } /** * * @param {string} productSku * @param {string} itemId * @param {any} [catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogInventoryStockRegistryV1Api */ catalogInventoryStockRegistryV1UpdateStockItemBySkuPut(productSku, itemId, catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody, options) { return exports.CatalogInventoryStockRegistryV1ApiFp(this.configuration).catalogInventoryStockRegistryV1UpdateStockItemBySkuPut(productSku, itemId, catalogInventoryStockRegistryV1UpdateStockItemBySkuPutBody, options)(this.fetch, this.basePath); } } exports.CatalogInventoryStockRegistryV1Api = CatalogInventoryStockRegistryV1Api; /** * CatalogProductAttributeGroupRepositoryV1Api - fetch parameter creator * @export */ const CatalogProductAttributeGroupRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Remove attribute group by id * @param {number} groupId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1DeleteByIdDelete(groupId, options = {}) { // verify required parameter 'groupId' is not null or undefined if (groupId === null || groupId === undefined) { throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling catalogProductAttributeGroupRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/products/attribute-sets/groups/{groupId}` .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve list of attribute groups * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/products/attribute-sets/groups/list`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save attribute group * @param {any} [catalogProductAttributeGroupRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1SavePost(catalogProductAttributeGroupRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/products/attribute-sets/groups`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductAttributeGroupRepositoryV1SavePostBody || {}) : (catalogProductAttributeGroupRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save attribute group * @param {string} attributeSetId * @param {any} [catalogProductAttributeGroupRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1SavePut(attributeSetId, catalogProductAttributeGroupRepositoryV1SavePutBody, options = {}) { // verify required parameter 'attributeSetId' is not null or undefined if (attributeSetId === null || attributeSetId === undefined) { throw new RequiredError('attributeSetId', 'Required parameter attributeSetId was null or undefined when calling catalogProductAttributeGroupRepositoryV1SavePut.'); } const localVarPath = `/V1/products/attribute-sets/{attributeSetId}/groups` .replace(`{${"attributeSetId"}}`, encodeURIComponent(String(attributeSetId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductAttributeGroupRepositoryV1SavePutBody || {}) : (catalogProductAttributeGroupRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductAttributeGroupRepositoryV1ApiFetchParamCreator = CatalogProductAttributeGroupRepositoryV1ApiFetchParamCreator; /** * CatalogProductAttributeGroupRepositoryV1Api - functional programming interface * @export */ const CatalogProductAttributeGroupRepositoryV1ApiFp = function (configuration) { return { /** * Remove attribute group by id * @param {number} groupId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1DeleteByIdDelete(groupId, options) { const localVarFetchArgs = exports.CatalogProductAttributeGroupRepositoryV1ApiFetchParamCreator(configuration).catalogProductAttributeGroupRepositoryV1DeleteByIdDelete(groupId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve list of attribute groups * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CatalogProductAttributeGroupRepositoryV1ApiFetchParamCreator(configuration).catalogProductAttributeGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save attribute group * @param {any} [catalogProductAttributeGroupRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1SavePost(catalogProductAttributeGroupRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.CatalogProductAttributeGroupRepositoryV1ApiFetchParamCreator(configuration).catalogProductAttributeGroupRepositoryV1SavePost(catalogProductAttributeGroupRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save attribute group * @param {string} attributeSetId * @param {any} [catalogProductAttributeGroupRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1SavePut(attributeSetId, catalogProductAttributeGroupRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CatalogProductAttributeGroupRepositoryV1ApiFetchParamCreator(configuration).catalogProductAttributeGroupRepositoryV1SavePut(attributeSetId, catalogProductAttributeGroupRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductAttributeGroupRepositoryV1ApiFp = CatalogProductAttributeGroupRepositoryV1ApiFp; /** * CatalogProductAttributeGroupRepositoryV1Api - factory interface * @export */ const CatalogProductAttributeGroupRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Remove attribute group by id * @param {number} groupId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1DeleteByIdDelete(groupId, options) { return exports.CatalogProductAttributeGroupRepositoryV1ApiFp(configuration).catalogProductAttributeGroupRepositoryV1DeleteByIdDelete(groupId, options)(fetch, basePath); }, /** * Retrieve list of attribute groups * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogProductAttributeGroupRepositoryV1ApiFp(configuration).catalogProductAttributeGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save attribute group * @param {any} [catalogProductAttributeGroupRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1SavePost(catalogProductAttributeGroupRepositoryV1SavePostBody, options) { return exports.CatalogProductAttributeGroupRepositoryV1ApiFp(configuration).catalogProductAttributeGroupRepositoryV1SavePost(catalogProductAttributeGroupRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save attribute group * @param {string} attributeSetId * @param {any} [catalogProductAttributeGroupRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeGroupRepositoryV1SavePut(attributeSetId, catalogProductAttributeGroupRepositoryV1SavePutBody, options) { return exports.CatalogProductAttributeGroupRepositoryV1ApiFp(configuration).catalogProductAttributeGroupRepositoryV1SavePut(attributeSetId, catalogProductAttributeGroupRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CatalogProductAttributeGroupRepositoryV1ApiFactory = CatalogProductAttributeGroupRepositoryV1ApiFactory; /** * CatalogProductAttributeGroupRepositoryV1Api - object-oriented interface * @export * @class CatalogProductAttributeGroupRepositoryV1Api * @extends {BaseAPI} */ class CatalogProductAttributeGroupRepositoryV1Api extends BaseAPI { /** * Remove attribute group by id * @param {number} groupId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeGroupRepositoryV1Api */ catalogProductAttributeGroupRepositoryV1DeleteByIdDelete(groupId, options) { return exports.CatalogProductAttributeGroupRepositoryV1ApiFp(this.configuration).catalogProductAttributeGroupRepositoryV1DeleteByIdDelete(groupId, options)(this.fetch, this.basePath); } /** * Retrieve list of attribute groups * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeGroupRepositoryV1Api */ catalogProductAttributeGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogProductAttributeGroupRepositoryV1ApiFp(this.configuration).catalogProductAttributeGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save attribute group * @param {any} [catalogProductAttributeGroupRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeGroupRepositoryV1Api */ catalogProductAttributeGroupRepositoryV1SavePost(catalogProductAttributeGroupRepositoryV1SavePostBody, options) { return exports.CatalogProductAttributeGroupRepositoryV1ApiFp(this.configuration).catalogProductAttributeGroupRepositoryV1SavePost(catalogProductAttributeGroupRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save attribute group * @param {string} attributeSetId * @param {any} [catalogProductAttributeGroupRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeGroupRepositoryV1Api */ catalogProductAttributeGroupRepositoryV1SavePut(attributeSetId, catalogProductAttributeGroupRepositoryV1SavePutBody, options) { return exports.CatalogProductAttributeGroupRepositoryV1ApiFp(this.configuration).catalogProductAttributeGroupRepositoryV1SavePut(attributeSetId, catalogProductAttributeGroupRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CatalogProductAttributeGroupRepositoryV1Api = CatalogProductAttributeGroupRepositoryV1Api; /** * CatalogProductAttributeManagementV1Api - fetch parameter creator * @export */ const CatalogProductAttributeManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Assign attribute to attribute set * @param {any} [catalogProductAttributeManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeManagementV1AssignPost(catalogProductAttributeManagementV1AssignPostBody, options = {}) { const localVarPath = `/V1/products/attribute-sets/attributes`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductAttributeManagementV1AssignPostBody || {}) : (catalogProductAttributeManagementV1AssignPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve related attributes based on given attribute set ID * @param {string} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeManagementV1GetAttributesGet(attributeSetId, options = {}) { // verify required parameter 'attributeSetId' is not null or undefined if (attributeSetId === null || attributeSetId === undefined) { throw new RequiredError('attributeSetId', 'Required parameter attributeSetId was null or undefined when calling catalogProductAttributeManagementV1GetAttributesGet.'); } const localVarPath = `/V1/products/attribute-sets/{attributeSetId}/attributes` .replace(`{${"attributeSetId"}}`, encodeURIComponent(String(attributeSetId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Remove attribute from attribute set * @param {string} attributeSetId * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeManagementV1UnassignDelete(attributeSetId, attributeCode, options = {}) { // verify required parameter 'attributeSetId' is not null or undefined if (attributeSetId === null || attributeSetId === undefined) { throw new RequiredError('attributeSetId', 'Required parameter attributeSetId was null or undefined when calling catalogProductAttributeManagementV1UnassignDelete.'); } // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling catalogProductAttributeManagementV1UnassignDelete.'); } const localVarPath = `/V1/products/attribute-sets/{attributeSetId}/attributes/{attributeCode}` .replace(`{${"attributeSetId"}}`, encodeURIComponent(String(attributeSetId))) .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductAttributeManagementV1ApiFetchParamCreator = CatalogProductAttributeManagementV1ApiFetchParamCreator; /** * CatalogProductAttributeManagementV1Api - functional programming interface * @export */ const CatalogProductAttributeManagementV1ApiFp = function (configuration) { return { /** * Assign attribute to attribute set * @param {any} [catalogProductAttributeManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeManagementV1AssignPost(catalogProductAttributeManagementV1AssignPostBody, options) { const localVarFetchArgs = exports.CatalogProductAttributeManagementV1ApiFetchParamCreator(configuration).catalogProductAttributeManagementV1AssignPost(catalogProductAttributeManagementV1AssignPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve related attributes based on given attribute set ID * @param {string} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeManagementV1GetAttributesGet(attributeSetId, options) { const localVarFetchArgs = exports.CatalogProductAttributeManagementV1ApiFetchParamCreator(configuration).catalogProductAttributeManagementV1GetAttributesGet(attributeSetId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Remove attribute from attribute set * @param {string} attributeSetId * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeManagementV1UnassignDelete(attributeSetId, attributeCode, options) { const localVarFetchArgs = exports.CatalogProductAttributeManagementV1ApiFetchParamCreator(configuration).catalogProductAttributeManagementV1UnassignDelete(attributeSetId, attributeCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductAttributeManagementV1ApiFp = CatalogProductAttributeManagementV1ApiFp; /** * CatalogProductAttributeManagementV1Api - factory interface * @export */ const CatalogProductAttributeManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Assign attribute to attribute set * @param {any} [catalogProductAttributeManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeManagementV1AssignPost(catalogProductAttributeManagementV1AssignPostBody, options) { return exports.CatalogProductAttributeManagementV1ApiFp(configuration).catalogProductAttributeManagementV1AssignPost(catalogProductAttributeManagementV1AssignPostBody, options)(fetch, basePath); }, /** * Retrieve related attributes based on given attribute set ID * @param {string} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeManagementV1GetAttributesGet(attributeSetId, options) { return exports.CatalogProductAttributeManagementV1ApiFp(configuration).catalogProductAttributeManagementV1GetAttributesGet(attributeSetId, options)(fetch, basePath); }, /** * Remove attribute from attribute set * @param {string} attributeSetId * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeManagementV1UnassignDelete(attributeSetId, attributeCode, options) { return exports.CatalogProductAttributeManagementV1ApiFp(configuration).catalogProductAttributeManagementV1UnassignDelete(attributeSetId, attributeCode, options)(fetch, basePath); }, }; }; exports.CatalogProductAttributeManagementV1ApiFactory = CatalogProductAttributeManagementV1ApiFactory; /** * CatalogProductAttributeManagementV1Api - object-oriented interface * @export * @class CatalogProductAttributeManagementV1Api * @extends {BaseAPI} */ class CatalogProductAttributeManagementV1Api extends BaseAPI { /** * Assign attribute to attribute set * @param {any} [catalogProductAttributeManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeManagementV1Api */ catalogProductAttributeManagementV1AssignPost(catalogProductAttributeManagementV1AssignPostBody, options) { return exports.CatalogProductAttributeManagementV1ApiFp(this.configuration).catalogProductAttributeManagementV1AssignPost(catalogProductAttributeManagementV1AssignPostBody, options)(this.fetch, this.basePath); } /** * Retrieve related attributes based on given attribute set ID * @param {string} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeManagementV1Api */ catalogProductAttributeManagementV1GetAttributesGet(attributeSetId, options) { return exports.CatalogProductAttributeManagementV1ApiFp(this.configuration).catalogProductAttributeManagementV1GetAttributesGet(attributeSetId, options)(this.fetch, this.basePath); } /** * Remove attribute from attribute set * @param {string} attributeSetId * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeManagementV1Api */ catalogProductAttributeManagementV1UnassignDelete(attributeSetId, attributeCode, options) { return exports.CatalogProductAttributeManagementV1ApiFp(this.configuration).catalogProductAttributeManagementV1UnassignDelete(attributeSetId, attributeCode, options)(this.fetch, this.basePath); } } exports.CatalogProductAttributeManagementV1Api = CatalogProductAttributeManagementV1Api; /** * CatalogProductAttributeMediaGalleryManagementV1Api - fetch parameter creator * @export */ const CatalogProductAttributeMediaGalleryManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Create new gallery entry * @param {string} sku * @param {any} [catalogProductAttributeMediaGalleryManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1CreatePost(sku, catalogProductAttributeMediaGalleryManagementV1CreatePostBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductAttributeMediaGalleryManagementV1CreatePost.'); } const localVarPath = `/V1/products/{sku}/media` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductAttributeMediaGalleryManagementV1CreatePostBody || {}) : (catalogProductAttributeMediaGalleryManagementV1CreatePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Return information about gallery entry * @param {string} sku * @param {number} entryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1GetGet(sku, entryId, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductAttributeMediaGalleryManagementV1GetGet.'); } // verify required parameter 'entryId' is not null or undefined if (entryId === null || entryId === undefined) { throw new RequiredError('entryId', 'Required parameter entryId was null or undefined when calling catalogProductAttributeMediaGalleryManagementV1GetGet.'); } const localVarPath = `/V1/products/{sku}/media/{entryId}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"entryId"}}`, encodeURIComponent(String(entryId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve the list of gallery entries associated with given product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1GetListGet(sku, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductAttributeMediaGalleryManagementV1GetListGet.'); } const localVarPath = `/V1/products/{sku}/media` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Remove gallery entry * @param {string} sku * @param {number} entryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1RemoveDelete(sku, entryId, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductAttributeMediaGalleryManagementV1RemoveDelete.'); } // verify required parameter 'entryId' is not null or undefined if (entryId === null || entryId === undefined) { throw new RequiredError('entryId', 'Required parameter entryId was null or undefined when calling catalogProductAttributeMediaGalleryManagementV1RemoveDelete.'); } const localVarPath = `/V1/products/{sku}/media/{entryId}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"entryId"}}`, encodeURIComponent(String(entryId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Update gallery entry * @param {string} sku * @param {string} entryId * @param {any} [catalogProductAttributeMediaGalleryManagementV1UpdatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1UpdatePut(sku, entryId, catalogProductAttributeMediaGalleryManagementV1UpdatePutBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductAttributeMediaGalleryManagementV1UpdatePut.'); } // verify required parameter 'entryId' is not null or undefined if (entryId === null || entryId === undefined) { throw new RequiredError('entryId', 'Required parameter entryId was null or undefined when calling catalogProductAttributeMediaGalleryManagementV1UpdatePut.'); } const localVarPath = `/V1/products/{sku}/media/{entryId}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"entryId"}}`, encodeURIComponent(String(entryId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductAttributeMediaGalleryManagementV1UpdatePutBody || {}) : (catalogProductAttributeMediaGalleryManagementV1UpdatePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductAttributeMediaGalleryManagementV1ApiFetchParamCreator = CatalogProductAttributeMediaGalleryManagementV1ApiFetchParamCreator; /** * CatalogProductAttributeMediaGalleryManagementV1Api - functional programming interface * @export */ const CatalogProductAttributeMediaGalleryManagementV1ApiFp = function (configuration) { return { /** * Create new gallery entry * @param {string} sku * @param {any} [catalogProductAttributeMediaGalleryManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1CreatePost(sku, catalogProductAttributeMediaGalleryManagementV1CreatePostBody, options) { const localVarFetchArgs = exports.CatalogProductAttributeMediaGalleryManagementV1ApiFetchParamCreator(configuration).catalogProductAttributeMediaGalleryManagementV1CreatePost(sku, catalogProductAttributeMediaGalleryManagementV1CreatePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Return information about gallery entry * @param {string} sku * @param {number} entryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1GetGet(sku, entryId, options) { const localVarFetchArgs = exports.CatalogProductAttributeMediaGalleryManagementV1ApiFetchParamCreator(configuration).catalogProductAttributeMediaGalleryManagementV1GetGet(sku, entryId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve the list of gallery entries associated with given product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1GetListGet(sku, options) { const localVarFetchArgs = exports.CatalogProductAttributeMediaGalleryManagementV1ApiFetchParamCreator(configuration).catalogProductAttributeMediaGalleryManagementV1GetListGet(sku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Remove gallery entry * @param {string} sku * @param {number} entryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1RemoveDelete(sku, entryId, options) { const localVarFetchArgs = exports.CatalogProductAttributeMediaGalleryManagementV1ApiFetchParamCreator(configuration).catalogProductAttributeMediaGalleryManagementV1RemoveDelete(sku, entryId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Update gallery entry * @param {string} sku * @param {string} entryId * @param {any} [catalogProductAttributeMediaGalleryManagementV1UpdatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1UpdatePut(sku, entryId, catalogProductAttributeMediaGalleryManagementV1UpdatePutBody, options) { const localVarFetchArgs = exports.CatalogProductAttributeMediaGalleryManagementV1ApiFetchParamCreator(configuration).catalogProductAttributeMediaGalleryManagementV1UpdatePut(sku, entryId, catalogProductAttributeMediaGalleryManagementV1UpdatePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp = CatalogProductAttributeMediaGalleryManagementV1ApiFp; /** * CatalogProductAttributeMediaGalleryManagementV1Api - factory interface * @export */ const CatalogProductAttributeMediaGalleryManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Create new gallery entry * @param {string} sku * @param {any} [catalogProductAttributeMediaGalleryManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1CreatePost(sku, catalogProductAttributeMediaGalleryManagementV1CreatePostBody, options) { return exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp(configuration).catalogProductAttributeMediaGalleryManagementV1CreatePost(sku, catalogProductAttributeMediaGalleryManagementV1CreatePostBody, options)(fetch, basePath); }, /** * Return information about gallery entry * @param {string} sku * @param {number} entryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1GetGet(sku, entryId, options) { return exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp(configuration).catalogProductAttributeMediaGalleryManagementV1GetGet(sku, entryId, options)(fetch, basePath); }, /** * Retrieve the list of gallery entries associated with given product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1GetListGet(sku, options) { return exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp(configuration).catalogProductAttributeMediaGalleryManagementV1GetListGet(sku, options)(fetch, basePath); }, /** * Remove gallery entry * @param {string} sku * @param {number} entryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1RemoveDelete(sku, entryId, options) { return exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp(configuration).catalogProductAttributeMediaGalleryManagementV1RemoveDelete(sku, entryId, options)(fetch, basePath); }, /** * Update gallery entry * @param {string} sku * @param {string} entryId * @param {any} [catalogProductAttributeMediaGalleryManagementV1UpdatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeMediaGalleryManagementV1UpdatePut(sku, entryId, catalogProductAttributeMediaGalleryManagementV1UpdatePutBody, options) { return exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp(configuration).catalogProductAttributeMediaGalleryManagementV1UpdatePut(sku, entryId, catalogProductAttributeMediaGalleryManagementV1UpdatePutBody, options)(fetch, basePath); }, }; }; exports.CatalogProductAttributeMediaGalleryManagementV1ApiFactory = CatalogProductAttributeMediaGalleryManagementV1ApiFactory; /** * CatalogProductAttributeMediaGalleryManagementV1Api - object-oriented interface * @export * @class CatalogProductAttributeMediaGalleryManagementV1Api * @extends {BaseAPI} */ class CatalogProductAttributeMediaGalleryManagementV1Api extends BaseAPI { /** * Create new gallery entry * @param {string} sku * @param {any} [catalogProductAttributeMediaGalleryManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeMediaGalleryManagementV1Api */ catalogProductAttributeMediaGalleryManagementV1CreatePost(sku, catalogProductAttributeMediaGalleryManagementV1CreatePostBody, options) { return exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp(this.configuration).catalogProductAttributeMediaGalleryManagementV1CreatePost(sku, catalogProductAttributeMediaGalleryManagementV1CreatePostBody, options)(this.fetch, this.basePath); } /** * Return information about gallery entry * @param {string} sku * @param {number} entryId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeMediaGalleryManagementV1Api */ catalogProductAttributeMediaGalleryManagementV1GetGet(sku, entryId, options) { return exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp(this.configuration).catalogProductAttributeMediaGalleryManagementV1GetGet(sku, entryId, options)(this.fetch, this.basePath); } /** * Retrieve the list of gallery entries associated with given product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeMediaGalleryManagementV1Api */ catalogProductAttributeMediaGalleryManagementV1GetListGet(sku, options) { return exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp(this.configuration).catalogProductAttributeMediaGalleryManagementV1GetListGet(sku, options)(this.fetch, this.basePath); } /** * Remove gallery entry * @param {string} sku * @param {number} entryId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeMediaGalleryManagementV1Api */ catalogProductAttributeMediaGalleryManagementV1RemoveDelete(sku, entryId, options) { return exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp(this.configuration).catalogProductAttributeMediaGalleryManagementV1RemoveDelete(sku, entryId, options)(this.fetch, this.basePath); } /** * Update gallery entry * @param {string} sku * @param {string} entryId * @param {any} [catalogProductAttributeMediaGalleryManagementV1UpdatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeMediaGalleryManagementV1Api */ catalogProductAttributeMediaGalleryManagementV1UpdatePut(sku, entryId, catalogProductAttributeMediaGalleryManagementV1UpdatePutBody, options) { return exports.CatalogProductAttributeMediaGalleryManagementV1ApiFp(this.configuration).catalogProductAttributeMediaGalleryManagementV1UpdatePut(sku, entryId, catalogProductAttributeMediaGalleryManagementV1UpdatePutBody, options)(this.fetch, this.basePath); } } exports.CatalogProductAttributeMediaGalleryManagementV1Api = CatalogProductAttributeMediaGalleryManagementV1Api; /** * CatalogProductAttributeOptionManagementV1Api - fetch parameter creator * @export */ const CatalogProductAttributeOptionManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Add option to attribute * @param {string} attributeCode * @param {any} [catalogProductAttributeOptionManagementV1AddPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionManagementV1AddPost(attributeCode, catalogProductAttributeOptionManagementV1AddPostBody, options = {}) { // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling catalogProductAttributeOptionManagementV1AddPost.'); } const localVarPath = `/V1/products/attributes/{attributeCode}/options` .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductAttributeOptionManagementV1AddPostBody || {}) : (catalogProductAttributeOptionManagementV1AddPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Delete option from attribute * @param {string} attributeCode * @param {string} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionManagementV1DeleteDelete(attributeCode, optionId, options = {}) { // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling catalogProductAttributeOptionManagementV1DeleteDelete.'); } // verify required parameter 'optionId' is not null or undefined if (optionId === null || optionId === undefined) { throw new RequiredError('optionId', 'Required parameter optionId was null or undefined when calling catalogProductAttributeOptionManagementV1DeleteDelete.'); } const localVarPath = `/V1/products/attributes/{attributeCode}/options/{optionId}` .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))) .replace(`{${"optionId"}}`, encodeURIComponent(String(optionId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve list of attribute options * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionManagementV1GetItemsGet(attributeCode, options = {}) { // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling catalogProductAttributeOptionManagementV1GetItemsGet.'); } const localVarPath = `/V1/products/attributes/{attributeCode}/options` .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductAttributeOptionManagementV1ApiFetchParamCreator = CatalogProductAttributeOptionManagementV1ApiFetchParamCreator; /** * CatalogProductAttributeOptionManagementV1Api - functional programming interface * @export */ const CatalogProductAttributeOptionManagementV1ApiFp = function (configuration) { return { /** * Add option to attribute * @param {string} attributeCode * @param {any} [catalogProductAttributeOptionManagementV1AddPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionManagementV1AddPost(attributeCode, catalogProductAttributeOptionManagementV1AddPostBody, options) { const localVarFetchArgs = exports.CatalogProductAttributeOptionManagementV1ApiFetchParamCreator(configuration).catalogProductAttributeOptionManagementV1AddPost(attributeCode, catalogProductAttributeOptionManagementV1AddPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Delete option from attribute * @param {string} attributeCode * @param {string} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionManagementV1DeleteDelete(attributeCode, optionId, options) { const localVarFetchArgs = exports.CatalogProductAttributeOptionManagementV1ApiFetchParamCreator(configuration).catalogProductAttributeOptionManagementV1DeleteDelete(attributeCode, optionId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve list of attribute options * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionManagementV1GetItemsGet(attributeCode, options) { const localVarFetchArgs = exports.CatalogProductAttributeOptionManagementV1ApiFetchParamCreator(configuration).catalogProductAttributeOptionManagementV1GetItemsGet(attributeCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductAttributeOptionManagementV1ApiFp = CatalogProductAttributeOptionManagementV1ApiFp; /** * CatalogProductAttributeOptionManagementV1Api - factory interface * @export */ const CatalogProductAttributeOptionManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Add option to attribute * @param {string} attributeCode * @param {any} [catalogProductAttributeOptionManagementV1AddPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionManagementV1AddPost(attributeCode, catalogProductAttributeOptionManagementV1AddPostBody, options) { return exports.CatalogProductAttributeOptionManagementV1ApiFp(configuration).catalogProductAttributeOptionManagementV1AddPost(attributeCode, catalogProductAttributeOptionManagementV1AddPostBody, options)(fetch, basePath); }, /** * Delete option from attribute * @param {string} attributeCode * @param {string} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionManagementV1DeleteDelete(attributeCode, optionId, options) { return exports.CatalogProductAttributeOptionManagementV1ApiFp(configuration).catalogProductAttributeOptionManagementV1DeleteDelete(attributeCode, optionId, options)(fetch, basePath); }, /** * Retrieve list of attribute options * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionManagementV1GetItemsGet(attributeCode, options) { return exports.CatalogProductAttributeOptionManagementV1ApiFp(configuration).catalogProductAttributeOptionManagementV1GetItemsGet(attributeCode, options)(fetch, basePath); }, }; }; exports.CatalogProductAttributeOptionManagementV1ApiFactory = CatalogProductAttributeOptionManagementV1ApiFactory; /** * CatalogProductAttributeOptionManagementV1Api - object-oriented interface * @export * @class CatalogProductAttributeOptionManagementV1Api * @extends {BaseAPI} */ class CatalogProductAttributeOptionManagementV1Api extends BaseAPI { /** * Add option to attribute * @param {string} attributeCode * @param {any} [catalogProductAttributeOptionManagementV1AddPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeOptionManagementV1Api */ catalogProductAttributeOptionManagementV1AddPost(attributeCode, catalogProductAttributeOptionManagementV1AddPostBody, options) { return exports.CatalogProductAttributeOptionManagementV1ApiFp(this.configuration).catalogProductAttributeOptionManagementV1AddPost(attributeCode, catalogProductAttributeOptionManagementV1AddPostBody, options)(this.fetch, this.basePath); } /** * Delete option from attribute * @param {string} attributeCode * @param {string} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeOptionManagementV1Api */ catalogProductAttributeOptionManagementV1DeleteDelete(attributeCode, optionId, options) { return exports.CatalogProductAttributeOptionManagementV1ApiFp(this.configuration).catalogProductAttributeOptionManagementV1DeleteDelete(attributeCode, optionId, options)(this.fetch, this.basePath); } /** * Retrieve list of attribute options * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeOptionManagementV1Api */ catalogProductAttributeOptionManagementV1GetItemsGet(attributeCode, options) { return exports.CatalogProductAttributeOptionManagementV1ApiFp(this.configuration).catalogProductAttributeOptionManagementV1GetItemsGet(attributeCode, options)(this.fetch, this.basePath); } } exports.CatalogProductAttributeOptionManagementV1Api = CatalogProductAttributeOptionManagementV1Api; /** * CatalogProductAttributeOptionUpdateV1Api - fetch parameter creator * @export */ const CatalogProductAttributeOptionUpdateV1ApiFetchParamCreator = function (configuration) { return { /** * Update attribute option * @param {string} attributeCode * @param {number} optionId * @param {any} [catalogProductAttributeOptionUpdateV1UpdatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionUpdateV1UpdatePut(attributeCode, optionId, catalogProductAttributeOptionUpdateV1UpdatePutBody, options = {}) { // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling catalogProductAttributeOptionUpdateV1UpdatePut.'); } // verify required parameter 'optionId' is not null or undefined if (optionId === null || optionId === undefined) { throw new RequiredError('optionId', 'Required parameter optionId was null or undefined when calling catalogProductAttributeOptionUpdateV1UpdatePut.'); } const localVarPath = `/V1/products/attributes/{attributeCode}/options/{optionId}` .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))) .replace(`{${"optionId"}}`, encodeURIComponent(String(optionId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductAttributeOptionUpdateV1UpdatePutBody || {}) : (catalogProductAttributeOptionUpdateV1UpdatePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductAttributeOptionUpdateV1ApiFetchParamCreator = CatalogProductAttributeOptionUpdateV1ApiFetchParamCreator; /** * CatalogProductAttributeOptionUpdateV1Api - functional programming interface * @export */ const CatalogProductAttributeOptionUpdateV1ApiFp = function (configuration) { return { /** * Update attribute option * @param {string} attributeCode * @param {number} optionId * @param {any} [catalogProductAttributeOptionUpdateV1UpdatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionUpdateV1UpdatePut(attributeCode, optionId, catalogProductAttributeOptionUpdateV1UpdatePutBody, options) { const localVarFetchArgs = exports.CatalogProductAttributeOptionUpdateV1ApiFetchParamCreator(configuration).catalogProductAttributeOptionUpdateV1UpdatePut(attributeCode, optionId, catalogProductAttributeOptionUpdateV1UpdatePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductAttributeOptionUpdateV1ApiFp = CatalogProductAttributeOptionUpdateV1ApiFp; /** * CatalogProductAttributeOptionUpdateV1Api - factory interface * @export */ const CatalogProductAttributeOptionUpdateV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Update attribute option * @param {string} attributeCode * @param {number} optionId * @param {any} [catalogProductAttributeOptionUpdateV1UpdatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeOptionUpdateV1UpdatePut(attributeCode, optionId, catalogProductAttributeOptionUpdateV1UpdatePutBody, options) { return exports.CatalogProductAttributeOptionUpdateV1ApiFp(configuration).catalogProductAttributeOptionUpdateV1UpdatePut(attributeCode, optionId, catalogProductAttributeOptionUpdateV1UpdatePutBody, options)(fetch, basePath); }, }; }; exports.CatalogProductAttributeOptionUpdateV1ApiFactory = CatalogProductAttributeOptionUpdateV1ApiFactory; /** * CatalogProductAttributeOptionUpdateV1Api - object-oriented interface * @export * @class CatalogProductAttributeOptionUpdateV1Api * @extends {BaseAPI} */ class CatalogProductAttributeOptionUpdateV1Api extends BaseAPI { /** * Update attribute option * @param {string} attributeCode * @param {number} optionId * @param {any} [catalogProductAttributeOptionUpdateV1UpdatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeOptionUpdateV1Api */ catalogProductAttributeOptionUpdateV1UpdatePut(attributeCode, optionId, catalogProductAttributeOptionUpdateV1UpdatePutBody, options) { return exports.CatalogProductAttributeOptionUpdateV1ApiFp(this.configuration).catalogProductAttributeOptionUpdateV1UpdatePut(attributeCode, optionId, catalogProductAttributeOptionUpdateV1UpdatePutBody, options)(this.fetch, this.basePath); } } exports.CatalogProductAttributeOptionUpdateV1Api = CatalogProductAttributeOptionUpdateV1Api; /** * CatalogProductAttributeRepositoryV1Api - fetch parameter creator * @export */ const CatalogProductAttributeRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete Attribute by id * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1DeleteByIdDelete(attributeCode, options = {}) { // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling catalogProductAttributeRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/products/attributes/{attributeCode}` .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve specific attribute * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1GetGet(attributeCode, options = {}) { // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling catalogProductAttributeRepositoryV1GetGet.'); } const localVarPath = `/V1/products/attributes/{attributeCode}` .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve all attributes for entity type * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/products/attributes`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save attribute data * @param {any} [catalogProductAttributeRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1SavePost(catalogProductAttributeRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/products/attributes`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductAttributeRepositoryV1SavePostBody || {}) : (catalogProductAttributeRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save attribute data * @param {string} attributeCode * @param {any} [catalogProductAttributeRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1SavePut(attributeCode, catalogProductAttributeRepositoryV1SavePutBody, options = {}) { // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling catalogProductAttributeRepositoryV1SavePut.'); } const localVarPath = `/V1/products/attributes/{attributeCode}` .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductAttributeRepositoryV1SavePutBody || {}) : (catalogProductAttributeRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductAttributeRepositoryV1ApiFetchParamCreator = CatalogProductAttributeRepositoryV1ApiFetchParamCreator; /** * CatalogProductAttributeRepositoryV1Api - functional programming interface * @export */ const CatalogProductAttributeRepositoryV1ApiFp = function (configuration) { return { /** * Delete Attribute by id * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1DeleteByIdDelete(attributeCode, options) { const localVarFetchArgs = exports.CatalogProductAttributeRepositoryV1ApiFetchParamCreator(configuration).catalogProductAttributeRepositoryV1DeleteByIdDelete(attributeCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve specific attribute * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1GetGet(attributeCode, options) { const localVarFetchArgs = exports.CatalogProductAttributeRepositoryV1ApiFetchParamCreator(configuration).catalogProductAttributeRepositoryV1GetGet(attributeCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve all attributes for entity type * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CatalogProductAttributeRepositoryV1ApiFetchParamCreator(configuration).catalogProductAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save attribute data * @param {any} [catalogProductAttributeRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1SavePost(catalogProductAttributeRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.CatalogProductAttributeRepositoryV1ApiFetchParamCreator(configuration).catalogProductAttributeRepositoryV1SavePost(catalogProductAttributeRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save attribute data * @param {string} attributeCode * @param {any} [catalogProductAttributeRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1SavePut(attributeCode, catalogProductAttributeRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CatalogProductAttributeRepositoryV1ApiFetchParamCreator(configuration).catalogProductAttributeRepositoryV1SavePut(attributeCode, catalogProductAttributeRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductAttributeRepositoryV1ApiFp = CatalogProductAttributeRepositoryV1ApiFp; /** * CatalogProductAttributeRepositoryV1Api - factory interface * @export */ const CatalogProductAttributeRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete Attribute by id * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1DeleteByIdDelete(attributeCode, options) { return exports.CatalogProductAttributeRepositoryV1ApiFp(configuration).catalogProductAttributeRepositoryV1DeleteByIdDelete(attributeCode, options)(fetch, basePath); }, /** * Retrieve specific attribute * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1GetGet(attributeCode, options) { return exports.CatalogProductAttributeRepositoryV1ApiFp(configuration).catalogProductAttributeRepositoryV1GetGet(attributeCode, options)(fetch, basePath); }, /** * Retrieve all attributes for entity type * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogProductAttributeRepositoryV1ApiFp(configuration).catalogProductAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save attribute data * @param {any} [catalogProductAttributeRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1SavePost(catalogProductAttributeRepositoryV1SavePostBody, options) { return exports.CatalogProductAttributeRepositoryV1ApiFp(configuration).catalogProductAttributeRepositoryV1SavePost(catalogProductAttributeRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save attribute data * @param {string} attributeCode * @param {any} [catalogProductAttributeRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeRepositoryV1SavePut(attributeCode, catalogProductAttributeRepositoryV1SavePutBody, options) { return exports.CatalogProductAttributeRepositoryV1ApiFp(configuration).catalogProductAttributeRepositoryV1SavePut(attributeCode, catalogProductAttributeRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CatalogProductAttributeRepositoryV1ApiFactory = CatalogProductAttributeRepositoryV1ApiFactory; /** * CatalogProductAttributeRepositoryV1Api - object-oriented interface * @export * @class CatalogProductAttributeRepositoryV1Api * @extends {BaseAPI} */ class CatalogProductAttributeRepositoryV1Api extends BaseAPI { /** * Delete Attribute by id * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeRepositoryV1Api */ catalogProductAttributeRepositoryV1DeleteByIdDelete(attributeCode, options) { return exports.CatalogProductAttributeRepositoryV1ApiFp(this.configuration).catalogProductAttributeRepositoryV1DeleteByIdDelete(attributeCode, options)(this.fetch, this.basePath); } /** * Retrieve specific attribute * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeRepositoryV1Api */ catalogProductAttributeRepositoryV1GetGet(attributeCode, options) { return exports.CatalogProductAttributeRepositoryV1ApiFp(this.configuration).catalogProductAttributeRepositoryV1GetGet(attributeCode, options)(this.fetch, this.basePath); } /** * Retrieve all attributes for entity type * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeRepositoryV1Api */ catalogProductAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogProductAttributeRepositoryV1ApiFp(this.configuration).catalogProductAttributeRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save attribute data * @param {any} [catalogProductAttributeRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeRepositoryV1Api */ catalogProductAttributeRepositoryV1SavePost(catalogProductAttributeRepositoryV1SavePostBody, options) { return exports.CatalogProductAttributeRepositoryV1ApiFp(this.configuration).catalogProductAttributeRepositoryV1SavePost(catalogProductAttributeRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save attribute data * @param {string} attributeCode * @param {any} [catalogProductAttributeRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeRepositoryV1Api */ catalogProductAttributeRepositoryV1SavePut(attributeCode, catalogProductAttributeRepositoryV1SavePutBody, options) { return exports.CatalogProductAttributeRepositoryV1ApiFp(this.configuration).catalogProductAttributeRepositoryV1SavePut(attributeCode, catalogProductAttributeRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CatalogProductAttributeRepositoryV1Api = CatalogProductAttributeRepositoryV1Api; /** * CatalogProductAttributeTypesListV1Api - fetch parameter creator * @export */ const CatalogProductAttributeTypesListV1ApiFetchParamCreator = function (configuration) { return { /** * Retrieve list of product attribute types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeTypesListV1GetItemsGet(options = {}) { const localVarPath = `/V1/products/attributes/types`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductAttributeTypesListV1ApiFetchParamCreator = CatalogProductAttributeTypesListV1ApiFetchParamCreator; /** * CatalogProductAttributeTypesListV1Api - functional programming interface * @export */ const CatalogProductAttributeTypesListV1ApiFp = function (configuration) { return { /** * Retrieve list of product attribute types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeTypesListV1GetItemsGet(options) { const localVarFetchArgs = exports.CatalogProductAttributeTypesListV1ApiFetchParamCreator(configuration).catalogProductAttributeTypesListV1GetItemsGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductAttributeTypesListV1ApiFp = CatalogProductAttributeTypesListV1ApiFp; /** * CatalogProductAttributeTypesListV1Api - factory interface * @export */ const CatalogProductAttributeTypesListV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Retrieve list of product attribute types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductAttributeTypesListV1GetItemsGet(options) { return exports.CatalogProductAttributeTypesListV1ApiFp(configuration).catalogProductAttributeTypesListV1GetItemsGet(options)(fetch, basePath); }, }; }; exports.CatalogProductAttributeTypesListV1ApiFactory = CatalogProductAttributeTypesListV1ApiFactory; /** * CatalogProductAttributeTypesListV1Api - object-oriented interface * @export * @class CatalogProductAttributeTypesListV1Api * @extends {BaseAPI} */ class CatalogProductAttributeTypesListV1Api extends BaseAPI { /** * Retrieve list of product attribute types * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductAttributeTypesListV1Api */ catalogProductAttributeTypesListV1GetItemsGet(options) { return exports.CatalogProductAttributeTypesListV1ApiFp(this.configuration).catalogProductAttributeTypesListV1GetItemsGet(options)(this.fetch, this.basePath); } } exports.CatalogProductAttributeTypesListV1Api = CatalogProductAttributeTypesListV1Api; /** * CatalogProductCustomOptionRepositoryV1Api - fetch parameter creator * @export */ const CatalogProductCustomOptionRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1DeleteByIdentifierDelete(sku, optionId, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductCustomOptionRepositoryV1DeleteByIdentifierDelete.'); } // verify required parameter 'optionId' is not null or undefined if (optionId === null || optionId === undefined) { throw new RequiredError('optionId', 'Required parameter optionId was null or undefined when calling catalogProductCustomOptionRepositoryV1DeleteByIdentifierDelete.'); } const localVarPath = `/V1/products/{sku}/options/{optionId}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"optionId"}}`, encodeURIComponent(String(optionId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get custom option for a specific product * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1GetGet(sku, optionId, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductCustomOptionRepositoryV1GetGet.'); } // verify required parameter 'optionId' is not null or undefined if (optionId === null || optionId === undefined) { throw new RequiredError('optionId', 'Required parameter optionId was null or undefined when calling catalogProductCustomOptionRepositoryV1GetGet.'); } const localVarPath = `/V1/products/{sku}/options/{optionId}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"optionId"}}`, encodeURIComponent(String(optionId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get the list of custom options for a specific product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1GetListGet(sku, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductCustomOptionRepositoryV1GetListGet.'); } const localVarPath = `/V1/products/{sku}/options` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save Custom Option * @param {any} [catalogProductCustomOptionRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1SavePost(catalogProductCustomOptionRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/products/options`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductCustomOptionRepositoryV1SavePostBody || {}) : (catalogProductCustomOptionRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save Custom Option * @param {string} optionId * @param {any} [catalogProductCustomOptionRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1SavePut(optionId, catalogProductCustomOptionRepositoryV1SavePutBody, options = {}) { // verify required parameter 'optionId' is not null or undefined if (optionId === null || optionId === undefined) { throw new RequiredError('optionId', 'Required parameter optionId was null or undefined when calling catalogProductCustomOptionRepositoryV1SavePut.'); } const localVarPath = `/V1/products/options/{optionId}` .replace(`{${"optionId"}}`, encodeURIComponent(String(optionId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductCustomOptionRepositoryV1SavePutBody || {}) : (catalogProductCustomOptionRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductCustomOptionRepositoryV1ApiFetchParamCreator = CatalogProductCustomOptionRepositoryV1ApiFetchParamCreator; /** * CatalogProductCustomOptionRepositoryV1Api - functional programming interface * @export */ const CatalogProductCustomOptionRepositoryV1ApiFp = function (configuration) { return { /** * * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1DeleteByIdentifierDelete(sku, optionId, options) { const localVarFetchArgs = exports.CatalogProductCustomOptionRepositoryV1ApiFetchParamCreator(configuration).catalogProductCustomOptionRepositoryV1DeleteByIdentifierDelete(sku, optionId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get custom option for a specific product * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1GetGet(sku, optionId, options) { const localVarFetchArgs = exports.CatalogProductCustomOptionRepositoryV1ApiFetchParamCreator(configuration).catalogProductCustomOptionRepositoryV1GetGet(sku, optionId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get the list of custom options for a specific product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1GetListGet(sku, options) { const localVarFetchArgs = exports.CatalogProductCustomOptionRepositoryV1ApiFetchParamCreator(configuration).catalogProductCustomOptionRepositoryV1GetListGet(sku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save Custom Option * @param {any} [catalogProductCustomOptionRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1SavePost(catalogProductCustomOptionRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.CatalogProductCustomOptionRepositoryV1ApiFetchParamCreator(configuration).catalogProductCustomOptionRepositoryV1SavePost(catalogProductCustomOptionRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save Custom Option * @param {string} optionId * @param {any} [catalogProductCustomOptionRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1SavePut(optionId, catalogProductCustomOptionRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CatalogProductCustomOptionRepositoryV1ApiFetchParamCreator(configuration).catalogProductCustomOptionRepositoryV1SavePut(optionId, catalogProductCustomOptionRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductCustomOptionRepositoryV1ApiFp = CatalogProductCustomOptionRepositoryV1ApiFp; /** * CatalogProductCustomOptionRepositoryV1Api - factory interface * @export */ const CatalogProductCustomOptionRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1DeleteByIdentifierDelete(sku, optionId, options) { return exports.CatalogProductCustomOptionRepositoryV1ApiFp(configuration).catalogProductCustomOptionRepositoryV1DeleteByIdentifierDelete(sku, optionId, options)(fetch, basePath); }, /** * Get custom option for a specific product * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1GetGet(sku, optionId, options) { return exports.CatalogProductCustomOptionRepositoryV1ApiFp(configuration).catalogProductCustomOptionRepositoryV1GetGet(sku, optionId, options)(fetch, basePath); }, /** * Get the list of custom options for a specific product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1GetListGet(sku, options) { return exports.CatalogProductCustomOptionRepositoryV1ApiFp(configuration).catalogProductCustomOptionRepositoryV1GetListGet(sku, options)(fetch, basePath); }, /** * Save Custom Option * @param {any} [catalogProductCustomOptionRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1SavePost(catalogProductCustomOptionRepositoryV1SavePostBody, options) { return exports.CatalogProductCustomOptionRepositoryV1ApiFp(configuration).catalogProductCustomOptionRepositoryV1SavePost(catalogProductCustomOptionRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save Custom Option * @param {string} optionId * @param {any} [catalogProductCustomOptionRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionRepositoryV1SavePut(optionId, catalogProductCustomOptionRepositoryV1SavePutBody, options) { return exports.CatalogProductCustomOptionRepositoryV1ApiFp(configuration).catalogProductCustomOptionRepositoryV1SavePut(optionId, catalogProductCustomOptionRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CatalogProductCustomOptionRepositoryV1ApiFactory = CatalogProductCustomOptionRepositoryV1ApiFactory; /** * CatalogProductCustomOptionRepositoryV1Api - object-oriented interface * @export * @class CatalogProductCustomOptionRepositoryV1Api * @extends {BaseAPI} */ class CatalogProductCustomOptionRepositoryV1Api extends BaseAPI { /** * * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductCustomOptionRepositoryV1Api */ catalogProductCustomOptionRepositoryV1DeleteByIdentifierDelete(sku, optionId, options) { return exports.CatalogProductCustomOptionRepositoryV1ApiFp(this.configuration).catalogProductCustomOptionRepositoryV1DeleteByIdentifierDelete(sku, optionId, options)(this.fetch, this.basePath); } /** * Get custom option for a specific product * @param {string} sku * @param {number} optionId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductCustomOptionRepositoryV1Api */ catalogProductCustomOptionRepositoryV1GetGet(sku, optionId, options) { return exports.CatalogProductCustomOptionRepositoryV1ApiFp(this.configuration).catalogProductCustomOptionRepositoryV1GetGet(sku, optionId, options)(this.fetch, this.basePath); } /** * Get the list of custom options for a specific product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductCustomOptionRepositoryV1Api */ catalogProductCustomOptionRepositoryV1GetListGet(sku, options) { return exports.CatalogProductCustomOptionRepositoryV1ApiFp(this.configuration).catalogProductCustomOptionRepositoryV1GetListGet(sku, options)(this.fetch, this.basePath); } /** * Save Custom Option * @param {any} [catalogProductCustomOptionRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductCustomOptionRepositoryV1Api */ catalogProductCustomOptionRepositoryV1SavePost(catalogProductCustomOptionRepositoryV1SavePostBody, options) { return exports.CatalogProductCustomOptionRepositoryV1ApiFp(this.configuration).catalogProductCustomOptionRepositoryV1SavePost(catalogProductCustomOptionRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save Custom Option * @param {string} optionId * @param {any} [catalogProductCustomOptionRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductCustomOptionRepositoryV1Api */ catalogProductCustomOptionRepositoryV1SavePut(optionId, catalogProductCustomOptionRepositoryV1SavePutBody, options) { return exports.CatalogProductCustomOptionRepositoryV1ApiFp(this.configuration).catalogProductCustomOptionRepositoryV1SavePut(optionId, catalogProductCustomOptionRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CatalogProductCustomOptionRepositoryV1Api = CatalogProductCustomOptionRepositoryV1Api; /** * CatalogProductCustomOptionTypeListV1Api - fetch parameter creator * @export */ const CatalogProductCustomOptionTypeListV1ApiFetchParamCreator = function (configuration) { return { /** * Get custom option types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionTypeListV1GetItemsGet(options = {}) { const localVarPath = `/V1/products/options/types`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductCustomOptionTypeListV1ApiFetchParamCreator = CatalogProductCustomOptionTypeListV1ApiFetchParamCreator; /** * CatalogProductCustomOptionTypeListV1Api - functional programming interface * @export */ const CatalogProductCustomOptionTypeListV1ApiFp = function (configuration) { return { /** * Get custom option types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionTypeListV1GetItemsGet(options) { const localVarFetchArgs = exports.CatalogProductCustomOptionTypeListV1ApiFetchParamCreator(configuration).catalogProductCustomOptionTypeListV1GetItemsGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductCustomOptionTypeListV1ApiFp = CatalogProductCustomOptionTypeListV1ApiFp; /** * CatalogProductCustomOptionTypeListV1Api - factory interface * @export */ const CatalogProductCustomOptionTypeListV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get custom option types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductCustomOptionTypeListV1GetItemsGet(options) { return exports.CatalogProductCustomOptionTypeListV1ApiFp(configuration).catalogProductCustomOptionTypeListV1GetItemsGet(options)(fetch, basePath); }, }; }; exports.CatalogProductCustomOptionTypeListV1ApiFactory = CatalogProductCustomOptionTypeListV1ApiFactory; /** * CatalogProductCustomOptionTypeListV1Api - object-oriented interface * @export * @class CatalogProductCustomOptionTypeListV1Api * @extends {BaseAPI} */ class CatalogProductCustomOptionTypeListV1Api extends BaseAPI { /** * Get custom option types * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductCustomOptionTypeListV1Api */ catalogProductCustomOptionTypeListV1GetItemsGet(options) { return exports.CatalogProductCustomOptionTypeListV1ApiFp(this.configuration).catalogProductCustomOptionTypeListV1GetItemsGet(options)(this.fetch, this.basePath); } } exports.CatalogProductCustomOptionTypeListV1Api = CatalogProductCustomOptionTypeListV1Api; /** * CatalogProductLinkManagementV1Api - fetch parameter creator * @export */ const CatalogProductLinkManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Provide the list of links for a specific product * @param {string} sku * @param {string} type * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkManagementV1GetLinkedItemsByTypeGet(sku, type, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductLinkManagementV1GetLinkedItemsByTypeGet.'); } // verify required parameter 'type' is not null or undefined if (type === null || type === undefined) { throw new RequiredError('type', 'Required parameter type was null or undefined when calling catalogProductLinkManagementV1GetLinkedItemsByTypeGet.'); } const localVarPath = `/V1/products/{sku}/links/{type}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"type"}}`, encodeURIComponent(String(type))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Assign a product link to another product * @param {string} sku * @param {any} [catalogProductLinkManagementV1SetProductLinksPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkManagementV1SetProductLinksPost(sku, catalogProductLinkManagementV1SetProductLinksPostBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductLinkManagementV1SetProductLinksPost.'); } const localVarPath = `/V1/products/{sku}/links` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductLinkManagementV1SetProductLinksPostBody || {}) : (catalogProductLinkManagementV1SetProductLinksPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductLinkManagementV1ApiFetchParamCreator = CatalogProductLinkManagementV1ApiFetchParamCreator; /** * CatalogProductLinkManagementV1Api - functional programming interface * @export */ const CatalogProductLinkManagementV1ApiFp = function (configuration) { return { /** * Provide the list of links for a specific product * @param {string} sku * @param {string} type * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkManagementV1GetLinkedItemsByTypeGet(sku, type, options) { const localVarFetchArgs = exports.CatalogProductLinkManagementV1ApiFetchParamCreator(configuration).catalogProductLinkManagementV1GetLinkedItemsByTypeGet(sku, type, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Assign a product link to another product * @param {string} sku * @param {any} [catalogProductLinkManagementV1SetProductLinksPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkManagementV1SetProductLinksPost(sku, catalogProductLinkManagementV1SetProductLinksPostBody, options) { const localVarFetchArgs = exports.CatalogProductLinkManagementV1ApiFetchParamCreator(configuration).catalogProductLinkManagementV1SetProductLinksPost(sku, catalogProductLinkManagementV1SetProductLinksPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductLinkManagementV1ApiFp = CatalogProductLinkManagementV1ApiFp; /** * CatalogProductLinkManagementV1Api - factory interface * @export */ const CatalogProductLinkManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Provide the list of links for a specific product * @param {string} sku * @param {string} type * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkManagementV1GetLinkedItemsByTypeGet(sku, type, options) { return exports.CatalogProductLinkManagementV1ApiFp(configuration).catalogProductLinkManagementV1GetLinkedItemsByTypeGet(sku, type, options)(fetch, basePath); }, /** * Assign a product link to another product * @param {string} sku * @param {any} [catalogProductLinkManagementV1SetProductLinksPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkManagementV1SetProductLinksPost(sku, catalogProductLinkManagementV1SetProductLinksPostBody, options) { return exports.CatalogProductLinkManagementV1ApiFp(configuration).catalogProductLinkManagementV1SetProductLinksPost(sku, catalogProductLinkManagementV1SetProductLinksPostBody, options)(fetch, basePath); }, }; }; exports.CatalogProductLinkManagementV1ApiFactory = CatalogProductLinkManagementV1ApiFactory; /** * CatalogProductLinkManagementV1Api - object-oriented interface * @export * @class CatalogProductLinkManagementV1Api * @extends {BaseAPI} */ class CatalogProductLinkManagementV1Api extends BaseAPI { /** * Provide the list of links for a specific product * @param {string} sku * @param {string} type * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductLinkManagementV1Api */ catalogProductLinkManagementV1GetLinkedItemsByTypeGet(sku, type, options) { return exports.CatalogProductLinkManagementV1ApiFp(this.configuration).catalogProductLinkManagementV1GetLinkedItemsByTypeGet(sku, type, options)(this.fetch, this.basePath); } /** * Assign a product link to another product * @param {string} sku * @param {any} [catalogProductLinkManagementV1SetProductLinksPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductLinkManagementV1Api */ catalogProductLinkManagementV1SetProductLinksPost(sku, catalogProductLinkManagementV1SetProductLinksPostBody, options) { return exports.CatalogProductLinkManagementV1ApiFp(this.configuration).catalogProductLinkManagementV1SetProductLinksPost(sku, catalogProductLinkManagementV1SetProductLinksPostBody, options)(this.fetch, this.basePath); } } exports.CatalogProductLinkManagementV1Api = CatalogProductLinkManagementV1Api; /** * CatalogProductLinkRepositoryV1Api - fetch parameter creator * @export */ const CatalogProductLinkRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {string} sku * @param {string} type * @param {string} linkedProductSku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkRepositoryV1DeleteByIdDelete(sku, type, linkedProductSku, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductLinkRepositoryV1DeleteByIdDelete.'); } // verify required parameter 'type' is not null or undefined if (type === null || type === undefined) { throw new RequiredError('type', 'Required parameter type was null or undefined when calling catalogProductLinkRepositoryV1DeleteByIdDelete.'); } // verify required parameter 'linkedProductSku' is not null or undefined if (linkedProductSku === null || linkedProductSku === undefined) { throw new RequiredError('linkedProductSku', 'Required parameter linkedProductSku was null or undefined when calling catalogProductLinkRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/products/{sku}/links/{type}/{linkedProductSku}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"type"}}`, encodeURIComponent(String(type))) .replace(`{${"linkedProductSku"}}`, encodeURIComponent(String(linkedProductSku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save product link * @param {string} sku * @param {any} [catalogProductLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkRepositoryV1SavePut(sku, catalogProductLinkRepositoryV1SavePutBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductLinkRepositoryV1SavePut.'); } const localVarPath = `/V1/products/{sku}/links` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductLinkRepositoryV1SavePutBody || {}) : (catalogProductLinkRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductLinkRepositoryV1ApiFetchParamCreator = CatalogProductLinkRepositoryV1ApiFetchParamCreator; /** * CatalogProductLinkRepositoryV1Api - functional programming interface * @export */ const CatalogProductLinkRepositoryV1ApiFp = function (configuration) { return { /** * * @param {string} sku * @param {string} type * @param {string} linkedProductSku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkRepositoryV1DeleteByIdDelete(sku, type, linkedProductSku, options) { const localVarFetchArgs = exports.CatalogProductLinkRepositoryV1ApiFetchParamCreator(configuration).catalogProductLinkRepositoryV1DeleteByIdDelete(sku, type, linkedProductSku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save product link * @param {string} sku * @param {any} [catalogProductLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkRepositoryV1SavePut(sku, catalogProductLinkRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CatalogProductLinkRepositoryV1ApiFetchParamCreator(configuration).catalogProductLinkRepositoryV1SavePut(sku, catalogProductLinkRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductLinkRepositoryV1ApiFp = CatalogProductLinkRepositoryV1ApiFp; /** * CatalogProductLinkRepositoryV1Api - factory interface * @export */ const CatalogProductLinkRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {string} sku * @param {string} type * @param {string} linkedProductSku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkRepositoryV1DeleteByIdDelete(sku, type, linkedProductSku, options) { return exports.CatalogProductLinkRepositoryV1ApiFp(configuration).catalogProductLinkRepositoryV1DeleteByIdDelete(sku, type, linkedProductSku, options)(fetch, basePath); }, /** * Save product link * @param {string} sku * @param {any} [catalogProductLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkRepositoryV1SavePut(sku, catalogProductLinkRepositoryV1SavePutBody, options) { return exports.CatalogProductLinkRepositoryV1ApiFp(configuration).catalogProductLinkRepositoryV1SavePut(sku, catalogProductLinkRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CatalogProductLinkRepositoryV1ApiFactory = CatalogProductLinkRepositoryV1ApiFactory; /** * CatalogProductLinkRepositoryV1Api - object-oriented interface * @export * @class CatalogProductLinkRepositoryV1Api * @extends {BaseAPI} */ class CatalogProductLinkRepositoryV1Api extends BaseAPI { /** * * @param {string} sku * @param {string} type * @param {string} linkedProductSku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductLinkRepositoryV1Api */ catalogProductLinkRepositoryV1DeleteByIdDelete(sku, type, linkedProductSku, options) { return exports.CatalogProductLinkRepositoryV1ApiFp(this.configuration).catalogProductLinkRepositoryV1DeleteByIdDelete(sku, type, linkedProductSku, options)(this.fetch, this.basePath); } /** * Save product link * @param {string} sku * @param {any} [catalogProductLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductLinkRepositoryV1Api */ catalogProductLinkRepositoryV1SavePut(sku, catalogProductLinkRepositoryV1SavePutBody, options) { return exports.CatalogProductLinkRepositoryV1ApiFp(this.configuration).catalogProductLinkRepositoryV1SavePut(sku, catalogProductLinkRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CatalogProductLinkRepositoryV1Api = CatalogProductLinkRepositoryV1Api; /** * CatalogProductLinkTypeListV1Api - fetch parameter creator * @export */ const CatalogProductLinkTypeListV1ApiFetchParamCreator = function (configuration) { return { /** * Provide a list of the product link type attributes * @param {string} type * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkTypeListV1GetItemAttributesGet(type, options = {}) { // verify required parameter 'type' is not null or undefined if (type === null || type === undefined) { throw new RequiredError('type', 'Required parameter type was null or undefined when calling catalogProductLinkTypeListV1GetItemAttributesGet.'); } const localVarPath = `/V1/products/links/{type}/attributes` .replace(`{${"type"}}`, encodeURIComponent(String(type))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve information about available product link types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkTypeListV1GetItemsGet(options = {}) { const localVarPath = `/V1/products/links/types`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductLinkTypeListV1ApiFetchParamCreator = CatalogProductLinkTypeListV1ApiFetchParamCreator; /** * CatalogProductLinkTypeListV1Api - functional programming interface * @export */ const CatalogProductLinkTypeListV1ApiFp = function (configuration) { return { /** * Provide a list of the product link type attributes * @param {string} type * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkTypeListV1GetItemAttributesGet(type, options) { const localVarFetchArgs = exports.CatalogProductLinkTypeListV1ApiFetchParamCreator(configuration).catalogProductLinkTypeListV1GetItemAttributesGet(type, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve information about available product link types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkTypeListV1GetItemsGet(options) { const localVarFetchArgs = exports.CatalogProductLinkTypeListV1ApiFetchParamCreator(configuration).catalogProductLinkTypeListV1GetItemsGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductLinkTypeListV1ApiFp = CatalogProductLinkTypeListV1ApiFp; /** * CatalogProductLinkTypeListV1Api - factory interface * @export */ const CatalogProductLinkTypeListV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Provide a list of the product link type attributes * @param {string} type * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkTypeListV1GetItemAttributesGet(type, options) { return exports.CatalogProductLinkTypeListV1ApiFp(configuration).catalogProductLinkTypeListV1GetItemAttributesGet(type, options)(fetch, basePath); }, /** * Retrieve information about available product link types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductLinkTypeListV1GetItemsGet(options) { return exports.CatalogProductLinkTypeListV1ApiFp(configuration).catalogProductLinkTypeListV1GetItemsGet(options)(fetch, basePath); }, }; }; exports.CatalogProductLinkTypeListV1ApiFactory = CatalogProductLinkTypeListV1ApiFactory; /** * CatalogProductLinkTypeListV1Api - object-oriented interface * @export * @class CatalogProductLinkTypeListV1Api * @extends {BaseAPI} */ class CatalogProductLinkTypeListV1Api extends BaseAPI { /** * Provide a list of the product link type attributes * @param {string} type * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductLinkTypeListV1Api */ catalogProductLinkTypeListV1GetItemAttributesGet(type, options) { return exports.CatalogProductLinkTypeListV1ApiFp(this.configuration).catalogProductLinkTypeListV1GetItemAttributesGet(type, options)(this.fetch, this.basePath); } /** * Retrieve information about available product link types * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductLinkTypeListV1Api */ catalogProductLinkTypeListV1GetItemsGet(options) { return exports.CatalogProductLinkTypeListV1ApiFp(this.configuration).catalogProductLinkTypeListV1GetItemsGet(options)(this.fetch, this.basePath); } } exports.CatalogProductLinkTypeListV1Api = CatalogProductLinkTypeListV1Api; /** * CatalogProductMediaAttributeManagementV1Api - fetch parameter creator * @export */ const CatalogProductMediaAttributeManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Retrieve the list of media attributes (fronted input type is media_image) assigned to the given attribute set. * @param {string} attributeSetName * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductMediaAttributeManagementV1GetListGet(attributeSetName, options = {}) { // verify required parameter 'attributeSetName' is not null or undefined if (attributeSetName === null || attributeSetName === undefined) { throw new RequiredError('attributeSetName', 'Required parameter attributeSetName was null or undefined when calling catalogProductMediaAttributeManagementV1GetListGet.'); } const localVarPath = `/V1/products/media/types/{attributeSetName}` .replace(`{${"attributeSetName"}}`, encodeURIComponent(String(attributeSetName))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductMediaAttributeManagementV1ApiFetchParamCreator = CatalogProductMediaAttributeManagementV1ApiFetchParamCreator; /** * CatalogProductMediaAttributeManagementV1Api - functional programming interface * @export */ const CatalogProductMediaAttributeManagementV1ApiFp = function (configuration) { return { /** * Retrieve the list of media attributes (fronted input type is media_image) assigned to the given attribute set. * @param {string} attributeSetName * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductMediaAttributeManagementV1GetListGet(attributeSetName, options) { const localVarFetchArgs = exports.CatalogProductMediaAttributeManagementV1ApiFetchParamCreator(configuration).catalogProductMediaAttributeManagementV1GetListGet(attributeSetName, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductMediaAttributeManagementV1ApiFp = CatalogProductMediaAttributeManagementV1ApiFp; /** * CatalogProductMediaAttributeManagementV1Api - factory interface * @export */ const CatalogProductMediaAttributeManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Retrieve the list of media attributes (fronted input type is media_image) assigned to the given attribute set. * @param {string} attributeSetName * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductMediaAttributeManagementV1GetListGet(attributeSetName, options) { return exports.CatalogProductMediaAttributeManagementV1ApiFp(configuration).catalogProductMediaAttributeManagementV1GetListGet(attributeSetName, options)(fetch, basePath); }, }; }; exports.CatalogProductMediaAttributeManagementV1ApiFactory = CatalogProductMediaAttributeManagementV1ApiFactory; /** * CatalogProductMediaAttributeManagementV1Api - object-oriented interface * @export * @class CatalogProductMediaAttributeManagementV1Api * @extends {BaseAPI} */ class CatalogProductMediaAttributeManagementV1Api extends BaseAPI { /** * Retrieve the list of media attributes (fronted input type is media_image) assigned to the given attribute set. * @param {string} attributeSetName * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductMediaAttributeManagementV1Api */ catalogProductMediaAttributeManagementV1GetListGet(attributeSetName, options) { return exports.CatalogProductMediaAttributeManagementV1ApiFp(this.configuration).catalogProductMediaAttributeManagementV1GetListGet(attributeSetName, options)(this.fetch, this.basePath); } } exports.CatalogProductMediaAttributeManagementV1Api = CatalogProductMediaAttributeManagementV1Api; /** * CatalogProductRenderListV1Api - fetch parameter creator * @export */ const CatalogProductRenderListV1ApiFetchParamCreator = function (configuration) { return { /** * Collect and retrieve the list of product render info. This info contains raw prices and formatted prices, product name, stock status, store_id, etc. * @param {number} storeId * @param {string} currencyCode * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRenderListV1GetListGet(storeId, currencyCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { // verify required parameter 'storeId' is not null or undefined if (storeId === null || storeId === undefined) { throw new RequiredError('storeId', 'Required parameter storeId was null or undefined when calling catalogProductRenderListV1GetListGet.'); } // verify required parameter 'currencyCode' is not null or undefined if (currencyCode === null || currencyCode === undefined) { throw new RequiredError('currencyCode', 'Required parameter currencyCode was null or undefined when calling catalogProductRenderListV1GetListGet.'); } const localVarPath = `/V1/products-render-info`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } if (storeId !== undefined) { localVarQueryParameter['storeId'] = storeId; } if (currencyCode !== undefined) { localVarQueryParameter['currencyCode'] = currencyCode; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductRenderListV1ApiFetchParamCreator = CatalogProductRenderListV1ApiFetchParamCreator; /** * CatalogProductRenderListV1Api - functional programming interface * @export */ const CatalogProductRenderListV1ApiFp = function (configuration) { return { /** * Collect and retrieve the list of product render info. This info contains raw prices and formatted prices, product name, stock status, store_id, etc. * @param {number} storeId * @param {string} currencyCode * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRenderListV1GetListGet(storeId, currencyCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CatalogProductRenderListV1ApiFetchParamCreator(configuration).catalogProductRenderListV1GetListGet(storeId, currencyCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductRenderListV1ApiFp = CatalogProductRenderListV1ApiFp; /** * CatalogProductRenderListV1Api - factory interface * @export */ const CatalogProductRenderListV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Collect and retrieve the list of product render info. This info contains raw prices and formatted prices, product name, stock status, store_id, etc. * @param {number} storeId * @param {string} currencyCode * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRenderListV1GetListGet(storeId, currencyCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogProductRenderListV1ApiFp(configuration).catalogProductRenderListV1GetListGet(storeId, currencyCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.CatalogProductRenderListV1ApiFactory = CatalogProductRenderListV1ApiFactory; /** * CatalogProductRenderListV1Api - object-oriented interface * @export * @class CatalogProductRenderListV1Api * @extends {BaseAPI} */ class CatalogProductRenderListV1Api extends BaseAPI { /** * Collect and retrieve the list of product render info. This info contains raw prices and formatted prices, product name, stock status, store_id, etc. * @param {number} storeId * @param {string} currencyCode * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductRenderListV1Api */ catalogProductRenderListV1GetListGet(storeId, currencyCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogProductRenderListV1ApiFp(this.configuration).catalogProductRenderListV1GetListGet(storeId, currencyCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.CatalogProductRenderListV1Api = CatalogProductRenderListV1Api; /** * CatalogProductRepositoryV1Api - fetch parameter creator * @export */ const CatalogProductRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1DeleteByIdDelete(sku, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/products/{sku}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get info about product by product SKU * @param {string} sku * @param {boolean} [editMode] * @param {number} [storeId] * @param {boolean} [forceReload] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1GetGet(sku, editMode, storeId, forceReload, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductRepositoryV1GetGet.'); } const localVarPath = `/V1/products/{sku}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (editMode !== undefined) { localVarQueryParameter['editMode'] = editMode; } if (storeId !== undefined) { localVarQueryParameter['storeId'] = storeId; } if (forceReload !== undefined) { localVarQueryParameter['forceReload'] = forceReload; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get product list * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/products`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create product * @param {any} [catalogProductRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1SavePost(catalogProductRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/products`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductRepositoryV1SavePostBody || {}) : (catalogProductRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create product * @param {string} sku * @param {any} [catalogProductRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1SavePut(sku, catalogProductRepositoryV1SavePutBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductRepositoryV1SavePut.'); } const localVarPath = `/V1/products/{sku}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductRepositoryV1SavePutBody || {}) : (catalogProductRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductRepositoryV1ApiFetchParamCreator = CatalogProductRepositoryV1ApiFetchParamCreator; /** * CatalogProductRepositoryV1Api - functional programming interface * @export */ const CatalogProductRepositoryV1ApiFp = function (configuration) { return { /** * * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1DeleteByIdDelete(sku, options) { const localVarFetchArgs = exports.CatalogProductRepositoryV1ApiFetchParamCreator(configuration).catalogProductRepositoryV1DeleteByIdDelete(sku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get info about product by product SKU * @param {string} sku * @param {boolean} [editMode] * @param {number} [storeId] * @param {boolean} [forceReload] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1GetGet(sku, editMode, storeId, forceReload, options) { const localVarFetchArgs = exports.CatalogProductRepositoryV1ApiFetchParamCreator(configuration).catalogProductRepositoryV1GetGet(sku, editMode, storeId, forceReload, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get product list * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CatalogProductRepositoryV1ApiFetchParamCreator(configuration).catalogProductRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Create product * @param {any} [catalogProductRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1SavePost(catalogProductRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.CatalogProductRepositoryV1ApiFetchParamCreator(configuration).catalogProductRepositoryV1SavePost(catalogProductRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Create product * @param {string} sku * @param {any} [catalogProductRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1SavePut(sku, catalogProductRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CatalogProductRepositoryV1ApiFetchParamCreator(configuration).catalogProductRepositoryV1SavePut(sku, catalogProductRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductRepositoryV1ApiFp = CatalogProductRepositoryV1ApiFp; /** * CatalogProductRepositoryV1Api - factory interface * @export */ const CatalogProductRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1DeleteByIdDelete(sku, options) { return exports.CatalogProductRepositoryV1ApiFp(configuration).catalogProductRepositoryV1DeleteByIdDelete(sku, options)(fetch, basePath); }, /** * Get info about product by product SKU * @param {string} sku * @param {boolean} [editMode] * @param {number} [storeId] * @param {boolean} [forceReload] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1GetGet(sku, editMode, storeId, forceReload, options) { return exports.CatalogProductRepositoryV1ApiFp(configuration).catalogProductRepositoryV1GetGet(sku, editMode, storeId, forceReload, options)(fetch, basePath); }, /** * Get product list * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogProductRepositoryV1ApiFp(configuration).catalogProductRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Create product * @param {any} [catalogProductRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1SavePost(catalogProductRepositoryV1SavePostBody, options) { return exports.CatalogProductRepositoryV1ApiFp(configuration).catalogProductRepositoryV1SavePost(catalogProductRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Create product * @param {string} sku * @param {any} [catalogProductRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductRepositoryV1SavePut(sku, catalogProductRepositoryV1SavePutBody, options) { return exports.CatalogProductRepositoryV1ApiFp(configuration).catalogProductRepositoryV1SavePut(sku, catalogProductRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CatalogProductRepositoryV1ApiFactory = CatalogProductRepositoryV1ApiFactory; /** * CatalogProductRepositoryV1Api - object-oriented interface * @export * @class CatalogProductRepositoryV1Api * @extends {BaseAPI} */ class CatalogProductRepositoryV1Api extends BaseAPI { /** * * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductRepositoryV1Api */ catalogProductRepositoryV1DeleteByIdDelete(sku, options) { return exports.CatalogProductRepositoryV1ApiFp(this.configuration).catalogProductRepositoryV1DeleteByIdDelete(sku, options)(this.fetch, this.basePath); } /** * Get info about product by product SKU * @param {string} sku * @param {boolean} [editMode] * @param {number} [storeId] * @param {boolean} [forceReload] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductRepositoryV1Api */ catalogProductRepositoryV1GetGet(sku, editMode, storeId, forceReload, options) { return exports.CatalogProductRepositoryV1ApiFp(this.configuration).catalogProductRepositoryV1GetGet(sku, editMode, storeId, forceReload, options)(this.fetch, this.basePath); } /** * Get product list * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductRepositoryV1Api */ catalogProductRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CatalogProductRepositoryV1ApiFp(this.configuration).catalogProductRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Create product * @param {any} [catalogProductRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductRepositoryV1Api */ catalogProductRepositoryV1SavePost(catalogProductRepositoryV1SavePostBody, options) { return exports.CatalogProductRepositoryV1ApiFp(this.configuration).catalogProductRepositoryV1SavePost(catalogProductRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Create product * @param {string} sku * @param {any} [catalogProductRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductRepositoryV1Api */ catalogProductRepositoryV1SavePut(sku, catalogProductRepositoryV1SavePutBody, options) { return exports.CatalogProductRepositoryV1ApiFp(this.configuration).catalogProductRepositoryV1SavePut(sku, catalogProductRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CatalogProductRepositoryV1Api = CatalogProductRepositoryV1Api; /** * CatalogProductTierPriceManagementV1Api - fetch parameter creator * @export */ const CatalogProductTierPriceManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Create tier price for product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {number} price * @param {number} qty * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTierPriceManagementV1AddPost(sku, customerGroupId, price, qty, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductTierPriceManagementV1AddPost.'); } // verify required parameter 'customerGroupId' is not null or undefined if (customerGroupId === null || customerGroupId === undefined) { throw new RequiredError('customerGroupId', 'Required parameter customerGroupId was null or undefined when calling catalogProductTierPriceManagementV1AddPost.'); } // verify required parameter 'price' is not null or undefined if (price === null || price === undefined) { throw new RequiredError('price', 'Required parameter price was null or undefined when calling catalogProductTierPriceManagementV1AddPost.'); } // verify required parameter 'qty' is not null or undefined if (qty === null || qty === undefined) { throw new RequiredError('qty', 'Required parameter qty was null or undefined when calling catalogProductTierPriceManagementV1AddPost.'); } const localVarPath = `/V1/products/{sku}/group-prices/{customerGroupId}/tiers/{qty}/price/{price}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"customerGroupId"}}`, encodeURIComponent(String(customerGroupId))) .replace(`{${"price"}}`, encodeURIComponent(String(price))) .replace(`{${"qty"}}`, encodeURIComponent(String(qty))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get tier price of product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTierPriceManagementV1GetListGet(sku, customerGroupId, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductTierPriceManagementV1GetListGet.'); } // verify required parameter 'customerGroupId' is not null or undefined if (customerGroupId === null || customerGroupId === undefined) { throw new RequiredError('customerGroupId', 'Required parameter customerGroupId was null or undefined when calling catalogProductTierPriceManagementV1GetListGet.'); } const localVarPath = `/V1/products/{sku}/group-prices/{customerGroupId}/tiers` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"customerGroupId"}}`, encodeURIComponent(String(customerGroupId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Remove tier price from product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {number} qty * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTierPriceManagementV1RemoveDelete(sku, customerGroupId, qty, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductTierPriceManagementV1RemoveDelete.'); } // verify required parameter 'customerGroupId' is not null or undefined if (customerGroupId === null || customerGroupId === undefined) { throw new RequiredError('customerGroupId', 'Required parameter customerGroupId was null or undefined when calling catalogProductTierPriceManagementV1RemoveDelete.'); } // verify required parameter 'qty' is not null or undefined if (qty === null || qty === undefined) { throw new RequiredError('qty', 'Required parameter qty was null or undefined when calling catalogProductTierPriceManagementV1RemoveDelete.'); } const localVarPath = `/V1/products/{sku}/group-prices/{customerGroupId}/tiers/{qty}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"customerGroupId"}}`, encodeURIComponent(String(customerGroupId))) .replace(`{${"qty"}}`, encodeURIComponent(String(qty))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductTierPriceManagementV1ApiFetchParamCreator = CatalogProductTierPriceManagementV1ApiFetchParamCreator; /** * CatalogProductTierPriceManagementV1Api - functional programming interface * @export */ const CatalogProductTierPriceManagementV1ApiFp = function (configuration) { return { /** * Create tier price for product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {number} price * @param {number} qty * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTierPriceManagementV1AddPost(sku, customerGroupId, price, qty, options) { const localVarFetchArgs = exports.CatalogProductTierPriceManagementV1ApiFetchParamCreator(configuration).catalogProductTierPriceManagementV1AddPost(sku, customerGroupId, price, qty, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get tier price of product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTierPriceManagementV1GetListGet(sku, customerGroupId, options) { const localVarFetchArgs = exports.CatalogProductTierPriceManagementV1ApiFetchParamCreator(configuration).catalogProductTierPriceManagementV1GetListGet(sku, customerGroupId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Remove tier price from product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {number} qty * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTierPriceManagementV1RemoveDelete(sku, customerGroupId, qty, options) { const localVarFetchArgs = exports.CatalogProductTierPriceManagementV1ApiFetchParamCreator(configuration).catalogProductTierPriceManagementV1RemoveDelete(sku, customerGroupId, qty, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductTierPriceManagementV1ApiFp = CatalogProductTierPriceManagementV1ApiFp; /** * CatalogProductTierPriceManagementV1Api - factory interface * @export */ const CatalogProductTierPriceManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Create tier price for product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {number} price * @param {number} qty * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTierPriceManagementV1AddPost(sku, customerGroupId, price, qty, options) { return exports.CatalogProductTierPriceManagementV1ApiFp(configuration).catalogProductTierPriceManagementV1AddPost(sku, customerGroupId, price, qty, options)(fetch, basePath); }, /** * Get tier price of product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTierPriceManagementV1GetListGet(sku, customerGroupId, options) { return exports.CatalogProductTierPriceManagementV1ApiFp(configuration).catalogProductTierPriceManagementV1GetListGet(sku, customerGroupId, options)(fetch, basePath); }, /** * Remove tier price from product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {number} qty * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTierPriceManagementV1RemoveDelete(sku, customerGroupId, qty, options) { return exports.CatalogProductTierPriceManagementV1ApiFp(configuration).catalogProductTierPriceManagementV1RemoveDelete(sku, customerGroupId, qty, options)(fetch, basePath); }, }; }; exports.CatalogProductTierPriceManagementV1ApiFactory = CatalogProductTierPriceManagementV1ApiFactory; /** * CatalogProductTierPriceManagementV1Api - object-oriented interface * @export * @class CatalogProductTierPriceManagementV1Api * @extends {BaseAPI} */ class CatalogProductTierPriceManagementV1Api extends BaseAPI { /** * Create tier price for product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {number} price * @param {number} qty * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductTierPriceManagementV1Api */ catalogProductTierPriceManagementV1AddPost(sku, customerGroupId, price, qty, options) { return exports.CatalogProductTierPriceManagementV1ApiFp(this.configuration).catalogProductTierPriceManagementV1AddPost(sku, customerGroupId, price, qty, options)(this.fetch, this.basePath); } /** * Get tier price of product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductTierPriceManagementV1Api */ catalogProductTierPriceManagementV1GetListGet(sku, customerGroupId, options) { return exports.CatalogProductTierPriceManagementV1ApiFp(this.configuration).catalogProductTierPriceManagementV1GetListGet(sku, customerGroupId, options)(this.fetch, this.basePath); } /** * Remove tier price from product * @param {string} sku * @param {string} customerGroupId 'all' can be used to specify 'ALL GROUPS' * @param {number} qty * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductTierPriceManagementV1Api */ catalogProductTierPriceManagementV1RemoveDelete(sku, customerGroupId, qty, options) { return exports.CatalogProductTierPriceManagementV1ApiFp(this.configuration).catalogProductTierPriceManagementV1RemoveDelete(sku, customerGroupId, qty, options)(this.fetch, this.basePath); } } exports.CatalogProductTierPriceManagementV1Api = CatalogProductTierPriceManagementV1Api; /** * CatalogProductTypeListV1Api - fetch parameter creator * @export */ const CatalogProductTypeListV1ApiFetchParamCreator = function (configuration) { return { /** * Retrieve available product types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTypeListV1GetProductTypesGet(options = {}) { const localVarPath = `/V1/products/types`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductTypeListV1ApiFetchParamCreator = CatalogProductTypeListV1ApiFetchParamCreator; /** * CatalogProductTypeListV1Api - functional programming interface * @export */ const CatalogProductTypeListV1ApiFp = function (configuration) { return { /** * Retrieve available product types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTypeListV1GetProductTypesGet(options) { const localVarFetchArgs = exports.CatalogProductTypeListV1ApiFetchParamCreator(configuration).catalogProductTypeListV1GetProductTypesGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductTypeListV1ApiFp = CatalogProductTypeListV1ApiFp; /** * CatalogProductTypeListV1Api - factory interface * @export */ const CatalogProductTypeListV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Retrieve available product types * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductTypeListV1GetProductTypesGet(options) { return exports.CatalogProductTypeListV1ApiFp(configuration).catalogProductTypeListV1GetProductTypesGet(options)(fetch, basePath); }, }; }; exports.CatalogProductTypeListV1ApiFactory = CatalogProductTypeListV1ApiFactory; /** * CatalogProductTypeListV1Api - object-oriented interface * @export * @class CatalogProductTypeListV1Api * @extends {BaseAPI} */ class CatalogProductTypeListV1Api extends BaseAPI { /** * Retrieve available product types * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductTypeListV1Api */ catalogProductTypeListV1GetProductTypesGet(options) { return exports.CatalogProductTypeListV1ApiFp(this.configuration).catalogProductTypeListV1GetProductTypesGet(options)(this.fetch, this.basePath); } } exports.CatalogProductTypeListV1Api = CatalogProductTypeListV1Api; /** * CatalogProductWebsiteLinkRepositoryV1Api - fetch parameter creator * @export */ const CatalogProductWebsiteLinkRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Remove the website assignment from the product by product sku * @param {string} sku * @param {number} websiteId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductWebsiteLinkRepositoryV1DeleteByIdDelete(sku, websiteId, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductWebsiteLinkRepositoryV1DeleteByIdDelete.'); } // verify required parameter 'websiteId' is not null or undefined if (websiteId === null || websiteId === undefined) { throw new RequiredError('websiteId', 'Required parameter websiteId was null or undefined when calling catalogProductWebsiteLinkRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/products/{sku}/websites/{websiteId}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"websiteId"}}`, encodeURIComponent(String(websiteId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Assign a product to the website * @param {string} sku * @param {any} [catalogProductWebsiteLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductWebsiteLinkRepositoryV1SavePost(sku, catalogProductWebsiteLinkRepositoryV1SavePostBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductWebsiteLinkRepositoryV1SavePost.'); } const localVarPath = `/V1/products/{sku}/websites` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductWebsiteLinkRepositoryV1SavePostBody || {}) : (catalogProductWebsiteLinkRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Assign a product to the website * @param {string} sku * @param {any} [catalogProductWebsiteLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductWebsiteLinkRepositoryV1SavePut(sku, catalogProductWebsiteLinkRepositoryV1SavePutBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling catalogProductWebsiteLinkRepositoryV1SavePut.'); } const localVarPath = `/V1/products/{sku}/websites` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogProductWebsiteLinkRepositoryV1SavePutBody || {}) : (catalogProductWebsiteLinkRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogProductWebsiteLinkRepositoryV1ApiFetchParamCreator = CatalogProductWebsiteLinkRepositoryV1ApiFetchParamCreator; /** * CatalogProductWebsiteLinkRepositoryV1Api - functional programming interface * @export */ const CatalogProductWebsiteLinkRepositoryV1ApiFp = function (configuration) { return { /** * Remove the website assignment from the product by product sku * @param {string} sku * @param {number} websiteId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductWebsiteLinkRepositoryV1DeleteByIdDelete(sku, websiteId, options) { const localVarFetchArgs = exports.CatalogProductWebsiteLinkRepositoryV1ApiFetchParamCreator(configuration).catalogProductWebsiteLinkRepositoryV1DeleteByIdDelete(sku, websiteId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Assign a product to the website * @param {string} sku * @param {any} [catalogProductWebsiteLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductWebsiteLinkRepositoryV1SavePost(sku, catalogProductWebsiteLinkRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.CatalogProductWebsiteLinkRepositoryV1ApiFetchParamCreator(configuration).catalogProductWebsiteLinkRepositoryV1SavePost(sku, catalogProductWebsiteLinkRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Assign a product to the website * @param {string} sku * @param {any} [catalogProductWebsiteLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductWebsiteLinkRepositoryV1SavePut(sku, catalogProductWebsiteLinkRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CatalogProductWebsiteLinkRepositoryV1ApiFetchParamCreator(configuration).catalogProductWebsiteLinkRepositoryV1SavePut(sku, catalogProductWebsiteLinkRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogProductWebsiteLinkRepositoryV1ApiFp = CatalogProductWebsiteLinkRepositoryV1ApiFp; /** * CatalogProductWebsiteLinkRepositoryV1Api - factory interface * @export */ const CatalogProductWebsiteLinkRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Remove the website assignment from the product by product sku * @param {string} sku * @param {number} websiteId * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductWebsiteLinkRepositoryV1DeleteByIdDelete(sku, websiteId, options) { return exports.CatalogProductWebsiteLinkRepositoryV1ApiFp(configuration).catalogProductWebsiteLinkRepositoryV1DeleteByIdDelete(sku, websiteId, options)(fetch, basePath); }, /** * Assign a product to the website * @param {string} sku * @param {any} [catalogProductWebsiteLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductWebsiteLinkRepositoryV1SavePost(sku, catalogProductWebsiteLinkRepositoryV1SavePostBody, options) { return exports.CatalogProductWebsiteLinkRepositoryV1ApiFp(configuration).catalogProductWebsiteLinkRepositoryV1SavePost(sku, catalogProductWebsiteLinkRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Assign a product to the website * @param {string} sku * @param {any} [catalogProductWebsiteLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogProductWebsiteLinkRepositoryV1SavePut(sku, catalogProductWebsiteLinkRepositoryV1SavePutBody, options) { return exports.CatalogProductWebsiteLinkRepositoryV1ApiFp(configuration).catalogProductWebsiteLinkRepositoryV1SavePut(sku, catalogProductWebsiteLinkRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CatalogProductWebsiteLinkRepositoryV1ApiFactory = CatalogProductWebsiteLinkRepositoryV1ApiFactory; /** * CatalogProductWebsiteLinkRepositoryV1Api - object-oriented interface * @export * @class CatalogProductWebsiteLinkRepositoryV1Api * @extends {BaseAPI} */ class CatalogProductWebsiteLinkRepositoryV1Api extends BaseAPI { /** * Remove the website assignment from the product by product sku * @param {string} sku * @param {number} websiteId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductWebsiteLinkRepositoryV1Api */ catalogProductWebsiteLinkRepositoryV1DeleteByIdDelete(sku, websiteId, options) { return exports.CatalogProductWebsiteLinkRepositoryV1ApiFp(this.configuration).catalogProductWebsiteLinkRepositoryV1DeleteByIdDelete(sku, websiteId, options)(this.fetch, this.basePath); } /** * Assign a product to the website * @param {string} sku * @param {any} [catalogProductWebsiteLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductWebsiteLinkRepositoryV1Api */ catalogProductWebsiteLinkRepositoryV1SavePost(sku, catalogProductWebsiteLinkRepositoryV1SavePostBody, options) { return exports.CatalogProductWebsiteLinkRepositoryV1ApiFp(this.configuration).catalogProductWebsiteLinkRepositoryV1SavePost(sku, catalogProductWebsiteLinkRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Assign a product to the website * @param {string} sku * @param {any} [catalogProductWebsiteLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogProductWebsiteLinkRepositoryV1Api */ catalogProductWebsiteLinkRepositoryV1SavePut(sku, catalogProductWebsiteLinkRepositoryV1SavePutBody, options) { return exports.CatalogProductWebsiteLinkRepositoryV1ApiFp(this.configuration).catalogProductWebsiteLinkRepositoryV1SavePut(sku, catalogProductWebsiteLinkRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CatalogProductWebsiteLinkRepositoryV1Api = CatalogProductWebsiteLinkRepositoryV1Api; /** * CatalogSpecialPriceStorageV1Api - fetch parameter creator * @export */ const CatalogSpecialPriceStorageV1ApiFetchParamCreator = function (configuration) { return { /** * Delete product's special price. If any items will have invalid price, store id, sku or dates, they will be marked as failed and excluded from delete list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the delete exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogSpecialPriceStorageV1DeletePost(catalogSpecialPriceStorageV1DeletePostBody, options = {}) { const localVarPath = `/V1/products/special-price-delete`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogSpecialPriceStorageV1DeletePostBody || {}) : (catalogSpecialPriceStorageV1DeletePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Return product's special price. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogSpecialPriceStorageV1GetPost(catalogSpecialPriceStorageV1GetPostBody, options = {}) { const localVarPath = `/V1/products/special-price-information`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogSpecialPriceStorageV1GetPostBody || {}) : (catalogSpecialPriceStorageV1GetPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add or update product's special price. If any items will have invalid price, store id, sku or dates, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogSpecialPriceStorageV1UpdatePost(catalogSpecialPriceStorageV1UpdatePostBody, options = {}) { const localVarPath = `/V1/products/special-price`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogSpecialPriceStorageV1UpdatePostBody || {}) : (catalogSpecialPriceStorageV1UpdatePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogSpecialPriceStorageV1ApiFetchParamCreator = CatalogSpecialPriceStorageV1ApiFetchParamCreator; /** * CatalogSpecialPriceStorageV1Api - functional programming interface * @export */ const CatalogSpecialPriceStorageV1ApiFp = function (configuration) { return { /** * Delete product's special price. If any items will have invalid price, store id, sku or dates, they will be marked as failed and excluded from delete list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the delete exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogSpecialPriceStorageV1DeletePost(catalogSpecialPriceStorageV1DeletePostBody, options) { const localVarFetchArgs = exports.CatalogSpecialPriceStorageV1ApiFetchParamCreator(configuration).catalogSpecialPriceStorageV1DeletePost(catalogSpecialPriceStorageV1DeletePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Return product's special price. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogSpecialPriceStorageV1GetPost(catalogSpecialPriceStorageV1GetPostBody, options) { const localVarFetchArgs = exports.CatalogSpecialPriceStorageV1ApiFetchParamCreator(configuration).catalogSpecialPriceStorageV1GetPost(catalogSpecialPriceStorageV1GetPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add or update product's special price. If any items will have invalid price, store id, sku or dates, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogSpecialPriceStorageV1UpdatePost(catalogSpecialPriceStorageV1UpdatePostBody, options) { const localVarFetchArgs = exports.CatalogSpecialPriceStorageV1ApiFetchParamCreator(configuration).catalogSpecialPriceStorageV1UpdatePost(catalogSpecialPriceStorageV1UpdatePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogSpecialPriceStorageV1ApiFp = CatalogSpecialPriceStorageV1ApiFp; /** * CatalogSpecialPriceStorageV1Api - factory interface * @export */ const CatalogSpecialPriceStorageV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete product's special price. If any items will have invalid price, store id, sku or dates, they will be marked as failed and excluded from delete list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the delete exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogSpecialPriceStorageV1DeletePost(catalogSpecialPriceStorageV1DeletePostBody, options) { return exports.CatalogSpecialPriceStorageV1ApiFp(configuration).catalogSpecialPriceStorageV1DeletePost(catalogSpecialPriceStorageV1DeletePostBody, options)(fetch, basePath); }, /** * Return product's special price. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogSpecialPriceStorageV1GetPost(catalogSpecialPriceStorageV1GetPostBody, options) { return exports.CatalogSpecialPriceStorageV1ApiFp(configuration).catalogSpecialPriceStorageV1GetPost(catalogSpecialPriceStorageV1GetPostBody, options)(fetch, basePath); }, /** * Add or update product's special price. If any items will have invalid price, store id, sku or dates, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogSpecialPriceStorageV1UpdatePost(catalogSpecialPriceStorageV1UpdatePostBody, options) { return exports.CatalogSpecialPriceStorageV1ApiFp(configuration).catalogSpecialPriceStorageV1UpdatePost(catalogSpecialPriceStorageV1UpdatePostBody, options)(fetch, basePath); }, }; }; exports.CatalogSpecialPriceStorageV1ApiFactory = CatalogSpecialPriceStorageV1ApiFactory; /** * CatalogSpecialPriceStorageV1Api - object-oriented interface * @export * @class CatalogSpecialPriceStorageV1Api * @extends {BaseAPI} */ class CatalogSpecialPriceStorageV1Api extends BaseAPI { /** * Delete product's special price. If any items will have invalid price, store id, sku or dates, they will be marked as failed and excluded from delete list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the delete exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogSpecialPriceStorageV1Api */ catalogSpecialPriceStorageV1DeletePost(catalogSpecialPriceStorageV1DeletePostBody, options) { return exports.CatalogSpecialPriceStorageV1ApiFp(this.configuration).catalogSpecialPriceStorageV1DeletePost(catalogSpecialPriceStorageV1DeletePostBody, options)(this.fetch, this.basePath); } /** * Return product's special price. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogSpecialPriceStorageV1Api */ catalogSpecialPriceStorageV1GetPost(catalogSpecialPriceStorageV1GetPostBody, options) { return exports.CatalogSpecialPriceStorageV1ApiFp(this.configuration).catalogSpecialPriceStorageV1GetPost(catalogSpecialPriceStorageV1GetPostBody, options)(this.fetch, this.basePath); } /** * Add or update product's special price. If any items will have invalid price, store id, sku or dates, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogSpecialPriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogSpecialPriceStorageV1Api */ catalogSpecialPriceStorageV1UpdatePost(catalogSpecialPriceStorageV1UpdatePostBody, options) { return exports.CatalogSpecialPriceStorageV1ApiFp(this.configuration).catalogSpecialPriceStorageV1UpdatePost(catalogSpecialPriceStorageV1UpdatePostBody, options)(this.fetch, this.basePath); } } exports.CatalogSpecialPriceStorageV1Api = CatalogSpecialPriceStorageV1Api; /** * CatalogTierPriceStorageV1Api - fetch parameter creator * @export */ const CatalogTierPriceStorageV1ApiFetchParamCreator = function (configuration) { return { /** * Delete product tier prices. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from delete list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1DeletePost(catalogTierPriceStorageV1DeletePostBody, options = {}) { const localVarPath = `/V1/products/tier-prices-delete`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogTierPriceStorageV1DeletePostBody || {}) : (catalogTierPriceStorageV1DeletePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogTierPriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1GetPost(catalogTierPriceStorageV1GetPostBody, options = {}) { const localVarPath = `/V1/products/tier-prices-information`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogTierPriceStorageV1GetPostBody || {}) : (catalogTierPriceStorageV1GetPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Remove existing tier prices and replace them with the new ones. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from replace list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1ReplacePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1ReplacePut(catalogTierPriceStorageV1ReplacePutBody, options = {}) { const localVarPath = `/V1/products/tier-prices`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogTierPriceStorageV1ReplacePutBody || {}) : (catalogTierPriceStorageV1ReplacePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add or update product prices. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1UpdatePost(catalogTierPriceStorageV1UpdatePostBody, options = {}) { const localVarPath = `/V1/products/tier-prices`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(catalogTierPriceStorageV1UpdatePostBody || {}) : (catalogTierPriceStorageV1UpdatePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CatalogTierPriceStorageV1ApiFetchParamCreator = CatalogTierPriceStorageV1ApiFetchParamCreator; /** * CatalogTierPriceStorageV1Api - functional programming interface * @export */ const CatalogTierPriceStorageV1ApiFp = function (configuration) { return { /** * Delete product tier prices. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from delete list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1DeletePost(catalogTierPriceStorageV1DeletePostBody, options) { const localVarFetchArgs = exports.CatalogTierPriceStorageV1ApiFetchParamCreator(configuration).catalogTierPriceStorageV1DeletePost(catalogTierPriceStorageV1DeletePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogTierPriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1GetPost(catalogTierPriceStorageV1GetPostBody, options) { const localVarFetchArgs = exports.CatalogTierPriceStorageV1ApiFetchParamCreator(configuration).catalogTierPriceStorageV1GetPost(catalogTierPriceStorageV1GetPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Remove existing tier prices and replace them with the new ones. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from replace list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1ReplacePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1ReplacePut(catalogTierPriceStorageV1ReplacePutBody, options) { const localVarFetchArgs = exports.CatalogTierPriceStorageV1ApiFetchParamCreator(configuration).catalogTierPriceStorageV1ReplacePut(catalogTierPriceStorageV1ReplacePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add or update product prices. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1UpdatePost(catalogTierPriceStorageV1UpdatePostBody, options) { const localVarFetchArgs = exports.CatalogTierPriceStorageV1ApiFetchParamCreator(configuration).catalogTierPriceStorageV1UpdatePost(catalogTierPriceStorageV1UpdatePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CatalogTierPriceStorageV1ApiFp = CatalogTierPriceStorageV1ApiFp; /** * CatalogTierPriceStorageV1Api - factory interface * @export */ const CatalogTierPriceStorageV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete product tier prices. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from delete list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1DeletePost(catalogTierPriceStorageV1DeletePostBody, options) { return exports.CatalogTierPriceStorageV1ApiFp(configuration).catalogTierPriceStorageV1DeletePost(catalogTierPriceStorageV1DeletePostBody, options)(fetch, basePath); }, /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogTierPriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1GetPost(catalogTierPriceStorageV1GetPostBody, options) { return exports.CatalogTierPriceStorageV1ApiFp(configuration).catalogTierPriceStorageV1GetPost(catalogTierPriceStorageV1GetPostBody, options)(fetch, basePath); }, /** * Remove existing tier prices and replace them with the new ones. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from replace list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1ReplacePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1ReplacePut(catalogTierPriceStorageV1ReplacePutBody, options) { return exports.CatalogTierPriceStorageV1ApiFp(configuration).catalogTierPriceStorageV1ReplacePut(catalogTierPriceStorageV1ReplacePutBody, options)(fetch, basePath); }, /** * Add or update product prices. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ catalogTierPriceStorageV1UpdatePost(catalogTierPriceStorageV1UpdatePostBody, options) { return exports.CatalogTierPriceStorageV1ApiFp(configuration).catalogTierPriceStorageV1UpdatePost(catalogTierPriceStorageV1UpdatePostBody, options)(fetch, basePath); }, }; }; exports.CatalogTierPriceStorageV1ApiFactory = CatalogTierPriceStorageV1ApiFactory; /** * CatalogTierPriceStorageV1Api - object-oriented interface * @export * @class CatalogTierPriceStorageV1Api * @extends {BaseAPI} */ class CatalogTierPriceStorageV1Api extends BaseAPI { /** * Delete product tier prices. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from delete list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1DeletePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogTierPriceStorageV1Api */ catalogTierPriceStorageV1DeletePost(catalogTierPriceStorageV1DeletePostBody, options) { return exports.CatalogTierPriceStorageV1ApiFp(this.configuration).catalogTierPriceStorageV1DeletePost(catalogTierPriceStorageV1DeletePostBody, options)(this.fetch, this.basePath); } /** * Return product prices. In case of at least one of skus is not found exception will be thrown. * @param {any} [catalogTierPriceStorageV1GetPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogTierPriceStorageV1Api */ catalogTierPriceStorageV1GetPost(catalogTierPriceStorageV1GetPostBody, options) { return exports.CatalogTierPriceStorageV1ApiFp(this.configuration).catalogTierPriceStorageV1GetPost(catalogTierPriceStorageV1GetPostBody, options)(this.fetch, this.basePath); } /** * Remove existing tier prices and replace them with the new ones. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from replace list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1ReplacePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogTierPriceStorageV1Api */ catalogTierPriceStorageV1ReplacePut(catalogTierPriceStorageV1ReplacePutBody, options) { return exports.CatalogTierPriceStorageV1ApiFp(this.configuration).catalogTierPriceStorageV1ReplacePut(catalogTierPriceStorageV1ReplacePutBody, options)(this.fetch, this.basePath); } /** * Add or update product prices. If any items will have invalid price, price type, website id, sku, customer group or quantity, they will be marked as failed and excluded from update list and \\Magento\\Catalog\\Api\\Data\\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown. * @param {any} [catalogTierPriceStorageV1UpdatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CatalogTierPriceStorageV1Api */ catalogTierPriceStorageV1UpdatePost(catalogTierPriceStorageV1UpdatePostBody, options) { return exports.CatalogTierPriceStorageV1ApiFp(this.configuration).catalogTierPriceStorageV1UpdatePost(catalogTierPriceStorageV1UpdatePostBody, options)(this.fetch, this.basePath); } } exports.CatalogTierPriceStorageV1Api = CatalogTierPriceStorageV1Api; /** * CheckoutAgreementsCheckoutAgreementsListV1Api - fetch parameter creator * @export */ const CheckoutAgreementsCheckoutAgreementsListV1ApiFetchParamCreator = function (configuration) { return { /** * List of checkout agreements. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutAgreementsCheckoutAgreementsListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/carts/licence/list`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CheckoutAgreementsCheckoutAgreementsListV1ApiFetchParamCreator = CheckoutAgreementsCheckoutAgreementsListV1ApiFetchParamCreator; /** * CheckoutAgreementsCheckoutAgreementsListV1Api - functional programming interface * @export */ const CheckoutAgreementsCheckoutAgreementsListV1ApiFp = function (configuration) { return { /** * List of checkout agreements. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutAgreementsCheckoutAgreementsListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CheckoutAgreementsCheckoutAgreementsListV1ApiFetchParamCreator(configuration).checkoutAgreementsCheckoutAgreementsListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CheckoutAgreementsCheckoutAgreementsListV1ApiFp = CheckoutAgreementsCheckoutAgreementsListV1ApiFp; /** * CheckoutAgreementsCheckoutAgreementsListV1Api - factory interface * @export */ const CheckoutAgreementsCheckoutAgreementsListV1ApiFactory = function (configuration, fetch, basePath) { return { /** * List of checkout agreements. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutAgreementsCheckoutAgreementsListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CheckoutAgreementsCheckoutAgreementsListV1ApiFp(configuration).checkoutAgreementsCheckoutAgreementsListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.CheckoutAgreementsCheckoutAgreementsListV1ApiFactory = CheckoutAgreementsCheckoutAgreementsListV1ApiFactory; /** * CheckoutAgreementsCheckoutAgreementsListV1Api - object-oriented interface * @export * @class CheckoutAgreementsCheckoutAgreementsListV1Api * @extends {BaseAPI} */ class CheckoutAgreementsCheckoutAgreementsListV1Api extends BaseAPI { /** * List of checkout agreements. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutAgreementsCheckoutAgreementsListV1Api */ checkoutAgreementsCheckoutAgreementsListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CheckoutAgreementsCheckoutAgreementsListV1ApiFp(this.configuration).checkoutAgreementsCheckoutAgreementsListV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.CheckoutAgreementsCheckoutAgreementsListV1Api = CheckoutAgreementsCheckoutAgreementsListV1Api; /** * CheckoutAgreementsCheckoutAgreementsRepositoryV1Api - fetch parameter creator * @export */ const CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Lists active checkout agreements. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutAgreementsCheckoutAgreementsRepositoryV1GetListGet(options = {}) { const localVarPath = `/V1/carts/licence`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFetchParamCreator = CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFetchParamCreator; /** * CheckoutAgreementsCheckoutAgreementsRepositoryV1Api - functional programming interface * @export */ const CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFp = function (configuration) { return { /** * Lists active checkout agreements. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutAgreementsCheckoutAgreementsRepositoryV1GetListGet(options) { const localVarFetchArgs = exports.CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFetchParamCreator(configuration).checkoutAgreementsCheckoutAgreementsRepositoryV1GetListGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFp = CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFp; /** * CheckoutAgreementsCheckoutAgreementsRepositoryV1Api - factory interface * @export */ const CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Lists active checkout agreements. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutAgreementsCheckoutAgreementsRepositoryV1GetListGet(options) { return exports.CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFp(configuration).checkoutAgreementsCheckoutAgreementsRepositoryV1GetListGet(options)(fetch, basePath); }, }; }; exports.CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFactory = CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFactory; /** * CheckoutAgreementsCheckoutAgreementsRepositoryV1Api - object-oriented interface * @export * @class CheckoutAgreementsCheckoutAgreementsRepositoryV1Api * @extends {BaseAPI} */ class CheckoutAgreementsCheckoutAgreementsRepositoryV1Api extends BaseAPI { /** * Lists active checkout agreements. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutAgreementsCheckoutAgreementsRepositoryV1Api */ checkoutAgreementsCheckoutAgreementsRepositoryV1GetListGet(options) { return exports.CheckoutAgreementsCheckoutAgreementsRepositoryV1ApiFp(this.configuration).checkoutAgreementsCheckoutAgreementsRepositoryV1GetListGet(options)(this.fetch, this.basePath); } } exports.CheckoutAgreementsCheckoutAgreementsRepositoryV1Api = CheckoutAgreementsCheckoutAgreementsRepositoryV1Api; /** * CheckoutGuestPaymentInformationManagementV1Api - fetch parameter creator * @export */ const CheckoutGuestPaymentInformationManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Get payment information * @param {string} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestPaymentInformationManagementV1GetPaymentInformationGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling checkoutGuestPaymentInformationManagementV1GetPaymentInformationGet.'); } const localVarPath = `/V1/guest-carts/{cartId}/payment-information` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Set payment information and place order for a specified cart. * @param {string} cartId * @param {any} [checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost.'); } const localVarPath = `/V1/guest-carts/{cartId}/payment-information` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody || {}) : (checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Set payment information for a specified cart. * @param {string} cartId * @param {any} [checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestPaymentInformationManagementV1SavePaymentInformationPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling checkoutGuestPaymentInformationManagementV1SavePaymentInformationPost.'); } const localVarPath = `/V1/guest-carts/{cartId}/set-payment-information` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody || {}) : (checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CheckoutGuestPaymentInformationManagementV1ApiFetchParamCreator = CheckoutGuestPaymentInformationManagementV1ApiFetchParamCreator; /** * CheckoutGuestPaymentInformationManagementV1Api - functional programming interface * @export */ const CheckoutGuestPaymentInformationManagementV1ApiFp = function (configuration) { return { /** * Get payment information * @param {string} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestPaymentInformationManagementV1GetPaymentInformationGet(cartId, options) { const localVarFetchArgs = exports.CheckoutGuestPaymentInformationManagementV1ApiFetchParamCreator(configuration).checkoutGuestPaymentInformationManagementV1GetPaymentInformationGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Set payment information and place order for a specified cart. * @param {string} cartId * @param {any} [checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options) { const localVarFetchArgs = exports.CheckoutGuestPaymentInformationManagementV1ApiFetchParamCreator(configuration).checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Set payment information for a specified cart. * @param {string} cartId * @param {any} [checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestPaymentInformationManagementV1SavePaymentInformationPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody, options) { const localVarFetchArgs = exports.CheckoutGuestPaymentInformationManagementV1ApiFetchParamCreator(configuration).checkoutGuestPaymentInformationManagementV1SavePaymentInformationPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CheckoutGuestPaymentInformationManagementV1ApiFp = CheckoutGuestPaymentInformationManagementV1ApiFp; /** * CheckoutGuestPaymentInformationManagementV1Api - factory interface * @export */ const CheckoutGuestPaymentInformationManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get payment information * @param {string} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestPaymentInformationManagementV1GetPaymentInformationGet(cartId, options) { return exports.CheckoutGuestPaymentInformationManagementV1ApiFp(configuration).checkoutGuestPaymentInformationManagementV1GetPaymentInformationGet(cartId, options)(fetch, basePath); }, /** * Set payment information and place order for a specified cart. * @param {string} cartId * @param {any} [checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options) { return exports.CheckoutGuestPaymentInformationManagementV1ApiFp(configuration).checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options)(fetch, basePath); }, /** * Set payment information for a specified cart. * @param {string} cartId * @param {any} [checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestPaymentInformationManagementV1SavePaymentInformationPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody, options) { return exports.CheckoutGuestPaymentInformationManagementV1ApiFp(configuration).checkoutGuestPaymentInformationManagementV1SavePaymentInformationPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody, options)(fetch, basePath); }, }; }; exports.CheckoutGuestPaymentInformationManagementV1ApiFactory = CheckoutGuestPaymentInformationManagementV1ApiFactory; /** * CheckoutGuestPaymentInformationManagementV1Api - object-oriented interface * @export * @class CheckoutGuestPaymentInformationManagementV1Api * @extends {BaseAPI} */ class CheckoutGuestPaymentInformationManagementV1Api extends BaseAPI { /** * Get payment information * @param {string} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutGuestPaymentInformationManagementV1Api */ checkoutGuestPaymentInformationManagementV1GetPaymentInformationGet(cartId, options) { return exports.CheckoutGuestPaymentInformationManagementV1ApiFp(this.configuration).checkoutGuestPaymentInformationManagementV1GetPaymentInformationGet(cartId, options)(this.fetch, this.basePath); } /** * Set payment information and place order for a specified cart. * @param {string} cartId * @param {any} [checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutGuestPaymentInformationManagementV1Api */ checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options) { return exports.CheckoutGuestPaymentInformationManagementV1ApiFp(this.configuration).checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options)(this.fetch, this.basePath); } /** * Set payment information for a specified cart. * @param {string} cartId * @param {any} [checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutGuestPaymentInformationManagementV1Api */ checkoutGuestPaymentInformationManagementV1SavePaymentInformationPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody, options) { return exports.CheckoutGuestPaymentInformationManagementV1ApiFp(this.configuration).checkoutGuestPaymentInformationManagementV1SavePaymentInformationPost(cartId, checkoutGuestPaymentInformationManagementV1SavePaymentInformationPostBody, options)(this.fetch, this.basePath); } } exports.CheckoutGuestPaymentInformationManagementV1Api = CheckoutGuestPaymentInformationManagementV1Api; /** * CheckoutGuestShippingInformationManagementV1Api - fetch parameter creator * @export */ const CheckoutGuestShippingInformationManagementV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {string} cartId * @param {any} [checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestShippingInformationManagementV1SaveAddressInformationPost(cartId, checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling checkoutGuestShippingInformationManagementV1SaveAddressInformationPost.'); } const localVarPath = `/V1/guest-carts/{cartId}/shipping-information` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody || {}) : (checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CheckoutGuestShippingInformationManagementV1ApiFetchParamCreator = CheckoutGuestShippingInformationManagementV1ApiFetchParamCreator; /** * CheckoutGuestShippingInformationManagementV1Api - functional programming interface * @export */ const CheckoutGuestShippingInformationManagementV1ApiFp = function (configuration) { return { /** * * @param {string} cartId * @param {any} [checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestShippingInformationManagementV1SaveAddressInformationPost(cartId, checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody, options) { const localVarFetchArgs = exports.CheckoutGuestShippingInformationManagementV1ApiFetchParamCreator(configuration).checkoutGuestShippingInformationManagementV1SaveAddressInformationPost(cartId, checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CheckoutGuestShippingInformationManagementV1ApiFp = CheckoutGuestShippingInformationManagementV1ApiFp; /** * CheckoutGuestShippingInformationManagementV1Api - factory interface * @export */ const CheckoutGuestShippingInformationManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {string} cartId * @param {any} [checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestShippingInformationManagementV1SaveAddressInformationPost(cartId, checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody, options) { return exports.CheckoutGuestShippingInformationManagementV1ApiFp(configuration).checkoutGuestShippingInformationManagementV1SaveAddressInformationPost(cartId, checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody, options)(fetch, basePath); }, }; }; exports.CheckoutGuestShippingInformationManagementV1ApiFactory = CheckoutGuestShippingInformationManagementV1ApiFactory; /** * CheckoutGuestShippingInformationManagementV1Api - object-oriented interface * @export * @class CheckoutGuestShippingInformationManagementV1Api * @extends {BaseAPI} */ class CheckoutGuestShippingInformationManagementV1Api extends BaseAPI { /** * * @param {string} cartId * @param {any} [checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutGuestShippingInformationManagementV1Api */ checkoutGuestShippingInformationManagementV1SaveAddressInformationPost(cartId, checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody, options) { return exports.CheckoutGuestShippingInformationManagementV1ApiFp(this.configuration).checkoutGuestShippingInformationManagementV1SaveAddressInformationPost(cartId, checkoutGuestShippingInformationManagementV1SaveAddressInformationPostBody, options)(this.fetch, this.basePath); } } exports.CheckoutGuestShippingInformationManagementV1Api = CheckoutGuestShippingInformationManagementV1Api; /** * CheckoutGuestTotalsInformationManagementV1Api - fetch parameter creator * @export */ const CheckoutGuestTotalsInformationManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Calculate quote totals based on address and shipping method. * @param {string} cartId * @param {any} [checkoutGuestTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestTotalsInformationManagementV1CalculatePost(cartId, checkoutGuestTotalsInformationManagementV1CalculatePostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling checkoutGuestTotalsInformationManagementV1CalculatePost.'); } const localVarPath = `/V1/guest-carts/{cartId}/totals-information` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(checkoutGuestTotalsInformationManagementV1CalculatePostBody || {}) : (checkoutGuestTotalsInformationManagementV1CalculatePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CheckoutGuestTotalsInformationManagementV1ApiFetchParamCreator = CheckoutGuestTotalsInformationManagementV1ApiFetchParamCreator; /** * CheckoutGuestTotalsInformationManagementV1Api - functional programming interface * @export */ const CheckoutGuestTotalsInformationManagementV1ApiFp = function (configuration) { return { /** * Calculate quote totals based on address and shipping method. * @param {string} cartId * @param {any} [checkoutGuestTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestTotalsInformationManagementV1CalculatePost(cartId, checkoutGuestTotalsInformationManagementV1CalculatePostBody, options) { const localVarFetchArgs = exports.CheckoutGuestTotalsInformationManagementV1ApiFetchParamCreator(configuration).checkoutGuestTotalsInformationManagementV1CalculatePost(cartId, checkoutGuestTotalsInformationManagementV1CalculatePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CheckoutGuestTotalsInformationManagementV1ApiFp = CheckoutGuestTotalsInformationManagementV1ApiFp; /** * CheckoutGuestTotalsInformationManagementV1Api - factory interface * @export */ const CheckoutGuestTotalsInformationManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Calculate quote totals based on address and shipping method. * @param {string} cartId * @param {any} [checkoutGuestTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutGuestTotalsInformationManagementV1CalculatePost(cartId, checkoutGuestTotalsInformationManagementV1CalculatePostBody, options) { return exports.CheckoutGuestTotalsInformationManagementV1ApiFp(configuration).checkoutGuestTotalsInformationManagementV1CalculatePost(cartId, checkoutGuestTotalsInformationManagementV1CalculatePostBody, options)(fetch, basePath); }, }; }; exports.CheckoutGuestTotalsInformationManagementV1ApiFactory = CheckoutGuestTotalsInformationManagementV1ApiFactory; /** * CheckoutGuestTotalsInformationManagementV1Api - object-oriented interface * @export * @class CheckoutGuestTotalsInformationManagementV1Api * @extends {BaseAPI} */ class CheckoutGuestTotalsInformationManagementV1Api extends BaseAPI { /** * Calculate quote totals based on address and shipping method. * @param {string} cartId * @param {any} [checkoutGuestTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutGuestTotalsInformationManagementV1Api */ checkoutGuestTotalsInformationManagementV1CalculatePost(cartId, checkoutGuestTotalsInformationManagementV1CalculatePostBody, options) { return exports.CheckoutGuestTotalsInformationManagementV1ApiFp(this.configuration).checkoutGuestTotalsInformationManagementV1CalculatePost(cartId, checkoutGuestTotalsInformationManagementV1CalculatePostBody, options)(this.fetch, this.basePath); } } exports.CheckoutGuestTotalsInformationManagementV1Api = CheckoutGuestTotalsInformationManagementV1Api; /** * CheckoutPaymentInformationManagementV1Api - fetch parameter creator * @export */ const CheckoutPaymentInformationManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Get payment information * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutPaymentInformationManagementV1GetPaymentInformationGet(options = {}) { const localVarPath = `/V1/carts/mine/payment-information`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Set payment information and place order for a specified cart. * @param {any} [checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options = {}) { const localVarPath = `/V1/carts/mine/payment-information`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody || {}) : (checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Set payment information for a specified cart. * @param {any} [checkoutPaymentInformationManagementV1SavePaymentInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutPaymentInformationManagementV1SavePaymentInformationPost(checkoutPaymentInformationManagementV1SavePaymentInformationPostBody, options = {}) { const localVarPath = `/V1/carts/mine/set-payment-information`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(checkoutPaymentInformationManagementV1SavePaymentInformationPostBody || {}) : (checkoutPaymentInformationManagementV1SavePaymentInformationPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CheckoutPaymentInformationManagementV1ApiFetchParamCreator = CheckoutPaymentInformationManagementV1ApiFetchParamCreator; /** * CheckoutPaymentInformationManagementV1Api - functional programming interface * @export */ const CheckoutPaymentInformationManagementV1ApiFp = function (configuration) { return { /** * Get payment information * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutPaymentInformationManagementV1GetPaymentInformationGet(options) { const localVarFetchArgs = exports.CheckoutPaymentInformationManagementV1ApiFetchParamCreator(configuration).checkoutPaymentInformationManagementV1GetPaymentInformationGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Set payment information and place order for a specified cart. * @param {any} [checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options) { const localVarFetchArgs = exports.CheckoutPaymentInformationManagementV1ApiFetchParamCreator(configuration).checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Set payment information for a specified cart. * @param {any} [checkoutPaymentInformationManagementV1SavePaymentInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutPaymentInformationManagementV1SavePaymentInformationPost(checkoutPaymentInformationManagementV1SavePaymentInformationPostBody, options) { const localVarFetchArgs = exports.CheckoutPaymentInformationManagementV1ApiFetchParamCreator(configuration).checkoutPaymentInformationManagementV1SavePaymentInformationPost(checkoutPaymentInformationManagementV1SavePaymentInformationPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CheckoutPaymentInformationManagementV1ApiFp = CheckoutPaymentInformationManagementV1ApiFp; /** * CheckoutPaymentInformationManagementV1Api - factory interface * @export */ const CheckoutPaymentInformationManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get payment information * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutPaymentInformationManagementV1GetPaymentInformationGet(options) { return exports.CheckoutPaymentInformationManagementV1ApiFp(configuration).checkoutPaymentInformationManagementV1GetPaymentInformationGet(options)(fetch, basePath); }, /** * Set payment information and place order for a specified cart. * @param {any} [checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options) { return exports.CheckoutPaymentInformationManagementV1ApiFp(configuration).checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options)(fetch, basePath); }, /** * Set payment information for a specified cart. * @param {any} [checkoutPaymentInformationManagementV1SavePaymentInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutPaymentInformationManagementV1SavePaymentInformationPost(checkoutPaymentInformationManagementV1SavePaymentInformationPostBody, options) { return exports.CheckoutPaymentInformationManagementV1ApiFp(configuration).checkoutPaymentInformationManagementV1SavePaymentInformationPost(checkoutPaymentInformationManagementV1SavePaymentInformationPostBody, options)(fetch, basePath); }, }; }; exports.CheckoutPaymentInformationManagementV1ApiFactory = CheckoutPaymentInformationManagementV1ApiFactory; /** * CheckoutPaymentInformationManagementV1Api - object-oriented interface * @export * @class CheckoutPaymentInformationManagementV1Api * @extends {BaseAPI} */ class CheckoutPaymentInformationManagementV1Api extends BaseAPI { /** * Get payment information * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutPaymentInformationManagementV1Api */ checkoutPaymentInformationManagementV1GetPaymentInformationGet(options) { return exports.CheckoutPaymentInformationManagementV1ApiFp(this.configuration).checkoutPaymentInformationManagementV1GetPaymentInformationGet(options)(this.fetch, this.basePath); } /** * Set payment information and place order for a specified cart. * @param {any} [checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutPaymentInformationManagementV1Api */ checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options) { return exports.CheckoutPaymentInformationManagementV1ApiFp(this.configuration).checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPost(checkoutPaymentInformationManagementV1SavePaymentInformationAndPlaceOrderPostBody, options)(this.fetch, this.basePath); } /** * Set payment information for a specified cart. * @param {any} [checkoutPaymentInformationManagementV1SavePaymentInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutPaymentInformationManagementV1Api */ checkoutPaymentInformationManagementV1SavePaymentInformationPost(checkoutPaymentInformationManagementV1SavePaymentInformationPostBody, options) { return exports.CheckoutPaymentInformationManagementV1ApiFp(this.configuration).checkoutPaymentInformationManagementV1SavePaymentInformationPost(checkoutPaymentInformationManagementV1SavePaymentInformationPostBody, options)(this.fetch, this.basePath); } } exports.CheckoutPaymentInformationManagementV1Api = CheckoutPaymentInformationManagementV1Api; /** * CheckoutShippingInformationManagementV1Api - fetch parameter creator * @export */ const CheckoutShippingInformationManagementV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {any} [checkoutShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutShippingInformationManagementV1SaveAddressInformationPost(checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options = {}) { const localVarPath = `/V1/carts/mine/shipping-information`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(checkoutShippingInformationManagementV1SaveAddressInformationPostBody || {}) : (checkoutShippingInformationManagementV1SaveAddressInformationPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {number} cartId * @param {any} [checkoutShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutShippingInformationManagementV1SaveAddressInformationPost_1(cartId, checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling checkoutShippingInformationManagementV1SaveAddressInformationPost_1.'); } const localVarPath = `/V1/carts/{cartId}/shipping-information` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(checkoutShippingInformationManagementV1SaveAddressInformationPostBody || {}) : (checkoutShippingInformationManagementV1SaveAddressInformationPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CheckoutShippingInformationManagementV1ApiFetchParamCreator = CheckoutShippingInformationManagementV1ApiFetchParamCreator; /** * CheckoutShippingInformationManagementV1Api - functional programming interface * @export */ const CheckoutShippingInformationManagementV1ApiFp = function (configuration) { return { /** * * @param {any} [checkoutShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutShippingInformationManagementV1SaveAddressInformationPost(checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options) { const localVarFetchArgs = exports.CheckoutShippingInformationManagementV1ApiFetchParamCreator(configuration).checkoutShippingInformationManagementV1SaveAddressInformationPost(checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * * @param {number} cartId * @param {any} [checkoutShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutShippingInformationManagementV1SaveAddressInformationPost_1(cartId, checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options) { const localVarFetchArgs = exports.CheckoutShippingInformationManagementV1ApiFetchParamCreator(configuration).checkoutShippingInformationManagementV1SaveAddressInformationPost_1(cartId, checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CheckoutShippingInformationManagementV1ApiFp = CheckoutShippingInformationManagementV1ApiFp; /** * CheckoutShippingInformationManagementV1Api - factory interface * @export */ const CheckoutShippingInformationManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {any} [checkoutShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutShippingInformationManagementV1SaveAddressInformationPost(checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options) { return exports.CheckoutShippingInformationManagementV1ApiFp(configuration).checkoutShippingInformationManagementV1SaveAddressInformationPost(checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options)(fetch, basePath); }, /** * * @param {number} cartId * @param {any} [checkoutShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutShippingInformationManagementV1SaveAddressInformationPost_1(cartId, checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options) { return exports.CheckoutShippingInformationManagementV1ApiFp(configuration).checkoutShippingInformationManagementV1SaveAddressInformationPost_1(cartId, checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options)(fetch, basePath); }, }; }; exports.CheckoutShippingInformationManagementV1ApiFactory = CheckoutShippingInformationManagementV1ApiFactory; /** * CheckoutShippingInformationManagementV1Api - object-oriented interface * @export * @class CheckoutShippingInformationManagementV1Api * @extends {BaseAPI} */ class CheckoutShippingInformationManagementV1Api extends BaseAPI { /** * * @param {any} [checkoutShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutShippingInformationManagementV1Api */ checkoutShippingInformationManagementV1SaveAddressInformationPost(checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options) { return exports.CheckoutShippingInformationManagementV1ApiFp(this.configuration).checkoutShippingInformationManagementV1SaveAddressInformationPost(checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options)(this.fetch, this.basePath); } /** * * @param {number} cartId * @param {any} [checkoutShippingInformationManagementV1SaveAddressInformationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutShippingInformationManagementV1Api */ checkoutShippingInformationManagementV1SaveAddressInformationPost_1(cartId, checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options) { return exports.CheckoutShippingInformationManagementV1ApiFp(this.configuration).checkoutShippingInformationManagementV1SaveAddressInformationPost_1(cartId, checkoutShippingInformationManagementV1SaveAddressInformationPostBody, options)(this.fetch, this.basePath); } } exports.CheckoutShippingInformationManagementV1Api = CheckoutShippingInformationManagementV1Api; /** * CheckoutTotalsInformationManagementV1Api - fetch parameter creator * @export */ const CheckoutTotalsInformationManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Calculate quote totals based on address and shipping method. * @param {number} cartId * @param {any} [checkoutTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutTotalsInformationManagementV1CalculatePost(cartId, checkoutTotalsInformationManagementV1CalculatePostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling checkoutTotalsInformationManagementV1CalculatePost.'); } const localVarPath = `/V1/carts/{cartId}/totals-information` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(checkoutTotalsInformationManagementV1CalculatePostBody || {}) : (checkoutTotalsInformationManagementV1CalculatePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Calculate quote totals based on address and shipping method. * @param {any} [checkoutTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutTotalsInformationManagementV1CalculatePost_1(checkoutTotalsInformationManagementV1CalculatePostBody, options = {}) { const localVarPath = `/V1/carts/mine/totals-information`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(checkoutTotalsInformationManagementV1CalculatePostBody || {}) : (checkoutTotalsInformationManagementV1CalculatePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CheckoutTotalsInformationManagementV1ApiFetchParamCreator = CheckoutTotalsInformationManagementV1ApiFetchParamCreator; /** * CheckoutTotalsInformationManagementV1Api - functional programming interface * @export */ const CheckoutTotalsInformationManagementV1ApiFp = function (configuration) { return { /** * Calculate quote totals based on address and shipping method. * @param {number} cartId * @param {any} [checkoutTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutTotalsInformationManagementV1CalculatePost(cartId, checkoutTotalsInformationManagementV1CalculatePostBody, options) { const localVarFetchArgs = exports.CheckoutTotalsInformationManagementV1ApiFetchParamCreator(configuration).checkoutTotalsInformationManagementV1CalculatePost(cartId, checkoutTotalsInformationManagementV1CalculatePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Calculate quote totals based on address and shipping method. * @param {any} [checkoutTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutTotalsInformationManagementV1CalculatePost_1(checkoutTotalsInformationManagementV1CalculatePostBody, options) { const localVarFetchArgs = exports.CheckoutTotalsInformationManagementV1ApiFetchParamCreator(configuration).checkoutTotalsInformationManagementV1CalculatePost_1(checkoutTotalsInformationManagementV1CalculatePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CheckoutTotalsInformationManagementV1ApiFp = CheckoutTotalsInformationManagementV1ApiFp; /** * CheckoutTotalsInformationManagementV1Api - factory interface * @export */ const CheckoutTotalsInformationManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Calculate quote totals based on address and shipping method. * @param {number} cartId * @param {any} [checkoutTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutTotalsInformationManagementV1CalculatePost(cartId, checkoutTotalsInformationManagementV1CalculatePostBody, options) { return exports.CheckoutTotalsInformationManagementV1ApiFp(configuration).checkoutTotalsInformationManagementV1CalculatePost(cartId, checkoutTotalsInformationManagementV1CalculatePostBody, options)(fetch, basePath); }, /** * Calculate quote totals based on address and shipping method. * @param {any} [checkoutTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkoutTotalsInformationManagementV1CalculatePost_1(checkoutTotalsInformationManagementV1CalculatePostBody, options) { return exports.CheckoutTotalsInformationManagementV1ApiFp(configuration).checkoutTotalsInformationManagementV1CalculatePost_1(checkoutTotalsInformationManagementV1CalculatePostBody, options)(fetch, basePath); }, }; }; exports.CheckoutTotalsInformationManagementV1ApiFactory = CheckoutTotalsInformationManagementV1ApiFactory; /** * CheckoutTotalsInformationManagementV1Api - object-oriented interface * @export * @class CheckoutTotalsInformationManagementV1Api * @extends {BaseAPI} */ class CheckoutTotalsInformationManagementV1Api extends BaseAPI { /** * Calculate quote totals based on address and shipping method. * @param {number} cartId * @param {any} [checkoutTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutTotalsInformationManagementV1Api */ checkoutTotalsInformationManagementV1CalculatePost(cartId, checkoutTotalsInformationManagementV1CalculatePostBody, options) { return exports.CheckoutTotalsInformationManagementV1ApiFp(this.configuration).checkoutTotalsInformationManagementV1CalculatePost(cartId, checkoutTotalsInformationManagementV1CalculatePostBody, options)(this.fetch, this.basePath); } /** * Calculate quote totals based on address and shipping method. * @param {any} [checkoutTotalsInformationManagementV1CalculatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CheckoutTotalsInformationManagementV1Api */ checkoutTotalsInformationManagementV1CalculatePost_1(checkoutTotalsInformationManagementV1CalculatePostBody, options) { return exports.CheckoutTotalsInformationManagementV1ApiFp(this.configuration).checkoutTotalsInformationManagementV1CalculatePost_1(checkoutTotalsInformationManagementV1CalculatePostBody, options)(this.fetch, this.basePath); } } exports.CheckoutTotalsInformationManagementV1Api = CheckoutTotalsInformationManagementV1Api; /** * CmsBlockRepositoryV1Api - fetch parameter creator * @export */ const CmsBlockRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete block by ID. * @param {string} blockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1DeleteByIdDelete(blockId, options = {}) { // verify required parameter 'blockId' is not null or undefined if (blockId === null || blockId === undefined) { throw new RequiredError('blockId', 'Required parameter blockId was null or undefined when calling cmsBlockRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/cmsBlock/{blockId}` .replace(`{${"blockId"}}`, encodeURIComponent(String(blockId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve block. * @param {string} blockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1GetByIdGet(blockId, options = {}) { // verify required parameter 'blockId' is not null or undefined if (blockId === null || blockId === undefined) { throw new RequiredError('blockId', 'Required parameter blockId was null or undefined when calling cmsBlockRepositoryV1GetByIdGet.'); } const localVarPath = `/V1/cmsBlock/{blockId}` .replace(`{${"blockId"}}`, encodeURIComponent(String(blockId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve blocks matching the specified criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/cmsBlock/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save block. * @param {any} [cmsBlockRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1SavePost(cmsBlockRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/cmsBlock`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(cmsBlockRepositoryV1SavePostBody || {}) : (cmsBlockRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save block. * @param {string} id * @param {any} [cmsBlockRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1SavePut(id, cmsBlockRepositoryV1SavePutBody, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling cmsBlockRepositoryV1SavePut.'); } const localVarPath = `/V1/cmsBlock/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(cmsBlockRepositoryV1SavePutBody || {}) : (cmsBlockRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CmsBlockRepositoryV1ApiFetchParamCreator = CmsBlockRepositoryV1ApiFetchParamCreator; /** * CmsBlockRepositoryV1Api - functional programming interface * @export */ const CmsBlockRepositoryV1ApiFp = function (configuration) { return { /** * Delete block by ID. * @param {string} blockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1DeleteByIdDelete(blockId, options) { const localVarFetchArgs = exports.CmsBlockRepositoryV1ApiFetchParamCreator(configuration).cmsBlockRepositoryV1DeleteByIdDelete(blockId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve block. * @param {string} blockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1GetByIdGet(blockId, options) { const localVarFetchArgs = exports.CmsBlockRepositoryV1ApiFetchParamCreator(configuration).cmsBlockRepositoryV1GetByIdGet(blockId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve blocks matching the specified criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CmsBlockRepositoryV1ApiFetchParamCreator(configuration).cmsBlockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save block. * @param {any} [cmsBlockRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1SavePost(cmsBlockRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.CmsBlockRepositoryV1ApiFetchParamCreator(configuration).cmsBlockRepositoryV1SavePost(cmsBlockRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save block. * @param {string} id * @param {any} [cmsBlockRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1SavePut(id, cmsBlockRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CmsBlockRepositoryV1ApiFetchParamCreator(configuration).cmsBlockRepositoryV1SavePut(id, cmsBlockRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CmsBlockRepositoryV1ApiFp = CmsBlockRepositoryV1ApiFp; /** * CmsBlockRepositoryV1Api - factory interface * @export */ const CmsBlockRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete block by ID. * @param {string} blockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1DeleteByIdDelete(blockId, options) { return exports.CmsBlockRepositoryV1ApiFp(configuration).cmsBlockRepositoryV1DeleteByIdDelete(blockId, options)(fetch, basePath); }, /** * Retrieve block. * @param {string} blockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1GetByIdGet(blockId, options) { return exports.CmsBlockRepositoryV1ApiFp(configuration).cmsBlockRepositoryV1GetByIdGet(blockId, options)(fetch, basePath); }, /** * Retrieve blocks matching the specified criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CmsBlockRepositoryV1ApiFp(configuration).cmsBlockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save block. * @param {any} [cmsBlockRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1SavePost(cmsBlockRepositoryV1SavePostBody, options) { return exports.CmsBlockRepositoryV1ApiFp(configuration).cmsBlockRepositoryV1SavePost(cmsBlockRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save block. * @param {string} id * @param {any} [cmsBlockRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsBlockRepositoryV1SavePut(id, cmsBlockRepositoryV1SavePutBody, options) { return exports.CmsBlockRepositoryV1ApiFp(configuration).cmsBlockRepositoryV1SavePut(id, cmsBlockRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CmsBlockRepositoryV1ApiFactory = CmsBlockRepositoryV1ApiFactory; /** * CmsBlockRepositoryV1Api - object-oriented interface * @export * @class CmsBlockRepositoryV1Api * @extends {BaseAPI} */ class CmsBlockRepositoryV1Api extends BaseAPI { /** * Delete block by ID. * @param {string} blockId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CmsBlockRepositoryV1Api */ cmsBlockRepositoryV1DeleteByIdDelete(blockId, options) { return exports.CmsBlockRepositoryV1ApiFp(this.configuration).cmsBlockRepositoryV1DeleteByIdDelete(blockId, options)(this.fetch, this.basePath); } /** * Retrieve block. * @param {string} blockId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CmsBlockRepositoryV1Api */ cmsBlockRepositoryV1GetByIdGet(blockId, options) { return exports.CmsBlockRepositoryV1ApiFp(this.configuration).cmsBlockRepositoryV1GetByIdGet(blockId, options)(this.fetch, this.basePath); } /** * Retrieve blocks matching the specified criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CmsBlockRepositoryV1Api */ cmsBlockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CmsBlockRepositoryV1ApiFp(this.configuration).cmsBlockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save block. * @param {any} [cmsBlockRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CmsBlockRepositoryV1Api */ cmsBlockRepositoryV1SavePost(cmsBlockRepositoryV1SavePostBody, options) { return exports.CmsBlockRepositoryV1ApiFp(this.configuration).cmsBlockRepositoryV1SavePost(cmsBlockRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save block. * @param {string} id * @param {any} [cmsBlockRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CmsBlockRepositoryV1Api */ cmsBlockRepositoryV1SavePut(id, cmsBlockRepositoryV1SavePutBody, options) { return exports.CmsBlockRepositoryV1ApiFp(this.configuration).cmsBlockRepositoryV1SavePut(id, cmsBlockRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CmsBlockRepositoryV1Api = CmsBlockRepositoryV1Api; /** * CmsPageRepositoryV1Api - fetch parameter creator * @export */ const CmsPageRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete page by ID. * @param {number} pageId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1DeleteByIdDelete(pageId, options = {}) { // verify required parameter 'pageId' is not null or undefined if (pageId === null || pageId === undefined) { throw new RequiredError('pageId', 'Required parameter pageId was null or undefined when calling cmsPageRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/cmsPage/{pageId}` .replace(`{${"pageId"}}`, encodeURIComponent(String(pageId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve page. * @param {number} pageId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1GetByIdGet(pageId, options = {}) { // verify required parameter 'pageId' is not null or undefined if (pageId === null || pageId === undefined) { throw new RequiredError('pageId', 'Required parameter pageId was null or undefined when calling cmsPageRepositoryV1GetByIdGet.'); } const localVarPath = `/V1/cmsPage/{pageId}` .replace(`{${"pageId"}}`, encodeURIComponent(String(pageId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve pages matching the specified criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/cmsPage/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save page. * @param {any} [cmsPageRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1SavePost(cmsPageRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/cmsPage`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(cmsPageRepositoryV1SavePostBody || {}) : (cmsPageRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save page. * @param {string} id * @param {any} [cmsPageRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1SavePut(id, cmsPageRepositoryV1SavePutBody, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling cmsPageRepositoryV1SavePut.'); } const localVarPath = `/V1/cmsPage/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(cmsPageRepositoryV1SavePutBody || {}) : (cmsPageRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CmsPageRepositoryV1ApiFetchParamCreator = CmsPageRepositoryV1ApiFetchParamCreator; /** * CmsPageRepositoryV1Api - functional programming interface * @export */ const CmsPageRepositoryV1ApiFp = function (configuration) { return { /** * Delete page by ID. * @param {number} pageId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1DeleteByIdDelete(pageId, options) { const localVarFetchArgs = exports.CmsPageRepositoryV1ApiFetchParamCreator(configuration).cmsPageRepositoryV1DeleteByIdDelete(pageId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve page. * @param {number} pageId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1GetByIdGet(pageId, options) { const localVarFetchArgs = exports.CmsPageRepositoryV1ApiFetchParamCreator(configuration).cmsPageRepositoryV1GetByIdGet(pageId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve pages matching the specified criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CmsPageRepositoryV1ApiFetchParamCreator(configuration).cmsPageRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save page. * @param {any} [cmsPageRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1SavePost(cmsPageRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.CmsPageRepositoryV1ApiFetchParamCreator(configuration).cmsPageRepositoryV1SavePost(cmsPageRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save page. * @param {string} id * @param {any} [cmsPageRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1SavePut(id, cmsPageRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CmsPageRepositoryV1ApiFetchParamCreator(configuration).cmsPageRepositoryV1SavePut(id, cmsPageRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CmsPageRepositoryV1ApiFp = CmsPageRepositoryV1ApiFp; /** * CmsPageRepositoryV1Api - factory interface * @export */ const CmsPageRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete page by ID. * @param {number} pageId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1DeleteByIdDelete(pageId, options) { return exports.CmsPageRepositoryV1ApiFp(configuration).cmsPageRepositoryV1DeleteByIdDelete(pageId, options)(fetch, basePath); }, /** * Retrieve page. * @param {number} pageId * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1GetByIdGet(pageId, options) { return exports.CmsPageRepositoryV1ApiFp(configuration).cmsPageRepositoryV1GetByIdGet(pageId, options)(fetch, basePath); }, /** * Retrieve pages matching the specified criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CmsPageRepositoryV1ApiFp(configuration).cmsPageRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save page. * @param {any} [cmsPageRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1SavePost(cmsPageRepositoryV1SavePostBody, options) { return exports.CmsPageRepositoryV1ApiFp(configuration).cmsPageRepositoryV1SavePost(cmsPageRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save page. * @param {string} id * @param {any} [cmsPageRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ cmsPageRepositoryV1SavePut(id, cmsPageRepositoryV1SavePutBody, options) { return exports.CmsPageRepositoryV1ApiFp(configuration).cmsPageRepositoryV1SavePut(id, cmsPageRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CmsPageRepositoryV1ApiFactory = CmsPageRepositoryV1ApiFactory; /** * CmsPageRepositoryV1Api - object-oriented interface * @export * @class CmsPageRepositoryV1Api * @extends {BaseAPI} */ class CmsPageRepositoryV1Api extends BaseAPI { /** * Delete page by ID. * @param {number} pageId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CmsPageRepositoryV1Api */ cmsPageRepositoryV1DeleteByIdDelete(pageId, options) { return exports.CmsPageRepositoryV1ApiFp(this.configuration).cmsPageRepositoryV1DeleteByIdDelete(pageId, options)(this.fetch, this.basePath); } /** * Retrieve page. * @param {number} pageId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CmsPageRepositoryV1Api */ cmsPageRepositoryV1GetByIdGet(pageId, options) { return exports.CmsPageRepositoryV1ApiFp(this.configuration).cmsPageRepositoryV1GetByIdGet(pageId, options)(this.fetch, this.basePath); } /** * Retrieve pages matching the specified criteria. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CmsPageRepositoryV1Api */ cmsPageRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CmsPageRepositoryV1ApiFp(this.configuration).cmsPageRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save page. * @param {any} [cmsPageRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CmsPageRepositoryV1Api */ cmsPageRepositoryV1SavePost(cmsPageRepositoryV1SavePostBody, options) { return exports.CmsPageRepositoryV1ApiFp(this.configuration).cmsPageRepositoryV1SavePost(cmsPageRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save page. * @param {string} id * @param {any} [cmsPageRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CmsPageRepositoryV1Api */ cmsPageRepositoryV1SavePut(id, cmsPageRepositoryV1SavePutBody, options) { return exports.CmsPageRepositoryV1ApiFp(this.configuration).cmsPageRepositoryV1SavePut(id, cmsPageRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CmsPageRepositoryV1Api = CmsPageRepositoryV1Api; /** * ConfigurableProductConfigurableProductManagementV1Api - fetch parameter creator * @export */ const ConfigurableProductConfigurableProductManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Generate variation based on same product * @param {any} [configurableProductConfigurableProductManagementV1GenerateVariationPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductConfigurableProductManagementV1GenerateVariationPut(configurableProductConfigurableProductManagementV1GenerateVariationPutBody, options = {}) { const localVarPath = `/V1/configurable-products/variation`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(configurableProductConfigurableProductManagementV1GenerateVariationPutBody || {}) : (configurableProductConfigurableProductManagementV1GenerateVariationPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.ConfigurableProductConfigurableProductManagementV1ApiFetchParamCreator = ConfigurableProductConfigurableProductManagementV1ApiFetchParamCreator; /** * ConfigurableProductConfigurableProductManagementV1Api - functional programming interface * @export */ const ConfigurableProductConfigurableProductManagementV1ApiFp = function (configuration) { return { /** * Generate variation based on same product * @param {any} [configurableProductConfigurableProductManagementV1GenerateVariationPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductConfigurableProductManagementV1GenerateVariationPut(configurableProductConfigurableProductManagementV1GenerateVariationPutBody, options) { const localVarFetchArgs = exports.ConfigurableProductConfigurableProductManagementV1ApiFetchParamCreator(configuration).configurableProductConfigurableProductManagementV1GenerateVariationPut(configurableProductConfigurableProductManagementV1GenerateVariationPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.ConfigurableProductConfigurableProductManagementV1ApiFp = ConfigurableProductConfigurableProductManagementV1ApiFp; /** * ConfigurableProductConfigurableProductManagementV1Api - factory interface * @export */ const ConfigurableProductConfigurableProductManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Generate variation based on same product * @param {any} [configurableProductConfigurableProductManagementV1GenerateVariationPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductConfigurableProductManagementV1GenerateVariationPut(configurableProductConfigurableProductManagementV1GenerateVariationPutBody, options) { return exports.ConfigurableProductConfigurableProductManagementV1ApiFp(configuration).configurableProductConfigurableProductManagementV1GenerateVariationPut(configurableProductConfigurableProductManagementV1GenerateVariationPutBody, options)(fetch, basePath); }, }; }; exports.ConfigurableProductConfigurableProductManagementV1ApiFactory = ConfigurableProductConfigurableProductManagementV1ApiFactory; /** * ConfigurableProductConfigurableProductManagementV1Api - object-oriented interface * @export * @class ConfigurableProductConfigurableProductManagementV1Api * @extends {BaseAPI} */ class ConfigurableProductConfigurableProductManagementV1Api extends BaseAPI { /** * Generate variation based on same product * @param {any} [configurableProductConfigurableProductManagementV1GenerateVariationPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurableProductConfigurableProductManagementV1Api */ configurableProductConfigurableProductManagementV1GenerateVariationPut(configurableProductConfigurableProductManagementV1GenerateVariationPutBody, options) { return exports.ConfigurableProductConfigurableProductManagementV1ApiFp(this.configuration).configurableProductConfigurableProductManagementV1GenerateVariationPut(configurableProductConfigurableProductManagementV1GenerateVariationPutBody, options)(this.fetch, this.basePath); } } exports.ConfigurableProductConfigurableProductManagementV1Api = ConfigurableProductConfigurableProductManagementV1Api; /** * ConfigurableProductLinkManagementV1Api - fetch parameter creator * @export */ const ConfigurableProductLinkManagementV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {string} sku * @param {any} [configurableProductLinkManagementV1AddChildPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductLinkManagementV1AddChildPost(sku, configurableProductLinkManagementV1AddChildPostBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling configurableProductLinkManagementV1AddChildPost.'); } const localVarPath = `/V1/configurable-products/{sku}/child` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(configurableProductLinkManagementV1AddChildPostBody || {}) : (configurableProductLinkManagementV1AddChildPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get all children for Configurable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductLinkManagementV1GetChildrenGet(sku, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling configurableProductLinkManagementV1GetChildrenGet.'); } const localVarPath = `/V1/configurable-products/{sku}/children` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Remove configurable product option * @param {string} sku * @param {string} childSku * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductLinkManagementV1RemoveChildDelete(sku, childSku, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling configurableProductLinkManagementV1RemoveChildDelete.'); } // verify required parameter 'childSku' is not null or undefined if (childSku === null || childSku === undefined) { throw new RequiredError('childSku', 'Required parameter childSku was null or undefined when calling configurableProductLinkManagementV1RemoveChildDelete.'); } const localVarPath = `/V1/configurable-products/{sku}/children/{childSku}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"childSku"}}`, encodeURIComponent(String(childSku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.ConfigurableProductLinkManagementV1ApiFetchParamCreator = ConfigurableProductLinkManagementV1ApiFetchParamCreator; /** * ConfigurableProductLinkManagementV1Api - functional programming interface * @export */ const ConfigurableProductLinkManagementV1ApiFp = function (configuration) { return { /** * * @param {string} sku * @param {any} [configurableProductLinkManagementV1AddChildPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductLinkManagementV1AddChildPost(sku, configurableProductLinkManagementV1AddChildPostBody, options) { const localVarFetchArgs = exports.ConfigurableProductLinkManagementV1ApiFetchParamCreator(configuration).configurableProductLinkManagementV1AddChildPost(sku, configurableProductLinkManagementV1AddChildPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get all children for Configurable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductLinkManagementV1GetChildrenGet(sku, options) { const localVarFetchArgs = exports.ConfigurableProductLinkManagementV1ApiFetchParamCreator(configuration).configurableProductLinkManagementV1GetChildrenGet(sku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Remove configurable product option * @param {string} sku * @param {string} childSku * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductLinkManagementV1RemoveChildDelete(sku, childSku, options) { const localVarFetchArgs = exports.ConfigurableProductLinkManagementV1ApiFetchParamCreator(configuration).configurableProductLinkManagementV1RemoveChildDelete(sku, childSku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.ConfigurableProductLinkManagementV1ApiFp = ConfigurableProductLinkManagementV1ApiFp; /** * ConfigurableProductLinkManagementV1Api - factory interface * @export */ const ConfigurableProductLinkManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {string} sku * @param {any} [configurableProductLinkManagementV1AddChildPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductLinkManagementV1AddChildPost(sku, configurableProductLinkManagementV1AddChildPostBody, options) { return exports.ConfigurableProductLinkManagementV1ApiFp(configuration).configurableProductLinkManagementV1AddChildPost(sku, configurableProductLinkManagementV1AddChildPostBody, options)(fetch, basePath); }, /** * Get all children for Configurable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductLinkManagementV1GetChildrenGet(sku, options) { return exports.ConfigurableProductLinkManagementV1ApiFp(configuration).configurableProductLinkManagementV1GetChildrenGet(sku, options)(fetch, basePath); }, /** * Remove configurable product option * @param {string} sku * @param {string} childSku * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductLinkManagementV1RemoveChildDelete(sku, childSku, options) { return exports.ConfigurableProductLinkManagementV1ApiFp(configuration).configurableProductLinkManagementV1RemoveChildDelete(sku, childSku, options)(fetch, basePath); }, }; }; exports.ConfigurableProductLinkManagementV1ApiFactory = ConfigurableProductLinkManagementV1ApiFactory; /** * ConfigurableProductLinkManagementV1Api - object-oriented interface * @export * @class ConfigurableProductLinkManagementV1Api * @extends {BaseAPI} */ class ConfigurableProductLinkManagementV1Api extends BaseAPI { /** * * @param {string} sku * @param {any} [configurableProductLinkManagementV1AddChildPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurableProductLinkManagementV1Api */ configurableProductLinkManagementV1AddChildPost(sku, configurableProductLinkManagementV1AddChildPostBody, options) { return exports.ConfigurableProductLinkManagementV1ApiFp(this.configuration).configurableProductLinkManagementV1AddChildPost(sku, configurableProductLinkManagementV1AddChildPostBody, options)(this.fetch, this.basePath); } /** * Get all children for Configurable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurableProductLinkManagementV1Api */ configurableProductLinkManagementV1GetChildrenGet(sku, options) { return exports.ConfigurableProductLinkManagementV1ApiFp(this.configuration).configurableProductLinkManagementV1GetChildrenGet(sku, options)(this.fetch, this.basePath); } /** * Remove configurable product option * @param {string} sku * @param {string} childSku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurableProductLinkManagementV1Api */ configurableProductLinkManagementV1RemoveChildDelete(sku, childSku, options) { return exports.ConfigurableProductLinkManagementV1ApiFp(this.configuration).configurableProductLinkManagementV1RemoveChildDelete(sku, childSku, options)(this.fetch, this.basePath); } } exports.ConfigurableProductLinkManagementV1Api = ConfigurableProductLinkManagementV1Api; /** * ConfigurableProductOptionRepositoryV1Api - fetch parameter creator * @export */ const ConfigurableProductOptionRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Remove option from configurable product * @param {string} sku * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1DeleteByIdDelete(sku, id, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling configurableProductOptionRepositoryV1DeleteByIdDelete.'); } // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling configurableProductOptionRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/configurable-products/{sku}/options/{id}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get option for configurable product * @param {string} sku * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1GetGet(sku, id, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling configurableProductOptionRepositoryV1GetGet.'); } // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling configurableProductOptionRepositoryV1GetGet.'); } const localVarPath = `/V1/configurable-products/{sku}/options/{id}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get all options for configurable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1GetListGet(sku, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling configurableProductOptionRepositoryV1GetListGet.'); } const localVarPath = `/V1/configurable-products/{sku}/options/all` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save option * @param {string} sku * @param {any} [configurableProductOptionRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1SavePost(sku, configurableProductOptionRepositoryV1SavePostBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling configurableProductOptionRepositoryV1SavePost.'); } const localVarPath = `/V1/configurable-products/{sku}/options` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(configurableProductOptionRepositoryV1SavePostBody || {}) : (configurableProductOptionRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save option * @param {string} sku * @param {string} id * @param {any} [configurableProductOptionRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1SavePut(sku, id, configurableProductOptionRepositoryV1SavePutBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling configurableProductOptionRepositoryV1SavePut.'); } // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling configurableProductOptionRepositoryV1SavePut.'); } const localVarPath = `/V1/configurable-products/{sku}/options/{id}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(configurableProductOptionRepositoryV1SavePutBody || {}) : (configurableProductOptionRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.ConfigurableProductOptionRepositoryV1ApiFetchParamCreator = ConfigurableProductOptionRepositoryV1ApiFetchParamCreator; /** * ConfigurableProductOptionRepositoryV1Api - functional programming interface * @export */ const ConfigurableProductOptionRepositoryV1ApiFp = function (configuration) { return { /** * Remove option from configurable product * @param {string} sku * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1DeleteByIdDelete(sku, id, options) { const localVarFetchArgs = exports.ConfigurableProductOptionRepositoryV1ApiFetchParamCreator(configuration).configurableProductOptionRepositoryV1DeleteByIdDelete(sku, id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get option for configurable product * @param {string} sku * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1GetGet(sku, id, options) { const localVarFetchArgs = exports.ConfigurableProductOptionRepositoryV1ApiFetchParamCreator(configuration).configurableProductOptionRepositoryV1GetGet(sku, id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get all options for configurable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1GetListGet(sku, options) { const localVarFetchArgs = exports.ConfigurableProductOptionRepositoryV1ApiFetchParamCreator(configuration).configurableProductOptionRepositoryV1GetListGet(sku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save option * @param {string} sku * @param {any} [configurableProductOptionRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1SavePost(sku, configurableProductOptionRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.ConfigurableProductOptionRepositoryV1ApiFetchParamCreator(configuration).configurableProductOptionRepositoryV1SavePost(sku, configurableProductOptionRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save option * @param {string} sku * @param {string} id * @param {any} [configurableProductOptionRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1SavePut(sku, id, configurableProductOptionRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.ConfigurableProductOptionRepositoryV1ApiFetchParamCreator(configuration).configurableProductOptionRepositoryV1SavePut(sku, id, configurableProductOptionRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.ConfigurableProductOptionRepositoryV1ApiFp = ConfigurableProductOptionRepositoryV1ApiFp; /** * ConfigurableProductOptionRepositoryV1Api - factory interface * @export */ const ConfigurableProductOptionRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Remove option from configurable product * @param {string} sku * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1DeleteByIdDelete(sku, id, options) { return exports.ConfigurableProductOptionRepositoryV1ApiFp(configuration).configurableProductOptionRepositoryV1DeleteByIdDelete(sku, id, options)(fetch, basePath); }, /** * Get option for configurable product * @param {string} sku * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1GetGet(sku, id, options) { return exports.ConfigurableProductOptionRepositoryV1ApiFp(configuration).configurableProductOptionRepositoryV1GetGet(sku, id, options)(fetch, basePath); }, /** * Get all options for configurable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1GetListGet(sku, options) { return exports.ConfigurableProductOptionRepositoryV1ApiFp(configuration).configurableProductOptionRepositoryV1GetListGet(sku, options)(fetch, basePath); }, /** * Save option * @param {string} sku * @param {any} [configurableProductOptionRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1SavePost(sku, configurableProductOptionRepositoryV1SavePostBody, options) { return exports.ConfigurableProductOptionRepositoryV1ApiFp(configuration).configurableProductOptionRepositoryV1SavePost(sku, configurableProductOptionRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save option * @param {string} sku * @param {string} id * @param {any} [configurableProductOptionRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ configurableProductOptionRepositoryV1SavePut(sku, id, configurableProductOptionRepositoryV1SavePutBody, options) { return exports.ConfigurableProductOptionRepositoryV1ApiFp(configuration).configurableProductOptionRepositoryV1SavePut(sku, id, configurableProductOptionRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.ConfigurableProductOptionRepositoryV1ApiFactory = ConfigurableProductOptionRepositoryV1ApiFactory; /** * ConfigurableProductOptionRepositoryV1Api - object-oriented interface * @export * @class ConfigurableProductOptionRepositoryV1Api * @extends {BaseAPI} */ class ConfigurableProductOptionRepositoryV1Api extends BaseAPI { /** * Remove option from configurable product * @param {string} sku * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurableProductOptionRepositoryV1Api */ configurableProductOptionRepositoryV1DeleteByIdDelete(sku, id, options) { return exports.ConfigurableProductOptionRepositoryV1ApiFp(this.configuration).configurableProductOptionRepositoryV1DeleteByIdDelete(sku, id, options)(this.fetch, this.basePath); } /** * Get option for configurable product * @param {string} sku * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurableProductOptionRepositoryV1Api */ configurableProductOptionRepositoryV1GetGet(sku, id, options) { return exports.ConfigurableProductOptionRepositoryV1ApiFp(this.configuration).configurableProductOptionRepositoryV1GetGet(sku, id, options)(this.fetch, this.basePath); } /** * Get all options for configurable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurableProductOptionRepositoryV1Api */ configurableProductOptionRepositoryV1GetListGet(sku, options) { return exports.ConfigurableProductOptionRepositoryV1ApiFp(this.configuration).configurableProductOptionRepositoryV1GetListGet(sku, options)(this.fetch, this.basePath); } /** * Save option * @param {string} sku * @param {any} [configurableProductOptionRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurableProductOptionRepositoryV1Api */ configurableProductOptionRepositoryV1SavePost(sku, configurableProductOptionRepositoryV1SavePostBody, options) { return exports.ConfigurableProductOptionRepositoryV1ApiFp(this.configuration).configurableProductOptionRepositoryV1SavePost(sku, configurableProductOptionRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save option * @param {string} sku * @param {string} id * @param {any} [configurableProductOptionRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConfigurableProductOptionRepositoryV1Api */ configurableProductOptionRepositoryV1SavePut(sku, id, configurableProductOptionRepositoryV1SavePutBody, options) { return exports.ConfigurableProductOptionRepositoryV1ApiFp(this.configuration).configurableProductOptionRepositoryV1SavePut(sku, id, configurableProductOptionRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.ConfigurableProductOptionRepositoryV1Api = ConfigurableProductOptionRepositoryV1Api; /** * CustomerAccountManagementV1Api - fetch parameter creator * @export */ const CustomerAccountManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Activate a customer account using a key that was sent in a confirmation email. * @param {any} [customerAccountManagementV1ActivateByIdPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ActivateByIdPut(customerAccountManagementV1ActivateByIdPutBody, options = {}) { const localVarPath = `/V1/customers/me/activate`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerAccountManagementV1ActivateByIdPutBody || {}) : (customerAccountManagementV1ActivateByIdPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Activate a customer account using a key that was sent in a confirmation email. * @param {string} email * @param {any} [customerAccountManagementV1ActivatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ActivatePut(email, customerAccountManagementV1ActivatePutBody, options = {}) { // verify required parameter 'email' is not null or undefined if (email === null || email === undefined) { throw new RequiredError('email', 'Required parameter email was null or undefined when calling customerAccountManagementV1ActivatePut.'); } const localVarPath = `/V1/customers/{email}/activate` .replace(`{${"email"}}`, encodeURIComponent(String(email))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerAccountManagementV1ActivatePutBody || {}) : (customerAccountManagementV1ActivatePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Change customer password. * @param {any} [customerAccountManagementV1ChangePasswordByIdPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ChangePasswordByIdPut(customerAccountManagementV1ChangePasswordByIdPutBody, options = {}) { const localVarPath = `/V1/customers/me/password`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerAccountManagementV1ChangePasswordByIdPutBody || {}) : (customerAccountManagementV1ChangePasswordByIdPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create customer account. Perform necessary business operations like sending email. * @param {any} [customerAccountManagementV1CreateAccountPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1CreateAccountPost(customerAccountManagementV1CreateAccountPostBody, options = {}) { const localVarPath = `/V1/customers`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerAccountManagementV1CreateAccountPostBody || {}) : (customerAccountManagementV1CreateAccountPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets the account confirmation status. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetConfirmationStatusGet(customerId, options = {}) { // verify required parameter 'customerId' is not null or undefined if (customerId === null || customerId === undefined) { throw new RequiredError('customerId', 'Required parameter customerId was null or undefined when calling customerAccountManagementV1GetConfirmationStatusGet.'); } const localVarPath = `/V1/customers/{customerId}/confirm` .replace(`{${"customerId"}}`, encodeURIComponent(String(customerId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve default billing address for the given customerId. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultBillingAddressGet(options = {}) { const localVarPath = `/V1/customers/me/billingAddress`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve default billing address for the given customerId. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultBillingAddressGet_1(customerId, options = {}) { // verify required parameter 'customerId' is not null or undefined if (customerId === null || customerId === undefined) { throw new RequiredError('customerId', 'Required parameter customerId was null or undefined when calling customerAccountManagementV1GetDefaultBillingAddressGet_1.'); } const localVarPath = `/V1/customers/{customerId}/billingAddress` .replace(`{${"customerId"}}`, encodeURIComponent(String(customerId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve default shipping address for the given customerId. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultShippingAddressGet(options = {}) { const localVarPath = `/V1/customers/me/shippingAddress`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve default shipping address for the given customerId. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultShippingAddressGet_2(customerId, options = {}) { // verify required parameter 'customerId' is not null or undefined if (customerId === null || customerId === undefined) { throw new RequiredError('customerId', 'Required parameter customerId was null or undefined when calling customerAccountManagementV1GetDefaultShippingAddressGet_2.'); } const localVarPath = `/V1/customers/{customerId}/shippingAddress` .replace(`{${"customerId"}}`, encodeURIComponent(String(customerId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Send an email to the customer with a password reset link. * @param {any} [customerAccountManagementV1InitiatePasswordResetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1InitiatePasswordResetPut(customerAccountManagementV1InitiatePasswordResetPutBody, options = {}) { const localVarPath = `/V1/customers/password`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerAccountManagementV1InitiatePasswordResetPutBody || {}) : (customerAccountManagementV1InitiatePasswordResetPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Check if given email is associated with a customer account in given website. * @param {any} [customerAccountManagementV1IsEmailAvailablePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1IsEmailAvailablePost(customerAccountManagementV1IsEmailAvailablePostBody, options = {}) { const localVarPath = `/V1/customers/isEmailAvailable`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerAccountManagementV1IsEmailAvailablePostBody || {}) : (customerAccountManagementV1IsEmailAvailablePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Check if customer can be deleted. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1IsReadonlyGet(customerId, options = {}) { // verify required parameter 'customerId' is not null or undefined if (customerId === null || customerId === undefined) { throw new RequiredError('customerId', 'Required parameter customerId was null or undefined when calling customerAccountManagementV1IsReadonlyGet.'); } const localVarPath = `/V1/customers/{customerId}/permissions/readonly` .replace(`{${"customerId"}}`, encodeURIComponent(String(customerId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Resend confirmation email. * @param {any} [customerAccountManagementV1ResendConfirmationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ResendConfirmationPost(customerAccountManagementV1ResendConfirmationPostBody, options = {}) { const localVarPath = `/V1/customers/confirm`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerAccountManagementV1ResendConfirmationPostBody || {}) : (customerAccountManagementV1ResendConfirmationPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Reset customer password. * @param {any} [customerAccountManagementV1ResetPasswordPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ResetPasswordPost(customerAccountManagementV1ResetPasswordPostBody, options = {}) { const localVarPath = `/V1/customers/resetPassword`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerAccountManagementV1ResetPasswordPostBody || {}) : (customerAccountManagementV1ResetPasswordPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Validate customer data. * @param {any} [customerAccountManagementV1ValidatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ValidatePut(customerAccountManagementV1ValidatePutBody, options = {}) { const localVarPath = `/V1/customers/validate`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerAccountManagementV1ValidatePutBody || {}) : (customerAccountManagementV1ValidatePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Check if password reset token is valid. * @param {number} customerId If null is given then a customer will be matched by the RP token. * @param {string} resetPasswordLinkToken * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ValidateResetPasswordLinkTokenGet(customerId, resetPasswordLinkToken, options = {}) { // verify required parameter 'customerId' is not null or undefined if (customerId === null || customerId === undefined) { throw new RequiredError('customerId', 'Required parameter customerId was null or undefined when calling customerAccountManagementV1ValidateResetPasswordLinkTokenGet.'); } // verify required parameter 'resetPasswordLinkToken' is not null or undefined if (resetPasswordLinkToken === null || resetPasswordLinkToken === undefined) { throw new RequiredError('resetPasswordLinkToken', 'Required parameter resetPasswordLinkToken was null or undefined when calling customerAccountManagementV1ValidateResetPasswordLinkTokenGet.'); } const localVarPath = `/V1/customers/{customerId}/password/resetLinkToken/{resetPasswordLinkToken}` .replace(`{${"customerId"}}`, encodeURIComponent(String(customerId))) .replace(`{${"resetPasswordLinkToken"}}`, encodeURIComponent(String(resetPasswordLinkToken))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CustomerAccountManagementV1ApiFetchParamCreator = CustomerAccountManagementV1ApiFetchParamCreator; /** * CustomerAccountManagementV1Api - functional programming interface * @export */ const CustomerAccountManagementV1ApiFp = function (configuration) { return { /** * Activate a customer account using a key that was sent in a confirmation email. * @param {any} [customerAccountManagementV1ActivateByIdPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ActivateByIdPut(customerAccountManagementV1ActivateByIdPutBody, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1ActivateByIdPut(customerAccountManagementV1ActivateByIdPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Activate a customer account using a key that was sent in a confirmation email. * @param {string} email * @param {any} [customerAccountManagementV1ActivatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ActivatePut(email, customerAccountManagementV1ActivatePutBody, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1ActivatePut(email, customerAccountManagementV1ActivatePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Change customer password. * @param {any} [customerAccountManagementV1ChangePasswordByIdPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ChangePasswordByIdPut(customerAccountManagementV1ChangePasswordByIdPutBody, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1ChangePasswordByIdPut(customerAccountManagementV1ChangePasswordByIdPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Create customer account. Perform necessary business operations like sending email. * @param {any} [customerAccountManagementV1CreateAccountPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1CreateAccountPost(customerAccountManagementV1CreateAccountPostBody, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1CreateAccountPost(customerAccountManagementV1CreateAccountPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Gets the account confirmation status. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetConfirmationStatusGet(customerId, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1GetConfirmationStatusGet(customerId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve default billing address for the given customerId. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultBillingAddressGet(options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1GetDefaultBillingAddressGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve default billing address for the given customerId. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultBillingAddressGet_1(customerId, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1GetDefaultBillingAddressGet_1(customerId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve default shipping address for the given customerId. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultShippingAddressGet(options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1GetDefaultShippingAddressGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve default shipping address for the given customerId. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultShippingAddressGet_2(customerId, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1GetDefaultShippingAddressGet_2(customerId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Send an email to the customer with a password reset link. * @param {any} [customerAccountManagementV1InitiatePasswordResetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1InitiatePasswordResetPut(customerAccountManagementV1InitiatePasswordResetPutBody, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1InitiatePasswordResetPut(customerAccountManagementV1InitiatePasswordResetPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Check if given email is associated with a customer account in given website. * @param {any} [customerAccountManagementV1IsEmailAvailablePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1IsEmailAvailablePost(customerAccountManagementV1IsEmailAvailablePostBody, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1IsEmailAvailablePost(customerAccountManagementV1IsEmailAvailablePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Check if customer can be deleted. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1IsReadonlyGet(customerId, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1IsReadonlyGet(customerId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Resend confirmation email. * @param {any} [customerAccountManagementV1ResendConfirmationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ResendConfirmationPost(customerAccountManagementV1ResendConfirmationPostBody, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1ResendConfirmationPost(customerAccountManagementV1ResendConfirmationPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Reset customer password. * @param {any} [customerAccountManagementV1ResetPasswordPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ResetPasswordPost(customerAccountManagementV1ResetPasswordPostBody, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1ResetPasswordPost(customerAccountManagementV1ResetPasswordPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Validate customer data. * @param {any} [customerAccountManagementV1ValidatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ValidatePut(customerAccountManagementV1ValidatePutBody, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1ValidatePut(customerAccountManagementV1ValidatePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Check if password reset token is valid. * @param {number} customerId If null is given then a customer will be matched by the RP token. * @param {string} resetPasswordLinkToken * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ValidateResetPasswordLinkTokenGet(customerId, resetPasswordLinkToken, options) { const localVarFetchArgs = exports.CustomerAccountManagementV1ApiFetchParamCreator(configuration).customerAccountManagementV1ValidateResetPasswordLinkTokenGet(customerId, resetPasswordLinkToken, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CustomerAccountManagementV1ApiFp = CustomerAccountManagementV1ApiFp; /** * CustomerAccountManagementV1Api - factory interface * @export */ const CustomerAccountManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Activate a customer account using a key that was sent in a confirmation email. * @param {any} [customerAccountManagementV1ActivateByIdPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ActivateByIdPut(customerAccountManagementV1ActivateByIdPutBody, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1ActivateByIdPut(customerAccountManagementV1ActivateByIdPutBody, options)(fetch, basePath); }, /** * Activate a customer account using a key that was sent in a confirmation email. * @param {string} email * @param {any} [customerAccountManagementV1ActivatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ActivatePut(email, customerAccountManagementV1ActivatePutBody, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1ActivatePut(email, customerAccountManagementV1ActivatePutBody, options)(fetch, basePath); }, /** * Change customer password. * @param {any} [customerAccountManagementV1ChangePasswordByIdPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ChangePasswordByIdPut(customerAccountManagementV1ChangePasswordByIdPutBody, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1ChangePasswordByIdPut(customerAccountManagementV1ChangePasswordByIdPutBody, options)(fetch, basePath); }, /** * Create customer account. Perform necessary business operations like sending email. * @param {any} [customerAccountManagementV1CreateAccountPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1CreateAccountPost(customerAccountManagementV1CreateAccountPostBody, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1CreateAccountPost(customerAccountManagementV1CreateAccountPostBody, options)(fetch, basePath); }, /** * Gets the account confirmation status. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetConfirmationStatusGet(customerId, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1GetConfirmationStatusGet(customerId, options)(fetch, basePath); }, /** * Retrieve default billing address for the given customerId. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultBillingAddressGet(options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1GetDefaultBillingAddressGet(options)(fetch, basePath); }, /** * Retrieve default billing address for the given customerId. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultBillingAddressGet_1(customerId, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1GetDefaultBillingAddressGet_1(customerId, options)(fetch, basePath); }, /** * Retrieve default shipping address for the given customerId. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultShippingAddressGet(options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1GetDefaultShippingAddressGet(options)(fetch, basePath); }, /** * Retrieve default shipping address for the given customerId. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1GetDefaultShippingAddressGet_2(customerId, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1GetDefaultShippingAddressGet_2(customerId, options)(fetch, basePath); }, /** * Send an email to the customer with a password reset link. * @param {any} [customerAccountManagementV1InitiatePasswordResetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1InitiatePasswordResetPut(customerAccountManagementV1InitiatePasswordResetPutBody, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1InitiatePasswordResetPut(customerAccountManagementV1InitiatePasswordResetPutBody, options)(fetch, basePath); }, /** * Check if given email is associated with a customer account in given website. * @param {any} [customerAccountManagementV1IsEmailAvailablePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1IsEmailAvailablePost(customerAccountManagementV1IsEmailAvailablePostBody, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1IsEmailAvailablePost(customerAccountManagementV1IsEmailAvailablePostBody, options)(fetch, basePath); }, /** * Check if customer can be deleted. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1IsReadonlyGet(customerId, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1IsReadonlyGet(customerId, options)(fetch, basePath); }, /** * Resend confirmation email. * @param {any} [customerAccountManagementV1ResendConfirmationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ResendConfirmationPost(customerAccountManagementV1ResendConfirmationPostBody, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1ResendConfirmationPost(customerAccountManagementV1ResendConfirmationPostBody, options)(fetch, basePath); }, /** * Reset customer password. * @param {any} [customerAccountManagementV1ResetPasswordPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ResetPasswordPost(customerAccountManagementV1ResetPasswordPostBody, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1ResetPasswordPost(customerAccountManagementV1ResetPasswordPostBody, options)(fetch, basePath); }, /** * Validate customer data. * @param {any} [customerAccountManagementV1ValidatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ValidatePut(customerAccountManagementV1ValidatePutBody, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1ValidatePut(customerAccountManagementV1ValidatePutBody, options)(fetch, basePath); }, /** * Check if password reset token is valid. * @param {number} customerId If null is given then a customer will be matched by the RP token. * @param {string} resetPasswordLinkToken * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAccountManagementV1ValidateResetPasswordLinkTokenGet(customerId, resetPasswordLinkToken, options) { return exports.CustomerAccountManagementV1ApiFp(configuration).customerAccountManagementV1ValidateResetPasswordLinkTokenGet(customerId, resetPasswordLinkToken, options)(fetch, basePath); }, }; }; exports.CustomerAccountManagementV1ApiFactory = CustomerAccountManagementV1ApiFactory; /** * CustomerAccountManagementV1Api - object-oriented interface * @export * @class CustomerAccountManagementV1Api * @extends {BaseAPI} */ class CustomerAccountManagementV1Api extends BaseAPI { /** * Activate a customer account using a key that was sent in a confirmation email. * @param {any} [customerAccountManagementV1ActivateByIdPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1ActivateByIdPut(customerAccountManagementV1ActivateByIdPutBody, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1ActivateByIdPut(customerAccountManagementV1ActivateByIdPutBody, options)(this.fetch, this.basePath); } /** * Activate a customer account using a key that was sent in a confirmation email. * @param {string} email * @param {any} [customerAccountManagementV1ActivatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1ActivatePut(email, customerAccountManagementV1ActivatePutBody, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1ActivatePut(email, customerAccountManagementV1ActivatePutBody, options)(this.fetch, this.basePath); } /** * Change customer password. * @param {any} [customerAccountManagementV1ChangePasswordByIdPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1ChangePasswordByIdPut(customerAccountManagementV1ChangePasswordByIdPutBody, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1ChangePasswordByIdPut(customerAccountManagementV1ChangePasswordByIdPutBody, options)(this.fetch, this.basePath); } /** * Create customer account. Perform necessary business operations like sending email. * @param {any} [customerAccountManagementV1CreateAccountPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1CreateAccountPost(customerAccountManagementV1CreateAccountPostBody, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1CreateAccountPost(customerAccountManagementV1CreateAccountPostBody, options)(this.fetch, this.basePath); } /** * Gets the account confirmation status. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1GetConfirmationStatusGet(customerId, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1GetConfirmationStatusGet(customerId, options)(this.fetch, this.basePath); } /** * Retrieve default billing address for the given customerId. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1GetDefaultBillingAddressGet(options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1GetDefaultBillingAddressGet(options)(this.fetch, this.basePath); } /** * Retrieve default billing address for the given customerId. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1GetDefaultBillingAddressGet_1(customerId, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1GetDefaultBillingAddressGet_1(customerId, options)(this.fetch, this.basePath); } /** * Retrieve default shipping address for the given customerId. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1GetDefaultShippingAddressGet(options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1GetDefaultShippingAddressGet(options)(this.fetch, this.basePath); } /** * Retrieve default shipping address for the given customerId. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1GetDefaultShippingAddressGet_2(customerId, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1GetDefaultShippingAddressGet_2(customerId, options)(this.fetch, this.basePath); } /** * Send an email to the customer with a password reset link. * @param {any} [customerAccountManagementV1InitiatePasswordResetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1InitiatePasswordResetPut(customerAccountManagementV1InitiatePasswordResetPutBody, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1InitiatePasswordResetPut(customerAccountManagementV1InitiatePasswordResetPutBody, options)(this.fetch, this.basePath); } /** * Check if given email is associated with a customer account in given website. * @param {any} [customerAccountManagementV1IsEmailAvailablePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1IsEmailAvailablePost(customerAccountManagementV1IsEmailAvailablePostBody, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1IsEmailAvailablePost(customerAccountManagementV1IsEmailAvailablePostBody, options)(this.fetch, this.basePath); } /** * Check if customer can be deleted. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1IsReadonlyGet(customerId, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1IsReadonlyGet(customerId, options)(this.fetch, this.basePath); } /** * Resend confirmation email. * @param {any} [customerAccountManagementV1ResendConfirmationPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1ResendConfirmationPost(customerAccountManagementV1ResendConfirmationPostBody, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1ResendConfirmationPost(customerAccountManagementV1ResendConfirmationPostBody, options)(this.fetch, this.basePath); } /** * Reset customer password. * @param {any} [customerAccountManagementV1ResetPasswordPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1ResetPasswordPost(customerAccountManagementV1ResetPasswordPostBody, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1ResetPasswordPost(customerAccountManagementV1ResetPasswordPostBody, options)(this.fetch, this.basePath); } /** * Validate customer data. * @param {any} [customerAccountManagementV1ValidatePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1ValidatePut(customerAccountManagementV1ValidatePutBody, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1ValidatePut(customerAccountManagementV1ValidatePutBody, options)(this.fetch, this.basePath); } /** * Check if password reset token is valid. * @param {number} customerId If null is given then a customer will be matched by the RP token. * @param {string} resetPasswordLinkToken * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAccountManagementV1Api */ customerAccountManagementV1ValidateResetPasswordLinkTokenGet(customerId, resetPasswordLinkToken, options) { return exports.CustomerAccountManagementV1ApiFp(this.configuration).customerAccountManagementV1ValidateResetPasswordLinkTokenGet(customerId, resetPasswordLinkToken, options)(this.fetch, this.basePath); } } exports.CustomerAccountManagementV1Api = CustomerAccountManagementV1Api; /** * CustomerAddressMetadataV1Api - fetch parameter creator * @export */ const CustomerAddressMetadataV1ApiFetchParamCreator = function (configuration) { return { /** * Get all attribute metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetAllAttributesMetadataGet(options = {}) { const localVarPath = `/V1/attributeMetadata/customerAddress`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve attribute metadata. * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetAttributeMetadataGet(attributeCode, options = {}) { // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling customerAddressMetadataV1GetAttributeMetadataGet.'); } const localVarPath = `/V1/attributeMetadata/customerAddress/attribute/{attributeCode}` .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve all attributes filtered by form code * @param {string} formCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetAttributesGet(formCode, options = {}) { // verify required parameter 'formCode' is not null or undefined if (formCode === null || formCode === undefined) { throw new RequiredError('formCode', 'Required parameter formCode was null or undefined when calling customerAddressMetadataV1GetAttributesGet.'); } const localVarPath = `/V1/attributeMetadata/customerAddress/form/{formCode}` .replace(`{${"formCode"}}`, encodeURIComponent(String(formCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get custom attributes metadata for the given data interface. * @param {string} [dataInterfaceName] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options = {}) { const localVarPath = `/V1/attributeMetadata/customerAddress/custom`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (dataInterfaceName !== undefined) { localVarQueryParameter['dataInterfaceName'] = dataInterfaceName; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CustomerAddressMetadataV1ApiFetchParamCreator = CustomerAddressMetadataV1ApiFetchParamCreator; /** * CustomerAddressMetadataV1Api - functional programming interface * @export */ const CustomerAddressMetadataV1ApiFp = function (configuration) { return { /** * Get all attribute metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetAllAttributesMetadataGet(options) { const localVarFetchArgs = exports.CustomerAddressMetadataV1ApiFetchParamCreator(configuration).customerAddressMetadataV1GetAllAttributesMetadataGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve attribute metadata. * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetAttributeMetadataGet(attributeCode, options) { const localVarFetchArgs = exports.CustomerAddressMetadataV1ApiFetchParamCreator(configuration).customerAddressMetadataV1GetAttributeMetadataGet(attributeCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve all attributes filtered by form code * @param {string} formCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetAttributesGet(formCode, options) { const localVarFetchArgs = exports.CustomerAddressMetadataV1ApiFetchParamCreator(configuration).customerAddressMetadataV1GetAttributesGet(formCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get custom attributes metadata for the given data interface. * @param {string} [dataInterfaceName] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options) { const localVarFetchArgs = exports.CustomerAddressMetadataV1ApiFetchParamCreator(configuration).customerAddressMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CustomerAddressMetadataV1ApiFp = CustomerAddressMetadataV1ApiFp; /** * CustomerAddressMetadataV1Api - factory interface * @export */ const CustomerAddressMetadataV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get all attribute metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetAllAttributesMetadataGet(options) { return exports.CustomerAddressMetadataV1ApiFp(configuration).customerAddressMetadataV1GetAllAttributesMetadataGet(options)(fetch, basePath); }, /** * Retrieve attribute metadata. * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetAttributeMetadataGet(attributeCode, options) { return exports.CustomerAddressMetadataV1ApiFp(configuration).customerAddressMetadataV1GetAttributeMetadataGet(attributeCode, options)(fetch, basePath); }, /** * Retrieve all attributes filtered by form code * @param {string} formCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetAttributesGet(formCode, options) { return exports.CustomerAddressMetadataV1ApiFp(configuration).customerAddressMetadataV1GetAttributesGet(formCode, options)(fetch, basePath); }, /** * Get custom attributes metadata for the given data interface. * @param {string} [dataInterfaceName] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options) { return exports.CustomerAddressMetadataV1ApiFp(configuration).customerAddressMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options)(fetch, basePath); }, }; }; exports.CustomerAddressMetadataV1ApiFactory = CustomerAddressMetadataV1ApiFactory; /** * CustomerAddressMetadataV1Api - object-oriented interface * @export * @class CustomerAddressMetadataV1Api * @extends {BaseAPI} */ class CustomerAddressMetadataV1Api extends BaseAPI { /** * Get all attribute metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAddressMetadataV1Api */ customerAddressMetadataV1GetAllAttributesMetadataGet(options) { return exports.CustomerAddressMetadataV1ApiFp(this.configuration).customerAddressMetadataV1GetAllAttributesMetadataGet(options)(this.fetch, this.basePath); } /** * Retrieve attribute metadata. * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAddressMetadataV1Api */ customerAddressMetadataV1GetAttributeMetadataGet(attributeCode, options) { return exports.CustomerAddressMetadataV1ApiFp(this.configuration).customerAddressMetadataV1GetAttributeMetadataGet(attributeCode, options)(this.fetch, this.basePath); } /** * Retrieve all attributes filtered by form code * @param {string} formCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAddressMetadataV1Api */ customerAddressMetadataV1GetAttributesGet(formCode, options) { return exports.CustomerAddressMetadataV1ApiFp(this.configuration).customerAddressMetadataV1GetAttributesGet(formCode, options)(this.fetch, this.basePath); } /** * Get custom attributes metadata for the given data interface. * @param {string} [dataInterfaceName] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAddressMetadataV1Api */ customerAddressMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options) { return exports.CustomerAddressMetadataV1ApiFp(this.configuration).customerAddressMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options)(this.fetch, this.basePath); } } exports.CustomerAddressMetadataV1Api = CustomerAddressMetadataV1Api; /** * CustomerAddressRepositoryV1Api - fetch parameter creator * @export */ const CustomerAddressRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete customer address by ID. * @param {number} addressId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressRepositoryV1DeleteByIdDelete(addressId, options = {}) { // verify required parameter 'addressId' is not null or undefined if (addressId === null || addressId === undefined) { throw new RequiredError('addressId', 'Required parameter addressId was null or undefined when calling customerAddressRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/addresses/{addressId}` .replace(`{${"addressId"}}`, encodeURIComponent(String(addressId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve customer address. * @param {number} addressId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressRepositoryV1GetByIdGet(addressId, options = {}) { // verify required parameter 'addressId' is not null or undefined if (addressId === null || addressId === undefined) { throw new RequiredError('addressId', 'Required parameter addressId was null or undefined when calling customerAddressRepositoryV1GetByIdGet.'); } const localVarPath = `/V1/customers/addresses/{addressId}` .replace(`{${"addressId"}}`, encodeURIComponent(String(addressId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CustomerAddressRepositoryV1ApiFetchParamCreator = CustomerAddressRepositoryV1ApiFetchParamCreator; /** * CustomerAddressRepositoryV1Api - functional programming interface * @export */ const CustomerAddressRepositoryV1ApiFp = function (configuration) { return { /** * Delete customer address by ID. * @param {number} addressId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressRepositoryV1DeleteByIdDelete(addressId, options) { const localVarFetchArgs = exports.CustomerAddressRepositoryV1ApiFetchParamCreator(configuration).customerAddressRepositoryV1DeleteByIdDelete(addressId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve customer address. * @param {number} addressId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressRepositoryV1GetByIdGet(addressId, options) { const localVarFetchArgs = exports.CustomerAddressRepositoryV1ApiFetchParamCreator(configuration).customerAddressRepositoryV1GetByIdGet(addressId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CustomerAddressRepositoryV1ApiFp = CustomerAddressRepositoryV1ApiFp; /** * CustomerAddressRepositoryV1Api - factory interface * @export */ const CustomerAddressRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete customer address by ID. * @param {number} addressId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressRepositoryV1DeleteByIdDelete(addressId, options) { return exports.CustomerAddressRepositoryV1ApiFp(configuration).customerAddressRepositoryV1DeleteByIdDelete(addressId, options)(fetch, basePath); }, /** * Retrieve customer address. * @param {number} addressId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerAddressRepositoryV1GetByIdGet(addressId, options) { return exports.CustomerAddressRepositoryV1ApiFp(configuration).customerAddressRepositoryV1GetByIdGet(addressId, options)(fetch, basePath); }, }; }; exports.CustomerAddressRepositoryV1ApiFactory = CustomerAddressRepositoryV1ApiFactory; /** * CustomerAddressRepositoryV1Api - object-oriented interface * @export * @class CustomerAddressRepositoryV1Api * @extends {BaseAPI} */ class CustomerAddressRepositoryV1Api extends BaseAPI { /** * Delete customer address by ID. * @param {number} addressId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAddressRepositoryV1Api */ customerAddressRepositoryV1DeleteByIdDelete(addressId, options) { return exports.CustomerAddressRepositoryV1ApiFp(this.configuration).customerAddressRepositoryV1DeleteByIdDelete(addressId, options)(this.fetch, this.basePath); } /** * Retrieve customer address. * @param {number} addressId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerAddressRepositoryV1Api */ customerAddressRepositoryV1GetByIdGet(addressId, options) { return exports.CustomerAddressRepositoryV1ApiFp(this.configuration).customerAddressRepositoryV1GetByIdGet(addressId, options)(this.fetch, this.basePath); } } exports.CustomerAddressRepositoryV1Api = CustomerAddressRepositoryV1Api; /** * CustomerCustomerGroupConfigV1Api - fetch parameter creator * @export */ const CustomerCustomerGroupConfigV1ApiFetchParamCreator = function (configuration) { return { /** * Set system default customer group. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerGroupConfigV1SetDefaultCustomerGroupPut(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling customerCustomerGroupConfigV1SetDefaultCustomerGroupPut.'); } const localVarPath = `/V1/customerGroups/default/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CustomerCustomerGroupConfigV1ApiFetchParamCreator = CustomerCustomerGroupConfigV1ApiFetchParamCreator; /** * CustomerCustomerGroupConfigV1Api - functional programming interface * @export */ const CustomerCustomerGroupConfigV1ApiFp = function (configuration) { return { /** * Set system default customer group. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerGroupConfigV1SetDefaultCustomerGroupPut(id, options) { const localVarFetchArgs = exports.CustomerCustomerGroupConfigV1ApiFetchParamCreator(configuration).customerCustomerGroupConfigV1SetDefaultCustomerGroupPut(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CustomerCustomerGroupConfigV1ApiFp = CustomerCustomerGroupConfigV1ApiFp; /** * CustomerCustomerGroupConfigV1Api - factory interface * @export */ const CustomerCustomerGroupConfigV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Set system default customer group. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerGroupConfigV1SetDefaultCustomerGroupPut(id, options) { return exports.CustomerCustomerGroupConfigV1ApiFp(configuration).customerCustomerGroupConfigV1SetDefaultCustomerGroupPut(id, options)(fetch, basePath); }, }; }; exports.CustomerCustomerGroupConfigV1ApiFactory = CustomerCustomerGroupConfigV1ApiFactory; /** * CustomerCustomerGroupConfigV1Api - object-oriented interface * @export * @class CustomerCustomerGroupConfigV1Api * @extends {BaseAPI} */ class CustomerCustomerGroupConfigV1Api extends BaseAPI { /** * Set system default customer group. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerCustomerGroupConfigV1Api */ customerCustomerGroupConfigV1SetDefaultCustomerGroupPut(id, options) { return exports.CustomerCustomerGroupConfigV1ApiFp(this.configuration).customerCustomerGroupConfigV1SetDefaultCustomerGroupPut(id, options)(this.fetch, this.basePath); } } exports.CustomerCustomerGroupConfigV1Api = CustomerCustomerGroupConfigV1Api; /** * CustomerCustomerMetadataV1Api - fetch parameter creator * @export */ const CustomerCustomerMetadataV1ApiFetchParamCreator = function (configuration) { return { /** * Get all attribute metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetAllAttributesMetadataGet(options = {}) { const localVarPath = `/V1/attributeMetadata/customer`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve attribute metadata. * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetAttributeMetadataGet(attributeCode, options = {}) { // verify required parameter 'attributeCode' is not null or undefined if (attributeCode === null || attributeCode === undefined) { throw new RequiredError('attributeCode', 'Required parameter attributeCode was null or undefined when calling customerCustomerMetadataV1GetAttributeMetadataGet.'); } const localVarPath = `/V1/attributeMetadata/customer/attribute/{attributeCode}` .replace(`{${"attributeCode"}}`, encodeURIComponent(String(attributeCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve all attributes filtered by form code * @param {string} formCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetAttributesGet(formCode, options = {}) { // verify required parameter 'formCode' is not null or undefined if (formCode === null || formCode === undefined) { throw new RequiredError('formCode', 'Required parameter formCode was null or undefined when calling customerCustomerMetadataV1GetAttributesGet.'); } const localVarPath = `/V1/attributeMetadata/customer/form/{formCode}` .replace(`{${"formCode"}}`, encodeURIComponent(String(formCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get custom attributes metadata for the given data interface. * @param {string} [dataInterfaceName] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options = {}) { const localVarPath = `/V1/attributeMetadata/customer/custom`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (dataInterfaceName !== undefined) { localVarQueryParameter['dataInterfaceName'] = dataInterfaceName; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CustomerCustomerMetadataV1ApiFetchParamCreator = CustomerCustomerMetadataV1ApiFetchParamCreator; /** * CustomerCustomerMetadataV1Api - functional programming interface * @export */ const CustomerCustomerMetadataV1ApiFp = function (configuration) { return { /** * Get all attribute metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetAllAttributesMetadataGet(options) { const localVarFetchArgs = exports.CustomerCustomerMetadataV1ApiFetchParamCreator(configuration).customerCustomerMetadataV1GetAllAttributesMetadataGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve attribute metadata. * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetAttributeMetadataGet(attributeCode, options) { const localVarFetchArgs = exports.CustomerCustomerMetadataV1ApiFetchParamCreator(configuration).customerCustomerMetadataV1GetAttributeMetadataGet(attributeCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve all attributes filtered by form code * @param {string} formCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetAttributesGet(formCode, options) { const localVarFetchArgs = exports.CustomerCustomerMetadataV1ApiFetchParamCreator(configuration).customerCustomerMetadataV1GetAttributesGet(formCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get custom attributes metadata for the given data interface. * @param {string} [dataInterfaceName] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options) { const localVarFetchArgs = exports.CustomerCustomerMetadataV1ApiFetchParamCreator(configuration).customerCustomerMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CustomerCustomerMetadataV1ApiFp = CustomerCustomerMetadataV1ApiFp; /** * CustomerCustomerMetadataV1Api - factory interface * @export */ const CustomerCustomerMetadataV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get all attribute metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetAllAttributesMetadataGet(options) { return exports.CustomerCustomerMetadataV1ApiFp(configuration).customerCustomerMetadataV1GetAllAttributesMetadataGet(options)(fetch, basePath); }, /** * Retrieve attribute metadata. * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetAttributeMetadataGet(attributeCode, options) { return exports.CustomerCustomerMetadataV1ApiFp(configuration).customerCustomerMetadataV1GetAttributeMetadataGet(attributeCode, options)(fetch, basePath); }, /** * Retrieve all attributes filtered by form code * @param {string} formCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetAttributesGet(formCode, options) { return exports.CustomerCustomerMetadataV1ApiFp(configuration).customerCustomerMetadataV1GetAttributesGet(formCode, options)(fetch, basePath); }, /** * Get custom attributes metadata for the given data interface. * @param {string} [dataInterfaceName] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options) { return exports.CustomerCustomerMetadataV1ApiFp(configuration).customerCustomerMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options)(fetch, basePath); }, }; }; exports.CustomerCustomerMetadataV1ApiFactory = CustomerCustomerMetadataV1ApiFactory; /** * CustomerCustomerMetadataV1Api - object-oriented interface * @export * @class CustomerCustomerMetadataV1Api * @extends {BaseAPI} */ class CustomerCustomerMetadataV1Api extends BaseAPI { /** * Get all attribute metadata. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerCustomerMetadataV1Api */ customerCustomerMetadataV1GetAllAttributesMetadataGet(options) { return exports.CustomerCustomerMetadataV1ApiFp(this.configuration).customerCustomerMetadataV1GetAllAttributesMetadataGet(options)(this.fetch, this.basePath); } /** * Retrieve attribute metadata. * @param {string} attributeCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerCustomerMetadataV1Api */ customerCustomerMetadataV1GetAttributeMetadataGet(attributeCode, options) { return exports.CustomerCustomerMetadataV1ApiFp(this.configuration).customerCustomerMetadataV1GetAttributeMetadataGet(attributeCode, options)(this.fetch, this.basePath); } /** * Retrieve all attributes filtered by form code * @param {string} formCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerCustomerMetadataV1Api */ customerCustomerMetadataV1GetAttributesGet(formCode, options) { return exports.CustomerCustomerMetadataV1ApiFp(this.configuration).customerCustomerMetadataV1GetAttributesGet(formCode, options)(this.fetch, this.basePath); } /** * Get custom attributes metadata for the given data interface. * @param {string} [dataInterfaceName] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerCustomerMetadataV1Api */ customerCustomerMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options) { return exports.CustomerCustomerMetadataV1ApiFp(this.configuration).customerCustomerMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName, options)(this.fetch, this.basePath); } } exports.CustomerCustomerMetadataV1Api = CustomerCustomerMetadataV1Api; /** * CustomerCustomerRepositoryV1Api - fetch parameter creator * @export */ const CustomerCustomerRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete customer by Customer ID. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1DeleteByIdDelete(customerId, options = {}) { // verify required parameter 'customerId' is not null or undefined if (customerId === null || customerId === undefined) { throw new RequiredError('customerId', 'Required parameter customerId was null or undefined when calling customerCustomerRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/customers/{customerId}` .replace(`{${"customerId"}}`, encodeURIComponent(String(customerId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get customer by Customer ID. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1GetByIdGet(customerId, options = {}) { // verify required parameter 'customerId' is not null or undefined if (customerId === null || customerId === undefined) { throw new RequiredError('customerId', 'Required parameter customerId was null or undefined when calling customerCustomerRepositoryV1GetByIdGet.'); } const localVarPath = `/V1/customers/{customerId}` .replace(`{${"customerId"}}`, encodeURIComponent(String(customerId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get customer by Customer ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1GetByIdGet_1(options = {}) { const localVarPath = `/V1/customers/me`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve customers which match a specified criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/customers/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create or update a customer. * @param {string} customerId * @param {any} [customerCustomerRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1SavePut(customerId, customerCustomerRepositoryV1SavePutBody, options = {}) { // verify required parameter 'customerId' is not null or undefined if (customerId === null || customerId === undefined) { throw new RequiredError('customerId', 'Required parameter customerId was null or undefined when calling customerCustomerRepositoryV1SavePut.'); } const localVarPath = `/V1/customers/{customerId}` .replace(`{${"customerId"}}`, encodeURIComponent(String(customerId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerCustomerRepositoryV1SavePutBody || {}) : (customerCustomerRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create or update a customer. * @param {any} [customerCustomerRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1SavePut_2(customerCustomerRepositoryV1SavePutBody, options = {}) { const localVarPath = `/V1/customers/me`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerCustomerRepositoryV1SavePutBody || {}) : (customerCustomerRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CustomerCustomerRepositoryV1ApiFetchParamCreator = CustomerCustomerRepositoryV1ApiFetchParamCreator; /** * CustomerCustomerRepositoryV1Api - functional programming interface * @export */ const CustomerCustomerRepositoryV1ApiFp = function (configuration) { return { /** * Delete customer by Customer ID. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1DeleteByIdDelete(customerId, options) { const localVarFetchArgs = exports.CustomerCustomerRepositoryV1ApiFetchParamCreator(configuration).customerCustomerRepositoryV1DeleteByIdDelete(customerId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get customer by Customer ID. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1GetByIdGet(customerId, options) { const localVarFetchArgs = exports.CustomerCustomerRepositoryV1ApiFetchParamCreator(configuration).customerCustomerRepositoryV1GetByIdGet(customerId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get customer by Customer ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1GetByIdGet_1(options) { const localVarFetchArgs = exports.CustomerCustomerRepositoryV1ApiFetchParamCreator(configuration).customerCustomerRepositoryV1GetByIdGet_1(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve customers which match a specified criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CustomerCustomerRepositoryV1ApiFetchParamCreator(configuration).customerCustomerRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Create or update a customer. * @param {string} customerId * @param {any} [customerCustomerRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1SavePut(customerId, customerCustomerRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CustomerCustomerRepositoryV1ApiFetchParamCreator(configuration).customerCustomerRepositoryV1SavePut(customerId, customerCustomerRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Create or update a customer. * @param {any} [customerCustomerRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1SavePut_2(customerCustomerRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CustomerCustomerRepositoryV1ApiFetchParamCreator(configuration).customerCustomerRepositoryV1SavePut_2(customerCustomerRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CustomerCustomerRepositoryV1ApiFp = CustomerCustomerRepositoryV1ApiFp; /** * CustomerCustomerRepositoryV1Api - factory interface * @export */ const CustomerCustomerRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete customer by Customer ID. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1DeleteByIdDelete(customerId, options) { return exports.CustomerCustomerRepositoryV1ApiFp(configuration).customerCustomerRepositoryV1DeleteByIdDelete(customerId, options)(fetch, basePath); }, /** * Get customer by Customer ID. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1GetByIdGet(customerId, options) { return exports.CustomerCustomerRepositoryV1ApiFp(configuration).customerCustomerRepositoryV1GetByIdGet(customerId, options)(fetch, basePath); }, /** * Get customer by Customer ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1GetByIdGet_1(options) { return exports.CustomerCustomerRepositoryV1ApiFp(configuration).customerCustomerRepositoryV1GetByIdGet_1(options)(fetch, basePath); }, /** * Retrieve customers which match a specified criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CustomerCustomerRepositoryV1ApiFp(configuration).customerCustomerRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Create or update a customer. * @param {string} customerId * @param {any} [customerCustomerRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1SavePut(customerId, customerCustomerRepositoryV1SavePutBody, options) { return exports.CustomerCustomerRepositoryV1ApiFp(configuration).customerCustomerRepositoryV1SavePut(customerId, customerCustomerRepositoryV1SavePutBody, options)(fetch, basePath); }, /** * Create or update a customer. * @param {any} [customerCustomerRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerCustomerRepositoryV1SavePut_2(customerCustomerRepositoryV1SavePutBody, options) { return exports.CustomerCustomerRepositoryV1ApiFp(configuration).customerCustomerRepositoryV1SavePut_2(customerCustomerRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CustomerCustomerRepositoryV1ApiFactory = CustomerCustomerRepositoryV1ApiFactory; /** * CustomerCustomerRepositoryV1Api - object-oriented interface * @export * @class CustomerCustomerRepositoryV1Api * @extends {BaseAPI} */ class CustomerCustomerRepositoryV1Api extends BaseAPI { /** * Delete customer by Customer ID. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerCustomerRepositoryV1Api */ customerCustomerRepositoryV1DeleteByIdDelete(customerId, options) { return exports.CustomerCustomerRepositoryV1ApiFp(this.configuration).customerCustomerRepositoryV1DeleteByIdDelete(customerId, options)(this.fetch, this.basePath); } /** * Get customer by Customer ID. * @param {number} customerId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerCustomerRepositoryV1Api */ customerCustomerRepositoryV1GetByIdGet(customerId, options) { return exports.CustomerCustomerRepositoryV1ApiFp(this.configuration).customerCustomerRepositoryV1GetByIdGet(customerId, options)(this.fetch, this.basePath); } /** * Get customer by Customer ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerCustomerRepositoryV1Api */ customerCustomerRepositoryV1GetByIdGet_1(options) { return exports.CustomerCustomerRepositoryV1ApiFp(this.configuration).customerCustomerRepositoryV1GetByIdGet_1(options)(this.fetch, this.basePath); } /** * Retrieve customers which match a specified criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerCustomerRepositoryV1Api */ customerCustomerRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CustomerCustomerRepositoryV1ApiFp(this.configuration).customerCustomerRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Create or update a customer. * @param {string} customerId * @param {any} [customerCustomerRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerCustomerRepositoryV1Api */ customerCustomerRepositoryV1SavePut(customerId, customerCustomerRepositoryV1SavePutBody, options) { return exports.CustomerCustomerRepositoryV1ApiFp(this.configuration).customerCustomerRepositoryV1SavePut(customerId, customerCustomerRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } /** * Create or update a customer. * @param {any} [customerCustomerRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerCustomerRepositoryV1Api */ customerCustomerRepositoryV1SavePut_2(customerCustomerRepositoryV1SavePutBody, options) { return exports.CustomerCustomerRepositoryV1ApiFp(this.configuration).customerCustomerRepositoryV1SavePut_2(customerCustomerRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CustomerCustomerRepositoryV1Api = CustomerCustomerRepositoryV1Api; /** * CustomerGroupManagementV1Api - fetch parameter creator * @export */ const CustomerGroupManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Get default customer group. * @param {number} storeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupManagementV1GetDefaultGroupGet(storeId, options = {}) { // verify required parameter 'storeId' is not null or undefined if (storeId === null || storeId === undefined) { throw new RequiredError('storeId', 'Required parameter storeId was null or undefined when calling customerGroupManagementV1GetDefaultGroupGet.'); } const localVarPath = `/V1/customerGroups/default/{storeId}` .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get default customer group. * @param {number} [storeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupManagementV1GetDefaultGroupGet_1(storeId, options = {}) { const localVarPath = `/V1/customerGroups/default`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (storeId !== undefined) { localVarQueryParameter['storeId'] = storeId; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Check if customer group can be deleted. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupManagementV1IsReadonlyGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling customerGroupManagementV1IsReadonlyGet.'); } const localVarPath = `/V1/customerGroups/{id}/permissions` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CustomerGroupManagementV1ApiFetchParamCreator = CustomerGroupManagementV1ApiFetchParamCreator; /** * CustomerGroupManagementV1Api - functional programming interface * @export */ const CustomerGroupManagementV1ApiFp = function (configuration) { return { /** * Get default customer group. * @param {number} storeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupManagementV1GetDefaultGroupGet(storeId, options) { const localVarFetchArgs = exports.CustomerGroupManagementV1ApiFetchParamCreator(configuration).customerGroupManagementV1GetDefaultGroupGet(storeId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get default customer group. * @param {number} [storeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupManagementV1GetDefaultGroupGet_1(storeId, options) { const localVarFetchArgs = exports.CustomerGroupManagementV1ApiFetchParamCreator(configuration).customerGroupManagementV1GetDefaultGroupGet_1(storeId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Check if customer group can be deleted. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupManagementV1IsReadonlyGet(id, options) { const localVarFetchArgs = exports.CustomerGroupManagementV1ApiFetchParamCreator(configuration).customerGroupManagementV1IsReadonlyGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CustomerGroupManagementV1ApiFp = CustomerGroupManagementV1ApiFp; /** * CustomerGroupManagementV1Api - factory interface * @export */ const CustomerGroupManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get default customer group. * @param {number} storeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupManagementV1GetDefaultGroupGet(storeId, options) { return exports.CustomerGroupManagementV1ApiFp(configuration).customerGroupManagementV1GetDefaultGroupGet(storeId, options)(fetch, basePath); }, /** * Get default customer group. * @param {number} [storeId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupManagementV1GetDefaultGroupGet_1(storeId, options) { return exports.CustomerGroupManagementV1ApiFp(configuration).customerGroupManagementV1GetDefaultGroupGet_1(storeId, options)(fetch, basePath); }, /** * Check if customer group can be deleted. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupManagementV1IsReadonlyGet(id, options) { return exports.CustomerGroupManagementV1ApiFp(configuration).customerGroupManagementV1IsReadonlyGet(id, options)(fetch, basePath); }, }; }; exports.CustomerGroupManagementV1ApiFactory = CustomerGroupManagementV1ApiFactory; /** * CustomerGroupManagementV1Api - object-oriented interface * @export * @class CustomerGroupManagementV1Api * @extends {BaseAPI} */ class CustomerGroupManagementV1Api extends BaseAPI { /** * Get default customer group. * @param {number} storeId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerGroupManagementV1Api */ customerGroupManagementV1GetDefaultGroupGet(storeId, options) { return exports.CustomerGroupManagementV1ApiFp(this.configuration).customerGroupManagementV1GetDefaultGroupGet(storeId, options)(this.fetch, this.basePath); } /** * Get default customer group. * @param {number} [storeId] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerGroupManagementV1Api */ customerGroupManagementV1GetDefaultGroupGet_1(storeId, options) { return exports.CustomerGroupManagementV1ApiFp(this.configuration).customerGroupManagementV1GetDefaultGroupGet_1(storeId, options)(this.fetch, this.basePath); } /** * Check if customer group can be deleted. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerGroupManagementV1Api */ customerGroupManagementV1IsReadonlyGet(id, options) { return exports.CustomerGroupManagementV1ApiFp(this.configuration).customerGroupManagementV1IsReadonlyGet(id, options)(this.fetch, this.basePath); } } exports.CustomerGroupManagementV1Api = CustomerGroupManagementV1Api; /** * CustomerGroupRepositoryV1Api - fetch parameter creator * @export */ const CustomerGroupRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete customer group by ID. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1DeleteByIdDelete(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling customerGroupRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/customerGroups/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get customer group by group ID. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1GetByIdGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling customerGroupRepositoryV1GetByIdGet.'); } const localVarPath = `/V1/customerGroups/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve customer groups. The list of groups can be filtered to exclude the NOT_LOGGED_IN group using the first parameter and/or it can be filtered by tax class. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#GroupRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/customerGroups/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save customer group. * @param {any} [customerGroupRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1SavePost(customerGroupRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/customerGroups`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerGroupRepositoryV1SavePostBody || {}) : (customerGroupRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save customer group. * @param {string} id * @param {any} [customerGroupRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1SavePut(id, customerGroupRepositoryV1SavePutBody, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling customerGroupRepositoryV1SavePut.'); } const localVarPath = `/V1/customerGroups/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(customerGroupRepositoryV1SavePutBody || {}) : (customerGroupRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.CustomerGroupRepositoryV1ApiFetchParamCreator = CustomerGroupRepositoryV1ApiFetchParamCreator; /** * CustomerGroupRepositoryV1Api - functional programming interface * @export */ const CustomerGroupRepositoryV1ApiFp = function (configuration) { return { /** * Delete customer group by ID. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1DeleteByIdDelete(id, options) { const localVarFetchArgs = exports.CustomerGroupRepositoryV1ApiFetchParamCreator(configuration).customerGroupRepositoryV1DeleteByIdDelete(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get customer group by group ID. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1GetByIdGet(id, options) { const localVarFetchArgs = exports.CustomerGroupRepositoryV1ApiFetchParamCreator(configuration).customerGroupRepositoryV1GetByIdGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve customer groups. The list of groups can be filtered to exclude the NOT_LOGGED_IN group using the first parameter and/or it can be filtered by tax class. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#GroupRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.CustomerGroupRepositoryV1ApiFetchParamCreator(configuration).customerGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save customer group. * @param {any} [customerGroupRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1SavePost(customerGroupRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.CustomerGroupRepositoryV1ApiFetchParamCreator(configuration).customerGroupRepositoryV1SavePost(customerGroupRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save customer group. * @param {string} id * @param {any} [customerGroupRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1SavePut(id, customerGroupRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.CustomerGroupRepositoryV1ApiFetchParamCreator(configuration).customerGroupRepositoryV1SavePut(id, customerGroupRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.CustomerGroupRepositoryV1ApiFp = CustomerGroupRepositoryV1ApiFp; /** * CustomerGroupRepositoryV1Api - factory interface * @export */ const CustomerGroupRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete customer group by ID. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1DeleteByIdDelete(id, options) { return exports.CustomerGroupRepositoryV1ApiFp(configuration).customerGroupRepositoryV1DeleteByIdDelete(id, options)(fetch, basePath); }, /** * Get customer group by group ID. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1GetByIdGet(id, options) { return exports.CustomerGroupRepositoryV1ApiFp(configuration).customerGroupRepositoryV1GetByIdGet(id, options)(fetch, basePath); }, /** * Retrieve customer groups. The list of groups can be filtered to exclude the NOT_LOGGED_IN group using the first parameter and/or it can be filtered by tax class. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#GroupRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CustomerGroupRepositoryV1ApiFp(configuration).customerGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save customer group. * @param {any} [customerGroupRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1SavePost(customerGroupRepositoryV1SavePostBody, options) { return exports.CustomerGroupRepositoryV1ApiFp(configuration).customerGroupRepositoryV1SavePost(customerGroupRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save customer group. * @param {string} id * @param {any} [customerGroupRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ customerGroupRepositoryV1SavePut(id, customerGroupRepositoryV1SavePutBody, options) { return exports.CustomerGroupRepositoryV1ApiFp(configuration).customerGroupRepositoryV1SavePut(id, customerGroupRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.CustomerGroupRepositoryV1ApiFactory = CustomerGroupRepositoryV1ApiFactory; /** * CustomerGroupRepositoryV1Api - object-oriented interface * @export * @class CustomerGroupRepositoryV1Api * @extends {BaseAPI} */ class CustomerGroupRepositoryV1Api extends BaseAPI { /** * Delete customer group by ID. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerGroupRepositoryV1Api */ customerGroupRepositoryV1DeleteByIdDelete(id, options) { return exports.CustomerGroupRepositoryV1ApiFp(this.configuration).customerGroupRepositoryV1DeleteByIdDelete(id, options)(this.fetch, this.basePath); } /** * Get customer group by group ID. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerGroupRepositoryV1Api */ customerGroupRepositoryV1GetByIdGet(id, options) { return exports.CustomerGroupRepositoryV1ApiFp(this.configuration).customerGroupRepositoryV1GetByIdGet(id, options)(this.fetch, this.basePath); } /** * Retrieve customer groups. The list of groups can be filtered to exclude the NOT_LOGGED_IN group using the first parameter and/or it can be filtered by tax class. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#GroupRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerGroupRepositoryV1Api */ customerGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.CustomerGroupRepositoryV1ApiFp(this.configuration).customerGroupRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save customer group. * @param {any} [customerGroupRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerGroupRepositoryV1Api */ customerGroupRepositoryV1SavePost(customerGroupRepositoryV1SavePostBody, options) { return exports.CustomerGroupRepositoryV1ApiFp(this.configuration).customerGroupRepositoryV1SavePost(customerGroupRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save customer group. * @param {string} id * @param {any} [customerGroupRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerGroupRepositoryV1Api */ customerGroupRepositoryV1SavePut(id, customerGroupRepositoryV1SavePutBody, options) { return exports.CustomerGroupRepositoryV1ApiFp(this.configuration).customerGroupRepositoryV1SavePut(id, customerGroupRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.CustomerGroupRepositoryV1Api = CustomerGroupRepositoryV1Api; /** * DirectoryCountryInformationAcquirerV1Api - fetch parameter creator * @export */ const DirectoryCountryInformationAcquirerV1ApiFetchParamCreator = function (configuration) { return { /** * Get all countries and regions information for the store. * @param {*} [options] Override http request option. * @throws {RequiredError} */ directoryCountryInformationAcquirerV1GetCountriesInfoGet(options = {}) { const localVarPath = `/V1/directory/countries`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get country and region information for the store. * @param {string} countryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ directoryCountryInformationAcquirerV1GetCountryInfoGet(countryId, options = {}) { // verify required parameter 'countryId' is not null or undefined if (countryId === null || countryId === undefined) { throw new RequiredError('countryId', 'Required parameter countryId was null or undefined when calling directoryCountryInformationAcquirerV1GetCountryInfoGet.'); } const localVarPath = `/V1/directory/countries/{countryId}` .replace(`{${"countryId"}}`, encodeURIComponent(String(countryId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.DirectoryCountryInformationAcquirerV1ApiFetchParamCreator = DirectoryCountryInformationAcquirerV1ApiFetchParamCreator; /** * DirectoryCountryInformationAcquirerV1Api - functional programming interface * @export */ const DirectoryCountryInformationAcquirerV1ApiFp = function (configuration) { return { /** * Get all countries and regions information for the store. * @param {*} [options] Override http request option. * @throws {RequiredError} */ directoryCountryInformationAcquirerV1GetCountriesInfoGet(options) { const localVarFetchArgs = exports.DirectoryCountryInformationAcquirerV1ApiFetchParamCreator(configuration).directoryCountryInformationAcquirerV1GetCountriesInfoGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get country and region information for the store. * @param {string} countryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ directoryCountryInformationAcquirerV1GetCountryInfoGet(countryId, options) { const localVarFetchArgs = exports.DirectoryCountryInformationAcquirerV1ApiFetchParamCreator(configuration).directoryCountryInformationAcquirerV1GetCountryInfoGet(countryId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.DirectoryCountryInformationAcquirerV1ApiFp = DirectoryCountryInformationAcquirerV1ApiFp; /** * DirectoryCountryInformationAcquirerV1Api - factory interface * @export */ const DirectoryCountryInformationAcquirerV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get all countries and regions information for the store. * @param {*} [options] Override http request option. * @throws {RequiredError} */ directoryCountryInformationAcquirerV1GetCountriesInfoGet(options) { return exports.DirectoryCountryInformationAcquirerV1ApiFp(configuration).directoryCountryInformationAcquirerV1GetCountriesInfoGet(options)(fetch, basePath); }, /** * Get country and region information for the store. * @param {string} countryId * @param {*} [options] Override http request option. * @throws {RequiredError} */ directoryCountryInformationAcquirerV1GetCountryInfoGet(countryId, options) { return exports.DirectoryCountryInformationAcquirerV1ApiFp(configuration).directoryCountryInformationAcquirerV1GetCountryInfoGet(countryId, options)(fetch, basePath); }, }; }; exports.DirectoryCountryInformationAcquirerV1ApiFactory = DirectoryCountryInformationAcquirerV1ApiFactory; /** * DirectoryCountryInformationAcquirerV1Api - object-oriented interface * @export * @class DirectoryCountryInformationAcquirerV1Api * @extends {BaseAPI} */ class DirectoryCountryInformationAcquirerV1Api extends BaseAPI { /** * Get all countries and regions information for the store. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DirectoryCountryInformationAcquirerV1Api */ directoryCountryInformationAcquirerV1GetCountriesInfoGet(options) { return exports.DirectoryCountryInformationAcquirerV1ApiFp(this.configuration).directoryCountryInformationAcquirerV1GetCountriesInfoGet(options)(this.fetch, this.basePath); } /** * Get country and region information for the store. * @param {string} countryId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DirectoryCountryInformationAcquirerV1Api */ directoryCountryInformationAcquirerV1GetCountryInfoGet(countryId, options) { return exports.DirectoryCountryInformationAcquirerV1ApiFp(this.configuration).directoryCountryInformationAcquirerV1GetCountryInfoGet(countryId, options)(this.fetch, this.basePath); } } exports.DirectoryCountryInformationAcquirerV1Api = DirectoryCountryInformationAcquirerV1Api; /** * DirectoryCurrencyInformationAcquirerV1Api - fetch parameter creator * @export */ const DirectoryCurrencyInformationAcquirerV1ApiFetchParamCreator = function (configuration) { return { /** * Get currency information for the store. * @param {*} [options] Override http request option. * @throws {RequiredError} */ directoryCurrencyInformationAcquirerV1GetCurrencyInfoGet(options = {}) { const localVarPath = `/V1/directory/currency`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.DirectoryCurrencyInformationAcquirerV1ApiFetchParamCreator = DirectoryCurrencyInformationAcquirerV1ApiFetchParamCreator; /** * DirectoryCurrencyInformationAcquirerV1Api - functional programming interface * @export */ const DirectoryCurrencyInformationAcquirerV1ApiFp = function (configuration) { return { /** * Get currency information for the store. * @param {*} [options] Override http request option. * @throws {RequiredError} */ directoryCurrencyInformationAcquirerV1GetCurrencyInfoGet(options) { const localVarFetchArgs = exports.DirectoryCurrencyInformationAcquirerV1ApiFetchParamCreator(configuration).directoryCurrencyInformationAcquirerV1GetCurrencyInfoGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.DirectoryCurrencyInformationAcquirerV1ApiFp = DirectoryCurrencyInformationAcquirerV1ApiFp; /** * DirectoryCurrencyInformationAcquirerV1Api - factory interface * @export */ const DirectoryCurrencyInformationAcquirerV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get currency information for the store. * @param {*} [options] Override http request option. * @throws {RequiredError} */ directoryCurrencyInformationAcquirerV1GetCurrencyInfoGet(options) { return exports.DirectoryCurrencyInformationAcquirerV1ApiFp(configuration).directoryCurrencyInformationAcquirerV1GetCurrencyInfoGet(options)(fetch, basePath); }, }; }; exports.DirectoryCurrencyInformationAcquirerV1ApiFactory = DirectoryCurrencyInformationAcquirerV1ApiFactory; /** * DirectoryCurrencyInformationAcquirerV1Api - object-oriented interface * @export * @class DirectoryCurrencyInformationAcquirerV1Api * @extends {BaseAPI} */ class DirectoryCurrencyInformationAcquirerV1Api extends BaseAPI { /** * Get currency information for the store. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DirectoryCurrencyInformationAcquirerV1Api */ directoryCurrencyInformationAcquirerV1GetCurrencyInfoGet(options) { return exports.DirectoryCurrencyInformationAcquirerV1ApiFp(this.configuration).directoryCurrencyInformationAcquirerV1GetCurrencyInfoGet(options)(this.fetch, this.basePath); } } exports.DirectoryCurrencyInformationAcquirerV1Api = DirectoryCurrencyInformationAcquirerV1Api; /** * DownloadableLinkRepositoryV1Api - fetch parameter creator * @export */ const DownloadableLinkRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete downloadable link * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1DeleteDelete(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling downloadableLinkRepositoryV1DeleteDelete.'); } const localVarPath = `/V1/products/downloadable-links/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * List of links with associated samples * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1GetListGet(sku, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling downloadableLinkRepositoryV1GetListGet.'); } const localVarPath = `/V1/products/{sku}/downloadable-links` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Update downloadable link of the given product (link type and its resources cannot be changed) * @param {string} sku * @param {any} [downloadableLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1SavePost(sku, downloadableLinkRepositoryV1SavePostBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling downloadableLinkRepositoryV1SavePost.'); } const localVarPath = `/V1/products/{sku}/downloadable-links` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(downloadableLinkRepositoryV1SavePostBody || {}) : (downloadableLinkRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Update downloadable link of the given product (link type and its resources cannot be changed) * @param {string} sku * @param {string} id * @param {any} [downloadableLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1SavePut(sku, id, downloadableLinkRepositoryV1SavePutBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling downloadableLinkRepositoryV1SavePut.'); } // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling downloadableLinkRepositoryV1SavePut.'); } const localVarPath = `/V1/products/{sku}/downloadable-links/{id}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(downloadableLinkRepositoryV1SavePutBody || {}) : (downloadableLinkRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.DownloadableLinkRepositoryV1ApiFetchParamCreator = DownloadableLinkRepositoryV1ApiFetchParamCreator; /** * DownloadableLinkRepositoryV1Api - functional programming interface * @export */ const DownloadableLinkRepositoryV1ApiFp = function (configuration) { return { /** * Delete downloadable link * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1DeleteDelete(id, options) { const localVarFetchArgs = exports.DownloadableLinkRepositoryV1ApiFetchParamCreator(configuration).downloadableLinkRepositoryV1DeleteDelete(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * List of links with associated samples * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1GetListGet(sku, options) { const localVarFetchArgs = exports.DownloadableLinkRepositoryV1ApiFetchParamCreator(configuration).downloadableLinkRepositoryV1GetListGet(sku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Update downloadable link of the given product (link type and its resources cannot be changed) * @param {string} sku * @param {any} [downloadableLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1SavePost(sku, downloadableLinkRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.DownloadableLinkRepositoryV1ApiFetchParamCreator(configuration).downloadableLinkRepositoryV1SavePost(sku, downloadableLinkRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Update downloadable link of the given product (link type and its resources cannot be changed) * @param {string} sku * @param {string} id * @param {any} [downloadableLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1SavePut(sku, id, downloadableLinkRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.DownloadableLinkRepositoryV1ApiFetchParamCreator(configuration).downloadableLinkRepositoryV1SavePut(sku, id, downloadableLinkRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.DownloadableLinkRepositoryV1ApiFp = DownloadableLinkRepositoryV1ApiFp; /** * DownloadableLinkRepositoryV1Api - factory interface * @export */ const DownloadableLinkRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete downloadable link * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1DeleteDelete(id, options) { return exports.DownloadableLinkRepositoryV1ApiFp(configuration).downloadableLinkRepositoryV1DeleteDelete(id, options)(fetch, basePath); }, /** * List of links with associated samples * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1GetListGet(sku, options) { return exports.DownloadableLinkRepositoryV1ApiFp(configuration).downloadableLinkRepositoryV1GetListGet(sku, options)(fetch, basePath); }, /** * Update downloadable link of the given product (link type and its resources cannot be changed) * @param {string} sku * @param {any} [downloadableLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1SavePost(sku, downloadableLinkRepositoryV1SavePostBody, options) { return exports.DownloadableLinkRepositoryV1ApiFp(configuration).downloadableLinkRepositoryV1SavePost(sku, downloadableLinkRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Update downloadable link of the given product (link type and its resources cannot be changed) * @param {string} sku * @param {string} id * @param {any} [downloadableLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableLinkRepositoryV1SavePut(sku, id, downloadableLinkRepositoryV1SavePutBody, options) { return exports.DownloadableLinkRepositoryV1ApiFp(configuration).downloadableLinkRepositoryV1SavePut(sku, id, downloadableLinkRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.DownloadableLinkRepositoryV1ApiFactory = DownloadableLinkRepositoryV1ApiFactory; /** * DownloadableLinkRepositoryV1Api - object-oriented interface * @export * @class DownloadableLinkRepositoryV1Api * @extends {BaseAPI} */ class DownloadableLinkRepositoryV1Api extends BaseAPI { /** * Delete downloadable link * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DownloadableLinkRepositoryV1Api */ downloadableLinkRepositoryV1DeleteDelete(id, options) { return exports.DownloadableLinkRepositoryV1ApiFp(this.configuration).downloadableLinkRepositoryV1DeleteDelete(id, options)(this.fetch, this.basePath); } /** * List of links with associated samples * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DownloadableLinkRepositoryV1Api */ downloadableLinkRepositoryV1GetListGet(sku, options) { return exports.DownloadableLinkRepositoryV1ApiFp(this.configuration).downloadableLinkRepositoryV1GetListGet(sku, options)(this.fetch, this.basePath); } /** * Update downloadable link of the given product (link type and its resources cannot be changed) * @param {string} sku * @param {any} [downloadableLinkRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DownloadableLinkRepositoryV1Api */ downloadableLinkRepositoryV1SavePost(sku, downloadableLinkRepositoryV1SavePostBody, options) { return exports.DownloadableLinkRepositoryV1ApiFp(this.configuration).downloadableLinkRepositoryV1SavePost(sku, downloadableLinkRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Update downloadable link of the given product (link type and its resources cannot be changed) * @param {string} sku * @param {string} id * @param {any} [downloadableLinkRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DownloadableLinkRepositoryV1Api */ downloadableLinkRepositoryV1SavePut(sku, id, downloadableLinkRepositoryV1SavePutBody, options) { return exports.DownloadableLinkRepositoryV1ApiFp(this.configuration).downloadableLinkRepositoryV1SavePut(sku, id, downloadableLinkRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.DownloadableLinkRepositoryV1Api = DownloadableLinkRepositoryV1Api; /** * DownloadableSampleRepositoryV1Api - fetch parameter creator * @export */ const DownloadableSampleRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete downloadable sample * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1DeleteDelete(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling downloadableSampleRepositoryV1DeleteDelete.'); } const localVarPath = `/V1/products/downloadable-links/samples/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * List of samples for downloadable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1GetListGet(sku, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling downloadableSampleRepositoryV1GetListGet.'); } const localVarPath = `/V1/products/{sku}/downloadable-links/samples` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Update downloadable sample of the given product * @param {string} sku * @param {any} [downloadableSampleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1SavePost(sku, downloadableSampleRepositoryV1SavePostBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling downloadableSampleRepositoryV1SavePost.'); } const localVarPath = `/V1/products/{sku}/downloadable-links/samples` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(downloadableSampleRepositoryV1SavePostBody || {}) : (downloadableSampleRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Update downloadable sample of the given product * @param {string} sku * @param {string} id * @param {any} [downloadableSampleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1SavePut(sku, id, downloadableSampleRepositoryV1SavePutBody, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling downloadableSampleRepositoryV1SavePut.'); } // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling downloadableSampleRepositoryV1SavePut.'); } const localVarPath = `/V1/products/{sku}/downloadable-links/samples/{id}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(downloadableSampleRepositoryV1SavePutBody || {}) : (downloadableSampleRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.DownloadableSampleRepositoryV1ApiFetchParamCreator = DownloadableSampleRepositoryV1ApiFetchParamCreator; /** * DownloadableSampleRepositoryV1Api - functional programming interface * @export */ const DownloadableSampleRepositoryV1ApiFp = function (configuration) { return { /** * Delete downloadable sample * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1DeleteDelete(id, options) { const localVarFetchArgs = exports.DownloadableSampleRepositoryV1ApiFetchParamCreator(configuration).downloadableSampleRepositoryV1DeleteDelete(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * List of samples for downloadable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1GetListGet(sku, options) { const localVarFetchArgs = exports.DownloadableSampleRepositoryV1ApiFetchParamCreator(configuration).downloadableSampleRepositoryV1GetListGet(sku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Update downloadable sample of the given product * @param {string} sku * @param {any} [downloadableSampleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1SavePost(sku, downloadableSampleRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.DownloadableSampleRepositoryV1ApiFetchParamCreator(configuration).downloadableSampleRepositoryV1SavePost(sku, downloadableSampleRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Update downloadable sample of the given product * @param {string} sku * @param {string} id * @param {any} [downloadableSampleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1SavePut(sku, id, downloadableSampleRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.DownloadableSampleRepositoryV1ApiFetchParamCreator(configuration).downloadableSampleRepositoryV1SavePut(sku, id, downloadableSampleRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.DownloadableSampleRepositoryV1ApiFp = DownloadableSampleRepositoryV1ApiFp; /** * DownloadableSampleRepositoryV1Api - factory interface * @export */ const DownloadableSampleRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete downloadable sample * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1DeleteDelete(id, options) { return exports.DownloadableSampleRepositoryV1ApiFp(configuration).downloadableSampleRepositoryV1DeleteDelete(id, options)(fetch, basePath); }, /** * List of samples for downloadable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1GetListGet(sku, options) { return exports.DownloadableSampleRepositoryV1ApiFp(configuration).downloadableSampleRepositoryV1GetListGet(sku, options)(fetch, basePath); }, /** * Update downloadable sample of the given product * @param {string} sku * @param {any} [downloadableSampleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1SavePost(sku, downloadableSampleRepositoryV1SavePostBody, options) { return exports.DownloadableSampleRepositoryV1ApiFp(configuration).downloadableSampleRepositoryV1SavePost(sku, downloadableSampleRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Update downloadable sample of the given product * @param {string} sku * @param {string} id * @param {any} [downloadableSampleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadableSampleRepositoryV1SavePut(sku, id, downloadableSampleRepositoryV1SavePutBody, options) { return exports.DownloadableSampleRepositoryV1ApiFp(configuration).downloadableSampleRepositoryV1SavePut(sku, id, downloadableSampleRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.DownloadableSampleRepositoryV1ApiFactory = DownloadableSampleRepositoryV1ApiFactory; /** * DownloadableSampleRepositoryV1Api - object-oriented interface * @export * @class DownloadableSampleRepositoryV1Api * @extends {BaseAPI} */ class DownloadableSampleRepositoryV1Api extends BaseAPI { /** * Delete downloadable sample * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DownloadableSampleRepositoryV1Api */ downloadableSampleRepositoryV1DeleteDelete(id, options) { return exports.DownloadableSampleRepositoryV1ApiFp(this.configuration).downloadableSampleRepositoryV1DeleteDelete(id, options)(this.fetch, this.basePath); } /** * List of samples for downloadable product * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DownloadableSampleRepositoryV1Api */ downloadableSampleRepositoryV1GetListGet(sku, options) { return exports.DownloadableSampleRepositoryV1ApiFp(this.configuration).downloadableSampleRepositoryV1GetListGet(sku, options)(this.fetch, this.basePath); } /** * Update downloadable sample of the given product * @param {string} sku * @param {any} [downloadableSampleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DownloadableSampleRepositoryV1Api */ downloadableSampleRepositoryV1SavePost(sku, downloadableSampleRepositoryV1SavePostBody, options) { return exports.DownloadableSampleRepositoryV1ApiFp(this.configuration).downloadableSampleRepositoryV1SavePost(sku, downloadableSampleRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Update downloadable sample of the given product * @param {string} sku * @param {string} id * @param {any} [downloadableSampleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DownloadableSampleRepositoryV1Api */ downloadableSampleRepositoryV1SavePut(sku, id, downloadableSampleRepositoryV1SavePutBody, options) { return exports.DownloadableSampleRepositoryV1ApiFp(this.configuration).downloadableSampleRepositoryV1SavePut(sku, id, downloadableSampleRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.DownloadableSampleRepositoryV1Api = DownloadableSampleRepositoryV1Api; /** * EavAttributeSetManagementV1Api - fetch parameter creator * @export */ const EavAttributeSetManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Create attribute set from data * @param {any} [eavAttributeSetManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetManagementV1CreatePost(eavAttributeSetManagementV1CreatePostBody, options = {}) { const localVarPath = `/V1/eav/attribute-sets`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(eavAttributeSetManagementV1CreatePostBody || {}) : (eavAttributeSetManagementV1CreatePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.EavAttributeSetManagementV1ApiFetchParamCreator = EavAttributeSetManagementV1ApiFetchParamCreator; /** * EavAttributeSetManagementV1Api - functional programming interface * @export */ const EavAttributeSetManagementV1ApiFp = function (configuration) { return { /** * Create attribute set from data * @param {any} [eavAttributeSetManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetManagementV1CreatePost(eavAttributeSetManagementV1CreatePostBody, options) { const localVarFetchArgs = exports.EavAttributeSetManagementV1ApiFetchParamCreator(configuration).eavAttributeSetManagementV1CreatePost(eavAttributeSetManagementV1CreatePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.EavAttributeSetManagementV1ApiFp = EavAttributeSetManagementV1ApiFp; /** * EavAttributeSetManagementV1Api - factory interface * @export */ const EavAttributeSetManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Create attribute set from data * @param {any} [eavAttributeSetManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetManagementV1CreatePost(eavAttributeSetManagementV1CreatePostBody, options) { return exports.EavAttributeSetManagementV1ApiFp(configuration).eavAttributeSetManagementV1CreatePost(eavAttributeSetManagementV1CreatePostBody, options)(fetch, basePath); }, }; }; exports.EavAttributeSetManagementV1ApiFactory = EavAttributeSetManagementV1ApiFactory; /** * EavAttributeSetManagementV1Api - object-oriented interface * @export * @class EavAttributeSetManagementV1Api * @extends {BaseAPI} */ class EavAttributeSetManagementV1Api extends BaseAPI { /** * Create attribute set from data * @param {any} [eavAttributeSetManagementV1CreatePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EavAttributeSetManagementV1Api */ eavAttributeSetManagementV1CreatePost(eavAttributeSetManagementV1CreatePostBody, options) { return exports.EavAttributeSetManagementV1ApiFp(this.configuration).eavAttributeSetManagementV1CreatePost(eavAttributeSetManagementV1CreatePostBody, options)(this.fetch, this.basePath); } } exports.EavAttributeSetManagementV1Api = EavAttributeSetManagementV1Api; /** * EavAttributeSetRepositoryV1Api - fetch parameter creator * @export */ const EavAttributeSetRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Remove attribute set by given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options = {}) { // verify required parameter 'attributeSetId' is not null or undefined if (attributeSetId === null || attributeSetId === undefined) { throw new RequiredError('attributeSetId', 'Required parameter attributeSetId was null or undefined when calling eavAttributeSetRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/eav/attribute-sets/{attributeSetId}` .replace(`{${"attributeSetId"}}`, encodeURIComponent(String(attributeSetId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve attribute set information based on given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1GetGet(attributeSetId, options = {}) { // verify required parameter 'attributeSetId' is not null or undefined if (attributeSetId === null || attributeSetId === undefined) { throw new RequiredError('attributeSetId', 'Required parameter attributeSetId was null or undefined when calling eavAttributeSetRepositoryV1GetGet.'); } const localVarPath = `/V1/eav/attribute-sets/{attributeSetId}` .replace(`{${"attributeSetId"}}`, encodeURIComponent(String(attributeSetId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve list of Attribute Sets This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#AttributeSetRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/eav/attribute-sets/list`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save attribute set data * @param {string} attributeSetId * @param {any} [eavAttributeSetRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1SavePut(attributeSetId, eavAttributeSetRepositoryV1SavePutBody, options = {}) { // verify required parameter 'attributeSetId' is not null or undefined if (attributeSetId === null || attributeSetId === undefined) { throw new RequiredError('attributeSetId', 'Required parameter attributeSetId was null or undefined when calling eavAttributeSetRepositoryV1SavePut.'); } const localVarPath = `/V1/eav/attribute-sets/{attributeSetId}` .replace(`{${"attributeSetId"}}`, encodeURIComponent(String(attributeSetId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(eavAttributeSetRepositoryV1SavePutBody || {}) : (eavAttributeSetRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.EavAttributeSetRepositoryV1ApiFetchParamCreator = EavAttributeSetRepositoryV1ApiFetchParamCreator; /** * EavAttributeSetRepositoryV1Api - functional programming interface * @export */ const EavAttributeSetRepositoryV1ApiFp = function (configuration) { return { /** * Remove attribute set by given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options) { const localVarFetchArgs = exports.EavAttributeSetRepositoryV1ApiFetchParamCreator(configuration).eavAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve attribute set information based on given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1GetGet(attributeSetId, options) { const localVarFetchArgs = exports.EavAttributeSetRepositoryV1ApiFetchParamCreator(configuration).eavAttributeSetRepositoryV1GetGet(attributeSetId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve list of Attribute Sets This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#AttributeSetRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.EavAttributeSetRepositoryV1ApiFetchParamCreator(configuration).eavAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save attribute set data * @param {string} attributeSetId * @param {any} [eavAttributeSetRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1SavePut(attributeSetId, eavAttributeSetRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.EavAttributeSetRepositoryV1ApiFetchParamCreator(configuration).eavAttributeSetRepositoryV1SavePut(attributeSetId, eavAttributeSetRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.EavAttributeSetRepositoryV1ApiFp = EavAttributeSetRepositoryV1ApiFp; /** * EavAttributeSetRepositoryV1Api - factory interface * @export */ const EavAttributeSetRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Remove attribute set by given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options) { return exports.EavAttributeSetRepositoryV1ApiFp(configuration).eavAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options)(fetch, basePath); }, /** * Retrieve attribute set information based on given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1GetGet(attributeSetId, options) { return exports.EavAttributeSetRepositoryV1ApiFp(configuration).eavAttributeSetRepositoryV1GetGet(attributeSetId, options)(fetch, basePath); }, /** * Retrieve list of Attribute Sets This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#AttributeSetRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.EavAttributeSetRepositoryV1ApiFp(configuration).eavAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save attribute set data * @param {string} attributeSetId * @param {any} [eavAttributeSetRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ eavAttributeSetRepositoryV1SavePut(attributeSetId, eavAttributeSetRepositoryV1SavePutBody, options) { return exports.EavAttributeSetRepositoryV1ApiFp(configuration).eavAttributeSetRepositoryV1SavePut(attributeSetId, eavAttributeSetRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.EavAttributeSetRepositoryV1ApiFactory = EavAttributeSetRepositoryV1ApiFactory; /** * EavAttributeSetRepositoryV1Api - object-oriented interface * @export * @class EavAttributeSetRepositoryV1Api * @extends {BaseAPI} */ class EavAttributeSetRepositoryV1Api extends BaseAPI { /** * Remove attribute set by given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EavAttributeSetRepositoryV1Api */ eavAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options) { return exports.EavAttributeSetRepositoryV1ApiFp(this.configuration).eavAttributeSetRepositoryV1DeleteByIdDelete(attributeSetId, options)(this.fetch, this.basePath); } /** * Retrieve attribute set information based on given ID * @param {number} attributeSetId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EavAttributeSetRepositoryV1Api */ eavAttributeSetRepositoryV1GetGet(attributeSetId, options) { return exports.EavAttributeSetRepositoryV1ApiFp(this.configuration).eavAttributeSetRepositoryV1GetGet(attributeSetId, options)(this.fetch, this.basePath); } /** * Retrieve list of Attribute Sets This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#AttributeSetRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EavAttributeSetRepositoryV1Api */ eavAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.EavAttributeSetRepositoryV1ApiFp(this.configuration).eavAttributeSetRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save attribute set data * @param {string} attributeSetId * @param {any} [eavAttributeSetRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EavAttributeSetRepositoryV1Api */ eavAttributeSetRepositoryV1SavePut(attributeSetId, eavAttributeSetRepositoryV1SavePutBody, options) { return exports.EavAttributeSetRepositoryV1ApiFp(this.configuration).eavAttributeSetRepositoryV1SavePut(attributeSetId, eavAttributeSetRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.EavAttributeSetRepositoryV1Api = EavAttributeSetRepositoryV1Api; /** * GiftMessageCartRepositoryV1Api - fetch parameter creator * @export */ const GiftMessageCartRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Return the gift message for a specified order. * @param {number} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling giftMessageCartRepositoryV1GetGet.'); } const localVarPath = `/V1/carts/{cartId}/gift-message` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Return the gift message for a specified order. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1GetGet_1(options = {}) { const localVarPath = `/V1/carts/mine/gift-message`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Set the gift message for an entire order. * @param {number} cartId The cart ID. * @param {any} [giftMessageCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1SavePost(cartId, giftMessageCartRepositoryV1SavePostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling giftMessageCartRepositoryV1SavePost.'); } const localVarPath = `/V1/carts/{cartId}/gift-message` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(giftMessageCartRepositoryV1SavePostBody || {}) : (giftMessageCartRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Set the gift message for an entire order. * @param {any} [giftMessageCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1SavePost_2(giftMessageCartRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/carts/mine/gift-message`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(giftMessageCartRepositoryV1SavePostBody || {}) : (giftMessageCartRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.GiftMessageCartRepositoryV1ApiFetchParamCreator = GiftMessageCartRepositoryV1ApiFetchParamCreator; /** * GiftMessageCartRepositoryV1Api - functional programming interface * @export */ const GiftMessageCartRepositoryV1ApiFp = function (configuration) { return { /** * Return the gift message for a specified order. * @param {number} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1GetGet(cartId, options) { const localVarFetchArgs = exports.GiftMessageCartRepositoryV1ApiFetchParamCreator(configuration).giftMessageCartRepositoryV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Return the gift message for a specified order. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1GetGet_1(options) { const localVarFetchArgs = exports.GiftMessageCartRepositoryV1ApiFetchParamCreator(configuration).giftMessageCartRepositoryV1GetGet_1(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Set the gift message for an entire order. * @param {number} cartId The cart ID. * @param {any} [giftMessageCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1SavePost(cartId, giftMessageCartRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.GiftMessageCartRepositoryV1ApiFetchParamCreator(configuration).giftMessageCartRepositoryV1SavePost(cartId, giftMessageCartRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Set the gift message for an entire order. * @param {any} [giftMessageCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1SavePost_2(giftMessageCartRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.GiftMessageCartRepositoryV1ApiFetchParamCreator(configuration).giftMessageCartRepositoryV1SavePost_2(giftMessageCartRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.GiftMessageCartRepositoryV1ApiFp = GiftMessageCartRepositoryV1ApiFp; /** * GiftMessageCartRepositoryV1Api - factory interface * @export */ const GiftMessageCartRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Return the gift message for a specified order. * @param {number} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1GetGet(cartId, options) { return exports.GiftMessageCartRepositoryV1ApiFp(configuration).giftMessageCartRepositoryV1GetGet(cartId, options)(fetch, basePath); }, /** * Return the gift message for a specified order. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1GetGet_1(options) { return exports.GiftMessageCartRepositoryV1ApiFp(configuration).giftMessageCartRepositoryV1GetGet_1(options)(fetch, basePath); }, /** * Set the gift message for an entire order. * @param {number} cartId The cart ID. * @param {any} [giftMessageCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1SavePost(cartId, giftMessageCartRepositoryV1SavePostBody, options) { return exports.GiftMessageCartRepositoryV1ApiFp(configuration).giftMessageCartRepositoryV1SavePost(cartId, giftMessageCartRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Set the gift message for an entire order. * @param {any} [giftMessageCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageCartRepositoryV1SavePost_2(giftMessageCartRepositoryV1SavePostBody, options) { return exports.GiftMessageCartRepositoryV1ApiFp(configuration).giftMessageCartRepositoryV1SavePost_2(giftMessageCartRepositoryV1SavePostBody, options)(fetch, basePath); }, }; }; exports.GiftMessageCartRepositoryV1ApiFactory = GiftMessageCartRepositoryV1ApiFactory; /** * GiftMessageCartRepositoryV1Api - object-oriented interface * @export * @class GiftMessageCartRepositoryV1Api * @extends {BaseAPI} */ class GiftMessageCartRepositoryV1Api extends BaseAPI { /** * Return the gift message for a specified order. * @param {number} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageCartRepositoryV1Api */ giftMessageCartRepositoryV1GetGet(cartId, options) { return exports.GiftMessageCartRepositoryV1ApiFp(this.configuration).giftMessageCartRepositoryV1GetGet(cartId, options)(this.fetch, this.basePath); } /** * Return the gift message for a specified order. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageCartRepositoryV1Api */ giftMessageCartRepositoryV1GetGet_1(options) { return exports.GiftMessageCartRepositoryV1ApiFp(this.configuration).giftMessageCartRepositoryV1GetGet_1(options)(this.fetch, this.basePath); } /** * Set the gift message for an entire order. * @param {number} cartId The cart ID. * @param {any} [giftMessageCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageCartRepositoryV1Api */ giftMessageCartRepositoryV1SavePost(cartId, giftMessageCartRepositoryV1SavePostBody, options) { return exports.GiftMessageCartRepositoryV1ApiFp(this.configuration).giftMessageCartRepositoryV1SavePost(cartId, giftMessageCartRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Set the gift message for an entire order. * @param {any} [giftMessageCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageCartRepositoryV1Api */ giftMessageCartRepositoryV1SavePost_2(giftMessageCartRepositoryV1SavePostBody, options) { return exports.GiftMessageCartRepositoryV1ApiFp(this.configuration).giftMessageCartRepositoryV1SavePost_2(giftMessageCartRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } } exports.GiftMessageCartRepositoryV1Api = GiftMessageCartRepositoryV1Api; /** * GiftMessageGuestCartRepositoryV1Api - fetch parameter creator * @export */ const GiftMessageGuestCartRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Return the gift message for a specified order. * @param {string} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestCartRepositoryV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling giftMessageGuestCartRepositoryV1GetGet.'); } const localVarPath = `/V1/guest-carts/{cartId}/gift-message` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Set the gift message for an entire order. * @param {string} cartId The cart ID. * @param {any} [giftMessageGuestCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestCartRepositoryV1SavePost(cartId, giftMessageGuestCartRepositoryV1SavePostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling giftMessageGuestCartRepositoryV1SavePost.'); } const localVarPath = `/V1/guest-carts/{cartId}/gift-message` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(giftMessageGuestCartRepositoryV1SavePostBody || {}) : (giftMessageGuestCartRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.GiftMessageGuestCartRepositoryV1ApiFetchParamCreator = GiftMessageGuestCartRepositoryV1ApiFetchParamCreator; /** * GiftMessageGuestCartRepositoryV1Api - functional programming interface * @export */ const GiftMessageGuestCartRepositoryV1ApiFp = function (configuration) { return { /** * Return the gift message for a specified order. * @param {string} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestCartRepositoryV1GetGet(cartId, options) { const localVarFetchArgs = exports.GiftMessageGuestCartRepositoryV1ApiFetchParamCreator(configuration).giftMessageGuestCartRepositoryV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Set the gift message for an entire order. * @param {string} cartId The cart ID. * @param {any} [giftMessageGuestCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestCartRepositoryV1SavePost(cartId, giftMessageGuestCartRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.GiftMessageGuestCartRepositoryV1ApiFetchParamCreator(configuration).giftMessageGuestCartRepositoryV1SavePost(cartId, giftMessageGuestCartRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.GiftMessageGuestCartRepositoryV1ApiFp = GiftMessageGuestCartRepositoryV1ApiFp; /** * GiftMessageGuestCartRepositoryV1Api - factory interface * @export */ const GiftMessageGuestCartRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Return the gift message for a specified order. * @param {string} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestCartRepositoryV1GetGet(cartId, options) { return exports.GiftMessageGuestCartRepositoryV1ApiFp(configuration).giftMessageGuestCartRepositoryV1GetGet(cartId, options)(fetch, basePath); }, /** * Set the gift message for an entire order. * @param {string} cartId The cart ID. * @param {any} [giftMessageGuestCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestCartRepositoryV1SavePost(cartId, giftMessageGuestCartRepositoryV1SavePostBody, options) { return exports.GiftMessageGuestCartRepositoryV1ApiFp(configuration).giftMessageGuestCartRepositoryV1SavePost(cartId, giftMessageGuestCartRepositoryV1SavePostBody, options)(fetch, basePath); }, }; }; exports.GiftMessageGuestCartRepositoryV1ApiFactory = GiftMessageGuestCartRepositoryV1ApiFactory; /** * GiftMessageGuestCartRepositoryV1Api - object-oriented interface * @export * @class GiftMessageGuestCartRepositoryV1Api * @extends {BaseAPI} */ class GiftMessageGuestCartRepositoryV1Api extends BaseAPI { /** * Return the gift message for a specified order. * @param {string} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageGuestCartRepositoryV1Api */ giftMessageGuestCartRepositoryV1GetGet(cartId, options) { return exports.GiftMessageGuestCartRepositoryV1ApiFp(this.configuration).giftMessageGuestCartRepositoryV1GetGet(cartId, options)(this.fetch, this.basePath); } /** * Set the gift message for an entire order. * @param {string} cartId The cart ID. * @param {any} [giftMessageGuestCartRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageGuestCartRepositoryV1Api */ giftMessageGuestCartRepositoryV1SavePost(cartId, giftMessageGuestCartRepositoryV1SavePostBody, options) { return exports.GiftMessageGuestCartRepositoryV1ApiFp(this.configuration).giftMessageGuestCartRepositoryV1SavePost(cartId, giftMessageGuestCartRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } } exports.GiftMessageGuestCartRepositoryV1Api = GiftMessageGuestCartRepositoryV1Api; /** * GiftMessageGuestItemRepositoryV1Api - fetch parameter creator * @export */ const GiftMessageGuestItemRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Return the gift message for a specified item in a specified shopping cart. * @param {string} cartId The shopping cart ID. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestItemRepositoryV1GetGet(cartId, itemId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling giftMessageGuestItemRepositoryV1GetGet.'); } // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling giftMessageGuestItemRepositoryV1GetGet.'); } const localVarPath = `/V1/guest-carts/{cartId}/gift-message/{itemId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))) .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Set the gift message for a specified item in a specified shopping cart. * @param {string} cartId The cart ID. * @param {number} itemId The item ID. * @param {any} [giftMessageGuestItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestItemRepositoryV1SavePost(cartId, itemId, giftMessageGuestItemRepositoryV1SavePostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling giftMessageGuestItemRepositoryV1SavePost.'); } // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling giftMessageGuestItemRepositoryV1SavePost.'); } const localVarPath = `/V1/guest-carts/{cartId}/gift-message/{itemId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))) .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(giftMessageGuestItemRepositoryV1SavePostBody || {}) : (giftMessageGuestItemRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.GiftMessageGuestItemRepositoryV1ApiFetchParamCreator = GiftMessageGuestItemRepositoryV1ApiFetchParamCreator; /** * GiftMessageGuestItemRepositoryV1Api - functional programming interface * @export */ const GiftMessageGuestItemRepositoryV1ApiFp = function (configuration) { return { /** * Return the gift message for a specified item in a specified shopping cart. * @param {string} cartId The shopping cart ID. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestItemRepositoryV1GetGet(cartId, itemId, options) { const localVarFetchArgs = exports.GiftMessageGuestItemRepositoryV1ApiFetchParamCreator(configuration).giftMessageGuestItemRepositoryV1GetGet(cartId, itemId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Set the gift message for a specified item in a specified shopping cart. * @param {string} cartId The cart ID. * @param {number} itemId The item ID. * @param {any} [giftMessageGuestItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestItemRepositoryV1SavePost(cartId, itemId, giftMessageGuestItemRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.GiftMessageGuestItemRepositoryV1ApiFetchParamCreator(configuration).giftMessageGuestItemRepositoryV1SavePost(cartId, itemId, giftMessageGuestItemRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.GiftMessageGuestItemRepositoryV1ApiFp = GiftMessageGuestItemRepositoryV1ApiFp; /** * GiftMessageGuestItemRepositoryV1Api - factory interface * @export */ const GiftMessageGuestItemRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Return the gift message for a specified item in a specified shopping cart. * @param {string} cartId The shopping cart ID. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestItemRepositoryV1GetGet(cartId, itemId, options) { return exports.GiftMessageGuestItemRepositoryV1ApiFp(configuration).giftMessageGuestItemRepositoryV1GetGet(cartId, itemId, options)(fetch, basePath); }, /** * Set the gift message for a specified item in a specified shopping cart. * @param {string} cartId The cart ID. * @param {number} itemId The item ID. * @param {any} [giftMessageGuestItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageGuestItemRepositoryV1SavePost(cartId, itemId, giftMessageGuestItemRepositoryV1SavePostBody, options) { return exports.GiftMessageGuestItemRepositoryV1ApiFp(configuration).giftMessageGuestItemRepositoryV1SavePost(cartId, itemId, giftMessageGuestItemRepositoryV1SavePostBody, options)(fetch, basePath); }, }; }; exports.GiftMessageGuestItemRepositoryV1ApiFactory = GiftMessageGuestItemRepositoryV1ApiFactory; /** * GiftMessageGuestItemRepositoryV1Api - object-oriented interface * @export * @class GiftMessageGuestItemRepositoryV1Api * @extends {BaseAPI} */ class GiftMessageGuestItemRepositoryV1Api extends BaseAPI { /** * Return the gift message for a specified item in a specified shopping cart. * @param {string} cartId The shopping cart ID. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageGuestItemRepositoryV1Api */ giftMessageGuestItemRepositoryV1GetGet(cartId, itemId, options) { return exports.GiftMessageGuestItemRepositoryV1ApiFp(this.configuration).giftMessageGuestItemRepositoryV1GetGet(cartId, itemId, options)(this.fetch, this.basePath); } /** * Set the gift message for a specified item in a specified shopping cart. * @param {string} cartId The cart ID. * @param {number} itemId The item ID. * @param {any} [giftMessageGuestItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageGuestItemRepositoryV1Api */ giftMessageGuestItemRepositoryV1SavePost(cartId, itemId, giftMessageGuestItemRepositoryV1SavePostBody, options) { return exports.GiftMessageGuestItemRepositoryV1ApiFp(this.configuration).giftMessageGuestItemRepositoryV1SavePost(cartId, itemId, giftMessageGuestItemRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } } exports.GiftMessageGuestItemRepositoryV1Api = GiftMessageGuestItemRepositoryV1Api; /** * GiftMessageItemRepositoryV1Api - fetch parameter creator * @export */ const GiftMessageItemRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Return the gift message for a specified item in a specified shopping cart. * @param {number} cartId The shopping cart ID. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1GetGet(cartId, itemId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling giftMessageItemRepositoryV1GetGet.'); } // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling giftMessageItemRepositoryV1GetGet.'); } const localVarPath = `/V1/carts/{cartId}/gift-message/{itemId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))) .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Return the gift message for a specified item in a specified shopping cart. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1GetGet_1(itemId, options = {}) { // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling giftMessageItemRepositoryV1GetGet_1.'); } const localVarPath = `/V1/carts/mine/gift-message/{itemId}` .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Set the gift message for a specified item in a specified shopping cart. * @param {number} cartId The cart ID. * @param {number} itemId The item ID. * @param {any} [giftMessageItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1SavePost(cartId, itemId, giftMessageItemRepositoryV1SavePostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling giftMessageItemRepositoryV1SavePost.'); } // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling giftMessageItemRepositoryV1SavePost.'); } const localVarPath = `/V1/carts/{cartId}/gift-message/{itemId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))) .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(giftMessageItemRepositoryV1SavePostBody || {}) : (giftMessageItemRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Set the gift message for a specified item in a specified shopping cart. * @param {number} itemId The item ID. * @param {any} [giftMessageItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1SavePost_2(itemId, giftMessageItemRepositoryV1SavePostBody, options = {}) { // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling giftMessageItemRepositoryV1SavePost_2.'); } const localVarPath = `/V1/carts/mine/gift-message/{itemId}` .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(giftMessageItemRepositoryV1SavePostBody || {}) : (giftMessageItemRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.GiftMessageItemRepositoryV1ApiFetchParamCreator = GiftMessageItemRepositoryV1ApiFetchParamCreator; /** * GiftMessageItemRepositoryV1Api - functional programming interface * @export */ const GiftMessageItemRepositoryV1ApiFp = function (configuration) { return { /** * Return the gift message for a specified item in a specified shopping cart. * @param {number} cartId The shopping cart ID. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1GetGet(cartId, itemId, options) { const localVarFetchArgs = exports.GiftMessageItemRepositoryV1ApiFetchParamCreator(configuration).giftMessageItemRepositoryV1GetGet(cartId, itemId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Return the gift message for a specified item in a specified shopping cart. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1GetGet_1(itemId, options) { const localVarFetchArgs = exports.GiftMessageItemRepositoryV1ApiFetchParamCreator(configuration).giftMessageItemRepositoryV1GetGet_1(itemId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Set the gift message for a specified item in a specified shopping cart. * @param {number} cartId The cart ID. * @param {number} itemId The item ID. * @param {any} [giftMessageItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1SavePost(cartId, itemId, giftMessageItemRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.GiftMessageItemRepositoryV1ApiFetchParamCreator(configuration).giftMessageItemRepositoryV1SavePost(cartId, itemId, giftMessageItemRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Set the gift message for a specified item in a specified shopping cart. * @param {number} itemId The item ID. * @param {any} [giftMessageItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1SavePost_2(itemId, giftMessageItemRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.GiftMessageItemRepositoryV1ApiFetchParamCreator(configuration).giftMessageItemRepositoryV1SavePost_2(itemId, giftMessageItemRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.GiftMessageItemRepositoryV1ApiFp = GiftMessageItemRepositoryV1ApiFp; /** * GiftMessageItemRepositoryV1Api - factory interface * @export */ const GiftMessageItemRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Return the gift message for a specified item in a specified shopping cart. * @param {number} cartId The shopping cart ID. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1GetGet(cartId, itemId, options) { return exports.GiftMessageItemRepositoryV1ApiFp(configuration).giftMessageItemRepositoryV1GetGet(cartId, itemId, options)(fetch, basePath); }, /** * Return the gift message for a specified item in a specified shopping cart. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1GetGet_1(itemId, options) { return exports.GiftMessageItemRepositoryV1ApiFp(configuration).giftMessageItemRepositoryV1GetGet_1(itemId, options)(fetch, basePath); }, /** * Set the gift message for a specified item in a specified shopping cart. * @param {number} cartId The cart ID. * @param {number} itemId The item ID. * @param {any} [giftMessageItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1SavePost(cartId, itemId, giftMessageItemRepositoryV1SavePostBody, options) { return exports.GiftMessageItemRepositoryV1ApiFp(configuration).giftMessageItemRepositoryV1SavePost(cartId, itemId, giftMessageItemRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Set the gift message for a specified item in a specified shopping cart. * @param {number} itemId The item ID. * @param {any} [giftMessageItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ giftMessageItemRepositoryV1SavePost_2(itemId, giftMessageItemRepositoryV1SavePostBody, options) { return exports.GiftMessageItemRepositoryV1ApiFp(configuration).giftMessageItemRepositoryV1SavePost_2(itemId, giftMessageItemRepositoryV1SavePostBody, options)(fetch, basePath); }, }; }; exports.GiftMessageItemRepositoryV1ApiFactory = GiftMessageItemRepositoryV1ApiFactory; /** * GiftMessageItemRepositoryV1Api - object-oriented interface * @export * @class GiftMessageItemRepositoryV1Api * @extends {BaseAPI} */ class GiftMessageItemRepositoryV1Api extends BaseAPI { /** * Return the gift message for a specified item in a specified shopping cart. * @param {number} cartId The shopping cart ID. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageItemRepositoryV1Api */ giftMessageItemRepositoryV1GetGet(cartId, itemId, options) { return exports.GiftMessageItemRepositoryV1ApiFp(this.configuration).giftMessageItemRepositoryV1GetGet(cartId, itemId, options)(this.fetch, this.basePath); } /** * Return the gift message for a specified item in a specified shopping cart. * @param {number} itemId The item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageItemRepositoryV1Api */ giftMessageItemRepositoryV1GetGet_1(itemId, options) { return exports.GiftMessageItemRepositoryV1ApiFp(this.configuration).giftMessageItemRepositoryV1GetGet_1(itemId, options)(this.fetch, this.basePath); } /** * Set the gift message for a specified item in a specified shopping cart. * @param {number} cartId The cart ID. * @param {number} itemId The item ID. * @param {any} [giftMessageItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageItemRepositoryV1Api */ giftMessageItemRepositoryV1SavePost(cartId, itemId, giftMessageItemRepositoryV1SavePostBody, options) { return exports.GiftMessageItemRepositoryV1ApiFp(this.configuration).giftMessageItemRepositoryV1SavePost(cartId, itemId, giftMessageItemRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Set the gift message for a specified item in a specified shopping cart. * @param {number} itemId The item ID. * @param {any} [giftMessageItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GiftMessageItemRepositoryV1Api */ giftMessageItemRepositoryV1SavePost_2(itemId, giftMessageItemRepositoryV1SavePostBody, options) { return exports.GiftMessageItemRepositoryV1ApiFp(this.configuration).giftMessageItemRepositoryV1SavePost_2(itemId, giftMessageItemRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } } exports.GiftMessageItemRepositoryV1Api = GiftMessageItemRepositoryV1Api; /** * IntegrationAdminTokenServiceV1Api - fetch parameter creator * @export */ const IntegrationAdminTokenServiceV1ApiFetchParamCreator = function (configuration) { return { /** * Create access token for admin given the admin credentials. * @param {any} [integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ integrationAdminTokenServiceV1CreateAdminAccessTokenPost(integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody, options = {}) { const localVarPath = `/V1/integration/admin/token`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody || {}) : (integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.IntegrationAdminTokenServiceV1ApiFetchParamCreator = IntegrationAdminTokenServiceV1ApiFetchParamCreator; /** * IntegrationAdminTokenServiceV1Api - functional programming interface * @export */ const IntegrationAdminTokenServiceV1ApiFp = function (configuration) { return { /** * Create access token for admin given the admin credentials. * @param {any} [integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ integrationAdminTokenServiceV1CreateAdminAccessTokenPost(integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody, options) { const localVarFetchArgs = exports.IntegrationAdminTokenServiceV1ApiFetchParamCreator(configuration).integrationAdminTokenServiceV1CreateAdminAccessTokenPost(integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.IntegrationAdminTokenServiceV1ApiFp = IntegrationAdminTokenServiceV1ApiFp; /** * IntegrationAdminTokenServiceV1Api - factory interface * @export */ const IntegrationAdminTokenServiceV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Create access token for admin given the admin credentials. * @param {any} [integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ integrationAdminTokenServiceV1CreateAdminAccessTokenPost(integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody, options) { return exports.IntegrationAdminTokenServiceV1ApiFp(configuration).integrationAdminTokenServiceV1CreateAdminAccessTokenPost(integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody, options)(fetch, basePath); }, }; }; exports.IntegrationAdminTokenServiceV1ApiFactory = IntegrationAdminTokenServiceV1ApiFactory; /** * IntegrationAdminTokenServiceV1Api - object-oriented interface * @export * @class IntegrationAdminTokenServiceV1Api * @extends {BaseAPI} */ class IntegrationAdminTokenServiceV1Api extends BaseAPI { /** * Create access token for admin given the admin credentials. * @param {any} [integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof IntegrationAdminTokenServiceV1Api */ integrationAdminTokenServiceV1CreateAdminAccessTokenPost(integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody, options) { return exports.IntegrationAdminTokenServiceV1ApiFp(this.configuration).integrationAdminTokenServiceV1CreateAdminAccessTokenPost(integrationAdminTokenServiceV1CreateAdminAccessTokenPostBody, options)(this.fetch, this.basePath); } } exports.IntegrationAdminTokenServiceV1Api = IntegrationAdminTokenServiceV1Api; /** * IntegrationCustomerTokenServiceV1Api - fetch parameter creator * @export */ const IntegrationCustomerTokenServiceV1ApiFetchParamCreator = function (configuration) { return { /** * Create access token for admin given the customer credentials. * @param {any} [integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ integrationCustomerTokenServiceV1CreateCustomerAccessTokenPost(integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody, options = {}) { const localVarPath = `/V1/integration/customer/token`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody || {}) : (integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.IntegrationCustomerTokenServiceV1ApiFetchParamCreator = IntegrationCustomerTokenServiceV1ApiFetchParamCreator; /** * IntegrationCustomerTokenServiceV1Api - functional programming interface * @export */ const IntegrationCustomerTokenServiceV1ApiFp = function (configuration) { return { /** * Create access token for admin given the customer credentials. * @param {any} [integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ integrationCustomerTokenServiceV1CreateCustomerAccessTokenPost(integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody, options) { const localVarFetchArgs = exports.IntegrationCustomerTokenServiceV1ApiFetchParamCreator(configuration).integrationCustomerTokenServiceV1CreateCustomerAccessTokenPost(integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.IntegrationCustomerTokenServiceV1ApiFp = IntegrationCustomerTokenServiceV1ApiFp; /** * IntegrationCustomerTokenServiceV1Api - factory interface * @export */ const IntegrationCustomerTokenServiceV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Create access token for admin given the customer credentials. * @param {any} [integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ integrationCustomerTokenServiceV1CreateCustomerAccessTokenPost(integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody, options) { return exports.IntegrationCustomerTokenServiceV1ApiFp(configuration).integrationCustomerTokenServiceV1CreateCustomerAccessTokenPost(integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody, options)(fetch, basePath); }, }; }; exports.IntegrationCustomerTokenServiceV1ApiFactory = IntegrationCustomerTokenServiceV1ApiFactory; /** * IntegrationCustomerTokenServiceV1Api - object-oriented interface * @export * @class IntegrationCustomerTokenServiceV1Api * @extends {BaseAPI} */ class IntegrationCustomerTokenServiceV1Api extends BaseAPI { /** * Create access token for admin given the customer credentials. * @param {any} [integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof IntegrationCustomerTokenServiceV1Api */ integrationCustomerTokenServiceV1CreateCustomerAccessTokenPost(integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody, options) { return exports.IntegrationCustomerTokenServiceV1ApiFp(this.configuration).integrationCustomerTokenServiceV1CreateCustomerAccessTokenPost(integrationCustomerTokenServiceV1CreateCustomerAccessTokenPostBody, options)(this.fetch, this.basePath); } } exports.IntegrationCustomerTokenServiceV1Api = IntegrationCustomerTokenServiceV1Api; /** * InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1Api - fetch parameter creator * @export */ const InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFetchParamCreator = function (configuration) { return { /** * Get Sources assigned to Stock ordered by priority If Stock with given id doesn't exist then return an empty array * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ExecuteGet(stockId, options = {}) { // verify required parameter 'stockId' is not null or undefined if (stockId === null || stockId === undefined) { throw new RequiredError('stockId', 'Required parameter stockId was null or undefined when calling inventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ExecuteGet.'); } const localVarPath = `/V1/inventory/get-sources-assigned-to-stock-ordered-by-priority/{stockId}` .replace(`{${"stockId"}}`, encodeURIComponent(String(stockId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFetchParamCreator = InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFetchParamCreator; /** * InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1Api - functional programming interface * @export */ const InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFp = function (configuration) { return { /** * Get Sources assigned to Stock ordered by priority If Stock with given id doesn't exist then return an empty array * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ExecuteGet(stockId, options) { const localVarFetchArgs = exports.InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFetchParamCreator(configuration).inventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ExecuteGet(stockId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFp = InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFp; /** * InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1Api - factory interface * @export */ const InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get Sources assigned to Stock ordered by priority If Stock with given id doesn't exist then return an empty array * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ExecuteGet(stockId, options) { return exports.InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFp(configuration).inventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ExecuteGet(stockId, options)(fetch, basePath); }, }; }; exports.InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFactory = InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFactory; /** * InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1Api - object-oriented interface * @export * @class InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1Api * @extends {BaseAPI} */ class InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1Api extends BaseAPI { /** * Get Sources assigned to Stock ordered by priority If Stock with given id doesn't exist then return an empty array * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1Api */ inventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ExecuteGet(stockId, options) { return exports.InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ApiFp(this.configuration).inventoryApiGetSourcesAssignedToStockOrderedByPriorityV1ExecuteGet(stockId, options)(this.fetch, this.basePath); } } exports.InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1Api = InventoryApiGetSourcesAssignedToStockOrderedByPriorityV1Api; /** * InventoryApiGetStockSourceLinksV1Api - fetch parameter creator * @export */ const InventoryApiGetStockSourceLinksV1ApiFetchParamCreator = function (configuration) { return { /** * Find StockSourceLink list by given SearchCriteria * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiGetStockSourceLinksV1ExecuteGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/inventory/stock-source-links`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryApiGetStockSourceLinksV1ApiFetchParamCreator = InventoryApiGetStockSourceLinksV1ApiFetchParamCreator; /** * InventoryApiGetStockSourceLinksV1Api - functional programming interface * @export */ const InventoryApiGetStockSourceLinksV1ApiFp = function (configuration) { return { /** * Find StockSourceLink list by given SearchCriteria * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiGetStockSourceLinksV1ExecuteGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.InventoryApiGetStockSourceLinksV1ApiFetchParamCreator(configuration).inventoryApiGetStockSourceLinksV1ExecuteGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryApiGetStockSourceLinksV1ApiFp = InventoryApiGetStockSourceLinksV1ApiFp; /** * InventoryApiGetStockSourceLinksV1Api - factory interface * @export */ const InventoryApiGetStockSourceLinksV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Find StockSourceLink list by given SearchCriteria * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiGetStockSourceLinksV1ExecuteGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.InventoryApiGetStockSourceLinksV1ApiFp(configuration).inventoryApiGetStockSourceLinksV1ExecuteGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.InventoryApiGetStockSourceLinksV1ApiFactory = InventoryApiGetStockSourceLinksV1ApiFactory; /** * InventoryApiGetStockSourceLinksV1Api - object-oriented interface * @export * @class InventoryApiGetStockSourceLinksV1Api * @extends {BaseAPI} */ class InventoryApiGetStockSourceLinksV1Api extends BaseAPI { /** * Find StockSourceLink list by given SearchCriteria * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiGetStockSourceLinksV1Api */ inventoryApiGetStockSourceLinksV1ExecuteGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.InventoryApiGetStockSourceLinksV1ApiFp(this.configuration).inventoryApiGetStockSourceLinksV1ExecuteGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.InventoryApiGetStockSourceLinksV1Api = InventoryApiGetStockSourceLinksV1Api; /** * InventoryApiSourceItemRepositoryV1Api - fetch parameter creator * @export */ const InventoryApiSourceItemRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Find SourceItems by SearchCriteria We need to have this method for direct work with SourceItems because this object contains additional data like as qty, status (for example can be searchable by additional field) * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/inventory/source-items`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryApiSourceItemRepositoryV1ApiFetchParamCreator = InventoryApiSourceItemRepositoryV1ApiFetchParamCreator; /** * InventoryApiSourceItemRepositoryV1Api - functional programming interface * @export */ const InventoryApiSourceItemRepositoryV1ApiFp = function (configuration) { return { /** * Find SourceItems by SearchCriteria We need to have this method for direct work with SourceItems because this object contains additional data like as qty, status (for example can be searchable by additional field) * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.InventoryApiSourceItemRepositoryV1ApiFetchParamCreator(configuration).inventoryApiSourceItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryApiSourceItemRepositoryV1ApiFp = InventoryApiSourceItemRepositoryV1ApiFp; /** * InventoryApiSourceItemRepositoryV1Api - factory interface * @export */ const InventoryApiSourceItemRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Find SourceItems by SearchCriteria We need to have this method for direct work with SourceItems because this object contains additional data like as qty, status (for example can be searchable by additional field) * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.InventoryApiSourceItemRepositoryV1ApiFp(configuration).inventoryApiSourceItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.InventoryApiSourceItemRepositoryV1ApiFactory = InventoryApiSourceItemRepositoryV1ApiFactory; /** * InventoryApiSourceItemRepositoryV1Api - object-oriented interface * @export * @class InventoryApiSourceItemRepositoryV1Api * @extends {BaseAPI} */ class InventoryApiSourceItemRepositoryV1Api extends BaseAPI { /** * Find SourceItems by SearchCriteria We need to have this method for direct work with SourceItems because this object contains additional data like as qty, status (for example can be searchable by additional field) * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiSourceItemRepositoryV1Api */ inventoryApiSourceItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.InventoryApiSourceItemRepositoryV1ApiFp(this.configuration).inventoryApiSourceItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.InventoryApiSourceItemRepositoryV1Api = InventoryApiSourceItemRepositoryV1Api; /** * InventoryApiSourceItemsDeleteV1Api - fetch parameter creator * @export */ const InventoryApiSourceItemsDeleteV1ApiFetchParamCreator = function (configuration) { return { /** * Delete Multiple Source item data * @param {any} [inventoryApiSourceItemsDeleteV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceItemsDeleteV1ExecutePost(inventoryApiSourceItemsDeleteV1ExecutePostBody, options = {}) { const localVarPath = `/V1/inventory/source-items-delete`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryApiSourceItemsDeleteV1ExecutePostBody || {}) : (inventoryApiSourceItemsDeleteV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryApiSourceItemsDeleteV1ApiFetchParamCreator = InventoryApiSourceItemsDeleteV1ApiFetchParamCreator; /** * InventoryApiSourceItemsDeleteV1Api - functional programming interface * @export */ const InventoryApiSourceItemsDeleteV1ApiFp = function (configuration) { return { /** * Delete Multiple Source item data * @param {any} [inventoryApiSourceItemsDeleteV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceItemsDeleteV1ExecutePost(inventoryApiSourceItemsDeleteV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventoryApiSourceItemsDeleteV1ApiFetchParamCreator(configuration).inventoryApiSourceItemsDeleteV1ExecutePost(inventoryApiSourceItemsDeleteV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryApiSourceItemsDeleteV1ApiFp = InventoryApiSourceItemsDeleteV1ApiFp; /** * InventoryApiSourceItemsDeleteV1Api - factory interface * @export */ const InventoryApiSourceItemsDeleteV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete Multiple Source item data * @param {any} [inventoryApiSourceItemsDeleteV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceItemsDeleteV1ExecutePost(inventoryApiSourceItemsDeleteV1ExecutePostBody, options) { return exports.InventoryApiSourceItemsDeleteV1ApiFp(configuration).inventoryApiSourceItemsDeleteV1ExecutePost(inventoryApiSourceItemsDeleteV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventoryApiSourceItemsDeleteV1ApiFactory = InventoryApiSourceItemsDeleteV1ApiFactory; /** * InventoryApiSourceItemsDeleteV1Api - object-oriented interface * @export * @class InventoryApiSourceItemsDeleteV1Api * @extends {BaseAPI} */ class InventoryApiSourceItemsDeleteV1Api extends BaseAPI { /** * Delete Multiple Source item data * @param {any} [inventoryApiSourceItemsDeleteV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiSourceItemsDeleteV1Api */ inventoryApiSourceItemsDeleteV1ExecutePost(inventoryApiSourceItemsDeleteV1ExecutePostBody, options) { return exports.InventoryApiSourceItemsDeleteV1ApiFp(this.configuration).inventoryApiSourceItemsDeleteV1ExecutePost(inventoryApiSourceItemsDeleteV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventoryApiSourceItemsDeleteV1Api = InventoryApiSourceItemsDeleteV1Api; /** * InventoryApiSourceItemsSaveV1Api - fetch parameter creator * @export */ const InventoryApiSourceItemsSaveV1ApiFetchParamCreator = function (configuration) { return { /** * Save Multiple Source item data * @param {any} [inventoryApiSourceItemsSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceItemsSaveV1ExecutePost(inventoryApiSourceItemsSaveV1ExecutePostBody, options = {}) { const localVarPath = `/V1/inventory/source-items`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryApiSourceItemsSaveV1ExecutePostBody || {}) : (inventoryApiSourceItemsSaveV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryApiSourceItemsSaveV1ApiFetchParamCreator = InventoryApiSourceItemsSaveV1ApiFetchParamCreator; /** * InventoryApiSourceItemsSaveV1Api - functional programming interface * @export */ const InventoryApiSourceItemsSaveV1ApiFp = function (configuration) { return { /** * Save Multiple Source item data * @param {any} [inventoryApiSourceItemsSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceItemsSaveV1ExecutePost(inventoryApiSourceItemsSaveV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventoryApiSourceItemsSaveV1ApiFetchParamCreator(configuration).inventoryApiSourceItemsSaveV1ExecutePost(inventoryApiSourceItemsSaveV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryApiSourceItemsSaveV1ApiFp = InventoryApiSourceItemsSaveV1ApiFp; /** * InventoryApiSourceItemsSaveV1Api - factory interface * @export */ const InventoryApiSourceItemsSaveV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Save Multiple Source item data * @param {any} [inventoryApiSourceItemsSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceItemsSaveV1ExecutePost(inventoryApiSourceItemsSaveV1ExecutePostBody, options) { return exports.InventoryApiSourceItemsSaveV1ApiFp(configuration).inventoryApiSourceItemsSaveV1ExecutePost(inventoryApiSourceItemsSaveV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventoryApiSourceItemsSaveV1ApiFactory = InventoryApiSourceItemsSaveV1ApiFactory; /** * InventoryApiSourceItemsSaveV1Api - object-oriented interface * @export * @class InventoryApiSourceItemsSaveV1Api * @extends {BaseAPI} */ class InventoryApiSourceItemsSaveV1Api extends BaseAPI { /** * Save Multiple Source item data * @param {any} [inventoryApiSourceItemsSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiSourceItemsSaveV1Api */ inventoryApiSourceItemsSaveV1ExecutePost(inventoryApiSourceItemsSaveV1ExecutePostBody, options) { return exports.InventoryApiSourceItemsSaveV1ApiFp(this.configuration).inventoryApiSourceItemsSaveV1ExecutePost(inventoryApiSourceItemsSaveV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventoryApiSourceItemsSaveV1Api = InventoryApiSourceItemsSaveV1Api; /** * InventoryApiSourceRepositoryV1Api - fetch parameter creator * @export */ const InventoryApiSourceRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Get Source data by given code. If you want to create plugin on get method, also you need to create separate plugin on getList method, because entity loading way is different for these methods * @param {string} sourceCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1GetGet(sourceCode, options = {}) { // verify required parameter 'sourceCode' is not null or undefined if (sourceCode === null || sourceCode === undefined) { throw new RequiredError('sourceCode', 'Required parameter sourceCode was null or undefined when calling inventoryApiSourceRepositoryV1GetGet.'); } const localVarPath = `/V1/inventory/sources/{sourceCode}` .replace(`{${"sourceCode"}}`, encodeURIComponent(String(sourceCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Find Sources by SearchCriteria SearchCriteria is not required because load all stocks is useful case * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/inventory/sources`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save Source data * @param {any} [inventoryApiSourceRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1SavePost(inventoryApiSourceRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/inventory/sources`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryApiSourceRepositoryV1SavePostBody || {}) : (inventoryApiSourceRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save Source data * @param {string} sourceCode * @param {any} [inventoryApiSourceRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1SavePut(sourceCode, inventoryApiSourceRepositoryV1SavePutBody, options = {}) { // verify required parameter 'sourceCode' is not null or undefined if (sourceCode === null || sourceCode === undefined) { throw new RequiredError('sourceCode', 'Required parameter sourceCode was null or undefined when calling inventoryApiSourceRepositoryV1SavePut.'); } const localVarPath = `/V1/inventory/sources/{sourceCode}` .replace(`{${"sourceCode"}}`, encodeURIComponent(String(sourceCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryApiSourceRepositoryV1SavePutBody || {}) : (inventoryApiSourceRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryApiSourceRepositoryV1ApiFetchParamCreator = InventoryApiSourceRepositoryV1ApiFetchParamCreator; /** * InventoryApiSourceRepositoryV1Api - functional programming interface * @export */ const InventoryApiSourceRepositoryV1ApiFp = function (configuration) { return { /** * Get Source data by given code. If you want to create plugin on get method, also you need to create separate plugin on getList method, because entity loading way is different for these methods * @param {string} sourceCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1GetGet(sourceCode, options) { const localVarFetchArgs = exports.InventoryApiSourceRepositoryV1ApiFetchParamCreator(configuration).inventoryApiSourceRepositoryV1GetGet(sourceCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Find Sources by SearchCriteria SearchCriteria is not required because load all stocks is useful case * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.InventoryApiSourceRepositoryV1ApiFetchParamCreator(configuration).inventoryApiSourceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save Source data * @param {any} [inventoryApiSourceRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1SavePost(inventoryApiSourceRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.InventoryApiSourceRepositoryV1ApiFetchParamCreator(configuration).inventoryApiSourceRepositoryV1SavePost(inventoryApiSourceRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save Source data * @param {string} sourceCode * @param {any} [inventoryApiSourceRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1SavePut(sourceCode, inventoryApiSourceRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.InventoryApiSourceRepositoryV1ApiFetchParamCreator(configuration).inventoryApiSourceRepositoryV1SavePut(sourceCode, inventoryApiSourceRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryApiSourceRepositoryV1ApiFp = InventoryApiSourceRepositoryV1ApiFp; /** * InventoryApiSourceRepositoryV1Api - factory interface * @export */ const InventoryApiSourceRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get Source data by given code. If you want to create plugin on get method, also you need to create separate plugin on getList method, because entity loading way is different for these methods * @param {string} sourceCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1GetGet(sourceCode, options) { return exports.InventoryApiSourceRepositoryV1ApiFp(configuration).inventoryApiSourceRepositoryV1GetGet(sourceCode, options)(fetch, basePath); }, /** * Find Sources by SearchCriteria SearchCriteria is not required because load all stocks is useful case * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.InventoryApiSourceRepositoryV1ApiFp(configuration).inventoryApiSourceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save Source data * @param {any} [inventoryApiSourceRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1SavePost(inventoryApiSourceRepositoryV1SavePostBody, options) { return exports.InventoryApiSourceRepositoryV1ApiFp(configuration).inventoryApiSourceRepositoryV1SavePost(inventoryApiSourceRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save Source data * @param {string} sourceCode * @param {any} [inventoryApiSourceRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiSourceRepositoryV1SavePut(sourceCode, inventoryApiSourceRepositoryV1SavePutBody, options) { return exports.InventoryApiSourceRepositoryV1ApiFp(configuration).inventoryApiSourceRepositoryV1SavePut(sourceCode, inventoryApiSourceRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.InventoryApiSourceRepositoryV1ApiFactory = InventoryApiSourceRepositoryV1ApiFactory; /** * InventoryApiSourceRepositoryV1Api - object-oriented interface * @export * @class InventoryApiSourceRepositoryV1Api * @extends {BaseAPI} */ class InventoryApiSourceRepositoryV1Api extends BaseAPI { /** * Get Source data by given code. If you want to create plugin on get method, also you need to create separate plugin on getList method, because entity loading way is different for these methods * @param {string} sourceCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiSourceRepositoryV1Api */ inventoryApiSourceRepositoryV1GetGet(sourceCode, options) { return exports.InventoryApiSourceRepositoryV1ApiFp(this.configuration).inventoryApiSourceRepositoryV1GetGet(sourceCode, options)(this.fetch, this.basePath); } /** * Find Sources by SearchCriteria SearchCriteria is not required because load all stocks is useful case * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiSourceRepositoryV1Api */ inventoryApiSourceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.InventoryApiSourceRepositoryV1ApiFp(this.configuration).inventoryApiSourceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save Source data * @param {any} [inventoryApiSourceRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiSourceRepositoryV1Api */ inventoryApiSourceRepositoryV1SavePost(inventoryApiSourceRepositoryV1SavePostBody, options) { return exports.InventoryApiSourceRepositoryV1ApiFp(this.configuration).inventoryApiSourceRepositoryV1SavePost(inventoryApiSourceRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save Source data * @param {string} sourceCode * @param {any} [inventoryApiSourceRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiSourceRepositoryV1Api */ inventoryApiSourceRepositoryV1SavePut(sourceCode, inventoryApiSourceRepositoryV1SavePutBody, options) { return exports.InventoryApiSourceRepositoryV1ApiFp(this.configuration).inventoryApiSourceRepositoryV1SavePut(sourceCode, inventoryApiSourceRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.InventoryApiSourceRepositoryV1Api = InventoryApiSourceRepositoryV1Api; /** * InventoryApiStockRepositoryV1Api - fetch parameter creator * @export */ const InventoryApiStockRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete the Stock data by stockId. If stock is not found do nothing * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1DeleteByIdDelete(stockId, options = {}) { // verify required parameter 'stockId' is not null or undefined if (stockId === null || stockId === undefined) { throw new RequiredError('stockId', 'Required parameter stockId was null or undefined when calling inventoryApiStockRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/inventory/stocks/{stockId}` .replace(`{${"stockId"}}`, encodeURIComponent(String(stockId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get Stock data by given stockId. If you want to create plugin on get method, also you need to create separate plugin on getList method, because entity loading way is different for these methods * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1GetGet(stockId, options = {}) { // verify required parameter 'stockId' is not null or undefined if (stockId === null || stockId === undefined) { throw new RequiredError('stockId', 'Required parameter stockId was null or undefined when calling inventoryApiStockRepositoryV1GetGet.'); } const localVarPath = `/V1/inventory/stocks/{stockId}` .replace(`{${"stockId"}}`, encodeURIComponent(String(stockId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Find Stocks by given SearchCriteria SearchCriteria is not required because load all stocks is useful case * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/inventory/stocks`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save Stock data * @param {any} [inventoryApiStockRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1SavePost(inventoryApiStockRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/inventory/stocks`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryApiStockRepositoryV1SavePostBody || {}) : (inventoryApiStockRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save Stock data * @param {string} stockId * @param {any} [inventoryApiStockRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1SavePut(stockId, inventoryApiStockRepositoryV1SavePutBody, options = {}) { // verify required parameter 'stockId' is not null or undefined if (stockId === null || stockId === undefined) { throw new RequiredError('stockId', 'Required parameter stockId was null or undefined when calling inventoryApiStockRepositoryV1SavePut.'); } const localVarPath = `/V1/inventory/stocks/{stockId}` .replace(`{${"stockId"}}`, encodeURIComponent(String(stockId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryApiStockRepositoryV1SavePutBody || {}) : (inventoryApiStockRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryApiStockRepositoryV1ApiFetchParamCreator = InventoryApiStockRepositoryV1ApiFetchParamCreator; /** * InventoryApiStockRepositoryV1Api - functional programming interface * @export */ const InventoryApiStockRepositoryV1ApiFp = function (configuration) { return { /** * Delete the Stock data by stockId. If stock is not found do nothing * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1DeleteByIdDelete(stockId, options) { const localVarFetchArgs = exports.InventoryApiStockRepositoryV1ApiFetchParamCreator(configuration).inventoryApiStockRepositoryV1DeleteByIdDelete(stockId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get Stock data by given stockId. If you want to create plugin on get method, also you need to create separate plugin on getList method, because entity loading way is different for these methods * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1GetGet(stockId, options) { const localVarFetchArgs = exports.InventoryApiStockRepositoryV1ApiFetchParamCreator(configuration).inventoryApiStockRepositoryV1GetGet(stockId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Find Stocks by given SearchCriteria SearchCriteria is not required because load all stocks is useful case * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.InventoryApiStockRepositoryV1ApiFetchParamCreator(configuration).inventoryApiStockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save Stock data * @param {any} [inventoryApiStockRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1SavePost(inventoryApiStockRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.InventoryApiStockRepositoryV1ApiFetchParamCreator(configuration).inventoryApiStockRepositoryV1SavePost(inventoryApiStockRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save Stock data * @param {string} stockId * @param {any} [inventoryApiStockRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1SavePut(stockId, inventoryApiStockRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.InventoryApiStockRepositoryV1ApiFetchParamCreator(configuration).inventoryApiStockRepositoryV1SavePut(stockId, inventoryApiStockRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryApiStockRepositoryV1ApiFp = InventoryApiStockRepositoryV1ApiFp; /** * InventoryApiStockRepositoryV1Api - factory interface * @export */ const InventoryApiStockRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete the Stock data by stockId. If stock is not found do nothing * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1DeleteByIdDelete(stockId, options) { return exports.InventoryApiStockRepositoryV1ApiFp(configuration).inventoryApiStockRepositoryV1DeleteByIdDelete(stockId, options)(fetch, basePath); }, /** * Get Stock data by given stockId. If you want to create plugin on get method, also you need to create separate plugin on getList method, because entity loading way is different for these methods * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1GetGet(stockId, options) { return exports.InventoryApiStockRepositoryV1ApiFp(configuration).inventoryApiStockRepositoryV1GetGet(stockId, options)(fetch, basePath); }, /** * Find Stocks by given SearchCriteria SearchCriteria is not required because load all stocks is useful case * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.InventoryApiStockRepositoryV1ApiFp(configuration).inventoryApiStockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save Stock data * @param {any} [inventoryApiStockRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1SavePost(inventoryApiStockRepositoryV1SavePostBody, options) { return exports.InventoryApiStockRepositoryV1ApiFp(configuration).inventoryApiStockRepositoryV1SavePost(inventoryApiStockRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save Stock data * @param {string} stockId * @param {any} [inventoryApiStockRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockRepositoryV1SavePut(stockId, inventoryApiStockRepositoryV1SavePutBody, options) { return exports.InventoryApiStockRepositoryV1ApiFp(configuration).inventoryApiStockRepositoryV1SavePut(stockId, inventoryApiStockRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.InventoryApiStockRepositoryV1ApiFactory = InventoryApiStockRepositoryV1ApiFactory; /** * InventoryApiStockRepositoryV1Api - object-oriented interface * @export * @class InventoryApiStockRepositoryV1Api * @extends {BaseAPI} */ class InventoryApiStockRepositoryV1Api extends BaseAPI { /** * Delete the Stock data by stockId. If stock is not found do nothing * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiStockRepositoryV1Api */ inventoryApiStockRepositoryV1DeleteByIdDelete(stockId, options) { return exports.InventoryApiStockRepositoryV1ApiFp(this.configuration).inventoryApiStockRepositoryV1DeleteByIdDelete(stockId, options)(this.fetch, this.basePath); } /** * Get Stock data by given stockId. If you want to create plugin on get method, also you need to create separate plugin on getList method, because entity loading way is different for these methods * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiStockRepositoryV1Api */ inventoryApiStockRepositoryV1GetGet(stockId, options) { return exports.InventoryApiStockRepositoryV1ApiFp(this.configuration).inventoryApiStockRepositoryV1GetGet(stockId, options)(this.fetch, this.basePath); } /** * Find Stocks by given SearchCriteria SearchCriteria is not required because load all stocks is useful case * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiStockRepositoryV1Api */ inventoryApiStockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.InventoryApiStockRepositoryV1ApiFp(this.configuration).inventoryApiStockRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save Stock data * @param {any} [inventoryApiStockRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiStockRepositoryV1Api */ inventoryApiStockRepositoryV1SavePost(inventoryApiStockRepositoryV1SavePostBody, options) { return exports.InventoryApiStockRepositoryV1ApiFp(this.configuration).inventoryApiStockRepositoryV1SavePost(inventoryApiStockRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save Stock data * @param {string} stockId * @param {any} [inventoryApiStockRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiStockRepositoryV1Api */ inventoryApiStockRepositoryV1SavePut(stockId, inventoryApiStockRepositoryV1SavePutBody, options) { return exports.InventoryApiStockRepositoryV1ApiFp(this.configuration).inventoryApiStockRepositoryV1SavePut(stockId, inventoryApiStockRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.InventoryApiStockRepositoryV1Api = InventoryApiStockRepositoryV1Api; /** * InventoryApiStockSourceLinksDeleteV1Api - fetch parameter creator * @export */ const InventoryApiStockSourceLinksDeleteV1ApiFetchParamCreator = function (configuration) { return { /** * Remove StockSourceLink list list * @param {any} [inventoryApiStockSourceLinksDeleteV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockSourceLinksDeleteV1ExecutePost(inventoryApiStockSourceLinksDeleteV1ExecutePostBody, options = {}) { const localVarPath = `/V1/inventory/stock-source-links-delete`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryApiStockSourceLinksDeleteV1ExecutePostBody || {}) : (inventoryApiStockSourceLinksDeleteV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryApiStockSourceLinksDeleteV1ApiFetchParamCreator = InventoryApiStockSourceLinksDeleteV1ApiFetchParamCreator; /** * InventoryApiStockSourceLinksDeleteV1Api - functional programming interface * @export */ const InventoryApiStockSourceLinksDeleteV1ApiFp = function (configuration) { return { /** * Remove StockSourceLink list list * @param {any} [inventoryApiStockSourceLinksDeleteV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockSourceLinksDeleteV1ExecutePost(inventoryApiStockSourceLinksDeleteV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventoryApiStockSourceLinksDeleteV1ApiFetchParamCreator(configuration).inventoryApiStockSourceLinksDeleteV1ExecutePost(inventoryApiStockSourceLinksDeleteV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryApiStockSourceLinksDeleteV1ApiFp = InventoryApiStockSourceLinksDeleteV1ApiFp; /** * InventoryApiStockSourceLinksDeleteV1Api - factory interface * @export */ const InventoryApiStockSourceLinksDeleteV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Remove StockSourceLink list list * @param {any} [inventoryApiStockSourceLinksDeleteV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockSourceLinksDeleteV1ExecutePost(inventoryApiStockSourceLinksDeleteV1ExecutePostBody, options) { return exports.InventoryApiStockSourceLinksDeleteV1ApiFp(configuration).inventoryApiStockSourceLinksDeleteV1ExecutePost(inventoryApiStockSourceLinksDeleteV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventoryApiStockSourceLinksDeleteV1ApiFactory = InventoryApiStockSourceLinksDeleteV1ApiFactory; /** * InventoryApiStockSourceLinksDeleteV1Api - object-oriented interface * @export * @class InventoryApiStockSourceLinksDeleteV1Api * @extends {BaseAPI} */ class InventoryApiStockSourceLinksDeleteV1Api extends BaseAPI { /** * Remove StockSourceLink list list * @param {any} [inventoryApiStockSourceLinksDeleteV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiStockSourceLinksDeleteV1Api */ inventoryApiStockSourceLinksDeleteV1ExecutePost(inventoryApiStockSourceLinksDeleteV1ExecutePostBody, options) { return exports.InventoryApiStockSourceLinksDeleteV1ApiFp(this.configuration).inventoryApiStockSourceLinksDeleteV1ExecutePost(inventoryApiStockSourceLinksDeleteV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventoryApiStockSourceLinksDeleteV1Api = InventoryApiStockSourceLinksDeleteV1Api; /** * InventoryApiStockSourceLinksSaveV1Api - fetch parameter creator * @export */ const InventoryApiStockSourceLinksSaveV1ApiFetchParamCreator = function (configuration) { return { /** * Save StockSourceLink list data * @param {any} [inventoryApiStockSourceLinksSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockSourceLinksSaveV1ExecutePost(inventoryApiStockSourceLinksSaveV1ExecutePostBody, options = {}) { const localVarPath = `/V1/inventory/stock-source-links`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryApiStockSourceLinksSaveV1ExecutePostBody || {}) : (inventoryApiStockSourceLinksSaveV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryApiStockSourceLinksSaveV1ApiFetchParamCreator = InventoryApiStockSourceLinksSaveV1ApiFetchParamCreator; /** * InventoryApiStockSourceLinksSaveV1Api - functional programming interface * @export */ const InventoryApiStockSourceLinksSaveV1ApiFp = function (configuration) { return { /** * Save StockSourceLink list data * @param {any} [inventoryApiStockSourceLinksSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockSourceLinksSaveV1ExecutePost(inventoryApiStockSourceLinksSaveV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventoryApiStockSourceLinksSaveV1ApiFetchParamCreator(configuration).inventoryApiStockSourceLinksSaveV1ExecutePost(inventoryApiStockSourceLinksSaveV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryApiStockSourceLinksSaveV1ApiFp = InventoryApiStockSourceLinksSaveV1ApiFp; /** * InventoryApiStockSourceLinksSaveV1Api - factory interface * @export */ const InventoryApiStockSourceLinksSaveV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Save StockSourceLink list data * @param {any} [inventoryApiStockSourceLinksSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryApiStockSourceLinksSaveV1ExecutePost(inventoryApiStockSourceLinksSaveV1ExecutePostBody, options) { return exports.InventoryApiStockSourceLinksSaveV1ApiFp(configuration).inventoryApiStockSourceLinksSaveV1ExecutePost(inventoryApiStockSourceLinksSaveV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventoryApiStockSourceLinksSaveV1ApiFactory = InventoryApiStockSourceLinksSaveV1ApiFactory; /** * InventoryApiStockSourceLinksSaveV1Api - object-oriented interface * @export * @class InventoryApiStockSourceLinksSaveV1Api * @extends {BaseAPI} */ class InventoryApiStockSourceLinksSaveV1Api extends BaseAPI { /** * Save StockSourceLink list data * @param {any} [inventoryApiStockSourceLinksSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryApiStockSourceLinksSaveV1Api */ inventoryApiStockSourceLinksSaveV1ExecutePost(inventoryApiStockSourceLinksSaveV1ExecutePostBody, options) { return exports.InventoryApiStockSourceLinksSaveV1ApiFp(this.configuration).inventoryApiStockSourceLinksSaveV1ExecutePost(inventoryApiStockSourceLinksSaveV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventoryApiStockSourceLinksSaveV1Api = InventoryApiStockSourceLinksSaveV1Api; /** * InventoryCatalogApiBulkInventoryTransferV1Api - fetch parameter creator * @export */ const InventoryCatalogApiBulkInventoryTransferV1ApiFetchParamCreator = function (configuration) { return { /** * Run bulk inventory transfer * @param {any} [inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkInventoryTransferV1ExecutePost(inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody, options = {}) { const localVarPath = `/V1/inventory/bulk-product-source-transfer`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody || {}) : (inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryCatalogApiBulkInventoryTransferV1ApiFetchParamCreator = InventoryCatalogApiBulkInventoryTransferV1ApiFetchParamCreator; /** * InventoryCatalogApiBulkInventoryTransferV1Api - functional programming interface * @export */ const InventoryCatalogApiBulkInventoryTransferV1ApiFp = function (configuration) { return { /** * Run bulk inventory transfer * @param {any} [inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkInventoryTransferV1ExecutePost(inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventoryCatalogApiBulkInventoryTransferV1ApiFetchParamCreator(configuration).inventoryCatalogApiBulkInventoryTransferV1ExecutePost(inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryCatalogApiBulkInventoryTransferV1ApiFp = InventoryCatalogApiBulkInventoryTransferV1ApiFp; /** * InventoryCatalogApiBulkInventoryTransferV1Api - factory interface * @export */ const InventoryCatalogApiBulkInventoryTransferV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Run bulk inventory transfer * @param {any} [inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkInventoryTransferV1ExecutePost(inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody, options) { return exports.InventoryCatalogApiBulkInventoryTransferV1ApiFp(configuration).inventoryCatalogApiBulkInventoryTransferV1ExecutePost(inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventoryCatalogApiBulkInventoryTransferV1ApiFactory = InventoryCatalogApiBulkInventoryTransferV1ApiFactory; /** * InventoryCatalogApiBulkInventoryTransferV1Api - object-oriented interface * @export * @class InventoryCatalogApiBulkInventoryTransferV1Api * @extends {BaseAPI} */ class InventoryCatalogApiBulkInventoryTransferV1Api extends BaseAPI { /** * Run bulk inventory transfer * @param {any} [inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryCatalogApiBulkInventoryTransferV1Api */ inventoryCatalogApiBulkInventoryTransferV1ExecutePost(inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody, options) { return exports.InventoryCatalogApiBulkInventoryTransferV1ApiFp(this.configuration).inventoryCatalogApiBulkInventoryTransferV1ExecutePost(inventoryCatalogApiBulkInventoryTransferV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventoryCatalogApiBulkInventoryTransferV1Api = InventoryCatalogApiBulkInventoryTransferV1Api; /** * InventoryCatalogApiBulkPartialInventoryTransferV1Api - fetch parameter creator * @export */ const InventoryCatalogApiBulkPartialInventoryTransferV1ApiFetchParamCreator = function (configuration) { return { /** * Run bulk partial inventory transfer for specified items. * @param {any} [inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePost(inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody, options = {}) { const localVarPath = `/V1/inventory/bulk-partial-source-transfer`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody || {}) : (inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryCatalogApiBulkPartialInventoryTransferV1ApiFetchParamCreator = InventoryCatalogApiBulkPartialInventoryTransferV1ApiFetchParamCreator; /** * InventoryCatalogApiBulkPartialInventoryTransferV1Api - functional programming interface * @export */ const InventoryCatalogApiBulkPartialInventoryTransferV1ApiFp = function (configuration) { return { /** * Run bulk partial inventory transfer for specified items. * @param {any} [inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePost(inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventoryCatalogApiBulkPartialInventoryTransferV1ApiFetchParamCreator(configuration).inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePost(inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryCatalogApiBulkPartialInventoryTransferV1ApiFp = InventoryCatalogApiBulkPartialInventoryTransferV1ApiFp; /** * InventoryCatalogApiBulkPartialInventoryTransferV1Api - factory interface * @export */ const InventoryCatalogApiBulkPartialInventoryTransferV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Run bulk partial inventory transfer for specified items. * @param {any} [inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePost(inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody, options) { return exports.InventoryCatalogApiBulkPartialInventoryTransferV1ApiFp(configuration).inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePost(inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventoryCatalogApiBulkPartialInventoryTransferV1ApiFactory = InventoryCatalogApiBulkPartialInventoryTransferV1ApiFactory; /** * InventoryCatalogApiBulkPartialInventoryTransferV1Api - object-oriented interface * @export * @class InventoryCatalogApiBulkPartialInventoryTransferV1Api * @extends {BaseAPI} */ class InventoryCatalogApiBulkPartialInventoryTransferV1Api extends BaseAPI { /** * Run bulk partial inventory transfer for specified items. * @param {any} [inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryCatalogApiBulkPartialInventoryTransferV1Api */ inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePost(inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody, options) { return exports.InventoryCatalogApiBulkPartialInventoryTransferV1ApiFp(this.configuration).inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePost(inventoryCatalogApiBulkPartialInventoryTransferV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventoryCatalogApiBulkPartialInventoryTransferV1Api = InventoryCatalogApiBulkPartialInventoryTransferV1Api; /** * InventoryCatalogApiBulkSourceAssignV1Api - fetch parameter creator * @export */ const InventoryCatalogApiBulkSourceAssignV1ApiFetchParamCreator = function (configuration) { return { /** * Run mass product to source assignment * @param {any} [inventoryCatalogApiBulkSourceAssignV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkSourceAssignV1ExecutePost(inventoryCatalogApiBulkSourceAssignV1ExecutePostBody, options = {}) { const localVarPath = `/V1/inventory/bulk-product-source-assign`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryCatalogApiBulkSourceAssignV1ExecutePostBody || {}) : (inventoryCatalogApiBulkSourceAssignV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryCatalogApiBulkSourceAssignV1ApiFetchParamCreator = InventoryCatalogApiBulkSourceAssignV1ApiFetchParamCreator; /** * InventoryCatalogApiBulkSourceAssignV1Api - functional programming interface * @export */ const InventoryCatalogApiBulkSourceAssignV1ApiFp = function (configuration) { return { /** * Run mass product to source assignment * @param {any} [inventoryCatalogApiBulkSourceAssignV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkSourceAssignV1ExecutePost(inventoryCatalogApiBulkSourceAssignV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventoryCatalogApiBulkSourceAssignV1ApiFetchParamCreator(configuration).inventoryCatalogApiBulkSourceAssignV1ExecutePost(inventoryCatalogApiBulkSourceAssignV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryCatalogApiBulkSourceAssignV1ApiFp = InventoryCatalogApiBulkSourceAssignV1ApiFp; /** * InventoryCatalogApiBulkSourceAssignV1Api - factory interface * @export */ const InventoryCatalogApiBulkSourceAssignV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Run mass product to source assignment * @param {any} [inventoryCatalogApiBulkSourceAssignV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkSourceAssignV1ExecutePost(inventoryCatalogApiBulkSourceAssignV1ExecutePostBody, options) { return exports.InventoryCatalogApiBulkSourceAssignV1ApiFp(configuration).inventoryCatalogApiBulkSourceAssignV1ExecutePost(inventoryCatalogApiBulkSourceAssignV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventoryCatalogApiBulkSourceAssignV1ApiFactory = InventoryCatalogApiBulkSourceAssignV1ApiFactory; /** * InventoryCatalogApiBulkSourceAssignV1Api - object-oriented interface * @export * @class InventoryCatalogApiBulkSourceAssignV1Api * @extends {BaseAPI} */ class InventoryCatalogApiBulkSourceAssignV1Api extends BaseAPI { /** * Run mass product to source assignment * @param {any} [inventoryCatalogApiBulkSourceAssignV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryCatalogApiBulkSourceAssignV1Api */ inventoryCatalogApiBulkSourceAssignV1ExecutePost(inventoryCatalogApiBulkSourceAssignV1ExecutePostBody, options) { return exports.InventoryCatalogApiBulkSourceAssignV1ApiFp(this.configuration).inventoryCatalogApiBulkSourceAssignV1ExecutePost(inventoryCatalogApiBulkSourceAssignV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventoryCatalogApiBulkSourceAssignV1Api = InventoryCatalogApiBulkSourceAssignV1Api; /** * InventoryCatalogApiBulkSourceUnassignV1Api - fetch parameter creator * @export */ const InventoryCatalogApiBulkSourceUnassignV1ApiFetchParamCreator = function (configuration) { return { /** * Run mass product to source un-assignment * @param {any} [inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkSourceUnassignV1ExecutePost(inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody, options = {}) { const localVarPath = `/V1/inventory/bulk-product-source-unassign`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody || {}) : (inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryCatalogApiBulkSourceUnassignV1ApiFetchParamCreator = InventoryCatalogApiBulkSourceUnassignV1ApiFetchParamCreator; /** * InventoryCatalogApiBulkSourceUnassignV1Api - functional programming interface * @export */ const InventoryCatalogApiBulkSourceUnassignV1ApiFp = function (configuration) { return { /** * Run mass product to source un-assignment * @param {any} [inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkSourceUnassignV1ExecutePost(inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventoryCatalogApiBulkSourceUnassignV1ApiFetchParamCreator(configuration).inventoryCatalogApiBulkSourceUnassignV1ExecutePost(inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryCatalogApiBulkSourceUnassignV1ApiFp = InventoryCatalogApiBulkSourceUnassignV1ApiFp; /** * InventoryCatalogApiBulkSourceUnassignV1Api - factory interface * @export */ const InventoryCatalogApiBulkSourceUnassignV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Run mass product to source un-assignment * @param {any} [inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryCatalogApiBulkSourceUnassignV1ExecutePost(inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody, options) { return exports.InventoryCatalogApiBulkSourceUnassignV1ApiFp(configuration).inventoryCatalogApiBulkSourceUnassignV1ExecutePost(inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventoryCatalogApiBulkSourceUnassignV1ApiFactory = InventoryCatalogApiBulkSourceUnassignV1ApiFactory; /** * InventoryCatalogApiBulkSourceUnassignV1Api - object-oriented interface * @export * @class InventoryCatalogApiBulkSourceUnassignV1Api * @extends {BaseAPI} */ class InventoryCatalogApiBulkSourceUnassignV1Api extends BaseAPI { /** * Run mass product to source un-assignment * @param {any} [inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryCatalogApiBulkSourceUnassignV1Api */ inventoryCatalogApiBulkSourceUnassignV1ExecutePost(inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody, options) { return exports.InventoryCatalogApiBulkSourceUnassignV1ApiFp(this.configuration).inventoryCatalogApiBulkSourceUnassignV1ExecutePost(inventoryCatalogApiBulkSourceUnassignV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventoryCatalogApiBulkSourceUnassignV1Api = InventoryCatalogApiBulkSourceUnassignV1Api; /** * InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1Api - fetch parameter creator * @export */ const InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFetchParamCreator = function (configuration) { return { /** * Get Default distance provider code * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ExecuteGet(options = {}) { const localVarPath = `/V1/inventory/get-distance-provider-code`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFetchParamCreator = InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFetchParamCreator; /** * InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1Api - functional programming interface * @export */ const InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFp = function (configuration) { return { /** * Get Default distance provider code * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ExecuteGet(options) { const localVarFetchArgs = exports.InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFetchParamCreator(configuration).inventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ExecuteGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFp = InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFp; /** * InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1Api - factory interface * @export */ const InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get Default distance provider code * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ExecuteGet(options) { return exports.InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFp(configuration).inventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ExecuteGet(options)(fetch, basePath); }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFactory = InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFactory; /** * InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1Api - object-oriented interface * @export * @class InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1Api * @extends {BaseAPI} */ class InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1Api extends BaseAPI { /** * Get Default distance provider code * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1Api */ inventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ExecuteGet(options) { return exports.InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ApiFp(this.configuration).inventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1ExecuteGet(options)(this.fetch, this.basePath); } } exports.InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1Api = InventoryDistanceBasedSourceSelectionApiGetDistanceProviderCodeV1Api; /** * InventoryDistanceBasedSourceSelectionApiGetDistanceV1Api - fetch parameter creator * @export */ const InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFetchParamCreator = function (configuration) { return { /** * Get distance between two points * @param {number} [sourceLat] Latitude * @param {number} [sourceLng] Longitude * @param {number} [destinationLat] Latitude * @param {number} [destinationLng] Longitude * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetDistanceV1ExecuteGet(sourceLat, sourceLng, destinationLat, destinationLng, options = {}) { const localVarPath = `/V1/inventory/get-distance`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (sourceLat !== undefined) { localVarQueryParameter['source[lat]'] = sourceLat; } if (sourceLng !== undefined) { localVarQueryParameter['source[lng]'] = sourceLng; } if (destinationLat !== undefined) { localVarQueryParameter['destination[lat]'] = destinationLat; } if (destinationLng !== undefined) { localVarQueryParameter['destination[lng]'] = destinationLng; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFetchParamCreator = InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFetchParamCreator; /** * InventoryDistanceBasedSourceSelectionApiGetDistanceV1Api - functional programming interface * @export */ const InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFp = function (configuration) { return { /** * Get distance between two points * @param {number} [sourceLat] Latitude * @param {number} [sourceLng] Longitude * @param {number} [destinationLat] Latitude * @param {number} [destinationLng] Longitude * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetDistanceV1ExecuteGet(sourceLat, sourceLng, destinationLat, destinationLng, options) { const localVarFetchArgs = exports.InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFetchParamCreator(configuration).inventoryDistanceBasedSourceSelectionApiGetDistanceV1ExecuteGet(sourceLat, sourceLng, destinationLat, destinationLng, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFp = InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFp; /** * InventoryDistanceBasedSourceSelectionApiGetDistanceV1Api - factory interface * @export */ const InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get distance between two points * @param {number} [sourceLat] Latitude * @param {number} [sourceLng] Longitude * @param {number} [destinationLat] Latitude * @param {number} [destinationLng] Longitude * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetDistanceV1ExecuteGet(sourceLat, sourceLng, destinationLat, destinationLng, options) { return exports.InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFp(configuration).inventoryDistanceBasedSourceSelectionApiGetDistanceV1ExecuteGet(sourceLat, sourceLng, destinationLat, destinationLng, options)(fetch, basePath); }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFactory = InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFactory; /** * InventoryDistanceBasedSourceSelectionApiGetDistanceV1Api - object-oriented interface * @export * @class InventoryDistanceBasedSourceSelectionApiGetDistanceV1Api * @extends {BaseAPI} */ class InventoryDistanceBasedSourceSelectionApiGetDistanceV1Api extends BaseAPI { /** * Get distance between two points * @param {number} [sourceLat] Latitude * @param {number} [sourceLng] Longitude * @param {number} [destinationLat] Latitude * @param {number} [destinationLng] Longitude * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryDistanceBasedSourceSelectionApiGetDistanceV1Api */ inventoryDistanceBasedSourceSelectionApiGetDistanceV1ExecuteGet(sourceLat, sourceLng, destinationLat, destinationLng, options) { return exports.InventoryDistanceBasedSourceSelectionApiGetDistanceV1ApiFp(this.configuration).inventoryDistanceBasedSourceSelectionApiGetDistanceV1ExecuteGet(sourceLat, sourceLng, destinationLat, destinationLng, options)(this.fetch, this.basePath); } } exports.InventoryDistanceBasedSourceSelectionApiGetDistanceV1Api = InventoryDistanceBasedSourceSelectionApiGetDistanceV1Api; /** * InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1Api - fetch parameter creator * @export */ const InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFetchParamCreator = function (configuration) { return { /** * Get latitude and longitude object from address * @param {string} [addressCountry] Shipping country * @param {string} [addressPostcode] Shipping postcode * @param {string} [addressStreet] Shipping street address * @param {string} [addressRegion] Shipping region * @param {string} [addressCity] Shipping city * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options = {}) { const localVarPath = `/V1/inventory/get-latlng-from-address`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (addressCountry !== undefined) { localVarQueryParameter['address[country]'] = addressCountry; } if (addressPostcode !== undefined) { localVarQueryParameter['address[postcode]'] = addressPostcode; } if (addressStreet !== undefined) { localVarQueryParameter['address[street]'] = addressStreet; } if (addressRegion !== undefined) { localVarQueryParameter['address[region]'] = addressRegion; } if (addressCity !== undefined) { localVarQueryParameter['address[city]'] = addressCity; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFetchParamCreator = InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFetchParamCreator; /** * InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1Api - functional programming interface * @export */ const InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFp = function (configuration) { return { /** * Get latitude and longitude object from address * @param {string} [addressCountry] Shipping country * @param {string} [addressPostcode] Shipping postcode * @param {string} [addressStreet] Shipping street address * @param {string} [addressRegion] Shipping region * @param {string} [addressCity] Shipping city * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options) { const localVarFetchArgs = exports.InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFetchParamCreator(configuration).inventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFp = InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFp; /** * InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1Api - factory interface * @export */ const InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get latitude and longitude object from address * @param {string} [addressCountry] Shipping country * @param {string} [addressPostcode] Shipping postcode * @param {string} [addressStreet] Shipping street address * @param {string} [addressRegion] Shipping region * @param {string} [addressCity] Shipping city * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options) { return exports.InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFp(configuration).inventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options)(fetch, basePath); }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFactory = InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFactory; /** * InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1Api - object-oriented interface * @export * @class InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1Api * @extends {BaseAPI} */ class InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1Api extends BaseAPI { /** * Get latitude and longitude object from address * @param {string} [addressCountry] Shipping country * @param {string} [addressPostcode] Shipping postcode * @param {string} [addressStreet] Shipping street address * @param {string} [addressRegion] Shipping region * @param {string} [addressCity] Shipping city * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1Api */ inventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options) { return exports.InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ApiFp(this.configuration).inventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options)(this.fetch, this.basePath); } } exports.InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1Api = InventoryDistanceBasedSourceSelectionApiGetLatLngFromAddressV1Api; /** * InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1Api - fetch parameter creator * @export */ const InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFetchParamCreator = function (configuration) { return { /** * Get all available latitude and longitude objects from address. * @param {string} [addressCountry] Shipping country * @param {string} [addressPostcode] Shipping postcode * @param {string} [addressStreet] Shipping street address * @param {string} [addressRegion] Shipping region * @param {string} [addressCity] Shipping city * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options = {}) { const localVarPath = `/V1/inventory/get-latslngs-from-address`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (addressCountry !== undefined) { localVarQueryParameter['address[country]'] = addressCountry; } if (addressPostcode !== undefined) { localVarQueryParameter['address[postcode]'] = addressPostcode; } if (addressStreet !== undefined) { localVarQueryParameter['address[street]'] = addressStreet; } if (addressRegion !== undefined) { localVarQueryParameter['address[region]'] = addressRegion; } if (addressCity !== undefined) { localVarQueryParameter['address[city]'] = addressCity; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFetchParamCreator = InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFetchParamCreator; /** * InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1Api - functional programming interface * @export */ const InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFp = function (configuration) { return { /** * Get all available latitude and longitude objects from address. * @param {string} [addressCountry] Shipping country * @param {string} [addressPostcode] Shipping postcode * @param {string} [addressStreet] Shipping street address * @param {string} [addressRegion] Shipping region * @param {string} [addressCity] Shipping city * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options) { const localVarFetchArgs = exports.InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFetchParamCreator(configuration).inventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFp = InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFp; /** * InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1Api - factory interface * @export */ const InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get all available latitude and longitude objects from address. * @param {string} [addressCountry] Shipping country * @param {string} [addressPostcode] Shipping postcode * @param {string} [addressStreet] Shipping street address * @param {string} [addressRegion] Shipping region * @param {string} [addressCity] Shipping city * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options) { return exports.InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFp(configuration).inventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options)(fetch, basePath); }, }; }; exports.InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFactory = InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFactory; /** * InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1Api - object-oriented interface * @export * @class InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1Api * @extends {BaseAPI} */ class InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1Api extends BaseAPI { /** * Get all available latitude and longitude objects from address. * @param {string} [addressCountry] Shipping country * @param {string} [addressPostcode] Shipping postcode * @param {string} [addressStreet] Shipping street address * @param {string} [addressRegion] Shipping region * @param {string} [addressCity] Shipping city * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1Api */ inventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options) { return exports.InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ApiFp(this.configuration).inventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1ExecuteGet(addressCountry, addressPostcode, addressStreet, addressRegion, addressCity, options)(this.fetch, this.basePath); } } exports.InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1Api = InventoryDistanceBasedSourceSelectionApiGetLatsLngsFromAddressV1Api; /** * InventoryExportStockApiExportStockIndexDataV1Api - fetch parameter creator * @export */ const InventoryExportStockApiExportStockIndexDataV1ApiFetchParamCreator = function (configuration) { return { /** * Provides stock index export from inventory_stock_% table * @param {string} salesChannelType * @param {string} salesChannelCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryExportStockApiExportStockIndexDataV1ExecuteGet(salesChannelType, salesChannelCode, options = {}) { // verify required parameter 'salesChannelType' is not null or undefined if (salesChannelType === null || salesChannelType === undefined) { throw new RequiredError('salesChannelType', 'Required parameter salesChannelType was null or undefined when calling inventoryExportStockApiExportStockIndexDataV1ExecuteGet.'); } // verify required parameter 'salesChannelCode' is not null or undefined if (salesChannelCode === null || salesChannelCode === undefined) { throw new RequiredError('salesChannelCode', 'Required parameter salesChannelCode was null or undefined when calling inventoryExportStockApiExportStockIndexDataV1ExecuteGet.'); } const localVarPath = `/V1/inventory/dump-stock-index-data/{salesChannelType}/{salesChannelCode}` .replace(`{${"salesChannelType"}}`, encodeURIComponent(String(salesChannelType))) .replace(`{${"salesChannelCode"}}`, encodeURIComponent(String(salesChannelCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryExportStockApiExportStockIndexDataV1ApiFetchParamCreator = InventoryExportStockApiExportStockIndexDataV1ApiFetchParamCreator; /** * InventoryExportStockApiExportStockIndexDataV1Api - functional programming interface * @export */ const InventoryExportStockApiExportStockIndexDataV1ApiFp = function (configuration) { return { /** * Provides stock index export from inventory_stock_% table * @param {string} salesChannelType * @param {string} salesChannelCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryExportStockApiExportStockIndexDataV1ExecuteGet(salesChannelType, salesChannelCode, options) { const localVarFetchArgs = exports.InventoryExportStockApiExportStockIndexDataV1ApiFetchParamCreator(configuration).inventoryExportStockApiExportStockIndexDataV1ExecuteGet(salesChannelType, salesChannelCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryExportStockApiExportStockIndexDataV1ApiFp = InventoryExportStockApiExportStockIndexDataV1ApiFp; /** * InventoryExportStockApiExportStockIndexDataV1Api - factory interface * @export */ const InventoryExportStockApiExportStockIndexDataV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Provides stock index export from inventory_stock_% table * @param {string} salesChannelType * @param {string} salesChannelCode * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryExportStockApiExportStockIndexDataV1ExecuteGet(salesChannelType, salesChannelCode, options) { return exports.InventoryExportStockApiExportStockIndexDataV1ApiFp(configuration).inventoryExportStockApiExportStockIndexDataV1ExecuteGet(salesChannelType, salesChannelCode, options)(fetch, basePath); }, }; }; exports.InventoryExportStockApiExportStockIndexDataV1ApiFactory = InventoryExportStockApiExportStockIndexDataV1ApiFactory; /** * InventoryExportStockApiExportStockIndexDataV1Api - object-oriented interface * @export * @class InventoryExportStockApiExportStockIndexDataV1Api * @extends {BaseAPI} */ class InventoryExportStockApiExportStockIndexDataV1Api extends BaseAPI { /** * Provides stock index export from inventory_stock_% table * @param {string} salesChannelType * @param {string} salesChannelCode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryExportStockApiExportStockIndexDataV1Api */ inventoryExportStockApiExportStockIndexDataV1ExecuteGet(salesChannelType, salesChannelCode, options) { return exports.InventoryExportStockApiExportStockIndexDataV1ApiFp(this.configuration).inventoryExportStockApiExportStockIndexDataV1ExecuteGet(salesChannelType, salesChannelCode, options)(this.fetch, this.basePath); } } exports.InventoryExportStockApiExportStockIndexDataV1Api = InventoryExportStockApiExportStockIndexDataV1Api; /** * InventoryExportStockApiExportStockSalableQtyV1Api - fetch parameter creator * @export */ const InventoryExportStockApiExportStockSalableQtyV1ApiFetchParamCreator = function (configuration) { return { /** * Export product stock data filtered by search criteria. * @param {string} salesChannelType * @param {string} salesChannelCode * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryExportStockApiExportStockSalableQtyV1ExecuteGet(salesChannelType, salesChannelCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { // verify required parameter 'salesChannelType' is not null or undefined if (salesChannelType === null || salesChannelType === undefined) { throw new RequiredError('salesChannelType', 'Required parameter salesChannelType was null or undefined when calling inventoryExportStockApiExportStockSalableQtyV1ExecuteGet.'); } // verify required parameter 'salesChannelCode' is not null or undefined if (salesChannelCode === null || salesChannelCode === undefined) { throw new RequiredError('salesChannelCode', 'Required parameter salesChannelCode was null or undefined when calling inventoryExportStockApiExportStockSalableQtyV1ExecuteGet.'); } const localVarPath = `/V1/inventory/export-stock-salable-qty/{salesChannelType}/{salesChannelCode}` .replace(`{${"salesChannelType"}}`, encodeURIComponent(String(salesChannelType))) .replace(`{${"salesChannelCode"}}`, encodeURIComponent(String(salesChannelCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryExportStockApiExportStockSalableQtyV1ApiFetchParamCreator = InventoryExportStockApiExportStockSalableQtyV1ApiFetchParamCreator; /** * InventoryExportStockApiExportStockSalableQtyV1Api - functional programming interface * @export */ const InventoryExportStockApiExportStockSalableQtyV1ApiFp = function (configuration) { return { /** * Export product stock data filtered by search criteria. * @param {string} salesChannelType * @param {string} salesChannelCode * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryExportStockApiExportStockSalableQtyV1ExecuteGet(salesChannelType, salesChannelCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.InventoryExportStockApiExportStockSalableQtyV1ApiFetchParamCreator(configuration).inventoryExportStockApiExportStockSalableQtyV1ExecuteGet(salesChannelType, salesChannelCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryExportStockApiExportStockSalableQtyV1ApiFp = InventoryExportStockApiExportStockSalableQtyV1ApiFp; /** * InventoryExportStockApiExportStockSalableQtyV1Api - factory interface * @export */ const InventoryExportStockApiExportStockSalableQtyV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Export product stock data filtered by search criteria. * @param {string} salesChannelType * @param {string} salesChannelCode * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryExportStockApiExportStockSalableQtyV1ExecuteGet(salesChannelType, salesChannelCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.InventoryExportStockApiExportStockSalableQtyV1ApiFp(configuration).inventoryExportStockApiExportStockSalableQtyV1ExecuteGet(salesChannelType, salesChannelCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.InventoryExportStockApiExportStockSalableQtyV1ApiFactory = InventoryExportStockApiExportStockSalableQtyV1ApiFactory; /** * InventoryExportStockApiExportStockSalableQtyV1Api - object-oriented interface * @export * @class InventoryExportStockApiExportStockSalableQtyV1Api * @extends {BaseAPI} */ class InventoryExportStockApiExportStockSalableQtyV1Api extends BaseAPI { /** * Export product stock data filtered by search criteria. * @param {string} salesChannelType * @param {string} salesChannelCode * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryExportStockApiExportStockSalableQtyV1Api */ inventoryExportStockApiExportStockSalableQtyV1ExecuteGet(salesChannelType, salesChannelCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.InventoryExportStockApiExportStockSalableQtyV1ApiFp(this.configuration).inventoryExportStockApiExportStockSalableQtyV1ExecuteGet(salesChannelType, salesChannelCode, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.InventoryExportStockApiExportStockSalableQtyV1Api = InventoryExportStockApiExportStockSalableQtyV1Api; /** * InventoryInStorePickupApiGetPickupLocationsV1Api - fetch parameter creator * @export */ const InventoryInStorePickupApiGetPickupLocationsV1ApiFetchParamCreator = function (configuration) { return { /** * Get Pickup Locations according to the results of filtration by Search Request. * @param {number} [searchRequestAreaRadius] Search radius in KM. * @param {string} [searchRequestAreaSearchTerm] Search term string. * @param {string} [searchRequestFiltersCountryValue] Value. * @param {string} [searchRequestFiltersCountryConditionType] Condition Type. * @param {string} [searchRequestFiltersPostcodeValue] Value. * @param {string} [searchRequestFiltersPostcodeConditionType] Condition Type. * @param {string} [searchRequestFiltersRegionValue] Value. * @param {string} [searchRequestFiltersRegionConditionType] Condition Type. * @param {string} [searchRequestFiltersRegionIdValue] Value. * @param {string} [searchRequestFiltersRegionIdConditionType] Condition Type. * @param {string} [searchRequestFiltersCityValue] Value. * @param {string} [searchRequestFiltersCityConditionType] Condition Type. * @param {string} [searchRequestFiltersStreetValue] Value. * @param {string} [searchRequestFiltersStreetConditionType] Condition Type. * @param {string} [searchRequestFiltersNameValue] Value. * @param {string} [searchRequestFiltersNameConditionType] Condition Type. * @param {string} [searchRequestFiltersPickupLocationCodeValue] Value. * @param {string} [searchRequestFiltersPickupLocationCodeConditionType] Condition Type. * @param {number} [searchRequestPageSize] Page size. * @param {number} [searchRequestCurrentPage] Current page. * @param {string} [searchRequestScopeType] Sales Channel Type. * @param {string} [searchRequestScopeCode] Sales Channel code. * @param {string} [searchRequestSort0Field] Sorting field. * @param {string} [searchRequestSort0Direction] Sorting direction. * @param {string} [searchRequestExtensionAttributesProductsInfo0Sku] Product SKU. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryInStorePickupApiGetPickupLocationsV1ExecuteGet(searchRequestAreaRadius, searchRequestAreaSearchTerm, searchRequestFiltersCountryValue, searchRequestFiltersCountryConditionType, searchRequestFiltersPostcodeValue, searchRequestFiltersPostcodeConditionType, searchRequestFiltersRegionValue, searchRequestFiltersRegionConditionType, searchRequestFiltersRegionIdValue, searchRequestFiltersRegionIdConditionType, searchRequestFiltersCityValue, searchRequestFiltersCityConditionType, searchRequestFiltersStreetValue, searchRequestFiltersStreetConditionType, searchRequestFiltersNameValue, searchRequestFiltersNameConditionType, searchRequestFiltersPickupLocationCodeValue, searchRequestFiltersPickupLocationCodeConditionType, searchRequestPageSize, searchRequestCurrentPage, searchRequestScopeType, searchRequestScopeCode, searchRequestSort0Field, searchRequestSort0Direction, searchRequestExtensionAttributesProductsInfo0Sku, options = {}) { const localVarPath = `/V1/inventory/in-store-pickup/pickup-locations/`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchRequestAreaRadius !== undefined) { localVarQueryParameter['searchRequest[area][radius]'] = searchRequestAreaRadius; } if (searchRequestAreaSearchTerm !== undefined) { localVarQueryParameter['searchRequest[area][searchTerm]'] = searchRequestAreaSearchTerm; } if (searchRequestFiltersCountryValue !== undefined) { localVarQueryParameter['searchRequest[filters][country][value]'] = searchRequestFiltersCountryValue; } if (searchRequestFiltersCountryConditionType !== undefined) { localVarQueryParameter['searchRequest[filters][country][conditionType]'] = searchRequestFiltersCountryConditionType; } if (searchRequestFiltersPostcodeValue !== undefined) { localVarQueryParameter['searchRequest[filters][postcode][value]'] = searchRequestFiltersPostcodeValue; } if (searchRequestFiltersPostcodeConditionType !== undefined) { localVarQueryParameter['searchRequest[filters][postcode][conditionType]'] = searchRequestFiltersPostcodeConditionType; } if (searchRequestFiltersRegionValue !== undefined) { localVarQueryParameter['searchRequest[filters][region][value]'] = searchRequestFiltersRegionValue; } if (searchRequestFiltersRegionConditionType !== undefined) { localVarQueryParameter['searchRequest[filters][region][conditionType]'] = searchRequestFiltersRegionConditionType; } if (searchRequestFiltersRegionIdValue !== undefined) { localVarQueryParameter['searchRequest[filters][regionId][value]'] = searchRequestFiltersRegionIdValue; } if (searchRequestFiltersRegionIdConditionType !== undefined) { localVarQueryParameter['searchRequest[filters][regionId][conditionType]'] = searchRequestFiltersRegionIdConditionType; } if (searchRequestFiltersCityValue !== undefined) { localVarQueryParameter['searchRequest[filters][city][value]'] = searchRequestFiltersCityValue; } if (searchRequestFiltersCityConditionType !== undefined) { localVarQueryParameter['searchRequest[filters][city][conditionType]'] = searchRequestFiltersCityConditionType; } if (searchRequestFiltersStreetValue !== undefined) { localVarQueryParameter['searchRequest[filters][street][value]'] = searchRequestFiltersStreetValue; } if (searchRequestFiltersStreetConditionType !== undefined) { localVarQueryParameter['searchRequest[filters][street][conditionType]'] = searchRequestFiltersStreetConditionType; } if (searchRequestFiltersNameValue !== undefined) { localVarQueryParameter['searchRequest[filters][name][value]'] = searchRequestFiltersNameValue; } if (searchRequestFiltersNameConditionType !== undefined) { localVarQueryParameter['searchRequest[filters][name][conditionType]'] = searchRequestFiltersNameConditionType; } if (searchRequestFiltersPickupLocationCodeValue !== undefined) { localVarQueryParameter['searchRequest[filters][pickupLocationCode][value]'] = searchRequestFiltersPickupLocationCodeValue; } if (searchRequestFiltersPickupLocationCodeConditionType !== undefined) { localVarQueryParameter['searchRequest[filters][pickupLocationCode][conditionType]'] = searchRequestFiltersPickupLocationCodeConditionType; } if (searchRequestPageSize !== undefined) { localVarQueryParameter['searchRequest[pageSize]'] = searchRequestPageSize; } if (searchRequestCurrentPage !== undefined) { localVarQueryParameter['searchRequest[currentPage]'] = searchRequestCurrentPage; } if (searchRequestScopeType !== undefined) { localVarQueryParameter['searchRequest[scopeType]'] = searchRequestScopeType; } if (searchRequestScopeCode !== undefined) { localVarQueryParameter['searchRequest[scopeCode]'] = searchRequestScopeCode; } if (searchRequestSort0Field !== undefined) { localVarQueryParameter['searchRequest[sort][0][field]'] = searchRequestSort0Field; } if (searchRequestSort0Direction !== undefined) { localVarQueryParameter['searchRequest[sort][0][direction]'] = searchRequestSort0Direction; } if (searchRequestExtensionAttributesProductsInfo0Sku !== undefined) { localVarQueryParameter['searchRequest[extensionAttributes][productsInfo][0][sku]'] = searchRequestExtensionAttributesProductsInfo0Sku; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryInStorePickupApiGetPickupLocationsV1ApiFetchParamCreator = InventoryInStorePickupApiGetPickupLocationsV1ApiFetchParamCreator; /** * InventoryInStorePickupApiGetPickupLocationsV1Api - functional programming interface * @export */ const InventoryInStorePickupApiGetPickupLocationsV1ApiFp = function (configuration) { return { /** * Get Pickup Locations according to the results of filtration by Search Request. * @param {number} [searchRequestAreaRadius] Search radius in KM. * @param {string} [searchRequestAreaSearchTerm] Search term string. * @param {string} [searchRequestFiltersCountryValue] Value. * @param {string} [searchRequestFiltersCountryConditionType] Condition Type. * @param {string} [searchRequestFiltersPostcodeValue] Value. * @param {string} [searchRequestFiltersPostcodeConditionType] Condition Type. * @param {string} [searchRequestFiltersRegionValue] Value. * @param {string} [searchRequestFiltersRegionConditionType] Condition Type. * @param {string} [searchRequestFiltersRegionIdValue] Value. * @param {string} [searchRequestFiltersRegionIdConditionType] Condition Type. * @param {string} [searchRequestFiltersCityValue] Value. * @param {string} [searchRequestFiltersCityConditionType] Condition Type. * @param {string} [searchRequestFiltersStreetValue] Value. * @param {string} [searchRequestFiltersStreetConditionType] Condition Type. * @param {string} [searchRequestFiltersNameValue] Value. * @param {string} [searchRequestFiltersNameConditionType] Condition Type. * @param {string} [searchRequestFiltersPickupLocationCodeValue] Value. * @param {string} [searchRequestFiltersPickupLocationCodeConditionType] Condition Type. * @param {number} [searchRequestPageSize] Page size. * @param {number} [searchRequestCurrentPage] Current page. * @param {string} [searchRequestScopeType] Sales Channel Type. * @param {string} [searchRequestScopeCode] Sales Channel code. * @param {string} [searchRequestSort0Field] Sorting field. * @param {string} [searchRequestSort0Direction] Sorting direction. * @param {string} [searchRequestExtensionAttributesProductsInfo0Sku] Product SKU. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryInStorePickupApiGetPickupLocationsV1ExecuteGet(searchRequestAreaRadius, searchRequestAreaSearchTerm, searchRequestFiltersCountryValue, searchRequestFiltersCountryConditionType, searchRequestFiltersPostcodeValue, searchRequestFiltersPostcodeConditionType, searchRequestFiltersRegionValue, searchRequestFiltersRegionConditionType, searchRequestFiltersRegionIdValue, searchRequestFiltersRegionIdConditionType, searchRequestFiltersCityValue, searchRequestFiltersCityConditionType, searchRequestFiltersStreetValue, searchRequestFiltersStreetConditionType, searchRequestFiltersNameValue, searchRequestFiltersNameConditionType, searchRequestFiltersPickupLocationCodeValue, searchRequestFiltersPickupLocationCodeConditionType, searchRequestPageSize, searchRequestCurrentPage, searchRequestScopeType, searchRequestScopeCode, searchRequestSort0Field, searchRequestSort0Direction, searchRequestExtensionAttributesProductsInfo0Sku, options) { const localVarFetchArgs = exports.InventoryInStorePickupApiGetPickupLocationsV1ApiFetchParamCreator(configuration).inventoryInStorePickupApiGetPickupLocationsV1ExecuteGet(searchRequestAreaRadius, searchRequestAreaSearchTerm, searchRequestFiltersCountryValue, searchRequestFiltersCountryConditionType, searchRequestFiltersPostcodeValue, searchRequestFiltersPostcodeConditionType, searchRequestFiltersRegionValue, searchRequestFiltersRegionConditionType, searchRequestFiltersRegionIdValue, searchRequestFiltersRegionIdConditionType, searchRequestFiltersCityValue, searchRequestFiltersCityConditionType, searchRequestFiltersStreetValue, searchRequestFiltersStreetConditionType, searchRequestFiltersNameValue, searchRequestFiltersNameConditionType, searchRequestFiltersPickupLocationCodeValue, searchRequestFiltersPickupLocationCodeConditionType, searchRequestPageSize, searchRequestCurrentPage, searchRequestScopeType, searchRequestScopeCode, searchRequestSort0Field, searchRequestSort0Direction, searchRequestExtensionAttributesProductsInfo0Sku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryInStorePickupApiGetPickupLocationsV1ApiFp = InventoryInStorePickupApiGetPickupLocationsV1ApiFp; /** * InventoryInStorePickupApiGetPickupLocationsV1Api - factory interface * @export */ const InventoryInStorePickupApiGetPickupLocationsV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get Pickup Locations according to the results of filtration by Search Request. * @param {number} [searchRequestAreaRadius] Search radius in KM. * @param {string} [searchRequestAreaSearchTerm] Search term string. * @param {string} [searchRequestFiltersCountryValue] Value. * @param {string} [searchRequestFiltersCountryConditionType] Condition Type. * @param {string} [searchRequestFiltersPostcodeValue] Value. * @param {string} [searchRequestFiltersPostcodeConditionType] Condition Type. * @param {string} [searchRequestFiltersRegionValue] Value. * @param {string} [searchRequestFiltersRegionConditionType] Condition Type. * @param {string} [searchRequestFiltersRegionIdValue] Value. * @param {string} [searchRequestFiltersRegionIdConditionType] Condition Type. * @param {string} [searchRequestFiltersCityValue] Value. * @param {string} [searchRequestFiltersCityConditionType] Condition Type. * @param {string} [searchRequestFiltersStreetValue] Value. * @param {string} [searchRequestFiltersStreetConditionType] Condition Type. * @param {string} [searchRequestFiltersNameValue] Value. * @param {string} [searchRequestFiltersNameConditionType] Condition Type. * @param {string} [searchRequestFiltersPickupLocationCodeValue] Value. * @param {string} [searchRequestFiltersPickupLocationCodeConditionType] Condition Type. * @param {number} [searchRequestPageSize] Page size. * @param {number} [searchRequestCurrentPage] Current page. * @param {string} [searchRequestScopeType] Sales Channel Type. * @param {string} [searchRequestScopeCode] Sales Channel code. * @param {string} [searchRequestSort0Field] Sorting field. * @param {string} [searchRequestSort0Direction] Sorting direction. * @param {string} [searchRequestExtensionAttributesProductsInfo0Sku] Product SKU. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryInStorePickupApiGetPickupLocationsV1ExecuteGet(searchRequestAreaRadius, searchRequestAreaSearchTerm, searchRequestFiltersCountryValue, searchRequestFiltersCountryConditionType, searchRequestFiltersPostcodeValue, searchRequestFiltersPostcodeConditionType, searchRequestFiltersRegionValue, searchRequestFiltersRegionConditionType, searchRequestFiltersRegionIdValue, searchRequestFiltersRegionIdConditionType, searchRequestFiltersCityValue, searchRequestFiltersCityConditionType, searchRequestFiltersStreetValue, searchRequestFiltersStreetConditionType, searchRequestFiltersNameValue, searchRequestFiltersNameConditionType, searchRequestFiltersPickupLocationCodeValue, searchRequestFiltersPickupLocationCodeConditionType, searchRequestPageSize, searchRequestCurrentPage, searchRequestScopeType, searchRequestScopeCode, searchRequestSort0Field, searchRequestSort0Direction, searchRequestExtensionAttributesProductsInfo0Sku, options) { return exports.InventoryInStorePickupApiGetPickupLocationsV1ApiFp(configuration).inventoryInStorePickupApiGetPickupLocationsV1ExecuteGet(searchRequestAreaRadius, searchRequestAreaSearchTerm, searchRequestFiltersCountryValue, searchRequestFiltersCountryConditionType, searchRequestFiltersPostcodeValue, searchRequestFiltersPostcodeConditionType, searchRequestFiltersRegionValue, searchRequestFiltersRegionConditionType, searchRequestFiltersRegionIdValue, searchRequestFiltersRegionIdConditionType, searchRequestFiltersCityValue, searchRequestFiltersCityConditionType, searchRequestFiltersStreetValue, searchRequestFiltersStreetConditionType, searchRequestFiltersNameValue, searchRequestFiltersNameConditionType, searchRequestFiltersPickupLocationCodeValue, searchRequestFiltersPickupLocationCodeConditionType, searchRequestPageSize, searchRequestCurrentPage, searchRequestScopeType, searchRequestScopeCode, searchRequestSort0Field, searchRequestSort0Direction, searchRequestExtensionAttributesProductsInfo0Sku, options)(fetch, basePath); }, }; }; exports.InventoryInStorePickupApiGetPickupLocationsV1ApiFactory = InventoryInStorePickupApiGetPickupLocationsV1ApiFactory; /** * InventoryInStorePickupApiGetPickupLocationsV1Api - object-oriented interface * @export * @class InventoryInStorePickupApiGetPickupLocationsV1Api * @extends {BaseAPI} */ class InventoryInStorePickupApiGetPickupLocationsV1Api extends BaseAPI { /** * Get Pickup Locations according to the results of filtration by Search Request. * @param {number} [searchRequestAreaRadius] Search radius in KM. * @param {string} [searchRequestAreaSearchTerm] Search term string. * @param {string} [searchRequestFiltersCountryValue] Value. * @param {string} [searchRequestFiltersCountryConditionType] Condition Type. * @param {string} [searchRequestFiltersPostcodeValue] Value. * @param {string} [searchRequestFiltersPostcodeConditionType] Condition Type. * @param {string} [searchRequestFiltersRegionValue] Value. * @param {string} [searchRequestFiltersRegionConditionType] Condition Type. * @param {string} [searchRequestFiltersRegionIdValue] Value. * @param {string} [searchRequestFiltersRegionIdConditionType] Condition Type. * @param {string} [searchRequestFiltersCityValue] Value. * @param {string} [searchRequestFiltersCityConditionType] Condition Type. * @param {string} [searchRequestFiltersStreetValue] Value. * @param {string} [searchRequestFiltersStreetConditionType] Condition Type. * @param {string} [searchRequestFiltersNameValue] Value. * @param {string} [searchRequestFiltersNameConditionType] Condition Type. * @param {string} [searchRequestFiltersPickupLocationCodeValue] Value. * @param {string} [searchRequestFiltersPickupLocationCodeConditionType] Condition Type. * @param {number} [searchRequestPageSize] Page size. * @param {number} [searchRequestCurrentPage] Current page. * @param {string} [searchRequestScopeType] Sales Channel Type. * @param {string} [searchRequestScopeCode] Sales Channel code. * @param {string} [searchRequestSort0Field] Sorting field. * @param {string} [searchRequestSort0Direction] Sorting direction. * @param {string} [searchRequestExtensionAttributesProductsInfo0Sku] Product SKU. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryInStorePickupApiGetPickupLocationsV1Api */ inventoryInStorePickupApiGetPickupLocationsV1ExecuteGet(searchRequestAreaRadius, searchRequestAreaSearchTerm, searchRequestFiltersCountryValue, searchRequestFiltersCountryConditionType, searchRequestFiltersPostcodeValue, searchRequestFiltersPostcodeConditionType, searchRequestFiltersRegionValue, searchRequestFiltersRegionConditionType, searchRequestFiltersRegionIdValue, searchRequestFiltersRegionIdConditionType, searchRequestFiltersCityValue, searchRequestFiltersCityConditionType, searchRequestFiltersStreetValue, searchRequestFiltersStreetConditionType, searchRequestFiltersNameValue, searchRequestFiltersNameConditionType, searchRequestFiltersPickupLocationCodeValue, searchRequestFiltersPickupLocationCodeConditionType, searchRequestPageSize, searchRequestCurrentPage, searchRequestScopeType, searchRequestScopeCode, searchRequestSort0Field, searchRequestSort0Direction, searchRequestExtensionAttributesProductsInfo0Sku, options) { return exports.InventoryInStorePickupApiGetPickupLocationsV1ApiFp(this.configuration).inventoryInStorePickupApiGetPickupLocationsV1ExecuteGet(searchRequestAreaRadius, searchRequestAreaSearchTerm, searchRequestFiltersCountryValue, searchRequestFiltersCountryConditionType, searchRequestFiltersPostcodeValue, searchRequestFiltersPostcodeConditionType, searchRequestFiltersRegionValue, searchRequestFiltersRegionConditionType, searchRequestFiltersRegionIdValue, searchRequestFiltersRegionIdConditionType, searchRequestFiltersCityValue, searchRequestFiltersCityConditionType, searchRequestFiltersStreetValue, searchRequestFiltersStreetConditionType, searchRequestFiltersNameValue, searchRequestFiltersNameConditionType, searchRequestFiltersPickupLocationCodeValue, searchRequestFiltersPickupLocationCodeConditionType, searchRequestPageSize, searchRequestCurrentPage, searchRequestScopeType, searchRequestScopeCode, searchRequestSort0Field, searchRequestSort0Direction, searchRequestExtensionAttributesProductsInfo0Sku, options)(this.fetch, this.basePath); } } exports.InventoryInStorePickupApiGetPickupLocationsV1Api = InventoryInStorePickupApiGetPickupLocationsV1Api; /** * InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1Api - fetch parameter creator * @export */ const InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFetchParamCreator = function (configuration) { return { /** * Notify customer that the orders is ready for pickup. * @param {any} [inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePost(inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody, options = {}) { const localVarPath = `/V1/order/notify-orders-are-ready-for-pickup`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody || {}) : (inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFetchParamCreator = InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFetchParamCreator; /** * InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1Api - functional programming interface * @export */ const InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFp = function (configuration) { return { /** * Notify customer that the orders is ready for pickup. * @param {any} [inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePost(inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFetchParamCreator(configuration).inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePost(inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFp = InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFp; /** * InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1Api - factory interface * @export */ const InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Notify customer that the orders is ready for pickup. * @param {any} [inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePost(inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody, options) { return exports.InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFp(configuration).inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePost(inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFactory = InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFactory; /** * InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1Api - object-oriented interface * @export * @class InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1Api * @extends {BaseAPI} */ class InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1Api extends BaseAPI { /** * Notify customer that the orders is ready for pickup. * @param {any} [inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1Api */ inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePost(inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody, options) { return exports.InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ApiFp(this.configuration).inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePost(inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1Api = InventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1Api; /** * InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1Api - fetch parameter creator * @export */ const InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFetchParamCreator = function (configuration) { return { /** * Delete multiple source items configuration for low quantity * @param {any} [inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePost(inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody, options = {}) { const localVarPath = `/V1/inventory/low-quantity-notifications-delete`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody || {}) : (inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFetchParamCreator = InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFetchParamCreator; /** * InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1Api - functional programming interface * @export */ const InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFp = function (configuration) { return { /** * Delete multiple source items configuration for low quantity * @param {any} [inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePost(inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFetchParamCreator(configuration).inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePost(inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFp = InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFp; /** * InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1Api - factory interface * @export */ const InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete multiple source items configuration for low quantity * @param {any} [inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePost(inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody, options) { return exports.InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFp(configuration).inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePost(inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFactory = InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFactory; /** * InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1Api - object-oriented interface * @export * @class InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1Api * @extends {BaseAPI} */ class InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1Api extends BaseAPI { /** * Delete multiple source items configuration for low quantity * @param {any} [inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1Api */ inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePost(inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody, options) { return exports.InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ApiFp(this.configuration).inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePost(inventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1Api = InventoryLowQuantityNotificationApiDeleteSourceItemsConfigurationV1Api; /** * InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1Api - fetch parameter creator * @export */ const InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFetchParamCreator = function (configuration) { return { /** * Get the source item configuration * @param {string} sourceCode * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ExecuteGet(sourceCode, sku, options = {}) { // verify required parameter 'sourceCode' is not null or undefined if (sourceCode === null || sourceCode === undefined) { throw new RequiredError('sourceCode', 'Required parameter sourceCode was null or undefined when calling inventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ExecuteGet.'); } // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling inventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ExecuteGet.'); } const localVarPath = `/V1/inventory/low-quantity-notification/{sourceCode}/{sku}` .replace(`{${"sourceCode"}}`, encodeURIComponent(String(sourceCode))) .replace(`{${"sku"}}`, encodeURIComponent(String(sku))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFetchParamCreator = InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFetchParamCreator; /** * InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1Api - functional programming interface * @export */ const InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFp = function (configuration) { return { /** * Get the source item configuration * @param {string} sourceCode * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ExecuteGet(sourceCode, sku, options) { const localVarFetchArgs = exports.InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFetchParamCreator(configuration).inventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ExecuteGet(sourceCode, sku, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFp = InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFp; /** * InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1Api - factory interface * @export */ const InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get the source item configuration * @param {string} sourceCode * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ExecuteGet(sourceCode, sku, options) { return exports.InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFp(configuration).inventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ExecuteGet(sourceCode, sku, options)(fetch, basePath); }, }; }; exports.InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFactory = InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFactory; /** * InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1Api - object-oriented interface * @export * @class InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1Api * @extends {BaseAPI} */ class InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1Api extends BaseAPI { /** * Get the source item configuration * @param {string} sourceCode * @param {string} sku * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1Api */ inventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ExecuteGet(sourceCode, sku, options) { return exports.InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ApiFp(this.configuration).inventoryLowQuantityNotificationApiGetSourceItemConfigurationV1ExecuteGet(sourceCode, sku, options)(this.fetch, this.basePath); } } exports.InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1Api = InventoryLowQuantityNotificationApiGetSourceItemConfigurationV1Api; /** * InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1Api - fetch parameter creator * @export */ const InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {any} [inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePost(inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody, options = {}) { const localVarPath = `/V1/inventory/low-quantity-notification`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody || {}) : (inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFetchParamCreator = InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFetchParamCreator; /** * InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1Api - functional programming interface * @export */ const InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFp = function (configuration) { return { /** * * @param {any} [inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePost(inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFetchParamCreator(configuration).inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePost(inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFp = InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFp; /** * InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1Api - factory interface * @export */ const InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {any} [inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePost(inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody, options) { return exports.InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFp(configuration).inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePost(inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFactory = InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFactory; /** * InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1Api - object-oriented interface * @export * @class InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1Api * @extends {BaseAPI} */ class InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1Api extends BaseAPI { /** * * @param {any} [inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1Api */ inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePost(inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody, options) { return exports.InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ApiFp(this.configuration).inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePost(inventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1Api = InventoryLowQuantityNotificationApiSourceItemConfigurationsSaveV1Api; /** * InventorySalesApiAreProductsSalableForRequestedQtyV1Api - fetch parameter creator * @export */ const InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFetchParamCreator = function (configuration) { return { /** * Get whether products are salable in requested Qty for given set of SKUs in specified stock. * @param {number} stockId * @param {string} [skuRequests0Sku] Product sku. * @param {number} [skuRequests0Qty] Product quantity. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiAreProductsSalableForRequestedQtyV1ExecuteGet(stockId, skuRequests0Sku, skuRequests0Qty, options = {}) { // verify required parameter 'stockId' is not null or undefined if (stockId === null || stockId === undefined) { throw new RequiredError('stockId', 'Required parameter stockId was null or undefined when calling inventorySalesApiAreProductsSalableForRequestedQtyV1ExecuteGet.'); } const localVarPath = `/V1/inventory/are-product-salable-for-requested-qty/`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (skuRequests0Sku !== undefined) { localVarQueryParameter['skuRequests[0][sku]'] = skuRequests0Sku; } if (skuRequests0Qty !== undefined) { localVarQueryParameter['skuRequests[0][qty]'] = skuRequests0Qty; } if (stockId !== undefined) { localVarQueryParameter['stockId'] = stockId; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFetchParamCreator = InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFetchParamCreator; /** * InventorySalesApiAreProductsSalableForRequestedQtyV1Api - functional programming interface * @export */ const InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFp = function (configuration) { return { /** * Get whether products are salable in requested Qty for given set of SKUs in specified stock. * @param {number} stockId * @param {string} [skuRequests0Sku] Product sku. * @param {number} [skuRequests0Qty] Product quantity. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiAreProductsSalableForRequestedQtyV1ExecuteGet(stockId, skuRequests0Sku, skuRequests0Qty, options) { const localVarFetchArgs = exports.InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFetchParamCreator(configuration).inventorySalesApiAreProductsSalableForRequestedQtyV1ExecuteGet(stockId, skuRequests0Sku, skuRequests0Qty, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFp = InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFp; /** * InventorySalesApiAreProductsSalableForRequestedQtyV1Api - factory interface * @export */ const InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get whether products are salable in requested Qty for given set of SKUs in specified stock. * @param {number} stockId * @param {string} [skuRequests0Sku] Product sku. * @param {number} [skuRequests0Qty] Product quantity. * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiAreProductsSalableForRequestedQtyV1ExecuteGet(stockId, skuRequests0Sku, skuRequests0Qty, options) { return exports.InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFp(configuration).inventorySalesApiAreProductsSalableForRequestedQtyV1ExecuteGet(stockId, skuRequests0Sku, skuRequests0Qty, options)(fetch, basePath); }, }; }; exports.InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFactory = InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFactory; /** * InventorySalesApiAreProductsSalableForRequestedQtyV1Api - object-oriented interface * @export * @class InventorySalesApiAreProductsSalableForRequestedQtyV1Api * @extends {BaseAPI} */ class InventorySalesApiAreProductsSalableForRequestedQtyV1Api extends BaseAPI { /** * Get whether products are salable in requested Qty for given set of SKUs in specified stock. * @param {number} stockId * @param {string} [skuRequests0Sku] Product sku. * @param {number} [skuRequests0Qty] Product quantity. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventorySalesApiAreProductsSalableForRequestedQtyV1Api */ inventorySalesApiAreProductsSalableForRequestedQtyV1ExecuteGet(stockId, skuRequests0Sku, skuRequests0Qty, options) { return exports.InventorySalesApiAreProductsSalableForRequestedQtyV1ApiFp(this.configuration).inventorySalesApiAreProductsSalableForRequestedQtyV1ExecuteGet(stockId, skuRequests0Sku, skuRequests0Qty, options)(this.fetch, this.basePath); } } exports.InventorySalesApiAreProductsSalableForRequestedQtyV1Api = InventorySalesApiAreProductsSalableForRequestedQtyV1Api; /** * InventorySalesApiAreProductsSalableV1Api - fetch parameter creator * @export */ const InventorySalesApiAreProductsSalableV1ApiFetchParamCreator = function (configuration) { return { /** * Get products salable status for given SKUs and given Stock. * @param {Array} skus * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiAreProductsSalableV1ExecuteGet(skus, stockId, options = {}) { // verify required parameter 'skus' is not null or undefined if (skus === null || skus === undefined) { throw new RequiredError('skus', 'Required parameter skus was null or undefined when calling inventorySalesApiAreProductsSalableV1ExecuteGet.'); } // verify required parameter 'stockId' is not null or undefined if (stockId === null || stockId === undefined) { throw new RequiredError('stockId', 'Required parameter stockId was null or undefined when calling inventorySalesApiAreProductsSalableV1ExecuteGet.'); } const localVarPath = `/V1/inventory/are-products-salable`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (skus) { localVarQueryParameter['skus'] = skus; } if (stockId !== undefined) { localVarQueryParameter['stockId'] = stockId; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventorySalesApiAreProductsSalableV1ApiFetchParamCreator = InventorySalesApiAreProductsSalableV1ApiFetchParamCreator; /** * InventorySalesApiAreProductsSalableV1Api - functional programming interface * @export */ const InventorySalesApiAreProductsSalableV1ApiFp = function (configuration) { return { /** * Get products salable status for given SKUs and given Stock. * @param {Array} skus * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiAreProductsSalableV1ExecuteGet(skus, stockId, options) { const localVarFetchArgs = exports.InventorySalesApiAreProductsSalableV1ApiFetchParamCreator(configuration).inventorySalesApiAreProductsSalableV1ExecuteGet(skus, stockId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventorySalesApiAreProductsSalableV1ApiFp = InventorySalesApiAreProductsSalableV1ApiFp; /** * InventorySalesApiAreProductsSalableV1Api - factory interface * @export */ const InventorySalesApiAreProductsSalableV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get products salable status for given SKUs and given Stock. * @param {Array} skus * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiAreProductsSalableV1ExecuteGet(skus, stockId, options) { return exports.InventorySalesApiAreProductsSalableV1ApiFp(configuration).inventorySalesApiAreProductsSalableV1ExecuteGet(skus, stockId, options)(fetch, basePath); }, }; }; exports.InventorySalesApiAreProductsSalableV1ApiFactory = InventorySalesApiAreProductsSalableV1ApiFactory; /** * InventorySalesApiAreProductsSalableV1Api - object-oriented interface * @export * @class InventorySalesApiAreProductsSalableV1Api * @extends {BaseAPI} */ class InventorySalesApiAreProductsSalableV1Api extends BaseAPI { /** * Get products salable status for given SKUs and given Stock. * @param {Array} skus * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventorySalesApiAreProductsSalableV1Api */ inventorySalesApiAreProductsSalableV1ExecuteGet(skus, stockId, options) { return exports.InventorySalesApiAreProductsSalableV1ApiFp(this.configuration).inventorySalesApiAreProductsSalableV1ExecuteGet(skus, stockId, options)(this.fetch, this.basePath); } } exports.InventorySalesApiAreProductsSalableV1Api = InventorySalesApiAreProductsSalableV1Api; /** * InventorySalesApiGetProductSalableQtyV1Api - fetch parameter creator * @export */ const InventorySalesApiGetProductSalableQtyV1ApiFetchParamCreator = function (configuration) { return { /** * Get Product Quantity for given SKU and Stock * @param {string} sku * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiGetProductSalableQtyV1ExecuteGet(sku, stockId, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling inventorySalesApiGetProductSalableQtyV1ExecuteGet.'); } // verify required parameter 'stockId' is not null or undefined if (stockId === null || stockId === undefined) { throw new RequiredError('stockId', 'Required parameter stockId was null or undefined when calling inventorySalesApiGetProductSalableQtyV1ExecuteGet.'); } const localVarPath = `/V1/inventory/get-product-salable-quantity/{sku}/{stockId}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"stockId"}}`, encodeURIComponent(String(stockId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventorySalesApiGetProductSalableQtyV1ApiFetchParamCreator = InventorySalesApiGetProductSalableQtyV1ApiFetchParamCreator; /** * InventorySalesApiGetProductSalableQtyV1Api - functional programming interface * @export */ const InventorySalesApiGetProductSalableQtyV1ApiFp = function (configuration) { return { /** * Get Product Quantity for given SKU and Stock * @param {string} sku * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiGetProductSalableQtyV1ExecuteGet(sku, stockId, options) { const localVarFetchArgs = exports.InventorySalesApiGetProductSalableQtyV1ApiFetchParamCreator(configuration).inventorySalesApiGetProductSalableQtyV1ExecuteGet(sku, stockId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventorySalesApiGetProductSalableQtyV1ApiFp = InventorySalesApiGetProductSalableQtyV1ApiFp; /** * InventorySalesApiGetProductSalableQtyV1Api - factory interface * @export */ const InventorySalesApiGetProductSalableQtyV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get Product Quantity for given SKU and Stock * @param {string} sku * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiGetProductSalableQtyV1ExecuteGet(sku, stockId, options) { return exports.InventorySalesApiGetProductSalableQtyV1ApiFp(configuration).inventorySalesApiGetProductSalableQtyV1ExecuteGet(sku, stockId, options)(fetch, basePath); }, }; }; exports.InventorySalesApiGetProductSalableQtyV1ApiFactory = InventorySalesApiGetProductSalableQtyV1ApiFactory; /** * InventorySalesApiGetProductSalableQtyV1Api - object-oriented interface * @export * @class InventorySalesApiGetProductSalableQtyV1Api * @extends {BaseAPI} */ class InventorySalesApiGetProductSalableQtyV1Api extends BaseAPI { /** * Get Product Quantity for given SKU and Stock * @param {string} sku * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventorySalesApiGetProductSalableQtyV1Api */ inventorySalesApiGetProductSalableQtyV1ExecuteGet(sku, stockId, options) { return exports.InventorySalesApiGetProductSalableQtyV1ApiFp(this.configuration).inventorySalesApiGetProductSalableQtyV1ExecuteGet(sku, stockId, options)(this.fetch, this.basePath); } } exports.InventorySalesApiGetProductSalableQtyV1Api = InventorySalesApiGetProductSalableQtyV1Api; /** * InventorySalesApiIsProductSalableForRequestedQtyV1Api - fetch parameter creator * @export */ const InventorySalesApiIsProductSalableForRequestedQtyV1ApiFetchParamCreator = function (configuration) { return { /** * Get is product salable for given SKU in a given Stock for a certain Qty * @param {string} sku * @param {number} stockId * @param {number} requestedQty * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiIsProductSalableForRequestedQtyV1ExecuteGet(sku, stockId, requestedQty, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling inventorySalesApiIsProductSalableForRequestedQtyV1ExecuteGet.'); } // verify required parameter 'stockId' is not null or undefined if (stockId === null || stockId === undefined) { throw new RequiredError('stockId', 'Required parameter stockId was null or undefined when calling inventorySalesApiIsProductSalableForRequestedQtyV1ExecuteGet.'); } // verify required parameter 'requestedQty' is not null or undefined if (requestedQty === null || requestedQty === undefined) { throw new RequiredError('requestedQty', 'Required parameter requestedQty was null or undefined when calling inventorySalesApiIsProductSalableForRequestedQtyV1ExecuteGet.'); } const localVarPath = `/V1/inventory/is-product-salable-for-requested-qty/{sku}/{stockId}/{requestedQty}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"stockId"}}`, encodeURIComponent(String(stockId))) .replace(`{${"requestedQty"}}`, encodeURIComponent(String(requestedQty))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventorySalesApiIsProductSalableForRequestedQtyV1ApiFetchParamCreator = InventorySalesApiIsProductSalableForRequestedQtyV1ApiFetchParamCreator; /** * InventorySalesApiIsProductSalableForRequestedQtyV1Api - functional programming interface * @export */ const InventorySalesApiIsProductSalableForRequestedQtyV1ApiFp = function (configuration) { return { /** * Get is product salable for given SKU in a given Stock for a certain Qty * @param {string} sku * @param {number} stockId * @param {number} requestedQty * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiIsProductSalableForRequestedQtyV1ExecuteGet(sku, stockId, requestedQty, options) { const localVarFetchArgs = exports.InventorySalesApiIsProductSalableForRequestedQtyV1ApiFetchParamCreator(configuration).inventorySalesApiIsProductSalableForRequestedQtyV1ExecuteGet(sku, stockId, requestedQty, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventorySalesApiIsProductSalableForRequestedQtyV1ApiFp = InventorySalesApiIsProductSalableForRequestedQtyV1ApiFp; /** * InventorySalesApiIsProductSalableForRequestedQtyV1Api - factory interface * @export */ const InventorySalesApiIsProductSalableForRequestedQtyV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get is product salable for given SKU in a given Stock for a certain Qty * @param {string} sku * @param {number} stockId * @param {number} requestedQty * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiIsProductSalableForRequestedQtyV1ExecuteGet(sku, stockId, requestedQty, options) { return exports.InventorySalesApiIsProductSalableForRequestedQtyV1ApiFp(configuration).inventorySalesApiIsProductSalableForRequestedQtyV1ExecuteGet(sku, stockId, requestedQty, options)(fetch, basePath); }, }; }; exports.InventorySalesApiIsProductSalableForRequestedQtyV1ApiFactory = InventorySalesApiIsProductSalableForRequestedQtyV1ApiFactory; /** * InventorySalesApiIsProductSalableForRequestedQtyV1Api - object-oriented interface * @export * @class InventorySalesApiIsProductSalableForRequestedQtyV1Api * @extends {BaseAPI} */ class InventorySalesApiIsProductSalableForRequestedQtyV1Api extends BaseAPI { /** * Get is product salable for given SKU in a given Stock for a certain Qty * @param {string} sku * @param {number} stockId * @param {number} requestedQty * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventorySalesApiIsProductSalableForRequestedQtyV1Api */ inventorySalesApiIsProductSalableForRequestedQtyV1ExecuteGet(sku, stockId, requestedQty, options) { return exports.InventorySalesApiIsProductSalableForRequestedQtyV1ApiFp(this.configuration).inventorySalesApiIsProductSalableForRequestedQtyV1ExecuteGet(sku, stockId, requestedQty, options)(this.fetch, this.basePath); } } exports.InventorySalesApiIsProductSalableForRequestedQtyV1Api = InventorySalesApiIsProductSalableForRequestedQtyV1Api; /** * InventorySalesApiIsProductSalableV1Api - fetch parameter creator * @export */ const InventorySalesApiIsProductSalableV1ApiFetchParamCreator = function (configuration) { return { /** * Get is product in salable for given SKU in a given Stock * @param {string} sku * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiIsProductSalableV1ExecuteGet(sku, stockId, options = {}) { // verify required parameter 'sku' is not null or undefined if (sku === null || sku === undefined) { throw new RequiredError('sku', 'Required parameter sku was null or undefined when calling inventorySalesApiIsProductSalableV1ExecuteGet.'); } // verify required parameter 'stockId' is not null or undefined if (stockId === null || stockId === undefined) { throw new RequiredError('stockId', 'Required parameter stockId was null or undefined when calling inventorySalesApiIsProductSalableV1ExecuteGet.'); } const localVarPath = `/V1/inventory/is-product-salable/{sku}/{stockId}` .replace(`{${"sku"}}`, encodeURIComponent(String(sku))) .replace(`{${"stockId"}}`, encodeURIComponent(String(stockId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventorySalesApiIsProductSalableV1ApiFetchParamCreator = InventorySalesApiIsProductSalableV1ApiFetchParamCreator; /** * InventorySalesApiIsProductSalableV1Api - functional programming interface * @export */ const InventorySalesApiIsProductSalableV1ApiFp = function (configuration) { return { /** * Get is product in salable for given SKU in a given Stock * @param {string} sku * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiIsProductSalableV1ExecuteGet(sku, stockId, options) { const localVarFetchArgs = exports.InventorySalesApiIsProductSalableV1ApiFetchParamCreator(configuration).inventorySalesApiIsProductSalableV1ExecuteGet(sku, stockId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventorySalesApiIsProductSalableV1ApiFp = InventorySalesApiIsProductSalableV1ApiFp; /** * InventorySalesApiIsProductSalableV1Api - factory interface * @export */ const InventorySalesApiIsProductSalableV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Get is product in salable for given SKU in a given Stock * @param {string} sku * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiIsProductSalableV1ExecuteGet(sku, stockId, options) { return exports.InventorySalesApiIsProductSalableV1ApiFp(configuration).inventorySalesApiIsProductSalableV1ExecuteGet(sku, stockId, options)(fetch, basePath); }, }; }; exports.InventorySalesApiIsProductSalableV1ApiFactory = InventorySalesApiIsProductSalableV1ApiFactory; /** * InventorySalesApiIsProductSalableV1Api - object-oriented interface * @export * @class InventorySalesApiIsProductSalableV1Api * @extends {BaseAPI} */ class InventorySalesApiIsProductSalableV1Api extends BaseAPI { /** * Get is product in salable for given SKU in a given Stock * @param {string} sku * @param {number} stockId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventorySalesApiIsProductSalableV1Api */ inventorySalesApiIsProductSalableV1ExecuteGet(sku, stockId, options) { return exports.InventorySalesApiIsProductSalableV1ApiFp(this.configuration).inventorySalesApiIsProductSalableV1ExecuteGet(sku, stockId, options)(this.fetch, this.basePath); } } exports.InventorySalesApiIsProductSalableV1Api = InventorySalesApiIsProductSalableV1Api; /** * InventorySalesApiStockResolverV1Api - fetch parameter creator * @export */ const InventorySalesApiStockResolverV1ApiFetchParamCreator = function (configuration) { return { /** * Resolve Stock by Sales Channel type and code * @param {string} type * @param {string} code * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiStockResolverV1ExecuteGet(type, code, options = {}) { // verify required parameter 'type' is not null or undefined if (type === null || type === undefined) { throw new RequiredError('type', 'Required parameter type was null or undefined when calling inventorySalesApiStockResolverV1ExecuteGet.'); } // verify required parameter 'code' is not null or undefined if (code === null || code === undefined) { throw new RequiredError('code', 'Required parameter code was null or undefined when calling inventorySalesApiStockResolverV1ExecuteGet.'); } const localVarPath = `/V1/inventory/stock-resolver/{type}/{code}` .replace(`{${"type"}}`, encodeURIComponent(String(type))) .replace(`{${"code"}}`, encodeURIComponent(String(code))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventorySalesApiStockResolverV1ApiFetchParamCreator = InventorySalesApiStockResolverV1ApiFetchParamCreator; /** * InventorySalesApiStockResolverV1Api - functional programming interface * @export */ const InventorySalesApiStockResolverV1ApiFp = function (configuration) { return { /** * Resolve Stock by Sales Channel type and code * @param {string} type * @param {string} code * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiStockResolverV1ExecuteGet(type, code, options) { const localVarFetchArgs = exports.InventorySalesApiStockResolverV1ApiFetchParamCreator(configuration).inventorySalesApiStockResolverV1ExecuteGet(type, code, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventorySalesApiStockResolverV1ApiFp = InventorySalesApiStockResolverV1ApiFp; /** * InventorySalesApiStockResolverV1Api - factory interface * @export */ const InventorySalesApiStockResolverV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Resolve Stock by Sales Channel type and code * @param {string} type * @param {string} code * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySalesApiStockResolverV1ExecuteGet(type, code, options) { return exports.InventorySalesApiStockResolverV1ApiFp(configuration).inventorySalesApiStockResolverV1ExecuteGet(type, code, options)(fetch, basePath); }, }; }; exports.InventorySalesApiStockResolverV1ApiFactory = InventorySalesApiStockResolverV1ApiFactory; /** * InventorySalesApiStockResolverV1Api - object-oriented interface * @export * @class InventorySalesApiStockResolverV1Api * @extends {BaseAPI} */ class InventorySalesApiStockResolverV1Api extends BaseAPI { /** * Resolve Stock by Sales Channel type and code * @param {string} type * @param {string} code * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventorySalesApiStockResolverV1Api */ inventorySalesApiStockResolverV1ExecuteGet(type, code, options) { return exports.InventorySalesApiStockResolverV1ApiFp(this.configuration).inventorySalesApiStockResolverV1ExecuteGet(type, code, options)(this.fetch, this.basePath); } } exports.InventorySalesApiStockResolverV1Api = InventorySalesApiStockResolverV1Api; /** * InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1Api - fetch parameter creator * @export */ const InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ExecuteGet(options = {}) { const localVarPath = `/V1/inventory/source-selection-algorithm-list`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFetchParamCreator = InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFetchParamCreator; /** * InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1Api - functional programming interface * @export */ const InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFp = function (configuration) { return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ExecuteGet(options) { const localVarFetchArgs = exports.InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFetchParamCreator(configuration).inventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ExecuteGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFp = InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFp; /** * InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1Api - factory interface * @export */ const InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ExecuteGet(options) { return exports.InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFp(configuration).inventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ExecuteGet(options)(fetch, basePath); }, }; }; exports.InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFactory = InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFactory; /** * InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1Api - object-oriented interface * @export * @class InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1Api * @extends {BaseAPI} */ class InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1Api extends BaseAPI { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1Api */ inventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ExecuteGet(options) { return exports.InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ApiFp(this.configuration).inventorySourceSelectionApiGetSourceSelectionAlgorithmListV1ExecuteGet(options)(this.fetch, this.basePath); } } exports.InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1Api = InventorySourceSelectionApiGetSourceSelectionAlgorithmListV1Api; /** * InventorySourceSelectionApiSourceSelectionServiceV1Api - fetch parameter creator * @export */ const InventorySourceSelectionApiSourceSelectionServiceV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {any} [inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySourceSelectionApiSourceSelectionServiceV1ExecutePost(inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody, options = {}) { const localVarPath = `/V1/inventory/source-selection-algorithm-result`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody || {}) : (inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InventorySourceSelectionApiSourceSelectionServiceV1ApiFetchParamCreator = InventorySourceSelectionApiSourceSelectionServiceV1ApiFetchParamCreator; /** * InventorySourceSelectionApiSourceSelectionServiceV1Api - functional programming interface * @export */ const InventorySourceSelectionApiSourceSelectionServiceV1ApiFp = function (configuration) { return { /** * * @param {any} [inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySourceSelectionApiSourceSelectionServiceV1ExecutePost(inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody, options) { const localVarFetchArgs = exports.InventorySourceSelectionApiSourceSelectionServiceV1ApiFetchParamCreator(configuration).inventorySourceSelectionApiSourceSelectionServiceV1ExecutePost(inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.InventorySourceSelectionApiSourceSelectionServiceV1ApiFp = InventorySourceSelectionApiSourceSelectionServiceV1ApiFp; /** * InventorySourceSelectionApiSourceSelectionServiceV1Api - factory interface * @export */ const InventorySourceSelectionApiSourceSelectionServiceV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {any} [inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inventorySourceSelectionApiSourceSelectionServiceV1ExecutePost(inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody, options) { return exports.InventorySourceSelectionApiSourceSelectionServiceV1ApiFp(configuration).inventorySourceSelectionApiSourceSelectionServiceV1ExecutePost(inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.InventorySourceSelectionApiSourceSelectionServiceV1ApiFactory = InventorySourceSelectionApiSourceSelectionServiceV1ApiFactory; /** * InventorySourceSelectionApiSourceSelectionServiceV1Api - object-oriented interface * @export * @class InventorySourceSelectionApiSourceSelectionServiceV1Api * @extends {BaseAPI} */ class InventorySourceSelectionApiSourceSelectionServiceV1Api extends BaseAPI { /** * * @param {any} [inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InventorySourceSelectionApiSourceSelectionServiceV1Api */ inventorySourceSelectionApiSourceSelectionServiceV1ExecutePost(inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody, options) { return exports.InventorySourceSelectionApiSourceSelectionServiceV1ApiFp(this.configuration).inventorySourceSelectionApiSourceSelectionServiceV1ExecutePost(inventorySourceSelectionApiSourceSelectionServiceV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.InventorySourceSelectionApiSourceSelectionServiceV1Api = InventorySourceSelectionApiSourceSelectionServiceV1Api; /** * MageplazaSmtpCheckoutManagementV1Api - fetch parameter creator * @export */ const MageplazaSmtpCheckoutManagementV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {string} cartId * @param {any} [mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ mageplazaSmtpCheckoutManagementV1UpdateOrderPost(cartId, mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling mageplazaSmtpCheckoutManagementV1UpdateOrderPost.'); } const localVarPath = `/V1/carts/{cartId}/update-order` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody || {}) : (mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.MageplazaSmtpCheckoutManagementV1ApiFetchParamCreator = MageplazaSmtpCheckoutManagementV1ApiFetchParamCreator; /** * MageplazaSmtpCheckoutManagementV1Api - functional programming interface * @export */ const MageplazaSmtpCheckoutManagementV1ApiFp = function (configuration) { return { /** * * @param {string} cartId * @param {any} [mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ mageplazaSmtpCheckoutManagementV1UpdateOrderPost(cartId, mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody, options) { const localVarFetchArgs = exports.MageplazaSmtpCheckoutManagementV1ApiFetchParamCreator(configuration).mageplazaSmtpCheckoutManagementV1UpdateOrderPost(cartId, mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.MageplazaSmtpCheckoutManagementV1ApiFp = MageplazaSmtpCheckoutManagementV1ApiFp; /** * MageplazaSmtpCheckoutManagementV1Api - factory interface * @export */ const MageplazaSmtpCheckoutManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {string} cartId * @param {any} [mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ mageplazaSmtpCheckoutManagementV1UpdateOrderPost(cartId, mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody, options) { return exports.MageplazaSmtpCheckoutManagementV1ApiFp(configuration).mageplazaSmtpCheckoutManagementV1UpdateOrderPost(cartId, mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody, options)(fetch, basePath); }, }; }; exports.MageplazaSmtpCheckoutManagementV1ApiFactory = MageplazaSmtpCheckoutManagementV1ApiFactory; /** * MageplazaSmtpCheckoutManagementV1Api - object-oriented interface * @export * @class MageplazaSmtpCheckoutManagementV1Api * @extends {BaseAPI} */ class MageplazaSmtpCheckoutManagementV1Api extends BaseAPI { /** * * @param {string} cartId * @param {any} [mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MageplazaSmtpCheckoutManagementV1Api */ mageplazaSmtpCheckoutManagementV1UpdateOrderPost(cartId, mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody, options) { return exports.MageplazaSmtpCheckoutManagementV1ApiFp(this.configuration).mageplazaSmtpCheckoutManagementV1UpdateOrderPost(cartId, mageplazaSmtpCheckoutManagementV1UpdateOrderPostBody, options)(this.fetch, this.basePath); } } exports.MageplazaSmtpCheckoutManagementV1Api = MageplazaSmtpCheckoutManagementV1Api; /** * QuoteBillingAddressManagementV1Api - fetch parameter creator * @export */ const QuoteBillingAddressManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Assigns a specified billing address to a specified cart. * @param {number} cartId The cart ID. * @param {any} [quoteBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1AssignPost(cartId, quoteBillingAddressManagementV1AssignPostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteBillingAddressManagementV1AssignPost.'); } const localVarPath = `/V1/carts/{cartId}/billing-address` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteBillingAddressManagementV1AssignPostBody || {}) : (quoteBillingAddressManagementV1AssignPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Assigns a specified billing address to a specified cart. * @param {any} [quoteBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1AssignPost_1(quoteBillingAddressManagementV1AssignPostBody, options = {}) { const localVarPath = `/V1/carts/mine/billing-address`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteBillingAddressManagementV1AssignPostBody || {}) : (quoteBillingAddressManagementV1AssignPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the billing address for a specified quote. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteBillingAddressManagementV1GetGet.'); } const localVarPath = `/V1/carts/{cartId}/billing-address` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the billing address for a specified quote. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1GetGet_2(options = {}) { const localVarPath = `/V1/carts/mine/billing-address`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteBillingAddressManagementV1ApiFetchParamCreator = QuoteBillingAddressManagementV1ApiFetchParamCreator; /** * QuoteBillingAddressManagementV1Api - functional programming interface * @export */ const QuoteBillingAddressManagementV1ApiFp = function (configuration) { return { /** * Assigns a specified billing address to a specified cart. * @param {number} cartId The cart ID. * @param {any} [quoteBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1AssignPost(cartId, quoteBillingAddressManagementV1AssignPostBody, options) { const localVarFetchArgs = exports.QuoteBillingAddressManagementV1ApiFetchParamCreator(configuration).quoteBillingAddressManagementV1AssignPost(cartId, quoteBillingAddressManagementV1AssignPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Assigns a specified billing address to a specified cart. * @param {any} [quoteBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1AssignPost_1(quoteBillingAddressManagementV1AssignPostBody, options) { const localVarFetchArgs = exports.QuoteBillingAddressManagementV1ApiFetchParamCreator(configuration).quoteBillingAddressManagementV1AssignPost_1(quoteBillingAddressManagementV1AssignPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Returns the billing address for a specified quote. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1GetGet(cartId, options) { const localVarFetchArgs = exports.QuoteBillingAddressManagementV1ApiFetchParamCreator(configuration).quoteBillingAddressManagementV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Returns the billing address for a specified quote. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1GetGet_2(options) { const localVarFetchArgs = exports.QuoteBillingAddressManagementV1ApiFetchParamCreator(configuration).quoteBillingAddressManagementV1GetGet_2(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteBillingAddressManagementV1ApiFp = QuoteBillingAddressManagementV1ApiFp; /** * QuoteBillingAddressManagementV1Api - factory interface * @export */ const QuoteBillingAddressManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Assigns a specified billing address to a specified cart. * @param {number} cartId The cart ID. * @param {any} [quoteBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1AssignPost(cartId, quoteBillingAddressManagementV1AssignPostBody, options) { return exports.QuoteBillingAddressManagementV1ApiFp(configuration).quoteBillingAddressManagementV1AssignPost(cartId, quoteBillingAddressManagementV1AssignPostBody, options)(fetch, basePath); }, /** * Assigns a specified billing address to a specified cart. * @param {any} [quoteBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1AssignPost_1(quoteBillingAddressManagementV1AssignPostBody, options) { return exports.QuoteBillingAddressManagementV1ApiFp(configuration).quoteBillingAddressManagementV1AssignPost_1(quoteBillingAddressManagementV1AssignPostBody, options)(fetch, basePath); }, /** * Returns the billing address for a specified quote. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1GetGet(cartId, options) { return exports.QuoteBillingAddressManagementV1ApiFp(configuration).quoteBillingAddressManagementV1GetGet(cartId, options)(fetch, basePath); }, /** * Returns the billing address for a specified quote. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteBillingAddressManagementV1GetGet_2(options) { return exports.QuoteBillingAddressManagementV1ApiFp(configuration).quoteBillingAddressManagementV1GetGet_2(options)(fetch, basePath); }, }; }; exports.QuoteBillingAddressManagementV1ApiFactory = QuoteBillingAddressManagementV1ApiFactory; /** * QuoteBillingAddressManagementV1Api - object-oriented interface * @export * @class QuoteBillingAddressManagementV1Api * @extends {BaseAPI} */ class QuoteBillingAddressManagementV1Api extends BaseAPI { /** * Assigns a specified billing address to a specified cart. * @param {number} cartId The cart ID. * @param {any} [quoteBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteBillingAddressManagementV1Api */ quoteBillingAddressManagementV1AssignPost(cartId, quoteBillingAddressManagementV1AssignPostBody, options) { return exports.QuoteBillingAddressManagementV1ApiFp(this.configuration).quoteBillingAddressManagementV1AssignPost(cartId, quoteBillingAddressManagementV1AssignPostBody, options)(this.fetch, this.basePath); } /** * Assigns a specified billing address to a specified cart. * @param {any} [quoteBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteBillingAddressManagementV1Api */ quoteBillingAddressManagementV1AssignPost_1(quoteBillingAddressManagementV1AssignPostBody, options) { return exports.QuoteBillingAddressManagementV1ApiFp(this.configuration).quoteBillingAddressManagementV1AssignPost_1(quoteBillingAddressManagementV1AssignPostBody, options)(this.fetch, this.basePath); } /** * Returns the billing address for a specified quote. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteBillingAddressManagementV1Api */ quoteBillingAddressManagementV1GetGet(cartId, options) { return exports.QuoteBillingAddressManagementV1ApiFp(this.configuration).quoteBillingAddressManagementV1GetGet(cartId, options)(this.fetch, this.basePath); } /** * Returns the billing address for a specified quote. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteBillingAddressManagementV1Api */ quoteBillingAddressManagementV1GetGet_2(options) { return exports.QuoteBillingAddressManagementV1ApiFp(this.configuration).quoteBillingAddressManagementV1GetGet_2(options)(this.fetch, this.basePath); } } exports.QuoteBillingAddressManagementV1Api = QuoteBillingAddressManagementV1Api; /** * QuoteCartItemRepositoryV1Api - fetch parameter creator * @export */ const QuoteCartItemRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Removes the specified item from the specified cart. * @param {number} cartId The cart ID. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteCartItemRepositoryV1DeleteByIdDelete.'); } // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling quoteCartItemRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/carts/{cartId}/items/{itemId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))) .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Removes the specified item from the specified cart. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1DeleteByIdDelete_1(itemId, options = {}) { // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling quoteCartItemRepositoryV1DeleteByIdDelete_1.'); } const localVarPath = `/V1/carts/mine/items/{itemId}` .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists items that are assigned to a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1GetListGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteCartItemRepositoryV1GetListGet.'); } const localVarPath = `/V1/carts/{cartId}/items` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists items that are assigned to a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1GetListGet_2(options = {}) { const localVarPath = `/V1/carts/mine/items`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add/update the specified cart item. * @param {string} quoteId * @param {any} [quoteCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePost(quoteId, quoteCartItemRepositoryV1SavePostBody, options = {}) { // verify required parameter 'quoteId' is not null or undefined if (quoteId === null || quoteId === undefined) { throw new RequiredError('quoteId', 'Required parameter quoteId was null or undefined when calling quoteCartItemRepositoryV1SavePost.'); } const localVarPath = `/V1/carts/{quoteId}/items` .replace(`{${"quoteId"}}`, encodeURIComponent(String(quoteId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteCartItemRepositoryV1SavePostBody || {}) : (quoteCartItemRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add/update the specified cart item. * @param {any} [quoteCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePost_3(quoteCartItemRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/carts/mine/items`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteCartItemRepositoryV1SavePostBody || {}) : (quoteCartItemRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add/update the specified cart item. * @param {string} cartId * @param {string} itemId * @param {any} [quoteCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePut(cartId, itemId, quoteCartItemRepositoryV1SavePutBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteCartItemRepositoryV1SavePut.'); } // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling quoteCartItemRepositoryV1SavePut.'); } const localVarPath = `/V1/carts/{cartId}/items/{itemId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))) .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteCartItemRepositoryV1SavePutBody || {}) : (quoteCartItemRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add/update the specified cart item. * @param {string} itemId * @param {any} [quoteCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePut_4(itemId, quoteCartItemRepositoryV1SavePutBody, options = {}) { // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling quoteCartItemRepositoryV1SavePut_4.'); } const localVarPath = `/V1/carts/mine/items/{itemId}` .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteCartItemRepositoryV1SavePutBody || {}) : (quoteCartItemRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteCartItemRepositoryV1ApiFetchParamCreator = QuoteCartItemRepositoryV1ApiFetchParamCreator; /** * QuoteCartItemRepositoryV1Api - functional programming interface * @export */ const QuoteCartItemRepositoryV1ApiFp = function (configuration) { return { /** * Removes the specified item from the specified cart. * @param {number} cartId The cart ID. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options) { const localVarFetchArgs = exports.QuoteCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Removes the specified item from the specified cart. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1DeleteByIdDelete_1(itemId, options) { const localVarFetchArgs = exports.QuoteCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteCartItemRepositoryV1DeleteByIdDelete_1(itemId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists items that are assigned to a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1GetListGet(cartId, options) { const localVarFetchArgs = exports.QuoteCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteCartItemRepositoryV1GetListGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists items that are assigned to a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1GetListGet_2(options) { const localVarFetchArgs = exports.QuoteCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteCartItemRepositoryV1GetListGet_2(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add/update the specified cart item. * @param {string} quoteId * @param {any} [quoteCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePost(quoteId, quoteCartItemRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.QuoteCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteCartItemRepositoryV1SavePost(quoteId, quoteCartItemRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add/update the specified cart item. * @param {any} [quoteCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePost_3(quoteCartItemRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.QuoteCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteCartItemRepositoryV1SavePost_3(quoteCartItemRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add/update the specified cart item. * @param {string} cartId * @param {string} itemId * @param {any} [quoteCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePut(cartId, itemId, quoteCartItemRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.QuoteCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteCartItemRepositoryV1SavePut(cartId, itemId, quoteCartItemRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add/update the specified cart item. * @param {string} itemId * @param {any} [quoteCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePut_4(itemId, quoteCartItemRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.QuoteCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteCartItemRepositoryV1SavePut_4(itemId, quoteCartItemRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteCartItemRepositoryV1ApiFp = QuoteCartItemRepositoryV1ApiFp; /** * QuoteCartItemRepositoryV1Api - factory interface * @export */ const QuoteCartItemRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Removes the specified item from the specified cart. * @param {number} cartId The cart ID. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options) { return exports.QuoteCartItemRepositoryV1ApiFp(configuration).quoteCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options)(fetch, basePath); }, /** * Removes the specified item from the specified cart. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1DeleteByIdDelete_1(itemId, options) { return exports.QuoteCartItemRepositoryV1ApiFp(configuration).quoteCartItemRepositoryV1DeleteByIdDelete_1(itemId, options)(fetch, basePath); }, /** * Lists items that are assigned to a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1GetListGet(cartId, options) { return exports.QuoteCartItemRepositoryV1ApiFp(configuration).quoteCartItemRepositoryV1GetListGet(cartId, options)(fetch, basePath); }, /** * Lists items that are assigned to a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1GetListGet_2(options) { return exports.QuoteCartItemRepositoryV1ApiFp(configuration).quoteCartItemRepositoryV1GetListGet_2(options)(fetch, basePath); }, /** * Add/update the specified cart item. * @param {string} quoteId * @param {any} [quoteCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePost(quoteId, quoteCartItemRepositoryV1SavePostBody, options) { return exports.QuoteCartItemRepositoryV1ApiFp(configuration).quoteCartItemRepositoryV1SavePost(quoteId, quoteCartItemRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Add/update the specified cart item. * @param {any} [quoteCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePost_3(quoteCartItemRepositoryV1SavePostBody, options) { return exports.QuoteCartItemRepositoryV1ApiFp(configuration).quoteCartItemRepositoryV1SavePost_3(quoteCartItemRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Add/update the specified cart item. * @param {string} cartId * @param {string} itemId * @param {any} [quoteCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePut(cartId, itemId, quoteCartItemRepositoryV1SavePutBody, options) { return exports.QuoteCartItemRepositoryV1ApiFp(configuration).quoteCartItemRepositoryV1SavePut(cartId, itemId, quoteCartItemRepositoryV1SavePutBody, options)(fetch, basePath); }, /** * Add/update the specified cart item. * @param {string} itemId * @param {any} [quoteCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartItemRepositoryV1SavePut_4(itemId, quoteCartItemRepositoryV1SavePutBody, options) { return exports.QuoteCartItemRepositoryV1ApiFp(configuration).quoteCartItemRepositoryV1SavePut_4(itemId, quoteCartItemRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.QuoteCartItemRepositoryV1ApiFactory = QuoteCartItemRepositoryV1ApiFactory; /** * QuoteCartItemRepositoryV1Api - object-oriented interface * @export * @class QuoteCartItemRepositoryV1Api * @extends {BaseAPI} */ class QuoteCartItemRepositoryV1Api extends BaseAPI { /** * Removes the specified item from the specified cart. * @param {number} cartId The cart ID. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartItemRepositoryV1Api */ quoteCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options) { return exports.QuoteCartItemRepositoryV1ApiFp(this.configuration).quoteCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options)(this.fetch, this.basePath); } /** * Removes the specified item from the specified cart. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartItemRepositoryV1Api */ quoteCartItemRepositoryV1DeleteByIdDelete_1(itemId, options) { return exports.QuoteCartItemRepositoryV1ApiFp(this.configuration).quoteCartItemRepositoryV1DeleteByIdDelete_1(itemId, options)(this.fetch, this.basePath); } /** * Lists items that are assigned to a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartItemRepositoryV1Api */ quoteCartItemRepositoryV1GetListGet(cartId, options) { return exports.QuoteCartItemRepositoryV1ApiFp(this.configuration).quoteCartItemRepositoryV1GetListGet(cartId, options)(this.fetch, this.basePath); } /** * Lists items that are assigned to a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartItemRepositoryV1Api */ quoteCartItemRepositoryV1GetListGet_2(options) { return exports.QuoteCartItemRepositoryV1ApiFp(this.configuration).quoteCartItemRepositoryV1GetListGet_2(options)(this.fetch, this.basePath); } /** * Add/update the specified cart item. * @param {string} quoteId * @param {any} [quoteCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartItemRepositoryV1Api */ quoteCartItemRepositoryV1SavePost(quoteId, quoteCartItemRepositoryV1SavePostBody, options) { return exports.QuoteCartItemRepositoryV1ApiFp(this.configuration).quoteCartItemRepositoryV1SavePost(quoteId, quoteCartItemRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Add/update the specified cart item. * @param {any} [quoteCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartItemRepositoryV1Api */ quoteCartItemRepositoryV1SavePost_3(quoteCartItemRepositoryV1SavePostBody, options) { return exports.QuoteCartItemRepositoryV1ApiFp(this.configuration).quoteCartItemRepositoryV1SavePost_3(quoteCartItemRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Add/update the specified cart item. * @param {string} cartId * @param {string} itemId * @param {any} [quoteCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartItemRepositoryV1Api */ quoteCartItemRepositoryV1SavePut(cartId, itemId, quoteCartItemRepositoryV1SavePutBody, options) { return exports.QuoteCartItemRepositoryV1ApiFp(this.configuration).quoteCartItemRepositoryV1SavePut(cartId, itemId, quoteCartItemRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } /** * Add/update the specified cart item. * @param {string} itemId * @param {any} [quoteCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartItemRepositoryV1Api */ quoteCartItemRepositoryV1SavePut_4(itemId, quoteCartItemRepositoryV1SavePutBody, options) { return exports.QuoteCartItemRepositoryV1ApiFp(this.configuration).quoteCartItemRepositoryV1SavePut_4(itemId, quoteCartItemRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.QuoteCartItemRepositoryV1Api = QuoteCartItemRepositoryV1Api; /** * QuoteCartManagementV1Api - fetch parameter creator * @export */ const QuoteCartManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Assigns a specified customer to a specified shopping cart. * @param {number} cartId The cart ID. * @param {any} [quoteCartManagementV1AssignCustomerPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1AssignCustomerPut(cartId, quoteCartManagementV1AssignCustomerPutBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteCartManagementV1AssignCustomerPut.'); } const localVarPath = `/V1/carts/{cartId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteCartManagementV1AssignCustomerPutBody || {}) : (quoteCartManagementV1AssignCustomerPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Creates an empty cart and quote for a specified customer if customer does not have a cart yet. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1CreateEmptyCartForCustomerPost(options = {}) { const localVarPath = `/V1/carts/mine`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Creates an empty cart and quote for a specified customer if customer does not have a cart yet. * @param {number} customerId The customer ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1CreateEmptyCartForCustomerPost_1(customerId, options = {}) { // verify required parameter 'customerId' is not null or undefined if (customerId === null || customerId === undefined) { throw new RequiredError('customerId', 'Required parameter customerId was null or undefined when calling quoteCartManagementV1CreateEmptyCartForCustomerPost_1.'); } const localVarPath = `/V1/customers/{customerId}/carts` .replace(`{${"customerId"}}`, encodeURIComponent(String(customerId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Creates an empty cart and quote for a guest. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1CreateEmptyCartPost(options = {}) { const localVarPath = `/V1/carts/`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns information for the cart for a specified customer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1GetCartForCustomerGet(options = {}) { const localVarPath = `/V1/carts/mine`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Places an order for a specified cart. * @param {any} [quoteCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1PlaceOrderPut(quoteCartManagementV1PlaceOrderPutBody, options = {}) { const localVarPath = `/V1/carts/mine/order`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteCartManagementV1PlaceOrderPutBody || {}) : (quoteCartManagementV1PlaceOrderPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Places an order for a specified cart. * @param {number} cartId The cart ID. * @param {any} [quoteCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1PlaceOrderPut_2(cartId, quoteCartManagementV1PlaceOrderPutBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteCartManagementV1PlaceOrderPut_2.'); } const localVarPath = `/V1/carts/{cartId}/order` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteCartManagementV1PlaceOrderPutBody || {}) : (quoteCartManagementV1PlaceOrderPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteCartManagementV1ApiFetchParamCreator = QuoteCartManagementV1ApiFetchParamCreator; /** * QuoteCartManagementV1Api - functional programming interface * @export */ const QuoteCartManagementV1ApiFp = function (configuration) { return { /** * Assigns a specified customer to a specified shopping cart. * @param {number} cartId The cart ID. * @param {any} [quoteCartManagementV1AssignCustomerPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1AssignCustomerPut(cartId, quoteCartManagementV1AssignCustomerPutBody, options) { const localVarFetchArgs = exports.QuoteCartManagementV1ApiFetchParamCreator(configuration).quoteCartManagementV1AssignCustomerPut(cartId, quoteCartManagementV1AssignCustomerPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Creates an empty cart and quote for a specified customer if customer does not have a cart yet. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1CreateEmptyCartForCustomerPost(options) { const localVarFetchArgs = exports.QuoteCartManagementV1ApiFetchParamCreator(configuration).quoteCartManagementV1CreateEmptyCartForCustomerPost(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Creates an empty cart and quote for a specified customer if customer does not have a cart yet. * @param {number} customerId The customer ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1CreateEmptyCartForCustomerPost_1(customerId, options) { const localVarFetchArgs = exports.QuoteCartManagementV1ApiFetchParamCreator(configuration).quoteCartManagementV1CreateEmptyCartForCustomerPost_1(customerId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Creates an empty cart and quote for a guest. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1CreateEmptyCartPost(options) { const localVarFetchArgs = exports.QuoteCartManagementV1ApiFetchParamCreator(configuration).quoteCartManagementV1CreateEmptyCartPost(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Returns information for the cart for a specified customer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1GetCartForCustomerGet(options) { const localVarFetchArgs = exports.QuoteCartManagementV1ApiFetchParamCreator(configuration).quoteCartManagementV1GetCartForCustomerGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Places an order for a specified cart. * @param {any} [quoteCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1PlaceOrderPut(quoteCartManagementV1PlaceOrderPutBody, options) { const localVarFetchArgs = exports.QuoteCartManagementV1ApiFetchParamCreator(configuration).quoteCartManagementV1PlaceOrderPut(quoteCartManagementV1PlaceOrderPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Places an order for a specified cart. * @param {number} cartId The cart ID. * @param {any} [quoteCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1PlaceOrderPut_2(cartId, quoteCartManagementV1PlaceOrderPutBody, options) { const localVarFetchArgs = exports.QuoteCartManagementV1ApiFetchParamCreator(configuration).quoteCartManagementV1PlaceOrderPut_2(cartId, quoteCartManagementV1PlaceOrderPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteCartManagementV1ApiFp = QuoteCartManagementV1ApiFp; /** * QuoteCartManagementV1Api - factory interface * @export */ const QuoteCartManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Assigns a specified customer to a specified shopping cart. * @param {number} cartId The cart ID. * @param {any} [quoteCartManagementV1AssignCustomerPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1AssignCustomerPut(cartId, quoteCartManagementV1AssignCustomerPutBody, options) { return exports.QuoteCartManagementV1ApiFp(configuration).quoteCartManagementV1AssignCustomerPut(cartId, quoteCartManagementV1AssignCustomerPutBody, options)(fetch, basePath); }, /** * Creates an empty cart and quote for a specified customer if customer does not have a cart yet. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1CreateEmptyCartForCustomerPost(options) { return exports.QuoteCartManagementV1ApiFp(configuration).quoteCartManagementV1CreateEmptyCartForCustomerPost(options)(fetch, basePath); }, /** * Creates an empty cart and quote for a specified customer if customer does not have a cart yet. * @param {number} customerId The customer ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1CreateEmptyCartForCustomerPost_1(customerId, options) { return exports.QuoteCartManagementV1ApiFp(configuration).quoteCartManagementV1CreateEmptyCartForCustomerPost_1(customerId, options)(fetch, basePath); }, /** * Creates an empty cart and quote for a guest. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1CreateEmptyCartPost(options) { return exports.QuoteCartManagementV1ApiFp(configuration).quoteCartManagementV1CreateEmptyCartPost(options)(fetch, basePath); }, /** * Returns information for the cart for a specified customer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1GetCartForCustomerGet(options) { return exports.QuoteCartManagementV1ApiFp(configuration).quoteCartManagementV1GetCartForCustomerGet(options)(fetch, basePath); }, /** * Places an order for a specified cart. * @param {any} [quoteCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1PlaceOrderPut(quoteCartManagementV1PlaceOrderPutBody, options) { return exports.QuoteCartManagementV1ApiFp(configuration).quoteCartManagementV1PlaceOrderPut(quoteCartManagementV1PlaceOrderPutBody, options)(fetch, basePath); }, /** * Places an order for a specified cart. * @param {number} cartId The cart ID. * @param {any} [quoteCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartManagementV1PlaceOrderPut_2(cartId, quoteCartManagementV1PlaceOrderPutBody, options) { return exports.QuoteCartManagementV1ApiFp(configuration).quoteCartManagementV1PlaceOrderPut_2(cartId, quoteCartManagementV1PlaceOrderPutBody, options)(fetch, basePath); }, }; }; exports.QuoteCartManagementV1ApiFactory = QuoteCartManagementV1ApiFactory; /** * QuoteCartManagementV1Api - object-oriented interface * @export * @class QuoteCartManagementV1Api * @extends {BaseAPI} */ class QuoteCartManagementV1Api extends BaseAPI { /** * Assigns a specified customer to a specified shopping cart. * @param {number} cartId The cart ID. * @param {any} [quoteCartManagementV1AssignCustomerPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartManagementV1Api */ quoteCartManagementV1AssignCustomerPut(cartId, quoteCartManagementV1AssignCustomerPutBody, options) { return exports.QuoteCartManagementV1ApiFp(this.configuration).quoteCartManagementV1AssignCustomerPut(cartId, quoteCartManagementV1AssignCustomerPutBody, options)(this.fetch, this.basePath); } /** * Creates an empty cart and quote for a specified customer if customer does not have a cart yet. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartManagementV1Api */ quoteCartManagementV1CreateEmptyCartForCustomerPost(options) { return exports.QuoteCartManagementV1ApiFp(this.configuration).quoteCartManagementV1CreateEmptyCartForCustomerPost(options)(this.fetch, this.basePath); } /** * Creates an empty cart and quote for a specified customer if customer does not have a cart yet. * @param {number} customerId The customer ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartManagementV1Api */ quoteCartManagementV1CreateEmptyCartForCustomerPost_1(customerId, options) { return exports.QuoteCartManagementV1ApiFp(this.configuration).quoteCartManagementV1CreateEmptyCartForCustomerPost_1(customerId, options)(this.fetch, this.basePath); } /** * Creates an empty cart and quote for a guest. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartManagementV1Api */ quoteCartManagementV1CreateEmptyCartPost(options) { return exports.QuoteCartManagementV1ApiFp(this.configuration).quoteCartManagementV1CreateEmptyCartPost(options)(this.fetch, this.basePath); } /** * Returns information for the cart for a specified customer. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartManagementV1Api */ quoteCartManagementV1GetCartForCustomerGet(options) { return exports.QuoteCartManagementV1ApiFp(this.configuration).quoteCartManagementV1GetCartForCustomerGet(options)(this.fetch, this.basePath); } /** * Places an order for a specified cart. * @param {any} [quoteCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartManagementV1Api */ quoteCartManagementV1PlaceOrderPut(quoteCartManagementV1PlaceOrderPutBody, options) { return exports.QuoteCartManagementV1ApiFp(this.configuration).quoteCartManagementV1PlaceOrderPut(quoteCartManagementV1PlaceOrderPutBody, options)(this.fetch, this.basePath); } /** * Places an order for a specified cart. * @param {number} cartId The cart ID. * @param {any} [quoteCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartManagementV1Api */ quoteCartManagementV1PlaceOrderPut_2(cartId, quoteCartManagementV1PlaceOrderPutBody, options) { return exports.QuoteCartManagementV1ApiFp(this.configuration).quoteCartManagementV1PlaceOrderPut_2(cartId, quoteCartManagementV1PlaceOrderPutBody, options)(this.fetch, this.basePath); } } exports.QuoteCartManagementV1Api = QuoteCartManagementV1Api; /** * QuoteCartRepositoryV1Api - fetch parameter creator * @export */ const QuoteCartRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Enables an administrative user to return information for a specified cart. * @param {number} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartRepositoryV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteCartRepositoryV1GetGet.'); } const localVarPath = `/V1/carts/{cartId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Enables administrative users to list carts that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CartRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/carts/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save quote * @param {any} [quoteCartRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartRepositoryV1SavePut(quoteCartRepositoryV1SavePutBody, options = {}) { const localVarPath = `/V1/carts/mine`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteCartRepositoryV1SavePutBody || {}) : (quoteCartRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteCartRepositoryV1ApiFetchParamCreator = QuoteCartRepositoryV1ApiFetchParamCreator; /** * QuoteCartRepositoryV1Api - functional programming interface * @export */ const QuoteCartRepositoryV1ApiFp = function (configuration) { return { /** * Enables an administrative user to return information for a specified cart. * @param {number} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartRepositoryV1GetGet(cartId, options) { const localVarFetchArgs = exports.QuoteCartRepositoryV1ApiFetchParamCreator(configuration).quoteCartRepositoryV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Enables administrative users to list carts that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CartRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.QuoteCartRepositoryV1ApiFetchParamCreator(configuration).quoteCartRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save quote * @param {any} [quoteCartRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartRepositoryV1SavePut(quoteCartRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.QuoteCartRepositoryV1ApiFetchParamCreator(configuration).quoteCartRepositoryV1SavePut(quoteCartRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteCartRepositoryV1ApiFp = QuoteCartRepositoryV1ApiFp; /** * QuoteCartRepositoryV1Api - factory interface * @export */ const QuoteCartRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Enables an administrative user to return information for a specified cart. * @param {number} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartRepositoryV1GetGet(cartId, options) { return exports.QuoteCartRepositoryV1ApiFp(configuration).quoteCartRepositoryV1GetGet(cartId, options)(fetch, basePath); }, /** * Enables administrative users to list carts that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CartRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.QuoteCartRepositoryV1ApiFp(configuration).quoteCartRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save quote * @param {any} [quoteCartRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartRepositoryV1SavePut(quoteCartRepositoryV1SavePutBody, options) { return exports.QuoteCartRepositoryV1ApiFp(configuration).quoteCartRepositoryV1SavePut(quoteCartRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.QuoteCartRepositoryV1ApiFactory = QuoteCartRepositoryV1ApiFactory; /** * QuoteCartRepositoryV1Api - object-oriented interface * @export * @class QuoteCartRepositoryV1Api * @extends {BaseAPI} */ class QuoteCartRepositoryV1Api extends BaseAPI { /** * Enables an administrative user to return information for a specified cart. * @param {number} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartRepositoryV1Api */ quoteCartRepositoryV1GetGet(cartId, options) { return exports.QuoteCartRepositoryV1ApiFp(this.configuration).quoteCartRepositoryV1GetGet(cartId, options)(this.fetch, this.basePath); } /** * Enables administrative users to list carts that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CartRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartRepositoryV1Api */ quoteCartRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.QuoteCartRepositoryV1ApiFp(this.configuration).quoteCartRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save quote * @param {any} [quoteCartRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartRepositoryV1Api */ quoteCartRepositoryV1SavePut(quoteCartRepositoryV1SavePutBody, options) { return exports.QuoteCartRepositoryV1ApiFp(this.configuration).quoteCartRepositoryV1SavePut(quoteCartRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.QuoteCartRepositoryV1Api = QuoteCartRepositoryV1Api; /** * QuoteCartTotalManagementV1Api - fetch parameter creator * @export */ const QuoteCartTotalManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Set shipping/billing methods and additional data for cart and collect totals. * @param {any} [quoteCartTotalManagementV1CollectTotalsPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartTotalManagementV1CollectTotalsPut(quoteCartTotalManagementV1CollectTotalsPutBody, options = {}) { const localVarPath = `/V1/carts/mine/collect-totals`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteCartTotalManagementV1CollectTotalsPutBody || {}) : (quoteCartTotalManagementV1CollectTotalsPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteCartTotalManagementV1ApiFetchParamCreator = QuoteCartTotalManagementV1ApiFetchParamCreator; /** * QuoteCartTotalManagementV1Api - functional programming interface * @export */ const QuoteCartTotalManagementV1ApiFp = function (configuration) { return { /** * Set shipping/billing methods and additional data for cart and collect totals. * @param {any} [quoteCartTotalManagementV1CollectTotalsPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartTotalManagementV1CollectTotalsPut(quoteCartTotalManagementV1CollectTotalsPutBody, options) { const localVarFetchArgs = exports.QuoteCartTotalManagementV1ApiFetchParamCreator(configuration).quoteCartTotalManagementV1CollectTotalsPut(quoteCartTotalManagementV1CollectTotalsPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteCartTotalManagementV1ApiFp = QuoteCartTotalManagementV1ApiFp; /** * QuoteCartTotalManagementV1Api - factory interface * @export */ const QuoteCartTotalManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Set shipping/billing methods and additional data for cart and collect totals. * @param {any} [quoteCartTotalManagementV1CollectTotalsPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartTotalManagementV1CollectTotalsPut(quoteCartTotalManagementV1CollectTotalsPutBody, options) { return exports.QuoteCartTotalManagementV1ApiFp(configuration).quoteCartTotalManagementV1CollectTotalsPut(quoteCartTotalManagementV1CollectTotalsPutBody, options)(fetch, basePath); }, }; }; exports.QuoteCartTotalManagementV1ApiFactory = QuoteCartTotalManagementV1ApiFactory; /** * QuoteCartTotalManagementV1Api - object-oriented interface * @export * @class QuoteCartTotalManagementV1Api * @extends {BaseAPI} */ class QuoteCartTotalManagementV1Api extends BaseAPI { /** * Set shipping/billing methods and additional data for cart and collect totals. * @param {any} [quoteCartTotalManagementV1CollectTotalsPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartTotalManagementV1Api */ quoteCartTotalManagementV1CollectTotalsPut(quoteCartTotalManagementV1CollectTotalsPutBody, options) { return exports.QuoteCartTotalManagementV1ApiFp(this.configuration).quoteCartTotalManagementV1CollectTotalsPut(quoteCartTotalManagementV1CollectTotalsPutBody, options)(this.fetch, this.basePath); } } exports.QuoteCartTotalManagementV1Api = QuoteCartTotalManagementV1Api; /** * QuoteCartTotalRepositoryV1Api - fetch parameter creator * @export */ const QuoteCartTotalRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Returns quote totals data for a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartTotalRepositoryV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteCartTotalRepositoryV1GetGet.'); } const localVarPath = `/V1/carts/{cartId}/totals` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns quote totals data for a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartTotalRepositoryV1GetGet_1(options = {}) { const localVarPath = `/V1/carts/mine/totals`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteCartTotalRepositoryV1ApiFetchParamCreator = QuoteCartTotalRepositoryV1ApiFetchParamCreator; /** * QuoteCartTotalRepositoryV1Api - functional programming interface * @export */ const QuoteCartTotalRepositoryV1ApiFp = function (configuration) { return { /** * Returns quote totals data for a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartTotalRepositoryV1GetGet(cartId, options) { const localVarFetchArgs = exports.QuoteCartTotalRepositoryV1ApiFetchParamCreator(configuration).quoteCartTotalRepositoryV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Returns quote totals data for a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartTotalRepositoryV1GetGet_1(options) { const localVarFetchArgs = exports.QuoteCartTotalRepositoryV1ApiFetchParamCreator(configuration).quoteCartTotalRepositoryV1GetGet_1(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteCartTotalRepositoryV1ApiFp = QuoteCartTotalRepositoryV1ApiFp; /** * QuoteCartTotalRepositoryV1Api - factory interface * @export */ const QuoteCartTotalRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Returns quote totals data for a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartTotalRepositoryV1GetGet(cartId, options) { return exports.QuoteCartTotalRepositoryV1ApiFp(configuration).quoteCartTotalRepositoryV1GetGet(cartId, options)(fetch, basePath); }, /** * Returns quote totals data for a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCartTotalRepositoryV1GetGet_1(options) { return exports.QuoteCartTotalRepositoryV1ApiFp(configuration).quoteCartTotalRepositoryV1GetGet_1(options)(fetch, basePath); }, }; }; exports.QuoteCartTotalRepositoryV1ApiFactory = QuoteCartTotalRepositoryV1ApiFactory; /** * QuoteCartTotalRepositoryV1Api - object-oriented interface * @export * @class QuoteCartTotalRepositoryV1Api * @extends {BaseAPI} */ class QuoteCartTotalRepositoryV1Api extends BaseAPI { /** * Returns quote totals data for a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartTotalRepositoryV1Api */ quoteCartTotalRepositoryV1GetGet(cartId, options) { return exports.QuoteCartTotalRepositoryV1ApiFp(this.configuration).quoteCartTotalRepositoryV1GetGet(cartId, options)(this.fetch, this.basePath); } /** * Returns quote totals data for a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCartTotalRepositoryV1Api */ quoteCartTotalRepositoryV1GetGet_1(options) { return exports.QuoteCartTotalRepositoryV1ApiFp(this.configuration).quoteCartTotalRepositoryV1GetGet_1(options)(this.fetch, this.basePath); } } exports.QuoteCartTotalRepositoryV1Api = QuoteCartTotalRepositoryV1Api; /** * QuoteCouponManagementV1Api - fetch parameter creator * @export */ const QuoteCouponManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Returns information for a coupon in a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteCouponManagementV1GetGet.'); } const localVarPath = `/V1/carts/{cartId}/coupons` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns information for a coupon in a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1GetGet_1(options = {}) { const localVarPath = `/V1/carts/mine/coupons`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Deletes a coupon from a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1RemoveDelete(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteCouponManagementV1RemoveDelete.'); } const localVarPath = `/V1/carts/{cartId}/coupons` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Deletes a coupon from a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1RemoveDelete_2(options = {}) { const localVarPath = `/V1/carts/mine/coupons`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Adds a coupon by code to a specified cart. * @param {number} cartId The cart ID. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1SetPut(cartId, couponCode, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteCouponManagementV1SetPut.'); } // verify required parameter 'couponCode' is not null or undefined if (couponCode === null || couponCode === undefined) { throw new RequiredError('couponCode', 'Required parameter couponCode was null or undefined when calling quoteCouponManagementV1SetPut.'); } const localVarPath = `/V1/carts/{cartId}/coupons/{couponCode}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))) .replace(`{${"couponCode"}}`, encodeURIComponent(String(couponCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Adds a coupon by code to a specified cart. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1SetPut_3(couponCode, options = {}) { // verify required parameter 'couponCode' is not null or undefined if (couponCode === null || couponCode === undefined) { throw new RequiredError('couponCode', 'Required parameter couponCode was null or undefined when calling quoteCouponManagementV1SetPut_3.'); } const localVarPath = `/V1/carts/mine/coupons/{couponCode}` .replace(`{${"couponCode"}}`, encodeURIComponent(String(couponCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteCouponManagementV1ApiFetchParamCreator = QuoteCouponManagementV1ApiFetchParamCreator; /** * QuoteCouponManagementV1Api - functional programming interface * @export */ const QuoteCouponManagementV1ApiFp = function (configuration) { return { /** * Returns information for a coupon in a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1GetGet(cartId, options) { const localVarFetchArgs = exports.QuoteCouponManagementV1ApiFetchParamCreator(configuration).quoteCouponManagementV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Returns information for a coupon in a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1GetGet_1(options) { const localVarFetchArgs = exports.QuoteCouponManagementV1ApiFetchParamCreator(configuration).quoteCouponManagementV1GetGet_1(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Deletes a coupon from a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1RemoveDelete(cartId, options) { const localVarFetchArgs = exports.QuoteCouponManagementV1ApiFetchParamCreator(configuration).quoteCouponManagementV1RemoveDelete(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Deletes a coupon from a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1RemoveDelete_2(options) { const localVarFetchArgs = exports.QuoteCouponManagementV1ApiFetchParamCreator(configuration).quoteCouponManagementV1RemoveDelete_2(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Adds a coupon by code to a specified cart. * @param {number} cartId The cart ID. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1SetPut(cartId, couponCode, options) { const localVarFetchArgs = exports.QuoteCouponManagementV1ApiFetchParamCreator(configuration).quoteCouponManagementV1SetPut(cartId, couponCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Adds a coupon by code to a specified cart. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1SetPut_3(couponCode, options) { const localVarFetchArgs = exports.QuoteCouponManagementV1ApiFetchParamCreator(configuration).quoteCouponManagementV1SetPut_3(couponCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteCouponManagementV1ApiFp = QuoteCouponManagementV1ApiFp; /** * QuoteCouponManagementV1Api - factory interface * @export */ const QuoteCouponManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Returns information for a coupon in a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1GetGet(cartId, options) { return exports.QuoteCouponManagementV1ApiFp(configuration).quoteCouponManagementV1GetGet(cartId, options)(fetch, basePath); }, /** * Returns information for a coupon in a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1GetGet_1(options) { return exports.QuoteCouponManagementV1ApiFp(configuration).quoteCouponManagementV1GetGet_1(options)(fetch, basePath); }, /** * Deletes a coupon from a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1RemoveDelete(cartId, options) { return exports.QuoteCouponManagementV1ApiFp(configuration).quoteCouponManagementV1RemoveDelete(cartId, options)(fetch, basePath); }, /** * Deletes a coupon from a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1RemoveDelete_2(options) { return exports.QuoteCouponManagementV1ApiFp(configuration).quoteCouponManagementV1RemoveDelete_2(options)(fetch, basePath); }, /** * Adds a coupon by code to a specified cart. * @param {number} cartId The cart ID. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1SetPut(cartId, couponCode, options) { return exports.QuoteCouponManagementV1ApiFp(configuration).quoteCouponManagementV1SetPut(cartId, couponCode, options)(fetch, basePath); }, /** * Adds a coupon by code to a specified cart. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteCouponManagementV1SetPut_3(couponCode, options) { return exports.QuoteCouponManagementV1ApiFp(configuration).quoteCouponManagementV1SetPut_3(couponCode, options)(fetch, basePath); }, }; }; exports.QuoteCouponManagementV1ApiFactory = QuoteCouponManagementV1ApiFactory; /** * QuoteCouponManagementV1Api - object-oriented interface * @export * @class QuoteCouponManagementV1Api * @extends {BaseAPI} */ class QuoteCouponManagementV1Api extends BaseAPI { /** * Returns information for a coupon in a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCouponManagementV1Api */ quoteCouponManagementV1GetGet(cartId, options) { return exports.QuoteCouponManagementV1ApiFp(this.configuration).quoteCouponManagementV1GetGet(cartId, options)(this.fetch, this.basePath); } /** * Returns information for a coupon in a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCouponManagementV1Api */ quoteCouponManagementV1GetGet_1(options) { return exports.QuoteCouponManagementV1ApiFp(this.configuration).quoteCouponManagementV1GetGet_1(options)(this.fetch, this.basePath); } /** * Deletes a coupon from a specified cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCouponManagementV1Api */ quoteCouponManagementV1RemoveDelete(cartId, options) { return exports.QuoteCouponManagementV1ApiFp(this.configuration).quoteCouponManagementV1RemoveDelete(cartId, options)(this.fetch, this.basePath); } /** * Deletes a coupon from a specified cart. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCouponManagementV1Api */ quoteCouponManagementV1RemoveDelete_2(options) { return exports.QuoteCouponManagementV1ApiFp(this.configuration).quoteCouponManagementV1RemoveDelete_2(options)(this.fetch, this.basePath); } /** * Adds a coupon by code to a specified cart. * @param {number} cartId The cart ID. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCouponManagementV1Api */ quoteCouponManagementV1SetPut(cartId, couponCode, options) { return exports.QuoteCouponManagementV1ApiFp(this.configuration).quoteCouponManagementV1SetPut(cartId, couponCode, options)(this.fetch, this.basePath); } /** * Adds a coupon by code to a specified cart. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteCouponManagementV1Api */ quoteCouponManagementV1SetPut_3(couponCode, options) { return exports.QuoteCouponManagementV1ApiFp(this.configuration).quoteCouponManagementV1SetPut_3(couponCode, options)(this.fetch, this.basePath); } } exports.QuoteCouponManagementV1Api = QuoteCouponManagementV1Api; /** * QuoteGuestBillingAddressManagementV1Api - fetch parameter creator * @export */ const QuoteGuestBillingAddressManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Assign a specified billing address to a specified cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestBillingAddressManagementV1AssignPost(cartId, quoteGuestBillingAddressManagementV1AssignPostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestBillingAddressManagementV1AssignPost.'); } const localVarPath = `/V1/guest-carts/{cartId}/billing-address` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteGuestBillingAddressManagementV1AssignPostBody || {}) : (quoteGuestBillingAddressManagementV1AssignPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Return the billing address for a specified quote. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestBillingAddressManagementV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestBillingAddressManagementV1GetGet.'); } const localVarPath = `/V1/guest-carts/{cartId}/billing-address` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteGuestBillingAddressManagementV1ApiFetchParamCreator = QuoteGuestBillingAddressManagementV1ApiFetchParamCreator; /** * QuoteGuestBillingAddressManagementV1Api - functional programming interface * @export */ const QuoteGuestBillingAddressManagementV1ApiFp = function (configuration) { return { /** * Assign a specified billing address to a specified cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestBillingAddressManagementV1AssignPost(cartId, quoteGuestBillingAddressManagementV1AssignPostBody, options) { const localVarFetchArgs = exports.QuoteGuestBillingAddressManagementV1ApiFetchParamCreator(configuration).quoteGuestBillingAddressManagementV1AssignPost(cartId, quoteGuestBillingAddressManagementV1AssignPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Return the billing address for a specified quote. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestBillingAddressManagementV1GetGet(cartId, options) { const localVarFetchArgs = exports.QuoteGuestBillingAddressManagementV1ApiFetchParamCreator(configuration).quoteGuestBillingAddressManagementV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteGuestBillingAddressManagementV1ApiFp = QuoteGuestBillingAddressManagementV1ApiFp; /** * QuoteGuestBillingAddressManagementV1Api - factory interface * @export */ const QuoteGuestBillingAddressManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Assign a specified billing address to a specified cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestBillingAddressManagementV1AssignPost(cartId, quoteGuestBillingAddressManagementV1AssignPostBody, options) { return exports.QuoteGuestBillingAddressManagementV1ApiFp(configuration).quoteGuestBillingAddressManagementV1AssignPost(cartId, quoteGuestBillingAddressManagementV1AssignPostBody, options)(fetch, basePath); }, /** * Return the billing address for a specified quote. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestBillingAddressManagementV1GetGet(cartId, options) { return exports.QuoteGuestBillingAddressManagementV1ApiFp(configuration).quoteGuestBillingAddressManagementV1GetGet(cartId, options)(fetch, basePath); }, }; }; exports.QuoteGuestBillingAddressManagementV1ApiFactory = QuoteGuestBillingAddressManagementV1ApiFactory; /** * QuoteGuestBillingAddressManagementV1Api - object-oriented interface * @export * @class QuoteGuestBillingAddressManagementV1Api * @extends {BaseAPI} */ class QuoteGuestBillingAddressManagementV1Api extends BaseAPI { /** * Assign a specified billing address to a specified cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestBillingAddressManagementV1AssignPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestBillingAddressManagementV1Api */ quoteGuestBillingAddressManagementV1AssignPost(cartId, quoteGuestBillingAddressManagementV1AssignPostBody, options) { return exports.QuoteGuestBillingAddressManagementV1ApiFp(this.configuration).quoteGuestBillingAddressManagementV1AssignPost(cartId, quoteGuestBillingAddressManagementV1AssignPostBody, options)(this.fetch, this.basePath); } /** * Return the billing address for a specified quote. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestBillingAddressManagementV1Api */ quoteGuestBillingAddressManagementV1GetGet(cartId, options) { return exports.QuoteGuestBillingAddressManagementV1ApiFp(this.configuration).quoteGuestBillingAddressManagementV1GetGet(cartId, options)(this.fetch, this.basePath); } } exports.QuoteGuestBillingAddressManagementV1Api = QuoteGuestBillingAddressManagementV1Api; /** * QuoteGuestCartItemRepositoryV1Api - fetch parameter creator * @export */ const QuoteGuestCartItemRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Remove the specified item from the specified cart. * @param {string} cartId The cart ID. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCartItemRepositoryV1DeleteByIdDelete.'); } // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling quoteGuestCartItemRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/guest-carts/{cartId}/items/{itemId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))) .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * List items that are assigned to a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1GetListGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCartItemRepositoryV1GetListGet.'); } const localVarPath = `/V1/guest-carts/{cartId}/items` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add/update the specified cart item. * @param {string} cartId * @param {any} [quoteGuestCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1SavePost(cartId, quoteGuestCartItemRepositoryV1SavePostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCartItemRepositoryV1SavePost.'); } const localVarPath = `/V1/guest-carts/{cartId}/items` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteGuestCartItemRepositoryV1SavePostBody || {}) : (quoteGuestCartItemRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add/update the specified cart item. * @param {string} cartId * @param {string} itemId * @param {any} [quoteGuestCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1SavePut(cartId, itemId, quoteGuestCartItemRepositoryV1SavePutBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCartItemRepositoryV1SavePut.'); } // verify required parameter 'itemId' is not null or undefined if (itemId === null || itemId === undefined) { throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling quoteGuestCartItemRepositoryV1SavePut.'); } const localVarPath = `/V1/guest-carts/{cartId}/items/{itemId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))) .replace(`{${"itemId"}}`, encodeURIComponent(String(itemId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteGuestCartItemRepositoryV1SavePutBody || {}) : (quoteGuestCartItemRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteGuestCartItemRepositoryV1ApiFetchParamCreator = QuoteGuestCartItemRepositoryV1ApiFetchParamCreator; /** * QuoteGuestCartItemRepositoryV1Api - functional programming interface * @export */ const QuoteGuestCartItemRepositoryV1ApiFp = function (configuration) { return { /** * Remove the specified item from the specified cart. * @param {string} cartId The cart ID. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options) { const localVarFetchArgs = exports.QuoteGuestCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteGuestCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * List items that are assigned to a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1GetListGet(cartId, options) { const localVarFetchArgs = exports.QuoteGuestCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteGuestCartItemRepositoryV1GetListGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add/update the specified cart item. * @param {string} cartId * @param {any} [quoteGuestCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1SavePost(cartId, quoteGuestCartItemRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.QuoteGuestCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteGuestCartItemRepositoryV1SavePost(cartId, quoteGuestCartItemRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add/update the specified cart item. * @param {string} cartId * @param {string} itemId * @param {any} [quoteGuestCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1SavePut(cartId, itemId, quoteGuestCartItemRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.QuoteGuestCartItemRepositoryV1ApiFetchParamCreator(configuration).quoteGuestCartItemRepositoryV1SavePut(cartId, itemId, quoteGuestCartItemRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteGuestCartItemRepositoryV1ApiFp = QuoteGuestCartItemRepositoryV1ApiFp; /** * QuoteGuestCartItemRepositoryV1Api - factory interface * @export */ const QuoteGuestCartItemRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Remove the specified item from the specified cart. * @param {string} cartId The cart ID. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options) { return exports.QuoteGuestCartItemRepositoryV1ApiFp(configuration).quoteGuestCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options)(fetch, basePath); }, /** * List items that are assigned to a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1GetListGet(cartId, options) { return exports.QuoteGuestCartItemRepositoryV1ApiFp(configuration).quoteGuestCartItemRepositoryV1GetListGet(cartId, options)(fetch, basePath); }, /** * Add/update the specified cart item. * @param {string} cartId * @param {any} [quoteGuestCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1SavePost(cartId, quoteGuestCartItemRepositoryV1SavePostBody, options) { return exports.QuoteGuestCartItemRepositoryV1ApiFp(configuration).quoteGuestCartItemRepositoryV1SavePost(cartId, quoteGuestCartItemRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Add/update the specified cart item. * @param {string} cartId * @param {string} itemId * @param {any} [quoteGuestCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartItemRepositoryV1SavePut(cartId, itemId, quoteGuestCartItemRepositoryV1SavePutBody, options) { return exports.QuoteGuestCartItemRepositoryV1ApiFp(configuration).quoteGuestCartItemRepositoryV1SavePut(cartId, itemId, quoteGuestCartItemRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.QuoteGuestCartItemRepositoryV1ApiFactory = QuoteGuestCartItemRepositoryV1ApiFactory; /** * QuoteGuestCartItemRepositoryV1Api - object-oriented interface * @export * @class QuoteGuestCartItemRepositoryV1Api * @extends {BaseAPI} */ class QuoteGuestCartItemRepositoryV1Api extends BaseAPI { /** * Remove the specified item from the specified cart. * @param {string} cartId The cart ID. * @param {number} itemId The item ID of the item to be removed. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCartItemRepositoryV1Api */ quoteGuestCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options) { return exports.QuoteGuestCartItemRepositoryV1ApiFp(this.configuration).quoteGuestCartItemRepositoryV1DeleteByIdDelete(cartId, itemId, options)(this.fetch, this.basePath); } /** * List items that are assigned to a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCartItemRepositoryV1Api */ quoteGuestCartItemRepositoryV1GetListGet(cartId, options) { return exports.QuoteGuestCartItemRepositoryV1ApiFp(this.configuration).quoteGuestCartItemRepositoryV1GetListGet(cartId, options)(this.fetch, this.basePath); } /** * Add/update the specified cart item. * @param {string} cartId * @param {any} [quoteGuestCartItemRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCartItemRepositoryV1Api */ quoteGuestCartItemRepositoryV1SavePost(cartId, quoteGuestCartItemRepositoryV1SavePostBody, options) { return exports.QuoteGuestCartItemRepositoryV1ApiFp(this.configuration).quoteGuestCartItemRepositoryV1SavePost(cartId, quoteGuestCartItemRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Add/update the specified cart item. * @param {string} cartId * @param {string} itemId * @param {any} [quoteGuestCartItemRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCartItemRepositoryV1Api */ quoteGuestCartItemRepositoryV1SavePut(cartId, itemId, quoteGuestCartItemRepositoryV1SavePutBody, options) { return exports.QuoteGuestCartItemRepositoryV1ApiFp(this.configuration).quoteGuestCartItemRepositoryV1SavePut(cartId, itemId, quoteGuestCartItemRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.QuoteGuestCartItemRepositoryV1Api = QuoteGuestCartItemRepositoryV1Api; /** * QuoteGuestCartManagementV1Api - fetch parameter creator * @export */ const QuoteGuestCartManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Assign a specified customer to a specified shopping cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartManagementV1AssignCustomerPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartManagementV1AssignCustomerPut(cartId, quoteGuestCartManagementV1AssignCustomerPutBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCartManagementV1AssignCustomerPut.'); } const localVarPath = `/V1/guest-carts/{cartId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteGuestCartManagementV1AssignCustomerPutBody || {}) : (quoteGuestCartManagementV1AssignCustomerPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Enable an customer or guest user to create an empty cart and quote for an anonymous customer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartManagementV1CreateEmptyCartPost(options = {}) { const localVarPath = `/V1/guest-carts`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Place an order for a specified cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartManagementV1PlaceOrderPut(cartId, quoteGuestCartManagementV1PlaceOrderPutBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCartManagementV1PlaceOrderPut.'); } const localVarPath = `/V1/guest-carts/{cartId}/order` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteGuestCartManagementV1PlaceOrderPutBody || {}) : (quoteGuestCartManagementV1PlaceOrderPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteGuestCartManagementV1ApiFetchParamCreator = QuoteGuestCartManagementV1ApiFetchParamCreator; /** * QuoteGuestCartManagementV1Api - functional programming interface * @export */ const QuoteGuestCartManagementV1ApiFp = function (configuration) { return { /** * Assign a specified customer to a specified shopping cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartManagementV1AssignCustomerPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartManagementV1AssignCustomerPut(cartId, quoteGuestCartManagementV1AssignCustomerPutBody, options) { const localVarFetchArgs = exports.QuoteGuestCartManagementV1ApiFetchParamCreator(configuration).quoteGuestCartManagementV1AssignCustomerPut(cartId, quoteGuestCartManagementV1AssignCustomerPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Enable an customer or guest user to create an empty cart and quote for an anonymous customer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartManagementV1CreateEmptyCartPost(options) { const localVarFetchArgs = exports.QuoteGuestCartManagementV1ApiFetchParamCreator(configuration).quoteGuestCartManagementV1CreateEmptyCartPost(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Place an order for a specified cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartManagementV1PlaceOrderPut(cartId, quoteGuestCartManagementV1PlaceOrderPutBody, options) { const localVarFetchArgs = exports.QuoteGuestCartManagementV1ApiFetchParamCreator(configuration).quoteGuestCartManagementV1PlaceOrderPut(cartId, quoteGuestCartManagementV1PlaceOrderPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteGuestCartManagementV1ApiFp = QuoteGuestCartManagementV1ApiFp; /** * QuoteGuestCartManagementV1Api - factory interface * @export */ const QuoteGuestCartManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Assign a specified customer to a specified shopping cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartManagementV1AssignCustomerPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartManagementV1AssignCustomerPut(cartId, quoteGuestCartManagementV1AssignCustomerPutBody, options) { return exports.QuoteGuestCartManagementV1ApiFp(configuration).quoteGuestCartManagementV1AssignCustomerPut(cartId, quoteGuestCartManagementV1AssignCustomerPutBody, options)(fetch, basePath); }, /** * Enable an customer or guest user to create an empty cart and quote for an anonymous customer. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartManagementV1CreateEmptyCartPost(options) { return exports.QuoteGuestCartManagementV1ApiFp(configuration).quoteGuestCartManagementV1CreateEmptyCartPost(options)(fetch, basePath); }, /** * Place an order for a specified cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartManagementV1PlaceOrderPut(cartId, quoteGuestCartManagementV1PlaceOrderPutBody, options) { return exports.QuoteGuestCartManagementV1ApiFp(configuration).quoteGuestCartManagementV1PlaceOrderPut(cartId, quoteGuestCartManagementV1PlaceOrderPutBody, options)(fetch, basePath); }, }; }; exports.QuoteGuestCartManagementV1ApiFactory = QuoteGuestCartManagementV1ApiFactory; /** * QuoteGuestCartManagementV1Api - object-oriented interface * @export * @class QuoteGuestCartManagementV1Api * @extends {BaseAPI} */ class QuoteGuestCartManagementV1Api extends BaseAPI { /** * Assign a specified customer to a specified shopping cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartManagementV1AssignCustomerPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCartManagementV1Api */ quoteGuestCartManagementV1AssignCustomerPut(cartId, quoteGuestCartManagementV1AssignCustomerPutBody, options) { return exports.QuoteGuestCartManagementV1ApiFp(this.configuration).quoteGuestCartManagementV1AssignCustomerPut(cartId, quoteGuestCartManagementV1AssignCustomerPutBody, options)(this.fetch, this.basePath); } /** * Enable an customer or guest user to create an empty cart and quote for an anonymous customer. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCartManagementV1Api */ quoteGuestCartManagementV1CreateEmptyCartPost(options) { return exports.QuoteGuestCartManagementV1ApiFp(this.configuration).quoteGuestCartManagementV1CreateEmptyCartPost(options)(this.fetch, this.basePath); } /** * Place an order for a specified cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartManagementV1PlaceOrderPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCartManagementV1Api */ quoteGuestCartManagementV1PlaceOrderPut(cartId, quoteGuestCartManagementV1PlaceOrderPutBody, options) { return exports.QuoteGuestCartManagementV1ApiFp(this.configuration).quoteGuestCartManagementV1PlaceOrderPut(cartId, quoteGuestCartManagementV1PlaceOrderPutBody, options)(this.fetch, this.basePath); } } exports.QuoteGuestCartManagementV1Api = QuoteGuestCartManagementV1Api; /** * QuoteGuestCartRepositoryV1Api - fetch parameter creator * @export */ const QuoteGuestCartRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Enable a guest user to return information for a specified cart. * @param {string} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartRepositoryV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCartRepositoryV1GetGet.'); } const localVarPath = `/V1/guest-carts/{cartId}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteGuestCartRepositoryV1ApiFetchParamCreator = QuoteGuestCartRepositoryV1ApiFetchParamCreator; /** * QuoteGuestCartRepositoryV1Api - functional programming interface * @export */ const QuoteGuestCartRepositoryV1ApiFp = function (configuration) { return { /** * Enable a guest user to return information for a specified cart. * @param {string} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartRepositoryV1GetGet(cartId, options) { const localVarFetchArgs = exports.QuoteGuestCartRepositoryV1ApiFetchParamCreator(configuration).quoteGuestCartRepositoryV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteGuestCartRepositoryV1ApiFp = QuoteGuestCartRepositoryV1ApiFp; /** * QuoteGuestCartRepositoryV1Api - factory interface * @export */ const QuoteGuestCartRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Enable a guest user to return information for a specified cart. * @param {string} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartRepositoryV1GetGet(cartId, options) { return exports.QuoteGuestCartRepositoryV1ApiFp(configuration).quoteGuestCartRepositoryV1GetGet(cartId, options)(fetch, basePath); }, }; }; exports.QuoteGuestCartRepositoryV1ApiFactory = QuoteGuestCartRepositoryV1ApiFactory; /** * QuoteGuestCartRepositoryV1Api - object-oriented interface * @export * @class QuoteGuestCartRepositoryV1Api * @extends {BaseAPI} */ class QuoteGuestCartRepositoryV1Api extends BaseAPI { /** * Enable a guest user to return information for a specified cart. * @param {string} cartId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCartRepositoryV1Api */ quoteGuestCartRepositoryV1GetGet(cartId, options) { return exports.QuoteGuestCartRepositoryV1ApiFp(this.configuration).quoteGuestCartRepositoryV1GetGet(cartId, options)(this.fetch, this.basePath); } } exports.QuoteGuestCartRepositoryV1Api = QuoteGuestCartRepositoryV1Api; /** * QuoteGuestCartTotalManagementV1Api - fetch parameter creator * @export */ const QuoteGuestCartTotalManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Set shipping/billing methods and additional data for cart and collect totals for guest. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartTotalManagementV1CollectTotalsPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartTotalManagementV1CollectTotalsPut(cartId, quoteGuestCartTotalManagementV1CollectTotalsPutBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCartTotalManagementV1CollectTotalsPut.'); } const localVarPath = `/V1/guest-carts/{cartId}/collect-totals` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteGuestCartTotalManagementV1CollectTotalsPutBody || {}) : (quoteGuestCartTotalManagementV1CollectTotalsPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteGuestCartTotalManagementV1ApiFetchParamCreator = QuoteGuestCartTotalManagementV1ApiFetchParamCreator; /** * QuoteGuestCartTotalManagementV1Api - functional programming interface * @export */ const QuoteGuestCartTotalManagementV1ApiFp = function (configuration) { return { /** * Set shipping/billing methods and additional data for cart and collect totals for guest. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartTotalManagementV1CollectTotalsPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartTotalManagementV1CollectTotalsPut(cartId, quoteGuestCartTotalManagementV1CollectTotalsPutBody, options) { const localVarFetchArgs = exports.QuoteGuestCartTotalManagementV1ApiFetchParamCreator(configuration).quoteGuestCartTotalManagementV1CollectTotalsPut(cartId, quoteGuestCartTotalManagementV1CollectTotalsPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteGuestCartTotalManagementV1ApiFp = QuoteGuestCartTotalManagementV1ApiFp; /** * QuoteGuestCartTotalManagementV1Api - factory interface * @export */ const QuoteGuestCartTotalManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Set shipping/billing methods and additional data for cart and collect totals for guest. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartTotalManagementV1CollectTotalsPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartTotalManagementV1CollectTotalsPut(cartId, quoteGuestCartTotalManagementV1CollectTotalsPutBody, options) { return exports.QuoteGuestCartTotalManagementV1ApiFp(configuration).quoteGuestCartTotalManagementV1CollectTotalsPut(cartId, quoteGuestCartTotalManagementV1CollectTotalsPutBody, options)(fetch, basePath); }, }; }; exports.QuoteGuestCartTotalManagementV1ApiFactory = QuoteGuestCartTotalManagementV1ApiFactory; /** * QuoteGuestCartTotalManagementV1Api - object-oriented interface * @export * @class QuoteGuestCartTotalManagementV1Api * @extends {BaseAPI} */ class QuoteGuestCartTotalManagementV1Api extends BaseAPI { /** * Set shipping/billing methods and additional data for cart and collect totals for guest. * @param {string} cartId The cart ID. * @param {any} [quoteGuestCartTotalManagementV1CollectTotalsPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCartTotalManagementV1Api */ quoteGuestCartTotalManagementV1CollectTotalsPut(cartId, quoteGuestCartTotalManagementV1CollectTotalsPutBody, options) { return exports.QuoteGuestCartTotalManagementV1ApiFp(this.configuration).quoteGuestCartTotalManagementV1CollectTotalsPut(cartId, quoteGuestCartTotalManagementV1CollectTotalsPutBody, options)(this.fetch, this.basePath); } } exports.QuoteGuestCartTotalManagementV1Api = QuoteGuestCartTotalManagementV1Api; /** * QuoteGuestCartTotalRepositoryV1Api - fetch parameter creator * @export */ const QuoteGuestCartTotalRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Return quote totals data for a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartTotalRepositoryV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCartTotalRepositoryV1GetGet.'); } const localVarPath = `/V1/guest-carts/{cartId}/totals` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteGuestCartTotalRepositoryV1ApiFetchParamCreator = QuoteGuestCartTotalRepositoryV1ApiFetchParamCreator; /** * QuoteGuestCartTotalRepositoryV1Api - functional programming interface * @export */ const QuoteGuestCartTotalRepositoryV1ApiFp = function (configuration) { return { /** * Return quote totals data for a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartTotalRepositoryV1GetGet(cartId, options) { const localVarFetchArgs = exports.QuoteGuestCartTotalRepositoryV1ApiFetchParamCreator(configuration).quoteGuestCartTotalRepositoryV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteGuestCartTotalRepositoryV1ApiFp = QuoteGuestCartTotalRepositoryV1ApiFp; /** * QuoteGuestCartTotalRepositoryV1Api - factory interface * @export */ const QuoteGuestCartTotalRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Return quote totals data for a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCartTotalRepositoryV1GetGet(cartId, options) { return exports.QuoteGuestCartTotalRepositoryV1ApiFp(configuration).quoteGuestCartTotalRepositoryV1GetGet(cartId, options)(fetch, basePath); }, }; }; exports.QuoteGuestCartTotalRepositoryV1ApiFactory = QuoteGuestCartTotalRepositoryV1ApiFactory; /** * QuoteGuestCartTotalRepositoryV1Api - object-oriented interface * @export * @class QuoteGuestCartTotalRepositoryV1Api * @extends {BaseAPI} */ class QuoteGuestCartTotalRepositoryV1Api extends BaseAPI { /** * Return quote totals data for a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCartTotalRepositoryV1Api */ quoteGuestCartTotalRepositoryV1GetGet(cartId, options) { return exports.QuoteGuestCartTotalRepositoryV1ApiFp(this.configuration).quoteGuestCartTotalRepositoryV1GetGet(cartId, options)(this.fetch, this.basePath); } } exports.QuoteGuestCartTotalRepositoryV1Api = QuoteGuestCartTotalRepositoryV1Api; /** * QuoteGuestCouponManagementV1Api - fetch parameter creator * @export */ const QuoteGuestCouponManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Return information for a coupon in a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCouponManagementV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCouponManagementV1GetGet.'); } const localVarPath = `/V1/guest-carts/{cartId}/coupons` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Delete a coupon from a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCouponManagementV1RemoveDelete(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCouponManagementV1RemoveDelete.'); } const localVarPath = `/V1/guest-carts/{cartId}/coupons` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add a coupon by code to a specified cart. * @param {string} cartId The cart ID. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCouponManagementV1SetPut(cartId, couponCode, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestCouponManagementV1SetPut.'); } // verify required parameter 'couponCode' is not null or undefined if (couponCode === null || couponCode === undefined) { throw new RequiredError('couponCode', 'Required parameter couponCode was null or undefined when calling quoteGuestCouponManagementV1SetPut.'); } const localVarPath = `/V1/guest-carts/{cartId}/coupons/{couponCode}` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))) .replace(`{${"couponCode"}}`, encodeURIComponent(String(couponCode))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteGuestCouponManagementV1ApiFetchParamCreator = QuoteGuestCouponManagementV1ApiFetchParamCreator; /** * QuoteGuestCouponManagementV1Api - functional programming interface * @export */ const QuoteGuestCouponManagementV1ApiFp = function (configuration) { return { /** * Return information for a coupon in a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCouponManagementV1GetGet(cartId, options) { const localVarFetchArgs = exports.QuoteGuestCouponManagementV1ApiFetchParamCreator(configuration).quoteGuestCouponManagementV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Delete a coupon from a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCouponManagementV1RemoveDelete(cartId, options) { const localVarFetchArgs = exports.QuoteGuestCouponManagementV1ApiFetchParamCreator(configuration).quoteGuestCouponManagementV1RemoveDelete(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add a coupon by code to a specified cart. * @param {string} cartId The cart ID. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCouponManagementV1SetPut(cartId, couponCode, options) { const localVarFetchArgs = exports.QuoteGuestCouponManagementV1ApiFetchParamCreator(configuration).quoteGuestCouponManagementV1SetPut(cartId, couponCode, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteGuestCouponManagementV1ApiFp = QuoteGuestCouponManagementV1ApiFp; /** * QuoteGuestCouponManagementV1Api - factory interface * @export */ const QuoteGuestCouponManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Return information for a coupon in a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCouponManagementV1GetGet(cartId, options) { return exports.QuoteGuestCouponManagementV1ApiFp(configuration).quoteGuestCouponManagementV1GetGet(cartId, options)(fetch, basePath); }, /** * Delete a coupon from a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCouponManagementV1RemoveDelete(cartId, options) { return exports.QuoteGuestCouponManagementV1ApiFp(configuration).quoteGuestCouponManagementV1RemoveDelete(cartId, options)(fetch, basePath); }, /** * Add a coupon by code to a specified cart. * @param {string} cartId The cart ID. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestCouponManagementV1SetPut(cartId, couponCode, options) { return exports.QuoteGuestCouponManagementV1ApiFp(configuration).quoteGuestCouponManagementV1SetPut(cartId, couponCode, options)(fetch, basePath); }, }; }; exports.QuoteGuestCouponManagementV1ApiFactory = QuoteGuestCouponManagementV1ApiFactory; /** * QuoteGuestCouponManagementV1Api - object-oriented interface * @export * @class QuoteGuestCouponManagementV1Api * @extends {BaseAPI} */ class QuoteGuestCouponManagementV1Api extends BaseAPI { /** * Return information for a coupon in a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCouponManagementV1Api */ quoteGuestCouponManagementV1GetGet(cartId, options) { return exports.QuoteGuestCouponManagementV1ApiFp(this.configuration).quoteGuestCouponManagementV1GetGet(cartId, options)(this.fetch, this.basePath); } /** * Delete a coupon from a specified cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCouponManagementV1Api */ quoteGuestCouponManagementV1RemoveDelete(cartId, options) { return exports.QuoteGuestCouponManagementV1ApiFp(this.configuration).quoteGuestCouponManagementV1RemoveDelete(cartId, options)(this.fetch, this.basePath); } /** * Add a coupon by code to a specified cart. * @param {string} cartId The cart ID. * @param {string} couponCode The coupon code data. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestCouponManagementV1Api */ quoteGuestCouponManagementV1SetPut(cartId, couponCode, options) { return exports.QuoteGuestCouponManagementV1ApiFp(this.configuration).quoteGuestCouponManagementV1SetPut(cartId, couponCode, options)(this.fetch, this.basePath); } } exports.QuoteGuestCouponManagementV1Api = QuoteGuestCouponManagementV1Api; /** * QuoteGuestPaymentMethodManagementV1Api - fetch parameter creator * @export */ const QuoteGuestPaymentMethodManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Return the payment method for a specified shopping cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestPaymentMethodManagementV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestPaymentMethodManagementV1GetGet.'); } const localVarPath = `/V1/guest-carts/{cartId}/selected-payment-method` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * List available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#GuestPaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestPaymentMethodManagementV1GetListGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestPaymentMethodManagementV1GetListGet.'); } const localVarPath = `/V1/guest-carts/{cartId}/payment-methods` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add a specified payment method to a specified shopping cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestPaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestPaymentMethodManagementV1SetPut(cartId, quoteGuestPaymentMethodManagementV1SetPutBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestPaymentMethodManagementV1SetPut.'); } const localVarPath = `/V1/guest-carts/{cartId}/selected-payment-method` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteGuestPaymentMethodManagementV1SetPutBody || {}) : (quoteGuestPaymentMethodManagementV1SetPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteGuestPaymentMethodManagementV1ApiFetchParamCreator = QuoteGuestPaymentMethodManagementV1ApiFetchParamCreator; /** * QuoteGuestPaymentMethodManagementV1Api - functional programming interface * @export */ const QuoteGuestPaymentMethodManagementV1ApiFp = function (configuration) { return { /** * Return the payment method for a specified shopping cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestPaymentMethodManagementV1GetGet(cartId, options) { const localVarFetchArgs = exports.QuoteGuestPaymentMethodManagementV1ApiFetchParamCreator(configuration).quoteGuestPaymentMethodManagementV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * List available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#GuestPaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestPaymentMethodManagementV1GetListGet(cartId, options) { const localVarFetchArgs = exports.QuoteGuestPaymentMethodManagementV1ApiFetchParamCreator(configuration).quoteGuestPaymentMethodManagementV1GetListGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Add a specified payment method to a specified shopping cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestPaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestPaymentMethodManagementV1SetPut(cartId, quoteGuestPaymentMethodManagementV1SetPutBody, options) { const localVarFetchArgs = exports.QuoteGuestPaymentMethodManagementV1ApiFetchParamCreator(configuration).quoteGuestPaymentMethodManagementV1SetPut(cartId, quoteGuestPaymentMethodManagementV1SetPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteGuestPaymentMethodManagementV1ApiFp = QuoteGuestPaymentMethodManagementV1ApiFp; /** * QuoteGuestPaymentMethodManagementV1Api - factory interface * @export */ const QuoteGuestPaymentMethodManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Return the payment method for a specified shopping cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestPaymentMethodManagementV1GetGet(cartId, options) { return exports.QuoteGuestPaymentMethodManagementV1ApiFp(configuration).quoteGuestPaymentMethodManagementV1GetGet(cartId, options)(fetch, basePath); }, /** * List available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#GuestPaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestPaymentMethodManagementV1GetListGet(cartId, options) { return exports.QuoteGuestPaymentMethodManagementV1ApiFp(configuration).quoteGuestPaymentMethodManagementV1GetListGet(cartId, options)(fetch, basePath); }, /** * Add a specified payment method to a specified shopping cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestPaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestPaymentMethodManagementV1SetPut(cartId, quoteGuestPaymentMethodManagementV1SetPutBody, options) { return exports.QuoteGuestPaymentMethodManagementV1ApiFp(configuration).quoteGuestPaymentMethodManagementV1SetPut(cartId, quoteGuestPaymentMethodManagementV1SetPutBody, options)(fetch, basePath); }, }; }; exports.QuoteGuestPaymentMethodManagementV1ApiFactory = QuoteGuestPaymentMethodManagementV1ApiFactory; /** * QuoteGuestPaymentMethodManagementV1Api - object-oriented interface * @export * @class QuoteGuestPaymentMethodManagementV1Api * @extends {BaseAPI} */ class QuoteGuestPaymentMethodManagementV1Api extends BaseAPI { /** * Return the payment method for a specified shopping cart. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestPaymentMethodManagementV1Api */ quoteGuestPaymentMethodManagementV1GetGet(cartId, options) { return exports.QuoteGuestPaymentMethodManagementV1ApiFp(this.configuration).quoteGuestPaymentMethodManagementV1GetGet(cartId, options)(this.fetch, this.basePath); } /** * List available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#GuestPaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestPaymentMethodManagementV1Api */ quoteGuestPaymentMethodManagementV1GetListGet(cartId, options) { return exports.QuoteGuestPaymentMethodManagementV1ApiFp(this.configuration).quoteGuestPaymentMethodManagementV1GetListGet(cartId, options)(this.fetch, this.basePath); } /** * Add a specified payment method to a specified shopping cart. * @param {string} cartId The cart ID. * @param {any} [quoteGuestPaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestPaymentMethodManagementV1Api */ quoteGuestPaymentMethodManagementV1SetPut(cartId, quoteGuestPaymentMethodManagementV1SetPutBody, options) { return exports.QuoteGuestPaymentMethodManagementV1ApiFp(this.configuration).quoteGuestPaymentMethodManagementV1SetPut(cartId, quoteGuestPaymentMethodManagementV1SetPutBody, options)(this.fetch, this.basePath); } } exports.QuoteGuestPaymentMethodManagementV1Api = QuoteGuestPaymentMethodManagementV1Api; /** * QuoteGuestShipmentEstimationV1Api - fetch parameter creator * @export */ const QuoteGuestShipmentEstimationV1ApiFetchParamCreator = function (configuration) { return { /** * Estimate shipping by address and return list of available shipping methods * @param {string} cartId * @param {any} [quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestShipmentEstimationV1EstimateByExtendedAddressPost.'); } const localVarPath = `/V1/guest-carts/{cartId}/estimate-shipping-methods` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody || {}) : (quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteGuestShipmentEstimationV1ApiFetchParamCreator = QuoteGuestShipmentEstimationV1ApiFetchParamCreator; /** * QuoteGuestShipmentEstimationV1Api - functional programming interface * @export */ const QuoteGuestShipmentEstimationV1ApiFp = function (configuration) { return { /** * Estimate shipping by address and return list of available shipping methods * @param {string} cartId * @param {any} [quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody, options) { const localVarFetchArgs = exports.QuoteGuestShipmentEstimationV1ApiFetchParamCreator(configuration).quoteGuestShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteGuestShipmentEstimationV1ApiFp = QuoteGuestShipmentEstimationV1ApiFp; /** * QuoteGuestShipmentEstimationV1Api - factory interface * @export */ const QuoteGuestShipmentEstimationV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Estimate shipping by address and return list of available shipping methods * @param {string} cartId * @param {any} [quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody, options) { return exports.QuoteGuestShipmentEstimationV1ApiFp(configuration).quoteGuestShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody, options)(fetch, basePath); }, }; }; exports.QuoteGuestShipmentEstimationV1ApiFactory = QuoteGuestShipmentEstimationV1ApiFactory; /** * QuoteGuestShipmentEstimationV1Api - object-oriented interface * @export * @class QuoteGuestShipmentEstimationV1Api * @extends {BaseAPI} */ class QuoteGuestShipmentEstimationV1Api extends BaseAPI { /** * Estimate shipping by address and return list of available shipping methods * @param {string} cartId * @param {any} [quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestShipmentEstimationV1Api */ quoteGuestShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody, options) { return exports.QuoteGuestShipmentEstimationV1ApiFp(this.configuration).quoteGuestShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteGuestShipmentEstimationV1EstimateByExtendedAddressPostBody, options)(this.fetch, this.basePath); } } exports.QuoteGuestShipmentEstimationV1Api = QuoteGuestShipmentEstimationV1Api; /** * QuoteGuestShippingMethodManagementV1Api - fetch parameter creator * @export */ const QuoteGuestShippingMethodManagementV1ApiFetchParamCreator = function (configuration) { return { /** * List applicable shipping methods for a specified quote. * @param {string} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestShippingMethodManagementV1GetListGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteGuestShippingMethodManagementV1GetListGet.'); } const localVarPath = `/V1/guest-carts/{cartId}/shipping-methods` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteGuestShippingMethodManagementV1ApiFetchParamCreator = QuoteGuestShippingMethodManagementV1ApiFetchParamCreator; /** * QuoteGuestShippingMethodManagementV1Api - functional programming interface * @export */ const QuoteGuestShippingMethodManagementV1ApiFp = function (configuration) { return { /** * List applicable shipping methods for a specified quote. * @param {string} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestShippingMethodManagementV1GetListGet(cartId, options) { const localVarFetchArgs = exports.QuoteGuestShippingMethodManagementV1ApiFetchParamCreator(configuration).quoteGuestShippingMethodManagementV1GetListGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteGuestShippingMethodManagementV1ApiFp = QuoteGuestShippingMethodManagementV1ApiFp; /** * QuoteGuestShippingMethodManagementV1Api - factory interface * @export */ const QuoteGuestShippingMethodManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * List applicable shipping methods for a specified quote. * @param {string} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteGuestShippingMethodManagementV1GetListGet(cartId, options) { return exports.QuoteGuestShippingMethodManagementV1ApiFp(configuration).quoteGuestShippingMethodManagementV1GetListGet(cartId, options)(fetch, basePath); }, }; }; exports.QuoteGuestShippingMethodManagementV1ApiFactory = QuoteGuestShippingMethodManagementV1ApiFactory; /** * QuoteGuestShippingMethodManagementV1Api - object-oriented interface * @export * @class QuoteGuestShippingMethodManagementV1Api * @extends {BaseAPI} */ class QuoteGuestShippingMethodManagementV1Api extends BaseAPI { /** * List applicable shipping methods for a specified quote. * @param {string} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteGuestShippingMethodManagementV1Api */ quoteGuestShippingMethodManagementV1GetListGet(cartId, options) { return exports.QuoteGuestShippingMethodManagementV1ApiFp(this.configuration).quoteGuestShippingMethodManagementV1GetListGet(cartId, options)(this.fetch, this.basePath); } } exports.QuoteGuestShippingMethodManagementV1Api = QuoteGuestShippingMethodManagementV1Api; /** * QuotePaymentMethodManagementV1Api - fetch parameter creator * @export */ const QuotePaymentMethodManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Returns the payment method for a specified shopping cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quotePaymentMethodManagementV1GetGet.'); } const localVarPath = `/V1/carts/{cartId}/selected-payment-method` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the payment method for a specified shopping cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetGet_1(options = {}) { const localVarPath = `/V1/carts/mine/selected-payment-method`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#PaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetListGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quotePaymentMethodManagementV1GetListGet.'); } const localVarPath = `/V1/carts/{cartId}/payment-methods` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#PaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetListGet_2(options = {}) { const localVarPath = `/V1/carts/mine/payment-methods`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Adds a specified payment method to a specified shopping cart. * @param {number} cartId The cart ID. * @param {any} [quotePaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1SetPut(cartId, quotePaymentMethodManagementV1SetPutBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quotePaymentMethodManagementV1SetPut.'); } const localVarPath = `/V1/carts/{cartId}/selected-payment-method` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quotePaymentMethodManagementV1SetPutBody || {}) : (quotePaymentMethodManagementV1SetPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Adds a specified payment method to a specified shopping cart. * @param {any} [quotePaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1SetPut_3(quotePaymentMethodManagementV1SetPutBody, options = {}) { const localVarPath = `/V1/carts/mine/selected-payment-method`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quotePaymentMethodManagementV1SetPutBody || {}) : (quotePaymentMethodManagementV1SetPutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuotePaymentMethodManagementV1ApiFetchParamCreator = QuotePaymentMethodManagementV1ApiFetchParamCreator; /** * QuotePaymentMethodManagementV1Api - functional programming interface * @export */ const QuotePaymentMethodManagementV1ApiFp = function (configuration) { return { /** * Returns the payment method for a specified shopping cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetGet(cartId, options) { const localVarFetchArgs = exports.QuotePaymentMethodManagementV1ApiFetchParamCreator(configuration).quotePaymentMethodManagementV1GetGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Returns the payment method for a specified shopping cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetGet_1(options) { const localVarFetchArgs = exports.QuotePaymentMethodManagementV1ApiFetchParamCreator(configuration).quotePaymentMethodManagementV1GetGet_1(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#PaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetListGet(cartId, options) { const localVarFetchArgs = exports.QuotePaymentMethodManagementV1ApiFetchParamCreator(configuration).quotePaymentMethodManagementV1GetListGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#PaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetListGet_2(options) { const localVarFetchArgs = exports.QuotePaymentMethodManagementV1ApiFetchParamCreator(configuration).quotePaymentMethodManagementV1GetListGet_2(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Adds a specified payment method to a specified shopping cart. * @param {number} cartId The cart ID. * @param {any} [quotePaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1SetPut(cartId, quotePaymentMethodManagementV1SetPutBody, options) { const localVarFetchArgs = exports.QuotePaymentMethodManagementV1ApiFetchParamCreator(configuration).quotePaymentMethodManagementV1SetPut(cartId, quotePaymentMethodManagementV1SetPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Adds a specified payment method to a specified shopping cart. * @param {any} [quotePaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1SetPut_3(quotePaymentMethodManagementV1SetPutBody, options) { const localVarFetchArgs = exports.QuotePaymentMethodManagementV1ApiFetchParamCreator(configuration).quotePaymentMethodManagementV1SetPut_3(quotePaymentMethodManagementV1SetPutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuotePaymentMethodManagementV1ApiFp = QuotePaymentMethodManagementV1ApiFp; /** * QuotePaymentMethodManagementV1Api - factory interface * @export */ const QuotePaymentMethodManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Returns the payment method for a specified shopping cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetGet(cartId, options) { return exports.QuotePaymentMethodManagementV1ApiFp(configuration).quotePaymentMethodManagementV1GetGet(cartId, options)(fetch, basePath); }, /** * Returns the payment method for a specified shopping cart. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetGet_1(options) { return exports.QuotePaymentMethodManagementV1ApiFp(configuration).quotePaymentMethodManagementV1GetGet_1(options)(fetch, basePath); }, /** * Lists available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#PaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetListGet(cartId, options) { return exports.QuotePaymentMethodManagementV1ApiFp(configuration).quotePaymentMethodManagementV1GetListGet(cartId, options)(fetch, basePath); }, /** * Lists available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#PaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1GetListGet_2(options) { return exports.QuotePaymentMethodManagementV1ApiFp(configuration).quotePaymentMethodManagementV1GetListGet_2(options)(fetch, basePath); }, /** * Adds a specified payment method to a specified shopping cart. * @param {number} cartId The cart ID. * @param {any} [quotePaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1SetPut(cartId, quotePaymentMethodManagementV1SetPutBody, options) { return exports.QuotePaymentMethodManagementV1ApiFp(configuration).quotePaymentMethodManagementV1SetPut(cartId, quotePaymentMethodManagementV1SetPutBody, options)(fetch, basePath); }, /** * Adds a specified payment method to a specified shopping cart. * @param {any} [quotePaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quotePaymentMethodManagementV1SetPut_3(quotePaymentMethodManagementV1SetPutBody, options) { return exports.QuotePaymentMethodManagementV1ApiFp(configuration).quotePaymentMethodManagementV1SetPut_3(quotePaymentMethodManagementV1SetPutBody, options)(fetch, basePath); }, }; }; exports.QuotePaymentMethodManagementV1ApiFactory = QuotePaymentMethodManagementV1ApiFactory; /** * QuotePaymentMethodManagementV1Api - object-oriented interface * @export * @class QuotePaymentMethodManagementV1Api * @extends {BaseAPI} */ class QuotePaymentMethodManagementV1Api extends BaseAPI { /** * Returns the payment method for a specified shopping cart. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuotePaymentMethodManagementV1Api */ quotePaymentMethodManagementV1GetGet(cartId, options) { return exports.QuotePaymentMethodManagementV1ApiFp(this.configuration).quotePaymentMethodManagementV1GetGet(cartId, options)(this.fetch, this.basePath); } /** * Returns the payment method for a specified shopping cart. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuotePaymentMethodManagementV1Api */ quotePaymentMethodManagementV1GetGet_1(options) { return exports.QuotePaymentMethodManagementV1ApiFp(this.configuration).quotePaymentMethodManagementV1GetGet_1(options)(this.fetch, this.basePath); } /** * Lists available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#PaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {number} cartId The cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuotePaymentMethodManagementV1Api */ quotePaymentMethodManagementV1GetListGet(cartId, options) { return exports.QuotePaymentMethodManagementV1ApiFp(this.configuration).quotePaymentMethodManagementV1GetListGet(cartId, options)(this.fetch, this.basePath); } /** * Lists available payment methods for a specified shopping cart. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#PaymentMethodManagementInterface to determine which call to use to get detailed information about all attributes for an object. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuotePaymentMethodManagementV1Api */ quotePaymentMethodManagementV1GetListGet_2(options) { return exports.QuotePaymentMethodManagementV1ApiFp(this.configuration).quotePaymentMethodManagementV1GetListGet_2(options)(this.fetch, this.basePath); } /** * Adds a specified payment method to a specified shopping cart. * @param {number} cartId The cart ID. * @param {any} [quotePaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuotePaymentMethodManagementV1Api */ quotePaymentMethodManagementV1SetPut(cartId, quotePaymentMethodManagementV1SetPutBody, options) { return exports.QuotePaymentMethodManagementV1ApiFp(this.configuration).quotePaymentMethodManagementV1SetPut(cartId, quotePaymentMethodManagementV1SetPutBody, options)(this.fetch, this.basePath); } /** * Adds a specified payment method to a specified shopping cart. * @param {any} [quotePaymentMethodManagementV1SetPutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuotePaymentMethodManagementV1Api */ quotePaymentMethodManagementV1SetPut_3(quotePaymentMethodManagementV1SetPutBody, options) { return exports.QuotePaymentMethodManagementV1ApiFp(this.configuration).quotePaymentMethodManagementV1SetPut_3(quotePaymentMethodManagementV1SetPutBody, options)(this.fetch, this.basePath); } } exports.QuotePaymentMethodManagementV1Api = QuotePaymentMethodManagementV1Api; /** * QuoteShipmentEstimationV1Api - fetch parameter creator * @export */ const QuoteShipmentEstimationV1ApiFetchParamCreator = function (configuration) { return { /** * Estimate shipping by address and return list of available shipping methods * @param {string} cartId * @param {any} [quoteShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteShipmentEstimationV1EstimateByExtendedAddressPost.'); } const localVarPath = `/V1/carts/{cartId}/estimate-shipping-methods` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteShipmentEstimationV1EstimateByExtendedAddressPostBody || {}) : (quoteShipmentEstimationV1EstimateByExtendedAddressPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Estimate shipping by address and return list of available shipping methods * @param {any} [quoteShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShipmentEstimationV1EstimateByExtendedAddressPost_1(quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options = {}) { const localVarPath = `/V1/carts/mine/estimate-shipping-methods`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteShipmentEstimationV1EstimateByExtendedAddressPostBody || {}) : (quoteShipmentEstimationV1EstimateByExtendedAddressPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteShipmentEstimationV1ApiFetchParamCreator = QuoteShipmentEstimationV1ApiFetchParamCreator; /** * QuoteShipmentEstimationV1Api - functional programming interface * @export */ const QuoteShipmentEstimationV1ApiFp = function (configuration) { return { /** * Estimate shipping by address and return list of available shipping methods * @param {string} cartId * @param {any} [quoteShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options) { const localVarFetchArgs = exports.QuoteShipmentEstimationV1ApiFetchParamCreator(configuration).quoteShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Estimate shipping by address and return list of available shipping methods * @param {any} [quoteShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShipmentEstimationV1EstimateByExtendedAddressPost_1(quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options) { const localVarFetchArgs = exports.QuoteShipmentEstimationV1ApiFetchParamCreator(configuration).quoteShipmentEstimationV1EstimateByExtendedAddressPost_1(quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteShipmentEstimationV1ApiFp = QuoteShipmentEstimationV1ApiFp; /** * QuoteShipmentEstimationV1Api - factory interface * @export */ const QuoteShipmentEstimationV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Estimate shipping by address and return list of available shipping methods * @param {string} cartId * @param {any} [quoteShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options) { return exports.QuoteShipmentEstimationV1ApiFp(configuration).quoteShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options)(fetch, basePath); }, /** * Estimate shipping by address and return list of available shipping methods * @param {any} [quoteShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShipmentEstimationV1EstimateByExtendedAddressPost_1(quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options) { return exports.QuoteShipmentEstimationV1ApiFp(configuration).quoteShipmentEstimationV1EstimateByExtendedAddressPost_1(quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options)(fetch, basePath); }, }; }; exports.QuoteShipmentEstimationV1ApiFactory = QuoteShipmentEstimationV1ApiFactory; /** * QuoteShipmentEstimationV1Api - object-oriented interface * @export * @class QuoteShipmentEstimationV1Api * @extends {BaseAPI} */ class QuoteShipmentEstimationV1Api extends BaseAPI { /** * Estimate shipping by address and return list of available shipping methods * @param {string} cartId * @param {any} [quoteShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteShipmentEstimationV1Api */ quoteShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options) { return exports.QuoteShipmentEstimationV1ApiFp(this.configuration).quoteShipmentEstimationV1EstimateByExtendedAddressPost(cartId, quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options)(this.fetch, this.basePath); } /** * Estimate shipping by address and return list of available shipping methods * @param {any} [quoteShipmentEstimationV1EstimateByExtendedAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteShipmentEstimationV1Api */ quoteShipmentEstimationV1EstimateByExtendedAddressPost_1(quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options) { return exports.QuoteShipmentEstimationV1ApiFp(this.configuration).quoteShipmentEstimationV1EstimateByExtendedAddressPost_1(quoteShipmentEstimationV1EstimateByExtendedAddressPostBody, options)(this.fetch, this.basePath); } } exports.QuoteShipmentEstimationV1Api = QuoteShipmentEstimationV1Api; /** * QuoteShippingMethodManagementV1Api - fetch parameter creator * @export */ const QuoteShippingMethodManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Estimate shipping * @param {number} cartId The shopping cart ID. * @param {any} [quoteShippingMethodManagementV1EstimateByAddressIdPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1EstimateByAddressIdPost(cartId, quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteShippingMethodManagementV1EstimateByAddressIdPost.'); } const localVarPath = `/V1/carts/{cartId}/estimate-shipping-methods-by-address-id` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteShippingMethodManagementV1EstimateByAddressIdPostBody || {}) : (quoteShippingMethodManagementV1EstimateByAddressIdPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Estimate shipping * @param {any} [quoteShippingMethodManagementV1EstimateByAddressIdPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1EstimateByAddressIdPost_1(quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options = {}) { const localVarPath = `/V1/carts/mine/estimate-shipping-methods-by-address-id`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(quoteShippingMethodManagementV1EstimateByAddressIdPostBody || {}) : (quoteShippingMethodManagementV1EstimateByAddressIdPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists applicable shipping methods for a specified quote. * @param {number} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1GetListGet(cartId, options = {}) { // verify required parameter 'cartId' is not null or undefined if (cartId === null || cartId === undefined) { throw new RequiredError('cartId', 'Required parameter cartId was null or undefined when calling quoteShippingMethodManagementV1GetListGet.'); } const localVarPath = `/V1/carts/{cartId}/shipping-methods` .replace(`{${"cartId"}}`, encodeURIComponent(String(cartId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists applicable shipping methods for a specified quote. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1GetListGet_2(options = {}) { const localVarPath = `/V1/carts/mine/shipping-methods`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.QuoteShippingMethodManagementV1ApiFetchParamCreator = QuoteShippingMethodManagementV1ApiFetchParamCreator; /** * QuoteShippingMethodManagementV1Api - functional programming interface * @export */ const QuoteShippingMethodManagementV1ApiFp = function (configuration) { return { /** * Estimate shipping * @param {number} cartId The shopping cart ID. * @param {any} [quoteShippingMethodManagementV1EstimateByAddressIdPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1EstimateByAddressIdPost(cartId, quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options) { const localVarFetchArgs = exports.QuoteShippingMethodManagementV1ApiFetchParamCreator(configuration).quoteShippingMethodManagementV1EstimateByAddressIdPost(cartId, quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Estimate shipping * @param {any} [quoteShippingMethodManagementV1EstimateByAddressIdPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1EstimateByAddressIdPost_1(quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options) { const localVarFetchArgs = exports.QuoteShippingMethodManagementV1ApiFetchParamCreator(configuration).quoteShippingMethodManagementV1EstimateByAddressIdPost_1(quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists applicable shipping methods for a specified quote. * @param {number} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1GetListGet(cartId, options) { const localVarFetchArgs = exports.QuoteShippingMethodManagementV1ApiFetchParamCreator(configuration).quoteShippingMethodManagementV1GetListGet(cartId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists applicable shipping methods for a specified quote. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1GetListGet_2(options) { const localVarFetchArgs = exports.QuoteShippingMethodManagementV1ApiFetchParamCreator(configuration).quoteShippingMethodManagementV1GetListGet_2(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.QuoteShippingMethodManagementV1ApiFp = QuoteShippingMethodManagementV1ApiFp; /** * QuoteShippingMethodManagementV1Api - factory interface * @export */ const QuoteShippingMethodManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Estimate shipping * @param {number} cartId The shopping cart ID. * @param {any} [quoteShippingMethodManagementV1EstimateByAddressIdPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1EstimateByAddressIdPost(cartId, quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options) { return exports.QuoteShippingMethodManagementV1ApiFp(configuration).quoteShippingMethodManagementV1EstimateByAddressIdPost(cartId, quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options)(fetch, basePath); }, /** * Estimate shipping * @param {any} [quoteShippingMethodManagementV1EstimateByAddressIdPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1EstimateByAddressIdPost_1(quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options) { return exports.QuoteShippingMethodManagementV1ApiFp(configuration).quoteShippingMethodManagementV1EstimateByAddressIdPost_1(quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options)(fetch, basePath); }, /** * Lists applicable shipping methods for a specified quote. * @param {number} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1GetListGet(cartId, options) { return exports.QuoteShippingMethodManagementV1ApiFp(configuration).quoteShippingMethodManagementV1GetListGet(cartId, options)(fetch, basePath); }, /** * Lists applicable shipping methods for a specified quote. * @param {*} [options] Override http request option. * @throws {RequiredError} */ quoteShippingMethodManagementV1GetListGet_2(options) { return exports.QuoteShippingMethodManagementV1ApiFp(configuration).quoteShippingMethodManagementV1GetListGet_2(options)(fetch, basePath); }, }; }; exports.QuoteShippingMethodManagementV1ApiFactory = QuoteShippingMethodManagementV1ApiFactory; /** * QuoteShippingMethodManagementV1Api - object-oriented interface * @export * @class QuoteShippingMethodManagementV1Api * @extends {BaseAPI} */ class QuoteShippingMethodManagementV1Api extends BaseAPI { /** * Estimate shipping * @param {number} cartId The shopping cart ID. * @param {any} [quoteShippingMethodManagementV1EstimateByAddressIdPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteShippingMethodManagementV1Api */ quoteShippingMethodManagementV1EstimateByAddressIdPost(cartId, quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options) { return exports.QuoteShippingMethodManagementV1ApiFp(this.configuration).quoteShippingMethodManagementV1EstimateByAddressIdPost(cartId, quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options)(this.fetch, this.basePath); } /** * Estimate shipping * @param {any} [quoteShippingMethodManagementV1EstimateByAddressIdPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteShippingMethodManagementV1Api */ quoteShippingMethodManagementV1EstimateByAddressIdPost_1(quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options) { return exports.QuoteShippingMethodManagementV1ApiFp(this.configuration).quoteShippingMethodManagementV1EstimateByAddressIdPost_1(quoteShippingMethodManagementV1EstimateByAddressIdPostBody, options)(this.fetch, this.basePath); } /** * Lists applicable shipping methods for a specified quote. * @param {number} cartId The shopping cart ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteShippingMethodManagementV1Api */ quoteShippingMethodManagementV1GetListGet(cartId, options) { return exports.QuoteShippingMethodManagementV1ApiFp(this.configuration).quoteShippingMethodManagementV1GetListGet(cartId, options)(this.fetch, this.basePath); } /** * Lists applicable shipping methods for a specified quote. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuoteShippingMethodManagementV1Api */ quoteShippingMethodManagementV1GetListGet_2(options) { return exports.QuoteShippingMethodManagementV1ApiFp(this.configuration).quoteShippingMethodManagementV1GetListGet_2(options)(this.fetch, this.basePath); } } exports.QuoteShippingMethodManagementV1Api = QuoteShippingMethodManagementV1Api; /** * SalesCreditmemoCommentRepositoryV1Api - fetch parameter creator * @export */ const SalesCreditmemoCommentRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Performs persist operations for a specified entity. * @param {string} id * @param {any} [salesCreditmemoCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoCommentRepositoryV1SavePost(id, salesCreditmemoCommentRepositoryV1SavePostBody, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesCreditmemoCommentRepositoryV1SavePost.'); } const localVarPath = `/V1/creditmemo/{id}/comments` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesCreditmemoCommentRepositoryV1SavePostBody || {}) : (salesCreditmemoCommentRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesCreditmemoCommentRepositoryV1ApiFetchParamCreator = SalesCreditmemoCommentRepositoryV1ApiFetchParamCreator; /** * SalesCreditmemoCommentRepositoryV1Api - functional programming interface * @export */ const SalesCreditmemoCommentRepositoryV1ApiFp = function (configuration) { return { /** * Performs persist operations for a specified entity. * @param {string} id * @param {any} [salesCreditmemoCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoCommentRepositoryV1SavePost(id, salesCreditmemoCommentRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.SalesCreditmemoCommentRepositoryV1ApiFetchParamCreator(configuration).salesCreditmemoCommentRepositoryV1SavePost(id, salesCreditmemoCommentRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesCreditmemoCommentRepositoryV1ApiFp = SalesCreditmemoCommentRepositoryV1ApiFp; /** * SalesCreditmemoCommentRepositoryV1Api - factory interface * @export */ const SalesCreditmemoCommentRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Performs persist operations for a specified entity. * @param {string} id * @param {any} [salesCreditmemoCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoCommentRepositoryV1SavePost(id, salesCreditmemoCommentRepositoryV1SavePostBody, options) { return exports.SalesCreditmemoCommentRepositoryV1ApiFp(configuration).salesCreditmemoCommentRepositoryV1SavePost(id, salesCreditmemoCommentRepositoryV1SavePostBody, options)(fetch, basePath); }, }; }; exports.SalesCreditmemoCommentRepositoryV1ApiFactory = SalesCreditmemoCommentRepositoryV1ApiFactory; /** * SalesCreditmemoCommentRepositoryV1Api - object-oriented interface * @export * @class SalesCreditmemoCommentRepositoryV1Api * @extends {BaseAPI} */ class SalesCreditmemoCommentRepositoryV1Api extends BaseAPI { /** * Performs persist operations for a specified entity. * @param {string} id * @param {any} [salesCreditmemoCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesCreditmemoCommentRepositoryV1Api */ salesCreditmemoCommentRepositoryV1SavePost(id, salesCreditmemoCommentRepositoryV1SavePostBody, options) { return exports.SalesCreditmemoCommentRepositoryV1ApiFp(this.configuration).salesCreditmemoCommentRepositoryV1SavePost(id, salesCreditmemoCommentRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } } exports.SalesCreditmemoCommentRepositoryV1Api = SalesCreditmemoCommentRepositoryV1Api; /** * SalesCreditmemoManagementV1Api - fetch parameter creator * @export */ const SalesCreditmemoManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Cancels a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1CancelPut(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesCreditmemoManagementV1CancelPut.'); } const localVarPath = `/V1/creditmemo/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists comments for a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1GetCommentsListGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesCreditmemoManagementV1GetCommentsListGet.'); } const localVarPath = `/V1/creditmemo/{id}/comments` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Emails a user a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1NotifyPost(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesCreditmemoManagementV1NotifyPost.'); } const localVarPath = `/V1/creditmemo/{id}/emails` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Prepare creditmemo to refund and save it. * @param {any} [salesCreditmemoManagementV1RefundPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1RefundPost(salesCreditmemoManagementV1RefundPostBody, options = {}) { const localVarPath = `/V1/creditmemo/refund`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesCreditmemoManagementV1RefundPostBody || {}) : (salesCreditmemoManagementV1RefundPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesCreditmemoManagementV1ApiFetchParamCreator = SalesCreditmemoManagementV1ApiFetchParamCreator; /** * SalesCreditmemoManagementV1Api - functional programming interface * @export */ const SalesCreditmemoManagementV1ApiFp = function (configuration) { return { /** * Cancels a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1CancelPut(id, options) { const localVarFetchArgs = exports.SalesCreditmemoManagementV1ApiFetchParamCreator(configuration).salesCreditmemoManagementV1CancelPut(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists comments for a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1GetCommentsListGet(id, options) { const localVarFetchArgs = exports.SalesCreditmemoManagementV1ApiFetchParamCreator(configuration).salesCreditmemoManagementV1GetCommentsListGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Emails a user a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1NotifyPost(id, options) { const localVarFetchArgs = exports.SalesCreditmemoManagementV1ApiFetchParamCreator(configuration).salesCreditmemoManagementV1NotifyPost(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Prepare creditmemo to refund and save it. * @param {any} [salesCreditmemoManagementV1RefundPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1RefundPost(salesCreditmemoManagementV1RefundPostBody, options) { const localVarFetchArgs = exports.SalesCreditmemoManagementV1ApiFetchParamCreator(configuration).salesCreditmemoManagementV1RefundPost(salesCreditmemoManagementV1RefundPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesCreditmemoManagementV1ApiFp = SalesCreditmemoManagementV1ApiFp; /** * SalesCreditmemoManagementV1Api - factory interface * @export */ const SalesCreditmemoManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Cancels a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1CancelPut(id, options) { return exports.SalesCreditmemoManagementV1ApiFp(configuration).salesCreditmemoManagementV1CancelPut(id, options)(fetch, basePath); }, /** * Lists comments for a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1GetCommentsListGet(id, options) { return exports.SalesCreditmemoManagementV1ApiFp(configuration).salesCreditmemoManagementV1GetCommentsListGet(id, options)(fetch, basePath); }, /** * Emails a user a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1NotifyPost(id, options) { return exports.SalesCreditmemoManagementV1ApiFp(configuration).salesCreditmemoManagementV1NotifyPost(id, options)(fetch, basePath); }, /** * Prepare creditmemo to refund and save it. * @param {any} [salesCreditmemoManagementV1RefundPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoManagementV1RefundPost(salesCreditmemoManagementV1RefundPostBody, options) { return exports.SalesCreditmemoManagementV1ApiFp(configuration).salesCreditmemoManagementV1RefundPost(salesCreditmemoManagementV1RefundPostBody, options)(fetch, basePath); }, }; }; exports.SalesCreditmemoManagementV1ApiFactory = SalesCreditmemoManagementV1ApiFactory; /** * SalesCreditmemoManagementV1Api - object-oriented interface * @export * @class SalesCreditmemoManagementV1Api * @extends {BaseAPI} */ class SalesCreditmemoManagementV1Api extends BaseAPI { /** * Cancels a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesCreditmemoManagementV1Api */ salesCreditmemoManagementV1CancelPut(id, options) { return exports.SalesCreditmemoManagementV1ApiFp(this.configuration).salesCreditmemoManagementV1CancelPut(id, options)(this.fetch, this.basePath); } /** * Lists comments for a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesCreditmemoManagementV1Api */ salesCreditmemoManagementV1GetCommentsListGet(id, options) { return exports.SalesCreditmemoManagementV1ApiFp(this.configuration).salesCreditmemoManagementV1GetCommentsListGet(id, options)(this.fetch, this.basePath); } /** * Emails a user a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesCreditmemoManagementV1Api */ salesCreditmemoManagementV1NotifyPost(id, options) { return exports.SalesCreditmemoManagementV1ApiFp(this.configuration).salesCreditmemoManagementV1NotifyPost(id, options)(this.fetch, this.basePath); } /** * Prepare creditmemo to refund and save it. * @param {any} [salesCreditmemoManagementV1RefundPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesCreditmemoManagementV1Api */ salesCreditmemoManagementV1RefundPost(salesCreditmemoManagementV1RefundPostBody, options) { return exports.SalesCreditmemoManagementV1ApiFp(this.configuration).salesCreditmemoManagementV1RefundPost(salesCreditmemoManagementV1RefundPostBody, options)(this.fetch, this.basePath); } } exports.SalesCreditmemoManagementV1Api = SalesCreditmemoManagementV1Api; /** * SalesCreditmemoRepositoryV1Api - fetch parameter creator * @export */ const SalesCreditmemoRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Loads a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoRepositoryV1GetGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesCreditmemoRepositoryV1GetGet.'); } const localVarPath = `/V1/creditmemo/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists credit memos that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CreditmemoRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/creditmemos`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Performs persist operations for a specified credit memo. * @param {any} [salesCreditmemoRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoRepositoryV1SavePost(salesCreditmemoRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/creditmemo`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesCreditmemoRepositoryV1SavePostBody || {}) : (salesCreditmemoRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesCreditmemoRepositoryV1ApiFetchParamCreator = SalesCreditmemoRepositoryV1ApiFetchParamCreator; /** * SalesCreditmemoRepositoryV1Api - functional programming interface * @export */ const SalesCreditmemoRepositoryV1ApiFp = function (configuration) { return { /** * Loads a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoRepositoryV1GetGet(id, options) { const localVarFetchArgs = exports.SalesCreditmemoRepositoryV1ApiFetchParamCreator(configuration).salesCreditmemoRepositoryV1GetGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists credit memos that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CreditmemoRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.SalesCreditmemoRepositoryV1ApiFetchParamCreator(configuration).salesCreditmemoRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Performs persist operations for a specified credit memo. * @param {any} [salesCreditmemoRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoRepositoryV1SavePost(salesCreditmemoRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.SalesCreditmemoRepositoryV1ApiFetchParamCreator(configuration).salesCreditmemoRepositoryV1SavePost(salesCreditmemoRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesCreditmemoRepositoryV1ApiFp = SalesCreditmemoRepositoryV1ApiFp; /** * SalesCreditmemoRepositoryV1Api - factory interface * @export */ const SalesCreditmemoRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Loads a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoRepositoryV1GetGet(id, options) { return exports.SalesCreditmemoRepositoryV1ApiFp(configuration).salesCreditmemoRepositoryV1GetGet(id, options)(fetch, basePath); }, /** * Lists credit memos that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CreditmemoRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesCreditmemoRepositoryV1ApiFp(configuration).salesCreditmemoRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Performs persist operations for a specified credit memo. * @param {any} [salesCreditmemoRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesCreditmemoRepositoryV1SavePost(salesCreditmemoRepositoryV1SavePostBody, options) { return exports.SalesCreditmemoRepositoryV1ApiFp(configuration).salesCreditmemoRepositoryV1SavePost(salesCreditmemoRepositoryV1SavePostBody, options)(fetch, basePath); }, }; }; exports.SalesCreditmemoRepositoryV1ApiFactory = SalesCreditmemoRepositoryV1ApiFactory; /** * SalesCreditmemoRepositoryV1Api - object-oriented interface * @export * @class SalesCreditmemoRepositoryV1Api * @extends {BaseAPI} */ class SalesCreditmemoRepositoryV1Api extends BaseAPI { /** * Loads a specified credit memo. * @param {number} id The credit memo ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesCreditmemoRepositoryV1Api */ salesCreditmemoRepositoryV1GetGet(id, options) { return exports.SalesCreditmemoRepositoryV1ApiFp(this.configuration).salesCreditmemoRepositoryV1GetGet(id, options)(this.fetch, this.basePath); } /** * Lists credit memos that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CreditmemoRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesCreditmemoRepositoryV1Api */ salesCreditmemoRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesCreditmemoRepositoryV1ApiFp(this.configuration).salesCreditmemoRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Performs persist operations for a specified credit memo. * @param {any} [salesCreditmemoRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesCreditmemoRepositoryV1Api */ salesCreditmemoRepositoryV1SavePost(salesCreditmemoRepositoryV1SavePostBody, options) { return exports.SalesCreditmemoRepositoryV1ApiFp(this.configuration).salesCreditmemoRepositoryV1SavePost(salesCreditmemoRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } } exports.SalesCreditmemoRepositoryV1Api = SalesCreditmemoRepositoryV1Api; /** * SalesInvoiceCommentRepositoryV1Api - fetch parameter creator * @export */ const SalesInvoiceCommentRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Performs persist operations for a specified invoice comment. * @param {any} [salesInvoiceCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceCommentRepositoryV1SavePost(salesInvoiceCommentRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/invoices/comments`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesInvoiceCommentRepositoryV1SavePostBody || {}) : (salesInvoiceCommentRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesInvoiceCommentRepositoryV1ApiFetchParamCreator = SalesInvoiceCommentRepositoryV1ApiFetchParamCreator; /** * SalesInvoiceCommentRepositoryV1Api - functional programming interface * @export */ const SalesInvoiceCommentRepositoryV1ApiFp = function (configuration) { return { /** * Performs persist operations for a specified invoice comment. * @param {any} [salesInvoiceCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceCommentRepositoryV1SavePost(salesInvoiceCommentRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.SalesInvoiceCommentRepositoryV1ApiFetchParamCreator(configuration).salesInvoiceCommentRepositoryV1SavePost(salesInvoiceCommentRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesInvoiceCommentRepositoryV1ApiFp = SalesInvoiceCommentRepositoryV1ApiFp; /** * SalesInvoiceCommentRepositoryV1Api - factory interface * @export */ const SalesInvoiceCommentRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Performs persist operations for a specified invoice comment. * @param {any} [salesInvoiceCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceCommentRepositoryV1SavePost(salesInvoiceCommentRepositoryV1SavePostBody, options) { return exports.SalesInvoiceCommentRepositoryV1ApiFp(configuration).salesInvoiceCommentRepositoryV1SavePost(salesInvoiceCommentRepositoryV1SavePostBody, options)(fetch, basePath); }, }; }; exports.SalesInvoiceCommentRepositoryV1ApiFactory = SalesInvoiceCommentRepositoryV1ApiFactory; /** * SalesInvoiceCommentRepositoryV1Api - object-oriented interface * @export * @class SalesInvoiceCommentRepositoryV1Api * @extends {BaseAPI} */ class SalesInvoiceCommentRepositoryV1Api extends BaseAPI { /** * Performs persist operations for a specified invoice comment. * @param {any} [salesInvoiceCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesInvoiceCommentRepositoryV1Api */ salesInvoiceCommentRepositoryV1SavePost(salesInvoiceCommentRepositoryV1SavePostBody, options) { return exports.SalesInvoiceCommentRepositoryV1ApiFp(this.configuration).salesInvoiceCommentRepositoryV1SavePost(salesInvoiceCommentRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } } exports.SalesInvoiceCommentRepositoryV1Api = SalesInvoiceCommentRepositoryV1Api; /** * SalesInvoiceManagementV1Api - fetch parameter creator * @export */ const SalesInvoiceManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Lists comments for a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1GetCommentsListGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesInvoiceManagementV1GetCommentsListGet.'); } const localVarPath = `/V1/invoices/{id}/comments` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Emails a user a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1NotifyPost(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesInvoiceManagementV1NotifyPost.'); } const localVarPath = `/V1/invoices/{id}/emails` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Sets invoice capture. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1SetCapturePost(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesInvoiceManagementV1SetCapturePost.'); } const localVarPath = `/V1/invoices/{id}/capture` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Voids a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1SetVoidPost(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesInvoiceManagementV1SetVoidPost.'); } const localVarPath = `/V1/invoices/{id}/void` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesInvoiceManagementV1ApiFetchParamCreator = SalesInvoiceManagementV1ApiFetchParamCreator; /** * SalesInvoiceManagementV1Api - functional programming interface * @export */ const SalesInvoiceManagementV1ApiFp = function (configuration) { return { /** * Lists comments for a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1GetCommentsListGet(id, options) { const localVarFetchArgs = exports.SalesInvoiceManagementV1ApiFetchParamCreator(configuration).salesInvoiceManagementV1GetCommentsListGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Emails a user a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1NotifyPost(id, options) { const localVarFetchArgs = exports.SalesInvoiceManagementV1ApiFetchParamCreator(configuration).salesInvoiceManagementV1NotifyPost(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Sets invoice capture. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1SetCapturePost(id, options) { const localVarFetchArgs = exports.SalesInvoiceManagementV1ApiFetchParamCreator(configuration).salesInvoiceManagementV1SetCapturePost(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Voids a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1SetVoidPost(id, options) { const localVarFetchArgs = exports.SalesInvoiceManagementV1ApiFetchParamCreator(configuration).salesInvoiceManagementV1SetVoidPost(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesInvoiceManagementV1ApiFp = SalesInvoiceManagementV1ApiFp; /** * SalesInvoiceManagementV1Api - factory interface * @export */ const SalesInvoiceManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Lists comments for a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1GetCommentsListGet(id, options) { return exports.SalesInvoiceManagementV1ApiFp(configuration).salesInvoiceManagementV1GetCommentsListGet(id, options)(fetch, basePath); }, /** * Emails a user a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1NotifyPost(id, options) { return exports.SalesInvoiceManagementV1ApiFp(configuration).salesInvoiceManagementV1NotifyPost(id, options)(fetch, basePath); }, /** * Sets invoice capture. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1SetCapturePost(id, options) { return exports.SalesInvoiceManagementV1ApiFp(configuration).salesInvoiceManagementV1SetCapturePost(id, options)(fetch, basePath); }, /** * Voids a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceManagementV1SetVoidPost(id, options) { return exports.SalesInvoiceManagementV1ApiFp(configuration).salesInvoiceManagementV1SetVoidPost(id, options)(fetch, basePath); }, }; }; exports.SalesInvoiceManagementV1ApiFactory = SalesInvoiceManagementV1ApiFactory; /** * SalesInvoiceManagementV1Api - object-oriented interface * @export * @class SalesInvoiceManagementV1Api * @extends {BaseAPI} */ class SalesInvoiceManagementV1Api extends BaseAPI { /** * Lists comments for a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesInvoiceManagementV1Api */ salesInvoiceManagementV1GetCommentsListGet(id, options) { return exports.SalesInvoiceManagementV1ApiFp(this.configuration).salesInvoiceManagementV1GetCommentsListGet(id, options)(this.fetch, this.basePath); } /** * Emails a user a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesInvoiceManagementV1Api */ salesInvoiceManagementV1NotifyPost(id, options) { return exports.SalesInvoiceManagementV1ApiFp(this.configuration).salesInvoiceManagementV1NotifyPost(id, options)(this.fetch, this.basePath); } /** * Sets invoice capture. * @param {number} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesInvoiceManagementV1Api */ salesInvoiceManagementV1SetCapturePost(id, options) { return exports.SalesInvoiceManagementV1ApiFp(this.configuration).salesInvoiceManagementV1SetCapturePost(id, options)(this.fetch, this.basePath); } /** * Voids a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesInvoiceManagementV1Api */ salesInvoiceManagementV1SetVoidPost(id, options) { return exports.SalesInvoiceManagementV1ApiFp(this.configuration).salesInvoiceManagementV1SetVoidPost(id, options)(this.fetch, this.basePath); } } exports.SalesInvoiceManagementV1Api = SalesInvoiceManagementV1Api; /** * SalesInvoiceOrderV1Api - fetch parameter creator * @export */ const SalesInvoiceOrderV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {number} orderId * @param {any} [salesInvoiceOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceOrderV1ExecutePost(orderId, salesInvoiceOrderV1ExecutePostBody, options = {}) { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { throw new RequiredError('orderId', 'Required parameter orderId was null or undefined when calling salesInvoiceOrderV1ExecutePost.'); } const localVarPath = `/V1/order/{orderId}/invoice` .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesInvoiceOrderV1ExecutePostBody || {}) : (salesInvoiceOrderV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesInvoiceOrderV1ApiFetchParamCreator = SalesInvoiceOrderV1ApiFetchParamCreator; /** * SalesInvoiceOrderV1Api - functional programming interface * @export */ const SalesInvoiceOrderV1ApiFp = function (configuration) { return { /** * * @param {number} orderId * @param {any} [salesInvoiceOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceOrderV1ExecutePost(orderId, salesInvoiceOrderV1ExecutePostBody, options) { const localVarFetchArgs = exports.SalesInvoiceOrderV1ApiFetchParamCreator(configuration).salesInvoiceOrderV1ExecutePost(orderId, salesInvoiceOrderV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesInvoiceOrderV1ApiFp = SalesInvoiceOrderV1ApiFp; /** * SalesInvoiceOrderV1Api - factory interface * @export */ const SalesInvoiceOrderV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {number} orderId * @param {any} [salesInvoiceOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceOrderV1ExecutePost(orderId, salesInvoiceOrderV1ExecutePostBody, options) { return exports.SalesInvoiceOrderV1ApiFp(configuration).salesInvoiceOrderV1ExecutePost(orderId, salesInvoiceOrderV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.SalesInvoiceOrderV1ApiFactory = SalesInvoiceOrderV1ApiFactory; /** * SalesInvoiceOrderV1Api - object-oriented interface * @export * @class SalesInvoiceOrderV1Api * @extends {BaseAPI} */ class SalesInvoiceOrderV1Api extends BaseAPI { /** * * @param {number} orderId * @param {any} [salesInvoiceOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesInvoiceOrderV1Api */ salesInvoiceOrderV1ExecutePost(orderId, salesInvoiceOrderV1ExecutePostBody, options) { return exports.SalesInvoiceOrderV1ApiFp(this.configuration).salesInvoiceOrderV1ExecutePost(orderId, salesInvoiceOrderV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.SalesInvoiceOrderV1Api = SalesInvoiceOrderV1Api; /** * SalesInvoiceRepositoryV1Api - fetch parameter creator * @export */ const SalesInvoiceRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Loads a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceRepositoryV1GetGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesInvoiceRepositoryV1GetGet.'); } const localVarPath = `/V1/invoices/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists invoices that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#InvoiceRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/invoices`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Performs persist operations for a specified invoice. * @param {any} [salesInvoiceRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceRepositoryV1SavePost(salesInvoiceRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/invoices/`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesInvoiceRepositoryV1SavePostBody || {}) : (salesInvoiceRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesInvoiceRepositoryV1ApiFetchParamCreator = SalesInvoiceRepositoryV1ApiFetchParamCreator; /** * SalesInvoiceRepositoryV1Api - functional programming interface * @export */ const SalesInvoiceRepositoryV1ApiFp = function (configuration) { return { /** * Loads a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceRepositoryV1GetGet(id, options) { const localVarFetchArgs = exports.SalesInvoiceRepositoryV1ApiFetchParamCreator(configuration).salesInvoiceRepositoryV1GetGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists invoices that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#InvoiceRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.SalesInvoiceRepositoryV1ApiFetchParamCreator(configuration).salesInvoiceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Performs persist operations for a specified invoice. * @param {any} [salesInvoiceRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceRepositoryV1SavePost(salesInvoiceRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.SalesInvoiceRepositoryV1ApiFetchParamCreator(configuration).salesInvoiceRepositoryV1SavePost(salesInvoiceRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesInvoiceRepositoryV1ApiFp = SalesInvoiceRepositoryV1ApiFp; /** * SalesInvoiceRepositoryV1Api - factory interface * @export */ const SalesInvoiceRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Loads a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceRepositoryV1GetGet(id, options) { return exports.SalesInvoiceRepositoryV1ApiFp(configuration).salesInvoiceRepositoryV1GetGet(id, options)(fetch, basePath); }, /** * Lists invoices that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#InvoiceRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesInvoiceRepositoryV1ApiFp(configuration).salesInvoiceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Performs persist operations for a specified invoice. * @param {any} [salesInvoiceRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesInvoiceRepositoryV1SavePost(salesInvoiceRepositoryV1SavePostBody, options) { return exports.SalesInvoiceRepositoryV1ApiFp(configuration).salesInvoiceRepositoryV1SavePost(salesInvoiceRepositoryV1SavePostBody, options)(fetch, basePath); }, }; }; exports.SalesInvoiceRepositoryV1ApiFactory = SalesInvoiceRepositoryV1ApiFactory; /** * SalesInvoiceRepositoryV1Api - object-oriented interface * @export * @class SalesInvoiceRepositoryV1Api * @extends {BaseAPI} */ class SalesInvoiceRepositoryV1Api extends BaseAPI { /** * Loads a specified invoice. * @param {number} id The invoice ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesInvoiceRepositoryV1Api */ salesInvoiceRepositoryV1GetGet(id, options) { return exports.SalesInvoiceRepositoryV1ApiFp(this.configuration).salesInvoiceRepositoryV1GetGet(id, options)(this.fetch, this.basePath); } /** * Lists invoices that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#InvoiceRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesInvoiceRepositoryV1Api */ salesInvoiceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesInvoiceRepositoryV1ApiFp(this.configuration).salesInvoiceRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Performs persist operations for a specified invoice. * @param {any} [salesInvoiceRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesInvoiceRepositoryV1Api */ salesInvoiceRepositoryV1SavePost(salesInvoiceRepositoryV1SavePostBody, options) { return exports.SalesInvoiceRepositoryV1ApiFp(this.configuration).salesInvoiceRepositoryV1SavePost(salesInvoiceRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } } exports.SalesInvoiceRepositoryV1Api = SalesInvoiceRepositoryV1Api; /** * SalesOrderAddressRepositoryV1Api - fetch parameter creator * @export */ const SalesOrderAddressRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Performs persist operations for a specified order address. * @param {string} parentId * @param {any} [salesOrderAddressRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderAddressRepositoryV1SavePut(parentId, salesOrderAddressRepositoryV1SavePutBody, options = {}) { // verify required parameter 'parentId' is not null or undefined if (parentId === null || parentId === undefined) { throw new RequiredError('parentId', 'Required parameter parentId was null or undefined when calling salesOrderAddressRepositoryV1SavePut.'); } const localVarPath = `/V1/orders/{parent_id}` .replace(`{${"parent_id"}}`, encodeURIComponent(String(parentId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesOrderAddressRepositoryV1SavePutBody || {}) : (salesOrderAddressRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesOrderAddressRepositoryV1ApiFetchParamCreator = SalesOrderAddressRepositoryV1ApiFetchParamCreator; /** * SalesOrderAddressRepositoryV1Api - functional programming interface * @export */ const SalesOrderAddressRepositoryV1ApiFp = function (configuration) { return { /** * Performs persist operations for a specified order address. * @param {string} parentId * @param {any} [salesOrderAddressRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderAddressRepositoryV1SavePut(parentId, salesOrderAddressRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.SalesOrderAddressRepositoryV1ApiFetchParamCreator(configuration).salesOrderAddressRepositoryV1SavePut(parentId, salesOrderAddressRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesOrderAddressRepositoryV1ApiFp = SalesOrderAddressRepositoryV1ApiFp; /** * SalesOrderAddressRepositoryV1Api - factory interface * @export */ const SalesOrderAddressRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Performs persist operations for a specified order address. * @param {string} parentId * @param {any} [salesOrderAddressRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderAddressRepositoryV1SavePut(parentId, salesOrderAddressRepositoryV1SavePutBody, options) { return exports.SalesOrderAddressRepositoryV1ApiFp(configuration).salesOrderAddressRepositoryV1SavePut(parentId, salesOrderAddressRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.SalesOrderAddressRepositoryV1ApiFactory = SalesOrderAddressRepositoryV1ApiFactory; /** * SalesOrderAddressRepositoryV1Api - object-oriented interface * @export * @class SalesOrderAddressRepositoryV1Api * @extends {BaseAPI} */ class SalesOrderAddressRepositoryV1Api extends BaseAPI { /** * Performs persist operations for a specified order address. * @param {string} parentId * @param {any} [salesOrderAddressRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderAddressRepositoryV1Api */ salesOrderAddressRepositoryV1SavePut(parentId, salesOrderAddressRepositoryV1SavePutBody, options) { return exports.SalesOrderAddressRepositoryV1ApiFp(this.configuration).salesOrderAddressRepositoryV1SavePut(parentId, salesOrderAddressRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.SalesOrderAddressRepositoryV1Api = SalesOrderAddressRepositoryV1Api; /** * SalesOrderItemRepositoryV1Api - fetch parameter creator * @export */ const SalesOrderItemRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Loads a specified order item. * @param {number} id The order item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderItemRepositoryV1GetGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesOrderItemRepositoryV1GetGet.'); } const localVarPath = `/V1/orders/items/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists order items that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#OrderItemRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/orders/items`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesOrderItemRepositoryV1ApiFetchParamCreator = SalesOrderItemRepositoryV1ApiFetchParamCreator; /** * SalesOrderItemRepositoryV1Api - functional programming interface * @export */ const SalesOrderItemRepositoryV1ApiFp = function (configuration) { return { /** * Loads a specified order item. * @param {number} id The order item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderItemRepositoryV1GetGet(id, options) { const localVarFetchArgs = exports.SalesOrderItemRepositoryV1ApiFetchParamCreator(configuration).salesOrderItemRepositoryV1GetGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists order items that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#OrderItemRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.SalesOrderItemRepositoryV1ApiFetchParamCreator(configuration).salesOrderItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesOrderItemRepositoryV1ApiFp = SalesOrderItemRepositoryV1ApiFp; /** * SalesOrderItemRepositoryV1Api - factory interface * @export */ const SalesOrderItemRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Loads a specified order item. * @param {number} id The order item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderItemRepositoryV1GetGet(id, options) { return exports.SalesOrderItemRepositoryV1ApiFp(configuration).salesOrderItemRepositoryV1GetGet(id, options)(fetch, basePath); }, /** * Lists order items that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#OrderItemRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesOrderItemRepositoryV1ApiFp(configuration).salesOrderItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.SalesOrderItemRepositoryV1ApiFactory = SalesOrderItemRepositoryV1ApiFactory; /** * SalesOrderItemRepositoryV1Api - object-oriented interface * @export * @class SalesOrderItemRepositoryV1Api * @extends {BaseAPI} */ class SalesOrderItemRepositoryV1Api extends BaseAPI { /** * Loads a specified order item. * @param {number} id The order item ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderItemRepositoryV1Api */ salesOrderItemRepositoryV1GetGet(id, options) { return exports.SalesOrderItemRepositoryV1ApiFp(this.configuration).salesOrderItemRepositoryV1GetGet(id, options)(this.fetch, this.basePath); } /** * Lists order items that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#OrderItemRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderItemRepositoryV1Api */ salesOrderItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesOrderItemRepositoryV1ApiFp(this.configuration).salesOrderItemRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.SalesOrderItemRepositoryV1Api = SalesOrderItemRepositoryV1Api; /** * SalesOrderManagementV1Api - fetch parameter creator * @export */ const SalesOrderManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Adds a comment to a specified order. * @param {number} id The order ID. * @param {any} [salesOrderManagementV1AddCommentPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1AddCommentPost(id, salesOrderManagementV1AddCommentPostBody, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesOrderManagementV1AddCommentPost.'); } const localVarPath = `/V1/orders/{id}/comments` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesOrderManagementV1AddCommentPostBody || {}) : (salesOrderManagementV1AddCommentPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Cancels a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1CancelPost(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesOrderManagementV1CancelPost.'); } const localVarPath = `/V1/orders/{id}/cancel` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists comments for a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1GetCommentsListGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesOrderManagementV1GetCommentsListGet.'); } const localVarPath = `/V1/orders/{id}/comments` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets the status for a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1GetStatusGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesOrderManagementV1GetStatusGet.'); } const localVarPath = `/V1/orders/{id}/statuses` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Holds a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1HoldPost(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesOrderManagementV1HoldPost.'); } const localVarPath = `/V1/orders/{id}/hold` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Emails a user a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1NotifyPost(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesOrderManagementV1NotifyPost.'); } const localVarPath = `/V1/orders/{id}/emails` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Releases a specified order from hold status. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1UnHoldPost(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesOrderManagementV1UnHoldPost.'); } const localVarPath = `/V1/orders/{id}/unhold` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesOrderManagementV1ApiFetchParamCreator = SalesOrderManagementV1ApiFetchParamCreator; /** * SalesOrderManagementV1Api - functional programming interface * @export */ const SalesOrderManagementV1ApiFp = function (configuration) { return { /** * Adds a comment to a specified order. * @param {number} id The order ID. * @param {any} [salesOrderManagementV1AddCommentPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1AddCommentPost(id, salesOrderManagementV1AddCommentPostBody, options) { const localVarFetchArgs = exports.SalesOrderManagementV1ApiFetchParamCreator(configuration).salesOrderManagementV1AddCommentPost(id, salesOrderManagementV1AddCommentPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Cancels a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1CancelPost(id, options) { const localVarFetchArgs = exports.SalesOrderManagementV1ApiFetchParamCreator(configuration).salesOrderManagementV1CancelPost(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists comments for a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1GetCommentsListGet(id, options) { const localVarFetchArgs = exports.SalesOrderManagementV1ApiFetchParamCreator(configuration).salesOrderManagementV1GetCommentsListGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Gets the status for a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1GetStatusGet(id, options) { const localVarFetchArgs = exports.SalesOrderManagementV1ApiFetchParamCreator(configuration).salesOrderManagementV1GetStatusGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Holds a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1HoldPost(id, options) { const localVarFetchArgs = exports.SalesOrderManagementV1ApiFetchParamCreator(configuration).salesOrderManagementV1HoldPost(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Emails a user a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1NotifyPost(id, options) { const localVarFetchArgs = exports.SalesOrderManagementV1ApiFetchParamCreator(configuration).salesOrderManagementV1NotifyPost(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Releases a specified order from hold status. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1UnHoldPost(id, options) { const localVarFetchArgs = exports.SalesOrderManagementV1ApiFetchParamCreator(configuration).salesOrderManagementV1UnHoldPost(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesOrderManagementV1ApiFp = SalesOrderManagementV1ApiFp; /** * SalesOrderManagementV1Api - factory interface * @export */ const SalesOrderManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Adds a comment to a specified order. * @param {number} id The order ID. * @param {any} [salesOrderManagementV1AddCommentPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1AddCommentPost(id, salesOrderManagementV1AddCommentPostBody, options) { return exports.SalesOrderManagementV1ApiFp(configuration).salesOrderManagementV1AddCommentPost(id, salesOrderManagementV1AddCommentPostBody, options)(fetch, basePath); }, /** * Cancels a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1CancelPost(id, options) { return exports.SalesOrderManagementV1ApiFp(configuration).salesOrderManagementV1CancelPost(id, options)(fetch, basePath); }, /** * Lists comments for a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1GetCommentsListGet(id, options) { return exports.SalesOrderManagementV1ApiFp(configuration).salesOrderManagementV1GetCommentsListGet(id, options)(fetch, basePath); }, /** * Gets the status for a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1GetStatusGet(id, options) { return exports.SalesOrderManagementV1ApiFp(configuration).salesOrderManagementV1GetStatusGet(id, options)(fetch, basePath); }, /** * Holds a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1HoldPost(id, options) { return exports.SalesOrderManagementV1ApiFp(configuration).salesOrderManagementV1HoldPost(id, options)(fetch, basePath); }, /** * Emails a user a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1NotifyPost(id, options) { return exports.SalesOrderManagementV1ApiFp(configuration).salesOrderManagementV1NotifyPost(id, options)(fetch, basePath); }, /** * Releases a specified order from hold status. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderManagementV1UnHoldPost(id, options) { return exports.SalesOrderManagementV1ApiFp(configuration).salesOrderManagementV1UnHoldPost(id, options)(fetch, basePath); }, }; }; exports.SalesOrderManagementV1ApiFactory = SalesOrderManagementV1ApiFactory; /** * SalesOrderManagementV1Api - object-oriented interface * @export * @class SalesOrderManagementV1Api * @extends {BaseAPI} */ class SalesOrderManagementV1Api extends BaseAPI { /** * Adds a comment to a specified order. * @param {number} id The order ID. * @param {any} [salesOrderManagementV1AddCommentPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderManagementV1Api */ salesOrderManagementV1AddCommentPost(id, salesOrderManagementV1AddCommentPostBody, options) { return exports.SalesOrderManagementV1ApiFp(this.configuration).salesOrderManagementV1AddCommentPost(id, salesOrderManagementV1AddCommentPostBody, options)(this.fetch, this.basePath); } /** * Cancels a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderManagementV1Api */ salesOrderManagementV1CancelPost(id, options) { return exports.SalesOrderManagementV1ApiFp(this.configuration).salesOrderManagementV1CancelPost(id, options)(this.fetch, this.basePath); } /** * Lists comments for a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderManagementV1Api */ salesOrderManagementV1GetCommentsListGet(id, options) { return exports.SalesOrderManagementV1ApiFp(this.configuration).salesOrderManagementV1GetCommentsListGet(id, options)(this.fetch, this.basePath); } /** * Gets the status for a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderManagementV1Api */ salesOrderManagementV1GetStatusGet(id, options) { return exports.SalesOrderManagementV1ApiFp(this.configuration).salesOrderManagementV1GetStatusGet(id, options)(this.fetch, this.basePath); } /** * Holds a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderManagementV1Api */ salesOrderManagementV1HoldPost(id, options) { return exports.SalesOrderManagementV1ApiFp(this.configuration).salesOrderManagementV1HoldPost(id, options)(this.fetch, this.basePath); } /** * Emails a user a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderManagementV1Api */ salesOrderManagementV1NotifyPost(id, options) { return exports.SalesOrderManagementV1ApiFp(this.configuration).salesOrderManagementV1NotifyPost(id, options)(this.fetch, this.basePath); } /** * Releases a specified order from hold status. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderManagementV1Api */ salesOrderManagementV1UnHoldPost(id, options) { return exports.SalesOrderManagementV1ApiFp(this.configuration).salesOrderManagementV1UnHoldPost(id, options)(this.fetch, this.basePath); } } exports.SalesOrderManagementV1Api = SalesOrderManagementV1Api; /** * SalesOrderRepositoryV1Api - fetch parameter creator * @export */ const SalesOrderRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Loads a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1GetGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesOrderRepositoryV1GetGet.'); } const localVarPath = `/V1/orders/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists orders that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#OrderRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/orders`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Performs persist operations for a specified order. * @param {any} [salesOrderRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1SavePost(salesOrderRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/orders`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesOrderRepositoryV1SavePostBody || {}) : (salesOrderRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Performs persist operations for a specified order. * @param {any} [salesOrderRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1SavePut(salesOrderRepositoryV1SavePutBody, options = {}) { const localVarPath = `/V1/orders/create`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesOrderRepositoryV1SavePutBody || {}) : (salesOrderRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesOrderRepositoryV1ApiFetchParamCreator = SalesOrderRepositoryV1ApiFetchParamCreator; /** * SalesOrderRepositoryV1Api - functional programming interface * @export */ const SalesOrderRepositoryV1ApiFp = function (configuration) { return { /** * Loads a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1GetGet(id, options) { const localVarFetchArgs = exports.SalesOrderRepositoryV1ApiFetchParamCreator(configuration).salesOrderRepositoryV1GetGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists orders that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#OrderRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.SalesOrderRepositoryV1ApiFetchParamCreator(configuration).salesOrderRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Performs persist operations for a specified order. * @param {any} [salesOrderRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1SavePost(salesOrderRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.SalesOrderRepositoryV1ApiFetchParamCreator(configuration).salesOrderRepositoryV1SavePost(salesOrderRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Performs persist operations for a specified order. * @param {any} [salesOrderRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1SavePut(salesOrderRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.SalesOrderRepositoryV1ApiFetchParamCreator(configuration).salesOrderRepositoryV1SavePut(salesOrderRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesOrderRepositoryV1ApiFp = SalesOrderRepositoryV1ApiFp; /** * SalesOrderRepositoryV1Api - factory interface * @export */ const SalesOrderRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Loads a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1GetGet(id, options) { return exports.SalesOrderRepositoryV1ApiFp(configuration).salesOrderRepositoryV1GetGet(id, options)(fetch, basePath); }, /** * Lists orders that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#OrderRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesOrderRepositoryV1ApiFp(configuration).salesOrderRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Performs persist operations for a specified order. * @param {any} [salesOrderRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1SavePost(salesOrderRepositoryV1SavePostBody, options) { return exports.SalesOrderRepositoryV1ApiFp(configuration).salesOrderRepositoryV1SavePost(salesOrderRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Performs persist operations for a specified order. * @param {any} [salesOrderRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesOrderRepositoryV1SavePut(salesOrderRepositoryV1SavePutBody, options) { return exports.SalesOrderRepositoryV1ApiFp(configuration).salesOrderRepositoryV1SavePut(salesOrderRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.SalesOrderRepositoryV1ApiFactory = SalesOrderRepositoryV1ApiFactory; /** * SalesOrderRepositoryV1Api - object-oriented interface * @export * @class SalesOrderRepositoryV1Api * @extends {BaseAPI} */ class SalesOrderRepositoryV1Api extends BaseAPI { /** * Loads a specified order. * @param {number} id The order ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderRepositoryV1Api */ salesOrderRepositoryV1GetGet(id, options) { return exports.SalesOrderRepositoryV1ApiFp(this.configuration).salesOrderRepositoryV1GetGet(id, options)(this.fetch, this.basePath); } /** * Lists orders that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#OrderRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderRepositoryV1Api */ salesOrderRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesOrderRepositoryV1ApiFp(this.configuration).salesOrderRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Performs persist operations for a specified order. * @param {any} [salesOrderRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderRepositoryV1Api */ salesOrderRepositoryV1SavePost(salesOrderRepositoryV1SavePostBody, options) { return exports.SalesOrderRepositoryV1ApiFp(this.configuration).salesOrderRepositoryV1SavePost(salesOrderRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Performs persist operations for a specified order. * @param {any} [salesOrderRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesOrderRepositoryV1Api */ salesOrderRepositoryV1SavePut(salesOrderRepositoryV1SavePutBody, options) { return exports.SalesOrderRepositoryV1ApiFp(this.configuration).salesOrderRepositoryV1SavePut(salesOrderRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.SalesOrderRepositoryV1Api = SalesOrderRepositoryV1Api; /** * SalesRefundInvoiceV1Api - fetch parameter creator * @export */ const SalesRefundInvoiceV1ApiFetchParamCreator = function (configuration) { return { /** * Create refund for invoice * @param {number} invoiceId * @param {any} [salesRefundInvoiceV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRefundInvoiceV1ExecutePost(invoiceId, salesRefundInvoiceV1ExecutePostBody, options = {}) { // verify required parameter 'invoiceId' is not null or undefined if (invoiceId === null || invoiceId === undefined) { throw new RequiredError('invoiceId', 'Required parameter invoiceId was null or undefined when calling salesRefundInvoiceV1ExecutePost.'); } const localVarPath = `/V1/invoice/{invoiceId}/refund` .replace(`{${"invoiceId"}}`, encodeURIComponent(String(invoiceId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesRefundInvoiceV1ExecutePostBody || {}) : (salesRefundInvoiceV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesRefundInvoiceV1ApiFetchParamCreator = SalesRefundInvoiceV1ApiFetchParamCreator; /** * SalesRefundInvoiceV1Api - functional programming interface * @export */ const SalesRefundInvoiceV1ApiFp = function (configuration) { return { /** * Create refund for invoice * @param {number} invoiceId * @param {any} [salesRefundInvoiceV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRefundInvoiceV1ExecutePost(invoiceId, salesRefundInvoiceV1ExecutePostBody, options) { const localVarFetchArgs = exports.SalesRefundInvoiceV1ApiFetchParamCreator(configuration).salesRefundInvoiceV1ExecutePost(invoiceId, salesRefundInvoiceV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesRefundInvoiceV1ApiFp = SalesRefundInvoiceV1ApiFp; /** * SalesRefundInvoiceV1Api - factory interface * @export */ const SalesRefundInvoiceV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Create refund for invoice * @param {number} invoiceId * @param {any} [salesRefundInvoiceV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRefundInvoiceV1ExecutePost(invoiceId, salesRefundInvoiceV1ExecutePostBody, options) { return exports.SalesRefundInvoiceV1ApiFp(configuration).salesRefundInvoiceV1ExecutePost(invoiceId, salesRefundInvoiceV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.SalesRefundInvoiceV1ApiFactory = SalesRefundInvoiceV1ApiFactory; /** * SalesRefundInvoiceV1Api - object-oriented interface * @export * @class SalesRefundInvoiceV1Api * @extends {BaseAPI} */ class SalesRefundInvoiceV1Api extends BaseAPI { /** * Create refund for invoice * @param {number} invoiceId * @param {any} [salesRefundInvoiceV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRefundInvoiceV1Api */ salesRefundInvoiceV1ExecutePost(invoiceId, salesRefundInvoiceV1ExecutePostBody, options) { return exports.SalesRefundInvoiceV1ApiFp(this.configuration).salesRefundInvoiceV1ExecutePost(invoiceId, salesRefundInvoiceV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.SalesRefundInvoiceV1Api = SalesRefundInvoiceV1Api; /** * SalesRefundOrderV1Api - fetch parameter creator * @export */ const SalesRefundOrderV1ApiFetchParamCreator = function (configuration) { return { /** * Create offline refund for order * @param {number} orderId * @param {any} [salesRefundOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRefundOrderV1ExecutePost(orderId, salesRefundOrderV1ExecutePostBody, options = {}) { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { throw new RequiredError('orderId', 'Required parameter orderId was null or undefined when calling salesRefundOrderV1ExecutePost.'); } const localVarPath = `/V1/order/{orderId}/refund` .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesRefundOrderV1ExecutePostBody || {}) : (salesRefundOrderV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesRefundOrderV1ApiFetchParamCreator = SalesRefundOrderV1ApiFetchParamCreator; /** * SalesRefundOrderV1Api - functional programming interface * @export */ const SalesRefundOrderV1ApiFp = function (configuration) { return { /** * Create offline refund for order * @param {number} orderId * @param {any} [salesRefundOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRefundOrderV1ExecutePost(orderId, salesRefundOrderV1ExecutePostBody, options) { const localVarFetchArgs = exports.SalesRefundOrderV1ApiFetchParamCreator(configuration).salesRefundOrderV1ExecutePost(orderId, salesRefundOrderV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesRefundOrderV1ApiFp = SalesRefundOrderV1ApiFp; /** * SalesRefundOrderV1Api - factory interface * @export */ const SalesRefundOrderV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Create offline refund for order * @param {number} orderId * @param {any} [salesRefundOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRefundOrderV1ExecutePost(orderId, salesRefundOrderV1ExecutePostBody, options) { return exports.SalesRefundOrderV1ApiFp(configuration).salesRefundOrderV1ExecutePost(orderId, salesRefundOrderV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.SalesRefundOrderV1ApiFactory = SalesRefundOrderV1ApiFactory; /** * SalesRefundOrderV1Api - object-oriented interface * @export * @class SalesRefundOrderV1Api * @extends {BaseAPI} */ class SalesRefundOrderV1Api extends BaseAPI { /** * Create offline refund for order * @param {number} orderId * @param {any} [salesRefundOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRefundOrderV1Api */ salesRefundOrderV1ExecutePost(orderId, salesRefundOrderV1ExecutePostBody, options) { return exports.SalesRefundOrderV1ApiFp(this.configuration).salesRefundOrderV1ExecutePost(orderId, salesRefundOrderV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.SalesRefundOrderV1Api = SalesRefundOrderV1Api; /** * SalesRuleCouponManagementV1Api - fetch parameter creator * @export */ const SalesRuleCouponManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Delete coupon by coupon codes. * @param {any} [salesRuleCouponManagementV1DeleteByCodesPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponManagementV1DeleteByCodesPost(salesRuleCouponManagementV1DeleteByCodesPostBody, options = {}) { const localVarPath = `/V1/coupons/deleteByCodes`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesRuleCouponManagementV1DeleteByCodesPostBody || {}) : (salesRuleCouponManagementV1DeleteByCodesPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Delete coupon by coupon ids. * @param {any} [salesRuleCouponManagementV1DeleteByIdsPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponManagementV1DeleteByIdsPost(salesRuleCouponManagementV1DeleteByIdsPostBody, options = {}) { const localVarPath = `/V1/coupons/deleteByIds`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesRuleCouponManagementV1DeleteByIdsPostBody || {}) : (salesRuleCouponManagementV1DeleteByIdsPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Generate coupon for a rule * @param {any} [salesRuleCouponManagementV1GeneratePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponManagementV1GeneratePost(salesRuleCouponManagementV1GeneratePostBody, options = {}) { const localVarPath = `/V1/coupons/generate`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesRuleCouponManagementV1GeneratePostBody || {}) : (salesRuleCouponManagementV1GeneratePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesRuleCouponManagementV1ApiFetchParamCreator = SalesRuleCouponManagementV1ApiFetchParamCreator; /** * SalesRuleCouponManagementV1Api - functional programming interface * @export */ const SalesRuleCouponManagementV1ApiFp = function (configuration) { return { /** * Delete coupon by coupon codes. * @param {any} [salesRuleCouponManagementV1DeleteByCodesPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponManagementV1DeleteByCodesPost(salesRuleCouponManagementV1DeleteByCodesPostBody, options) { const localVarFetchArgs = exports.SalesRuleCouponManagementV1ApiFetchParamCreator(configuration).salesRuleCouponManagementV1DeleteByCodesPost(salesRuleCouponManagementV1DeleteByCodesPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Delete coupon by coupon ids. * @param {any} [salesRuleCouponManagementV1DeleteByIdsPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponManagementV1DeleteByIdsPost(salesRuleCouponManagementV1DeleteByIdsPostBody, options) { const localVarFetchArgs = exports.SalesRuleCouponManagementV1ApiFetchParamCreator(configuration).salesRuleCouponManagementV1DeleteByIdsPost(salesRuleCouponManagementV1DeleteByIdsPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Generate coupon for a rule * @param {any} [salesRuleCouponManagementV1GeneratePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponManagementV1GeneratePost(salesRuleCouponManagementV1GeneratePostBody, options) { const localVarFetchArgs = exports.SalesRuleCouponManagementV1ApiFetchParamCreator(configuration).salesRuleCouponManagementV1GeneratePost(salesRuleCouponManagementV1GeneratePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesRuleCouponManagementV1ApiFp = SalesRuleCouponManagementV1ApiFp; /** * SalesRuleCouponManagementV1Api - factory interface * @export */ const SalesRuleCouponManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete coupon by coupon codes. * @param {any} [salesRuleCouponManagementV1DeleteByCodesPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponManagementV1DeleteByCodesPost(salesRuleCouponManagementV1DeleteByCodesPostBody, options) { return exports.SalesRuleCouponManagementV1ApiFp(configuration).salesRuleCouponManagementV1DeleteByCodesPost(salesRuleCouponManagementV1DeleteByCodesPostBody, options)(fetch, basePath); }, /** * Delete coupon by coupon ids. * @param {any} [salesRuleCouponManagementV1DeleteByIdsPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponManagementV1DeleteByIdsPost(salesRuleCouponManagementV1DeleteByIdsPostBody, options) { return exports.SalesRuleCouponManagementV1ApiFp(configuration).salesRuleCouponManagementV1DeleteByIdsPost(salesRuleCouponManagementV1DeleteByIdsPostBody, options)(fetch, basePath); }, /** * Generate coupon for a rule * @param {any} [salesRuleCouponManagementV1GeneratePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponManagementV1GeneratePost(salesRuleCouponManagementV1GeneratePostBody, options) { return exports.SalesRuleCouponManagementV1ApiFp(configuration).salesRuleCouponManagementV1GeneratePost(salesRuleCouponManagementV1GeneratePostBody, options)(fetch, basePath); }, }; }; exports.SalesRuleCouponManagementV1ApiFactory = SalesRuleCouponManagementV1ApiFactory; /** * SalesRuleCouponManagementV1Api - object-oriented interface * @export * @class SalesRuleCouponManagementV1Api * @extends {BaseAPI} */ class SalesRuleCouponManagementV1Api extends BaseAPI { /** * Delete coupon by coupon codes. * @param {any} [salesRuleCouponManagementV1DeleteByCodesPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleCouponManagementV1Api */ salesRuleCouponManagementV1DeleteByCodesPost(salesRuleCouponManagementV1DeleteByCodesPostBody, options) { return exports.SalesRuleCouponManagementV1ApiFp(this.configuration).salesRuleCouponManagementV1DeleteByCodesPost(salesRuleCouponManagementV1DeleteByCodesPostBody, options)(this.fetch, this.basePath); } /** * Delete coupon by coupon ids. * @param {any} [salesRuleCouponManagementV1DeleteByIdsPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleCouponManagementV1Api */ salesRuleCouponManagementV1DeleteByIdsPost(salesRuleCouponManagementV1DeleteByIdsPostBody, options) { return exports.SalesRuleCouponManagementV1ApiFp(this.configuration).salesRuleCouponManagementV1DeleteByIdsPost(salesRuleCouponManagementV1DeleteByIdsPostBody, options)(this.fetch, this.basePath); } /** * Generate coupon for a rule * @param {any} [salesRuleCouponManagementV1GeneratePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleCouponManagementV1Api */ salesRuleCouponManagementV1GeneratePost(salesRuleCouponManagementV1GeneratePostBody, options) { return exports.SalesRuleCouponManagementV1ApiFp(this.configuration).salesRuleCouponManagementV1GeneratePost(salesRuleCouponManagementV1GeneratePostBody, options)(this.fetch, this.basePath); } } exports.SalesRuleCouponManagementV1Api = SalesRuleCouponManagementV1Api; /** * SalesRuleCouponRepositoryV1Api - fetch parameter creator * @export */ const SalesRuleCouponRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete coupon by coupon id. * @param {number} couponId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1DeleteByIdDelete(couponId, options = {}) { // verify required parameter 'couponId' is not null or undefined if (couponId === null || couponId === undefined) { throw new RequiredError('couponId', 'Required parameter couponId was null or undefined when calling salesRuleCouponRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/coupons/{couponId}` .replace(`{${"couponId"}}`, encodeURIComponent(String(couponId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get coupon by coupon id. * @param {number} couponId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1GetByIdGet(couponId, options = {}) { // verify required parameter 'couponId' is not null or undefined if (couponId === null || couponId === undefined) { throw new RequiredError('couponId', 'Required parameter couponId was null or undefined when calling salesRuleCouponRepositoryV1GetByIdGet.'); } const localVarPath = `/V1/coupons/{couponId}` .replace(`{${"couponId"}}`, encodeURIComponent(String(couponId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve a coupon using the specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CouponRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/coupons/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save a coupon. * @param {any} [salesRuleCouponRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1SavePost(salesRuleCouponRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/coupons`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesRuleCouponRepositoryV1SavePostBody || {}) : (salesRuleCouponRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save a coupon. * @param {string} couponId * @param {any} [salesRuleCouponRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1SavePut(couponId, salesRuleCouponRepositoryV1SavePutBody, options = {}) { // verify required parameter 'couponId' is not null or undefined if (couponId === null || couponId === undefined) { throw new RequiredError('couponId', 'Required parameter couponId was null or undefined when calling salesRuleCouponRepositoryV1SavePut.'); } const localVarPath = `/V1/coupons/{couponId}` .replace(`{${"couponId"}}`, encodeURIComponent(String(couponId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesRuleCouponRepositoryV1SavePutBody || {}) : (salesRuleCouponRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesRuleCouponRepositoryV1ApiFetchParamCreator = SalesRuleCouponRepositoryV1ApiFetchParamCreator; /** * SalesRuleCouponRepositoryV1Api - functional programming interface * @export */ const SalesRuleCouponRepositoryV1ApiFp = function (configuration) { return { /** * Delete coupon by coupon id. * @param {number} couponId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1DeleteByIdDelete(couponId, options) { const localVarFetchArgs = exports.SalesRuleCouponRepositoryV1ApiFetchParamCreator(configuration).salesRuleCouponRepositoryV1DeleteByIdDelete(couponId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get coupon by coupon id. * @param {number} couponId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1GetByIdGet(couponId, options) { const localVarFetchArgs = exports.SalesRuleCouponRepositoryV1ApiFetchParamCreator(configuration).salesRuleCouponRepositoryV1GetByIdGet(couponId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve a coupon using the specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CouponRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.SalesRuleCouponRepositoryV1ApiFetchParamCreator(configuration).salesRuleCouponRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save a coupon. * @param {any} [salesRuleCouponRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1SavePost(salesRuleCouponRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.SalesRuleCouponRepositoryV1ApiFetchParamCreator(configuration).salesRuleCouponRepositoryV1SavePost(salesRuleCouponRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save a coupon. * @param {string} couponId * @param {any} [salesRuleCouponRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1SavePut(couponId, salesRuleCouponRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.SalesRuleCouponRepositoryV1ApiFetchParamCreator(configuration).salesRuleCouponRepositoryV1SavePut(couponId, salesRuleCouponRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesRuleCouponRepositoryV1ApiFp = SalesRuleCouponRepositoryV1ApiFp; /** * SalesRuleCouponRepositoryV1Api - factory interface * @export */ const SalesRuleCouponRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete coupon by coupon id. * @param {number} couponId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1DeleteByIdDelete(couponId, options) { return exports.SalesRuleCouponRepositoryV1ApiFp(configuration).salesRuleCouponRepositoryV1DeleteByIdDelete(couponId, options)(fetch, basePath); }, /** * Get coupon by coupon id. * @param {number} couponId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1GetByIdGet(couponId, options) { return exports.SalesRuleCouponRepositoryV1ApiFp(configuration).salesRuleCouponRepositoryV1GetByIdGet(couponId, options)(fetch, basePath); }, /** * Retrieve a coupon using the specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CouponRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesRuleCouponRepositoryV1ApiFp(configuration).salesRuleCouponRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save a coupon. * @param {any} [salesRuleCouponRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1SavePost(salesRuleCouponRepositoryV1SavePostBody, options) { return exports.SalesRuleCouponRepositoryV1ApiFp(configuration).salesRuleCouponRepositoryV1SavePost(salesRuleCouponRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save a coupon. * @param {string} couponId * @param {any} [salesRuleCouponRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleCouponRepositoryV1SavePut(couponId, salesRuleCouponRepositoryV1SavePutBody, options) { return exports.SalesRuleCouponRepositoryV1ApiFp(configuration).salesRuleCouponRepositoryV1SavePut(couponId, salesRuleCouponRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.SalesRuleCouponRepositoryV1ApiFactory = SalesRuleCouponRepositoryV1ApiFactory; /** * SalesRuleCouponRepositoryV1Api - object-oriented interface * @export * @class SalesRuleCouponRepositoryV1Api * @extends {BaseAPI} */ class SalesRuleCouponRepositoryV1Api extends BaseAPI { /** * Delete coupon by coupon id. * @param {number} couponId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleCouponRepositoryV1Api */ salesRuleCouponRepositoryV1DeleteByIdDelete(couponId, options) { return exports.SalesRuleCouponRepositoryV1ApiFp(this.configuration).salesRuleCouponRepositoryV1DeleteByIdDelete(couponId, options)(this.fetch, this.basePath); } /** * Get coupon by coupon id. * @param {number} couponId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleCouponRepositoryV1Api */ salesRuleCouponRepositoryV1GetByIdGet(couponId, options) { return exports.SalesRuleCouponRepositoryV1ApiFp(this.configuration).salesRuleCouponRepositoryV1GetByIdGet(couponId, options)(this.fetch, this.basePath); } /** * Retrieve a coupon using the specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#CouponRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleCouponRepositoryV1Api */ salesRuleCouponRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesRuleCouponRepositoryV1ApiFp(this.configuration).salesRuleCouponRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save a coupon. * @param {any} [salesRuleCouponRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleCouponRepositoryV1Api */ salesRuleCouponRepositoryV1SavePost(salesRuleCouponRepositoryV1SavePostBody, options) { return exports.SalesRuleCouponRepositoryV1ApiFp(this.configuration).salesRuleCouponRepositoryV1SavePost(salesRuleCouponRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save a coupon. * @param {string} couponId * @param {any} [salesRuleCouponRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleCouponRepositoryV1Api */ salesRuleCouponRepositoryV1SavePut(couponId, salesRuleCouponRepositoryV1SavePutBody, options) { return exports.SalesRuleCouponRepositoryV1ApiFp(this.configuration).salesRuleCouponRepositoryV1SavePut(couponId, salesRuleCouponRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.SalesRuleCouponRepositoryV1Api = SalesRuleCouponRepositoryV1Api; /** * SalesRuleRuleRepositoryV1Api - fetch parameter creator * @export */ const SalesRuleRuleRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete rule by ID. * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1DeleteByIdDelete(ruleId, options = {}) { // verify required parameter 'ruleId' is not null or undefined if (ruleId === null || ruleId === undefined) { throw new RequiredError('ruleId', 'Required parameter ruleId was null or undefined when calling salesRuleRuleRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/salesRules/{ruleId}` .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get rule by ID. * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1GetByIdGet(ruleId, options = {}) { // verify required parameter 'ruleId' is not null or undefined if (ruleId === null || ruleId === undefined) { throw new RequiredError('ruleId', 'Required parameter ruleId was null or undefined when calling salesRuleRuleRepositoryV1GetByIdGet.'); } const localVarPath = `/V1/salesRules/{ruleId}` .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve sales rules that match te specified criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#RuleRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/salesRules/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save sales rule. * @param {any} [salesRuleRuleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1SavePost(salesRuleRuleRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/salesRules`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesRuleRuleRepositoryV1SavePostBody || {}) : (salesRuleRuleRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save sales rule. * @param {string} ruleId * @param {any} [salesRuleRuleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1SavePut(ruleId, salesRuleRuleRepositoryV1SavePutBody, options = {}) { // verify required parameter 'ruleId' is not null or undefined if (ruleId === null || ruleId === undefined) { throw new RequiredError('ruleId', 'Required parameter ruleId was null or undefined when calling salesRuleRuleRepositoryV1SavePut.'); } const localVarPath = `/V1/salesRules/{ruleId}` .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesRuleRuleRepositoryV1SavePutBody || {}) : (salesRuleRuleRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesRuleRuleRepositoryV1ApiFetchParamCreator = SalesRuleRuleRepositoryV1ApiFetchParamCreator; /** * SalesRuleRuleRepositoryV1Api - functional programming interface * @export */ const SalesRuleRuleRepositoryV1ApiFp = function (configuration) { return { /** * Delete rule by ID. * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1DeleteByIdDelete(ruleId, options) { const localVarFetchArgs = exports.SalesRuleRuleRepositoryV1ApiFetchParamCreator(configuration).salesRuleRuleRepositoryV1DeleteByIdDelete(ruleId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get rule by ID. * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1GetByIdGet(ruleId, options) { const localVarFetchArgs = exports.SalesRuleRuleRepositoryV1ApiFetchParamCreator(configuration).salesRuleRuleRepositoryV1GetByIdGet(ruleId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve sales rules that match te specified criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#RuleRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.SalesRuleRuleRepositoryV1ApiFetchParamCreator(configuration).salesRuleRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save sales rule. * @param {any} [salesRuleRuleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1SavePost(salesRuleRuleRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.SalesRuleRuleRepositoryV1ApiFetchParamCreator(configuration).salesRuleRuleRepositoryV1SavePost(salesRuleRuleRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save sales rule. * @param {string} ruleId * @param {any} [salesRuleRuleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1SavePut(ruleId, salesRuleRuleRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.SalesRuleRuleRepositoryV1ApiFetchParamCreator(configuration).salesRuleRuleRepositoryV1SavePut(ruleId, salesRuleRuleRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesRuleRuleRepositoryV1ApiFp = SalesRuleRuleRepositoryV1ApiFp; /** * SalesRuleRuleRepositoryV1Api - factory interface * @export */ const SalesRuleRuleRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete rule by ID. * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1DeleteByIdDelete(ruleId, options) { return exports.SalesRuleRuleRepositoryV1ApiFp(configuration).salesRuleRuleRepositoryV1DeleteByIdDelete(ruleId, options)(fetch, basePath); }, /** * Get rule by ID. * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1GetByIdGet(ruleId, options) { return exports.SalesRuleRuleRepositoryV1ApiFp(configuration).salesRuleRuleRepositoryV1GetByIdGet(ruleId, options)(fetch, basePath); }, /** * Retrieve sales rules that match te specified criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#RuleRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesRuleRuleRepositoryV1ApiFp(configuration).salesRuleRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save sales rule. * @param {any} [salesRuleRuleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1SavePost(salesRuleRuleRepositoryV1SavePostBody, options) { return exports.SalesRuleRuleRepositoryV1ApiFp(configuration).salesRuleRuleRepositoryV1SavePost(salesRuleRuleRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save sales rule. * @param {string} ruleId * @param {any} [salesRuleRuleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesRuleRuleRepositoryV1SavePut(ruleId, salesRuleRuleRepositoryV1SavePutBody, options) { return exports.SalesRuleRuleRepositoryV1ApiFp(configuration).salesRuleRuleRepositoryV1SavePut(ruleId, salesRuleRuleRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.SalesRuleRuleRepositoryV1ApiFactory = SalesRuleRuleRepositoryV1ApiFactory; /** * SalesRuleRuleRepositoryV1Api - object-oriented interface * @export * @class SalesRuleRuleRepositoryV1Api * @extends {BaseAPI} */ class SalesRuleRuleRepositoryV1Api extends BaseAPI { /** * Delete rule by ID. * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleRuleRepositoryV1Api */ salesRuleRuleRepositoryV1DeleteByIdDelete(ruleId, options) { return exports.SalesRuleRuleRepositoryV1ApiFp(this.configuration).salesRuleRuleRepositoryV1DeleteByIdDelete(ruleId, options)(this.fetch, this.basePath); } /** * Get rule by ID. * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleRuleRepositoryV1Api */ salesRuleRuleRepositoryV1GetByIdGet(ruleId, options) { return exports.SalesRuleRuleRepositoryV1ApiFp(this.configuration).salesRuleRuleRepositoryV1GetByIdGet(ruleId, options)(this.fetch, this.basePath); } /** * Retrieve sales rules that match te specified criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#RuleRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleRuleRepositoryV1Api */ salesRuleRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesRuleRuleRepositoryV1ApiFp(this.configuration).salesRuleRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save sales rule. * @param {any} [salesRuleRuleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleRuleRepositoryV1Api */ salesRuleRuleRepositoryV1SavePost(salesRuleRuleRepositoryV1SavePostBody, options) { return exports.SalesRuleRuleRepositoryV1ApiFp(this.configuration).salesRuleRuleRepositoryV1SavePost(salesRuleRuleRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save sales rule. * @param {string} ruleId * @param {any} [salesRuleRuleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesRuleRuleRepositoryV1Api */ salesRuleRuleRepositoryV1SavePut(ruleId, salesRuleRuleRepositoryV1SavePutBody, options) { return exports.SalesRuleRuleRepositoryV1ApiFp(this.configuration).salesRuleRuleRepositoryV1SavePut(ruleId, salesRuleRuleRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.SalesRuleRuleRepositoryV1Api = SalesRuleRuleRepositoryV1Api; /** * SalesShipOrderV1Api - fetch parameter creator * @export */ const SalesShipOrderV1ApiFetchParamCreator = function (configuration) { return { /** * Creates new Shipment for given Order. * @param {number} orderId * @param {any} [salesShipOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipOrderV1ExecutePost(orderId, salesShipOrderV1ExecutePostBody, options = {}) { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { throw new RequiredError('orderId', 'Required parameter orderId was null or undefined when calling salesShipOrderV1ExecutePost.'); } const localVarPath = `/V1/order/{orderId}/ship` .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesShipOrderV1ExecutePostBody || {}) : (salesShipOrderV1ExecutePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesShipOrderV1ApiFetchParamCreator = SalesShipOrderV1ApiFetchParamCreator; /** * SalesShipOrderV1Api - functional programming interface * @export */ const SalesShipOrderV1ApiFp = function (configuration) { return { /** * Creates new Shipment for given Order. * @param {number} orderId * @param {any} [salesShipOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipOrderV1ExecutePost(orderId, salesShipOrderV1ExecutePostBody, options) { const localVarFetchArgs = exports.SalesShipOrderV1ApiFetchParamCreator(configuration).salesShipOrderV1ExecutePost(orderId, salesShipOrderV1ExecutePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesShipOrderV1ApiFp = SalesShipOrderV1ApiFp; /** * SalesShipOrderV1Api - factory interface * @export */ const SalesShipOrderV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Creates new Shipment for given Order. * @param {number} orderId * @param {any} [salesShipOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipOrderV1ExecutePost(orderId, salesShipOrderV1ExecutePostBody, options) { return exports.SalesShipOrderV1ApiFp(configuration).salesShipOrderV1ExecutePost(orderId, salesShipOrderV1ExecutePostBody, options)(fetch, basePath); }, }; }; exports.SalesShipOrderV1ApiFactory = SalesShipOrderV1ApiFactory; /** * SalesShipOrderV1Api - object-oriented interface * @export * @class SalesShipOrderV1Api * @extends {BaseAPI} */ class SalesShipOrderV1Api extends BaseAPI { /** * Creates new Shipment for given Order. * @param {number} orderId * @param {any} [salesShipOrderV1ExecutePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesShipOrderV1Api */ salesShipOrderV1ExecutePost(orderId, salesShipOrderV1ExecutePostBody, options) { return exports.SalesShipOrderV1ApiFp(this.configuration).salesShipOrderV1ExecutePost(orderId, salesShipOrderV1ExecutePostBody, options)(this.fetch, this.basePath); } } exports.SalesShipOrderV1Api = SalesShipOrderV1Api; /** * SalesShipmentCommentRepositoryV1Api - fetch parameter creator * @export */ const SalesShipmentCommentRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Performs persist operations for a specified shipment comment. * @param {string} id * @param {any} [salesShipmentCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentCommentRepositoryV1SavePost(id, salesShipmentCommentRepositoryV1SavePostBody, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesShipmentCommentRepositoryV1SavePost.'); } const localVarPath = `/V1/shipment/{id}/comments` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesShipmentCommentRepositoryV1SavePostBody || {}) : (salesShipmentCommentRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesShipmentCommentRepositoryV1ApiFetchParamCreator = SalesShipmentCommentRepositoryV1ApiFetchParamCreator; /** * SalesShipmentCommentRepositoryV1Api - functional programming interface * @export */ const SalesShipmentCommentRepositoryV1ApiFp = function (configuration) { return { /** * Performs persist operations for a specified shipment comment. * @param {string} id * @param {any} [salesShipmentCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentCommentRepositoryV1SavePost(id, salesShipmentCommentRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.SalesShipmentCommentRepositoryV1ApiFetchParamCreator(configuration).salesShipmentCommentRepositoryV1SavePost(id, salesShipmentCommentRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesShipmentCommentRepositoryV1ApiFp = SalesShipmentCommentRepositoryV1ApiFp; /** * SalesShipmentCommentRepositoryV1Api - factory interface * @export */ const SalesShipmentCommentRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Performs persist operations for a specified shipment comment. * @param {string} id * @param {any} [salesShipmentCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentCommentRepositoryV1SavePost(id, salesShipmentCommentRepositoryV1SavePostBody, options) { return exports.SalesShipmentCommentRepositoryV1ApiFp(configuration).salesShipmentCommentRepositoryV1SavePost(id, salesShipmentCommentRepositoryV1SavePostBody, options)(fetch, basePath); }, }; }; exports.SalesShipmentCommentRepositoryV1ApiFactory = SalesShipmentCommentRepositoryV1ApiFactory; /** * SalesShipmentCommentRepositoryV1Api - object-oriented interface * @export * @class SalesShipmentCommentRepositoryV1Api * @extends {BaseAPI} */ class SalesShipmentCommentRepositoryV1Api extends BaseAPI { /** * Performs persist operations for a specified shipment comment. * @param {string} id * @param {any} [salesShipmentCommentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesShipmentCommentRepositoryV1Api */ salesShipmentCommentRepositoryV1SavePost(id, salesShipmentCommentRepositoryV1SavePostBody, options) { return exports.SalesShipmentCommentRepositoryV1ApiFp(this.configuration).salesShipmentCommentRepositoryV1SavePost(id, salesShipmentCommentRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } } exports.SalesShipmentCommentRepositoryV1Api = SalesShipmentCommentRepositoryV1Api; /** * SalesShipmentManagementV1Api - fetch parameter creator * @export */ const SalesShipmentManagementV1ApiFetchParamCreator = function (configuration) { return { /** * Lists comments for a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentManagementV1GetCommentsListGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesShipmentManagementV1GetCommentsListGet.'); } const localVarPath = `/V1/shipment/{id}/comments` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets a specified shipment label. * @param {number} id The shipment label ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentManagementV1GetLabelGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesShipmentManagementV1GetLabelGet.'); } const localVarPath = `/V1/shipment/{id}/label` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Emails user a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentManagementV1NotifyPost(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesShipmentManagementV1NotifyPost.'); } const localVarPath = `/V1/shipment/{id}/emails` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesShipmentManagementV1ApiFetchParamCreator = SalesShipmentManagementV1ApiFetchParamCreator; /** * SalesShipmentManagementV1Api - functional programming interface * @export */ const SalesShipmentManagementV1ApiFp = function (configuration) { return { /** * Lists comments for a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentManagementV1GetCommentsListGet(id, options) { const localVarFetchArgs = exports.SalesShipmentManagementV1ApiFetchParamCreator(configuration).salesShipmentManagementV1GetCommentsListGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Gets a specified shipment label. * @param {number} id The shipment label ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentManagementV1GetLabelGet(id, options) { const localVarFetchArgs = exports.SalesShipmentManagementV1ApiFetchParamCreator(configuration).salesShipmentManagementV1GetLabelGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Emails user a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentManagementV1NotifyPost(id, options) { const localVarFetchArgs = exports.SalesShipmentManagementV1ApiFetchParamCreator(configuration).salesShipmentManagementV1NotifyPost(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesShipmentManagementV1ApiFp = SalesShipmentManagementV1ApiFp; /** * SalesShipmentManagementV1Api - factory interface * @export */ const SalesShipmentManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Lists comments for a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentManagementV1GetCommentsListGet(id, options) { return exports.SalesShipmentManagementV1ApiFp(configuration).salesShipmentManagementV1GetCommentsListGet(id, options)(fetch, basePath); }, /** * Gets a specified shipment label. * @param {number} id The shipment label ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentManagementV1GetLabelGet(id, options) { return exports.SalesShipmentManagementV1ApiFp(configuration).salesShipmentManagementV1GetLabelGet(id, options)(fetch, basePath); }, /** * Emails user a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentManagementV1NotifyPost(id, options) { return exports.SalesShipmentManagementV1ApiFp(configuration).salesShipmentManagementV1NotifyPost(id, options)(fetch, basePath); }, }; }; exports.SalesShipmentManagementV1ApiFactory = SalesShipmentManagementV1ApiFactory; /** * SalesShipmentManagementV1Api - object-oriented interface * @export * @class SalesShipmentManagementV1Api * @extends {BaseAPI} */ class SalesShipmentManagementV1Api extends BaseAPI { /** * Lists comments for a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesShipmentManagementV1Api */ salesShipmentManagementV1GetCommentsListGet(id, options) { return exports.SalesShipmentManagementV1ApiFp(this.configuration).salesShipmentManagementV1GetCommentsListGet(id, options)(this.fetch, this.basePath); } /** * Gets a specified shipment label. * @param {number} id The shipment label ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesShipmentManagementV1Api */ salesShipmentManagementV1GetLabelGet(id, options) { return exports.SalesShipmentManagementV1ApiFp(this.configuration).salesShipmentManagementV1GetLabelGet(id, options)(this.fetch, this.basePath); } /** * Emails user a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesShipmentManagementV1Api */ salesShipmentManagementV1NotifyPost(id, options) { return exports.SalesShipmentManagementV1ApiFp(this.configuration).salesShipmentManagementV1NotifyPost(id, options)(this.fetch, this.basePath); } } exports.SalesShipmentManagementV1Api = SalesShipmentManagementV1Api; /** * SalesShipmentRepositoryV1Api - fetch parameter creator * @export */ const SalesShipmentRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Loads a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentRepositoryV1GetGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesShipmentRepositoryV1GetGet.'); } const localVarPath = `/V1/shipment/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists shipments that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#ShipmentRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/shipments`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Performs persist operations for a specified shipment. * @param {any} [salesShipmentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentRepositoryV1SavePost(salesShipmentRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/shipment/`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesShipmentRepositoryV1SavePostBody || {}) : (salesShipmentRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesShipmentRepositoryV1ApiFetchParamCreator = SalesShipmentRepositoryV1ApiFetchParamCreator; /** * SalesShipmentRepositoryV1Api - functional programming interface * @export */ const SalesShipmentRepositoryV1ApiFp = function (configuration) { return { /** * Loads a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentRepositoryV1GetGet(id, options) { const localVarFetchArgs = exports.SalesShipmentRepositoryV1ApiFetchParamCreator(configuration).salesShipmentRepositoryV1GetGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists shipments that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#ShipmentRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.SalesShipmentRepositoryV1ApiFetchParamCreator(configuration).salesShipmentRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Performs persist operations for a specified shipment. * @param {any} [salesShipmentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentRepositoryV1SavePost(salesShipmentRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.SalesShipmentRepositoryV1ApiFetchParamCreator(configuration).salesShipmentRepositoryV1SavePost(salesShipmentRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesShipmentRepositoryV1ApiFp = SalesShipmentRepositoryV1ApiFp; /** * SalesShipmentRepositoryV1Api - factory interface * @export */ const SalesShipmentRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Loads a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentRepositoryV1GetGet(id, options) { return exports.SalesShipmentRepositoryV1ApiFp(configuration).salesShipmentRepositoryV1GetGet(id, options)(fetch, basePath); }, /** * Lists shipments that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#ShipmentRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesShipmentRepositoryV1ApiFp(configuration).salesShipmentRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Performs persist operations for a specified shipment. * @param {any} [salesShipmentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentRepositoryV1SavePost(salesShipmentRepositoryV1SavePostBody, options) { return exports.SalesShipmentRepositoryV1ApiFp(configuration).salesShipmentRepositoryV1SavePost(salesShipmentRepositoryV1SavePostBody, options)(fetch, basePath); }, }; }; exports.SalesShipmentRepositoryV1ApiFactory = SalesShipmentRepositoryV1ApiFactory; /** * SalesShipmentRepositoryV1Api - object-oriented interface * @export * @class SalesShipmentRepositoryV1Api * @extends {BaseAPI} */ class SalesShipmentRepositoryV1Api extends BaseAPI { /** * Loads a specified shipment. * @param {number} id The shipment ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesShipmentRepositoryV1Api */ salesShipmentRepositoryV1GetGet(id, options) { return exports.SalesShipmentRepositoryV1ApiFp(this.configuration).salesShipmentRepositoryV1GetGet(id, options)(this.fetch, this.basePath); } /** * Lists shipments that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#ShipmentRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesShipmentRepositoryV1Api */ salesShipmentRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesShipmentRepositoryV1ApiFp(this.configuration).salesShipmentRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Performs persist operations for a specified shipment. * @param {any} [salesShipmentRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesShipmentRepositoryV1Api */ salesShipmentRepositoryV1SavePost(salesShipmentRepositoryV1SavePostBody, options) { return exports.SalesShipmentRepositoryV1ApiFp(this.configuration).salesShipmentRepositoryV1SavePost(salesShipmentRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } } exports.SalesShipmentRepositoryV1Api = SalesShipmentRepositoryV1Api; /** * SalesShipmentTrackRepositoryV1Api - fetch parameter creator * @export */ const SalesShipmentTrackRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Deletes a specified shipment track by ID. * @param {number} id The shipment track ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentTrackRepositoryV1DeleteByIdDelete(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesShipmentTrackRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/shipment/track/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Performs persist operations for a specified shipment track. * @param {any} [salesShipmentTrackRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentTrackRepositoryV1SavePost(salesShipmentTrackRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/shipment/track`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(salesShipmentTrackRepositoryV1SavePostBody || {}) : (salesShipmentTrackRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesShipmentTrackRepositoryV1ApiFetchParamCreator = SalesShipmentTrackRepositoryV1ApiFetchParamCreator; /** * SalesShipmentTrackRepositoryV1Api - functional programming interface * @export */ const SalesShipmentTrackRepositoryV1ApiFp = function (configuration) { return { /** * Deletes a specified shipment track by ID. * @param {number} id The shipment track ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentTrackRepositoryV1DeleteByIdDelete(id, options) { const localVarFetchArgs = exports.SalesShipmentTrackRepositoryV1ApiFetchParamCreator(configuration).salesShipmentTrackRepositoryV1DeleteByIdDelete(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Performs persist operations for a specified shipment track. * @param {any} [salesShipmentTrackRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentTrackRepositoryV1SavePost(salesShipmentTrackRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.SalesShipmentTrackRepositoryV1ApiFetchParamCreator(configuration).salesShipmentTrackRepositoryV1SavePost(salesShipmentTrackRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesShipmentTrackRepositoryV1ApiFp = SalesShipmentTrackRepositoryV1ApiFp; /** * SalesShipmentTrackRepositoryV1Api - factory interface * @export */ const SalesShipmentTrackRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Deletes a specified shipment track by ID. * @param {number} id The shipment track ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentTrackRepositoryV1DeleteByIdDelete(id, options) { return exports.SalesShipmentTrackRepositoryV1ApiFp(configuration).salesShipmentTrackRepositoryV1DeleteByIdDelete(id, options)(fetch, basePath); }, /** * Performs persist operations for a specified shipment track. * @param {any} [salesShipmentTrackRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesShipmentTrackRepositoryV1SavePost(salesShipmentTrackRepositoryV1SavePostBody, options) { return exports.SalesShipmentTrackRepositoryV1ApiFp(configuration).salesShipmentTrackRepositoryV1SavePost(salesShipmentTrackRepositoryV1SavePostBody, options)(fetch, basePath); }, }; }; exports.SalesShipmentTrackRepositoryV1ApiFactory = SalesShipmentTrackRepositoryV1ApiFactory; /** * SalesShipmentTrackRepositoryV1Api - object-oriented interface * @export * @class SalesShipmentTrackRepositoryV1Api * @extends {BaseAPI} */ class SalesShipmentTrackRepositoryV1Api extends BaseAPI { /** * Deletes a specified shipment track by ID. * @param {number} id The shipment track ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesShipmentTrackRepositoryV1Api */ salesShipmentTrackRepositoryV1DeleteByIdDelete(id, options) { return exports.SalesShipmentTrackRepositoryV1ApiFp(this.configuration).salesShipmentTrackRepositoryV1DeleteByIdDelete(id, options)(this.fetch, this.basePath); } /** * Performs persist operations for a specified shipment track. * @param {any} [salesShipmentTrackRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesShipmentTrackRepositoryV1Api */ salesShipmentTrackRepositoryV1SavePost(salesShipmentTrackRepositoryV1SavePostBody, options) { return exports.SalesShipmentTrackRepositoryV1ApiFp(this.configuration).salesShipmentTrackRepositoryV1SavePost(salesShipmentTrackRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } } exports.SalesShipmentTrackRepositoryV1Api = SalesShipmentTrackRepositoryV1Api; /** * SalesTransactionRepositoryV1Api - fetch parameter creator * @export */ const SalesTransactionRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Loads a specified transaction. * @param {number} id The transaction ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesTransactionRepositoryV1GetGet(id, options = {}) { // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError('id', 'Required parameter id was null or undefined when calling salesTransactionRepositoryV1GetGet.'); } const localVarPath = `/V1/transactions/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists transactions that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TransactionRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesTransactionRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/transactions`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SalesTransactionRepositoryV1ApiFetchParamCreator = SalesTransactionRepositoryV1ApiFetchParamCreator; /** * SalesTransactionRepositoryV1Api - functional programming interface * @export */ const SalesTransactionRepositoryV1ApiFp = function (configuration) { return { /** * Loads a specified transaction. * @param {number} id The transaction ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesTransactionRepositoryV1GetGet(id, options) { const localVarFetchArgs = exports.SalesTransactionRepositoryV1ApiFetchParamCreator(configuration).salesTransactionRepositoryV1GetGet(id, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Lists transactions that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TransactionRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesTransactionRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.SalesTransactionRepositoryV1ApiFetchParamCreator(configuration).salesTransactionRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SalesTransactionRepositoryV1ApiFp = SalesTransactionRepositoryV1ApiFp; /** * SalesTransactionRepositoryV1Api - factory interface * @export */ const SalesTransactionRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Loads a specified transaction. * @param {number} id The transaction ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesTransactionRepositoryV1GetGet(id, options) { return exports.SalesTransactionRepositoryV1ApiFp(configuration).salesTransactionRepositoryV1GetGet(id, options)(fetch, basePath); }, /** * Lists transactions that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TransactionRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ salesTransactionRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesTransactionRepositoryV1ApiFp(configuration).salesTransactionRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.SalesTransactionRepositoryV1ApiFactory = SalesTransactionRepositoryV1ApiFactory; /** * SalesTransactionRepositoryV1Api - object-oriented interface * @export * @class SalesTransactionRepositoryV1Api * @extends {BaseAPI} */ class SalesTransactionRepositoryV1Api extends BaseAPI { /** * Loads a specified transaction. * @param {number} id The transaction ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesTransactionRepositoryV1Api */ salesTransactionRepositoryV1GetGet(id, options) { return exports.SalesTransactionRepositoryV1ApiFp(this.configuration).salesTransactionRepositoryV1GetGet(id, options)(this.fetch, this.basePath); } /** * Lists transactions that match specified search criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TransactionRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SalesTransactionRepositoryV1Api */ salesTransactionRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SalesTransactionRepositoryV1ApiFp(this.configuration).salesTransactionRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.SalesTransactionRepositoryV1Api = SalesTransactionRepositoryV1Api; /** * SearchV1Api - fetch parameter creator * @export */ const SearchV1ApiFetchParamCreator = function (configuration) { return { /** * Make Full Text Search and return found Documents * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ searchV1SearchGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaRequestName !== undefined) { localVarQueryParameter['searchCriteria[requestName]'] = searchCriteriaRequestName; } if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.SearchV1ApiFetchParamCreator = SearchV1ApiFetchParamCreator; /** * SearchV1Api - functional programming interface * @export */ const SearchV1ApiFp = function (configuration) { return { /** * Make Full Text Search and return found Documents * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ searchV1SearchGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.SearchV1ApiFetchParamCreator(configuration).searchV1SearchGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.SearchV1ApiFp = SearchV1ApiFp; /** * SearchV1Api - factory interface * @export */ const SearchV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Make Full Text Search and return found Documents * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ searchV1SearchGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SearchV1ApiFp(configuration).searchV1SearchGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, }; }; exports.SearchV1ApiFactory = SearchV1ApiFactory; /** * SearchV1Api - object-oriented interface * @export * @class SearchV1Api * @extends {BaseAPI} */ class SearchV1Api extends BaseAPI { /** * Make Full Text Search and return found Documents * @param {string} [searchCriteriaRequestName] * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SearchV1Api */ searchV1SearchGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.SearchV1ApiFp(this.configuration).searchV1SearchGet(searchCriteriaRequestName, searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } } exports.SearchV1Api = SearchV1Api; /** * StoreGroupRepositoryV1Api - fetch parameter creator * @export */ const StoreGroupRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Retrieve list of all groups * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeGroupRepositoryV1GetListGet(options = {}) { const localVarPath = `/V1/store/storeGroups`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.StoreGroupRepositoryV1ApiFetchParamCreator = StoreGroupRepositoryV1ApiFetchParamCreator; /** * StoreGroupRepositoryV1Api - functional programming interface * @export */ const StoreGroupRepositoryV1ApiFp = function (configuration) { return { /** * Retrieve list of all groups * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeGroupRepositoryV1GetListGet(options) { const localVarFetchArgs = exports.StoreGroupRepositoryV1ApiFetchParamCreator(configuration).storeGroupRepositoryV1GetListGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.StoreGroupRepositoryV1ApiFp = StoreGroupRepositoryV1ApiFp; /** * StoreGroupRepositoryV1Api - factory interface * @export */ const StoreGroupRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Retrieve list of all groups * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeGroupRepositoryV1GetListGet(options) { return exports.StoreGroupRepositoryV1ApiFp(configuration).storeGroupRepositoryV1GetListGet(options)(fetch, basePath); }, }; }; exports.StoreGroupRepositoryV1ApiFactory = StoreGroupRepositoryV1ApiFactory; /** * StoreGroupRepositoryV1Api - object-oriented interface * @export * @class StoreGroupRepositoryV1Api * @extends {BaseAPI} */ class StoreGroupRepositoryV1Api extends BaseAPI { /** * Retrieve list of all groups * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StoreGroupRepositoryV1Api */ storeGroupRepositoryV1GetListGet(options) { return exports.StoreGroupRepositoryV1ApiFp(this.configuration).storeGroupRepositoryV1GetListGet(options)(this.fetch, this.basePath); } } exports.StoreGroupRepositoryV1Api = StoreGroupRepositoryV1Api; /** * StoreStoreConfigManagerV1Api - fetch parameter creator * @export */ const StoreStoreConfigManagerV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {Array} [storeCodes] * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeStoreConfigManagerV1GetStoreConfigsGet(storeCodes, options = {}) { const localVarPath = `/V1/store/storeConfigs`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (storeCodes) { localVarQueryParameter['storeCodes'] = storeCodes; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.StoreStoreConfigManagerV1ApiFetchParamCreator = StoreStoreConfigManagerV1ApiFetchParamCreator; /** * StoreStoreConfigManagerV1Api - functional programming interface * @export */ const StoreStoreConfigManagerV1ApiFp = function (configuration) { return { /** * * @param {Array} [storeCodes] * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeStoreConfigManagerV1GetStoreConfigsGet(storeCodes, options) { const localVarFetchArgs = exports.StoreStoreConfigManagerV1ApiFetchParamCreator(configuration).storeStoreConfigManagerV1GetStoreConfigsGet(storeCodes, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.StoreStoreConfigManagerV1ApiFp = StoreStoreConfigManagerV1ApiFp; /** * StoreStoreConfigManagerV1Api - factory interface * @export */ const StoreStoreConfigManagerV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {Array} [storeCodes] * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeStoreConfigManagerV1GetStoreConfigsGet(storeCodes, options) { return exports.StoreStoreConfigManagerV1ApiFp(configuration).storeStoreConfigManagerV1GetStoreConfigsGet(storeCodes, options)(fetch, basePath); }, }; }; exports.StoreStoreConfigManagerV1ApiFactory = StoreStoreConfigManagerV1ApiFactory; /** * StoreStoreConfigManagerV1Api - object-oriented interface * @export * @class StoreStoreConfigManagerV1Api * @extends {BaseAPI} */ class StoreStoreConfigManagerV1Api extends BaseAPI { /** * * @param {Array} [storeCodes] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StoreStoreConfigManagerV1Api */ storeStoreConfigManagerV1GetStoreConfigsGet(storeCodes, options) { return exports.StoreStoreConfigManagerV1ApiFp(this.configuration).storeStoreConfigManagerV1GetStoreConfigsGet(storeCodes, options)(this.fetch, this.basePath); } } exports.StoreStoreConfigManagerV1Api = StoreStoreConfigManagerV1Api; /** * StoreStoreRepositoryV1Api - fetch parameter creator * @export */ const StoreStoreRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Retrieve list of all stores * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeStoreRepositoryV1GetListGet(options = {}) { const localVarPath = `/V1/store/storeViews`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.StoreStoreRepositoryV1ApiFetchParamCreator = StoreStoreRepositoryV1ApiFetchParamCreator; /** * StoreStoreRepositoryV1Api - functional programming interface * @export */ const StoreStoreRepositoryV1ApiFp = function (configuration) { return { /** * Retrieve list of all stores * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeStoreRepositoryV1GetListGet(options) { const localVarFetchArgs = exports.StoreStoreRepositoryV1ApiFetchParamCreator(configuration).storeStoreRepositoryV1GetListGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.StoreStoreRepositoryV1ApiFp = StoreStoreRepositoryV1ApiFp; /** * StoreStoreRepositoryV1Api - factory interface * @export */ const StoreStoreRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Retrieve list of all stores * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeStoreRepositoryV1GetListGet(options) { return exports.StoreStoreRepositoryV1ApiFp(configuration).storeStoreRepositoryV1GetListGet(options)(fetch, basePath); }, }; }; exports.StoreStoreRepositoryV1ApiFactory = StoreStoreRepositoryV1ApiFactory; /** * StoreStoreRepositoryV1Api - object-oriented interface * @export * @class StoreStoreRepositoryV1Api * @extends {BaseAPI} */ class StoreStoreRepositoryV1Api extends BaseAPI { /** * Retrieve list of all stores * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StoreStoreRepositoryV1Api */ storeStoreRepositoryV1GetListGet(options) { return exports.StoreStoreRepositoryV1ApiFp(this.configuration).storeStoreRepositoryV1GetListGet(options)(this.fetch, this.basePath); } } exports.StoreStoreRepositoryV1Api = StoreStoreRepositoryV1Api; /** * StoreWebsiteRepositoryV1Api - fetch parameter creator * @export */ const StoreWebsiteRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Retrieve list of all websites * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeWebsiteRepositoryV1GetListGet(options = {}) { const localVarPath = `/V1/store/websites`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.StoreWebsiteRepositoryV1ApiFetchParamCreator = StoreWebsiteRepositoryV1ApiFetchParamCreator; /** * StoreWebsiteRepositoryV1Api - functional programming interface * @export */ const StoreWebsiteRepositoryV1ApiFp = function (configuration) { return { /** * Retrieve list of all websites * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeWebsiteRepositoryV1GetListGet(options) { const localVarFetchArgs = exports.StoreWebsiteRepositoryV1ApiFetchParamCreator(configuration).storeWebsiteRepositoryV1GetListGet(options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.StoreWebsiteRepositoryV1ApiFp = StoreWebsiteRepositoryV1ApiFp; /** * StoreWebsiteRepositoryV1Api - factory interface * @export */ const StoreWebsiteRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Retrieve list of all websites * @param {*} [options] Override http request option. * @throws {RequiredError} */ storeWebsiteRepositoryV1GetListGet(options) { return exports.StoreWebsiteRepositoryV1ApiFp(configuration).storeWebsiteRepositoryV1GetListGet(options)(fetch, basePath); }, }; }; exports.StoreWebsiteRepositoryV1ApiFactory = StoreWebsiteRepositoryV1ApiFactory; /** * StoreWebsiteRepositoryV1Api - object-oriented interface * @export * @class StoreWebsiteRepositoryV1Api * @extends {BaseAPI} */ class StoreWebsiteRepositoryV1Api extends BaseAPI { /** * Retrieve list of all websites * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StoreWebsiteRepositoryV1Api */ storeWebsiteRepositoryV1GetListGet(options) { return exports.StoreWebsiteRepositoryV1ApiFp(this.configuration).storeWebsiteRepositoryV1GetListGet(options)(this.fetch, this.basePath); } } exports.StoreWebsiteRepositoryV1Api = StoreWebsiteRepositoryV1Api; /** * TaxTaxClassRepositoryV1Api - fetch parameter creator * @export */ const TaxTaxClassRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete a tax class with the given tax class id. * @param {number} taxClassId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1DeleteByIdDelete(taxClassId, options = {}) { // verify required parameter 'taxClassId' is not null or undefined if (taxClassId === null || taxClassId === undefined) { throw new RequiredError('taxClassId', 'Required parameter taxClassId was null or undefined when calling taxTaxClassRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/taxClasses/{taxClassId}` .replace(`{${"taxClassId"}}`, encodeURIComponent(String(taxClassId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get a tax class with the given tax class id. * @param {number} taxClassId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1GetGet(taxClassId, options = {}) { // verify required parameter 'taxClassId' is not null or undefined if (taxClassId === null || taxClassId === undefined) { throw new RequiredError('taxClassId', 'Required parameter taxClassId was null or undefined when calling taxTaxClassRepositoryV1GetGet.'); } const localVarPath = `/V1/taxClasses/{taxClassId}` .replace(`{${"taxClassId"}}`, encodeURIComponent(String(taxClassId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieve tax classes which match a specific criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxClassRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/taxClasses/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create a Tax Class * @param {any} [taxTaxClassRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1SavePost(taxTaxClassRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/taxClasses`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(taxTaxClassRepositoryV1SavePostBody || {}) : (taxTaxClassRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create a Tax Class * @param {string} classId * @param {any} [taxTaxClassRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1SavePut(classId, taxTaxClassRepositoryV1SavePutBody, options = {}) { // verify required parameter 'classId' is not null or undefined if (classId === null || classId === undefined) { throw new RequiredError('classId', 'Required parameter classId was null or undefined when calling taxTaxClassRepositoryV1SavePut.'); } const localVarPath = `/V1/taxClasses/{classId}` .replace(`{${"classId"}}`, encodeURIComponent(String(classId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(taxTaxClassRepositoryV1SavePutBody || {}) : (taxTaxClassRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.TaxTaxClassRepositoryV1ApiFetchParamCreator = TaxTaxClassRepositoryV1ApiFetchParamCreator; /** * TaxTaxClassRepositoryV1Api - functional programming interface * @export */ const TaxTaxClassRepositoryV1ApiFp = function (configuration) { return { /** * Delete a tax class with the given tax class id. * @param {number} taxClassId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1DeleteByIdDelete(taxClassId, options) { const localVarFetchArgs = exports.TaxTaxClassRepositoryV1ApiFetchParamCreator(configuration).taxTaxClassRepositoryV1DeleteByIdDelete(taxClassId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get a tax class with the given tax class id. * @param {number} taxClassId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1GetGet(taxClassId, options) { const localVarFetchArgs = exports.TaxTaxClassRepositoryV1ApiFetchParamCreator(configuration).taxTaxClassRepositoryV1GetGet(taxClassId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Retrieve tax classes which match a specific criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxClassRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.TaxTaxClassRepositoryV1ApiFetchParamCreator(configuration).taxTaxClassRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Create a Tax Class * @param {any} [taxTaxClassRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1SavePost(taxTaxClassRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.TaxTaxClassRepositoryV1ApiFetchParamCreator(configuration).taxTaxClassRepositoryV1SavePost(taxTaxClassRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Create a Tax Class * @param {string} classId * @param {any} [taxTaxClassRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1SavePut(classId, taxTaxClassRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.TaxTaxClassRepositoryV1ApiFetchParamCreator(configuration).taxTaxClassRepositoryV1SavePut(classId, taxTaxClassRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.TaxTaxClassRepositoryV1ApiFp = TaxTaxClassRepositoryV1ApiFp; /** * TaxTaxClassRepositoryV1Api - factory interface * @export */ const TaxTaxClassRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete a tax class with the given tax class id. * @param {number} taxClassId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1DeleteByIdDelete(taxClassId, options) { return exports.TaxTaxClassRepositoryV1ApiFp(configuration).taxTaxClassRepositoryV1DeleteByIdDelete(taxClassId, options)(fetch, basePath); }, /** * Get a tax class with the given tax class id. * @param {number} taxClassId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1GetGet(taxClassId, options) { return exports.TaxTaxClassRepositoryV1ApiFp(configuration).taxTaxClassRepositoryV1GetGet(taxClassId, options)(fetch, basePath); }, /** * Retrieve tax classes which match a specific criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxClassRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.TaxTaxClassRepositoryV1ApiFp(configuration).taxTaxClassRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Create a Tax Class * @param {any} [taxTaxClassRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1SavePost(taxTaxClassRepositoryV1SavePostBody, options) { return exports.TaxTaxClassRepositoryV1ApiFp(configuration).taxTaxClassRepositoryV1SavePost(taxTaxClassRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Create a Tax Class * @param {string} classId * @param {any} [taxTaxClassRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxClassRepositoryV1SavePut(classId, taxTaxClassRepositoryV1SavePutBody, options) { return exports.TaxTaxClassRepositoryV1ApiFp(configuration).taxTaxClassRepositoryV1SavePut(classId, taxTaxClassRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.TaxTaxClassRepositoryV1ApiFactory = TaxTaxClassRepositoryV1ApiFactory; /** * TaxTaxClassRepositoryV1Api - object-oriented interface * @export * @class TaxTaxClassRepositoryV1Api * @extends {BaseAPI} */ class TaxTaxClassRepositoryV1Api extends BaseAPI { /** * Delete a tax class with the given tax class id. * @param {number} taxClassId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxClassRepositoryV1Api */ taxTaxClassRepositoryV1DeleteByIdDelete(taxClassId, options) { return exports.TaxTaxClassRepositoryV1ApiFp(this.configuration).taxTaxClassRepositoryV1DeleteByIdDelete(taxClassId, options)(this.fetch, this.basePath); } /** * Get a tax class with the given tax class id. * @param {number} taxClassId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxClassRepositoryV1Api */ taxTaxClassRepositoryV1GetGet(taxClassId, options) { return exports.TaxTaxClassRepositoryV1ApiFp(this.configuration).taxTaxClassRepositoryV1GetGet(taxClassId, options)(this.fetch, this.basePath); } /** * Retrieve tax classes which match a specific criteria. This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxClassRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxClassRepositoryV1Api */ taxTaxClassRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.TaxTaxClassRepositoryV1ApiFp(this.configuration).taxTaxClassRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Create a Tax Class * @param {any} [taxTaxClassRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxClassRepositoryV1Api */ taxTaxClassRepositoryV1SavePost(taxTaxClassRepositoryV1SavePostBody, options) { return exports.TaxTaxClassRepositoryV1ApiFp(this.configuration).taxTaxClassRepositoryV1SavePost(taxTaxClassRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Create a Tax Class * @param {string} classId * @param {any} [taxTaxClassRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxClassRepositoryV1Api */ taxTaxClassRepositoryV1SavePut(classId, taxTaxClassRepositoryV1SavePutBody, options) { return exports.TaxTaxClassRepositoryV1ApiFp(this.configuration).taxTaxClassRepositoryV1SavePut(classId, taxTaxClassRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.TaxTaxClassRepositoryV1Api = TaxTaxClassRepositoryV1Api; /** * TaxTaxRateRepositoryV1Api - fetch parameter creator * @export */ const TaxTaxRateRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete tax rate * @param {number} rateId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1DeleteByIdDelete(rateId, options = {}) { // verify required parameter 'rateId' is not null or undefined if (rateId === null || rateId === undefined) { throw new RequiredError('rateId', 'Required parameter rateId was null or undefined when calling taxTaxRateRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/taxRates/{rateId}` .replace(`{${"rateId"}}`, encodeURIComponent(String(rateId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get tax rate * @param {number} rateId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1GetGet(rateId, options = {}) { // verify required parameter 'rateId' is not null or undefined if (rateId === null || rateId === undefined) { throw new RequiredError('rateId', 'Required parameter rateId was null or undefined when calling taxTaxRateRepositoryV1GetGet.'); } const localVarPath = `/V1/taxRates/{rateId}` .replace(`{${"rateId"}}`, encodeURIComponent(String(rateId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Search TaxRates This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRateRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/taxRates/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create or update tax rate * @param {any} [taxTaxRateRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1SavePost(taxTaxRateRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/taxRates`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(taxTaxRateRepositoryV1SavePostBody || {}) : (taxTaxRateRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create or update tax rate * @param {any} [taxTaxRateRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1SavePut(taxTaxRateRepositoryV1SavePutBody, options = {}) { const localVarPath = `/V1/taxRates`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(taxTaxRateRepositoryV1SavePutBody || {}) : (taxTaxRateRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.TaxTaxRateRepositoryV1ApiFetchParamCreator = TaxTaxRateRepositoryV1ApiFetchParamCreator; /** * TaxTaxRateRepositoryV1Api - functional programming interface * @export */ const TaxTaxRateRepositoryV1ApiFp = function (configuration) { return { /** * Delete tax rate * @param {number} rateId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1DeleteByIdDelete(rateId, options) { const localVarFetchArgs = exports.TaxTaxRateRepositoryV1ApiFetchParamCreator(configuration).taxTaxRateRepositoryV1DeleteByIdDelete(rateId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get tax rate * @param {number} rateId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1GetGet(rateId, options) { const localVarFetchArgs = exports.TaxTaxRateRepositoryV1ApiFetchParamCreator(configuration).taxTaxRateRepositoryV1GetGet(rateId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Search TaxRates This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRateRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.TaxTaxRateRepositoryV1ApiFetchParamCreator(configuration).taxTaxRateRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Create or update tax rate * @param {any} [taxTaxRateRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1SavePost(taxTaxRateRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.TaxTaxRateRepositoryV1ApiFetchParamCreator(configuration).taxTaxRateRepositoryV1SavePost(taxTaxRateRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Create or update tax rate * @param {any} [taxTaxRateRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1SavePut(taxTaxRateRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.TaxTaxRateRepositoryV1ApiFetchParamCreator(configuration).taxTaxRateRepositoryV1SavePut(taxTaxRateRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.TaxTaxRateRepositoryV1ApiFp = TaxTaxRateRepositoryV1ApiFp; /** * TaxTaxRateRepositoryV1Api - factory interface * @export */ const TaxTaxRateRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete tax rate * @param {number} rateId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1DeleteByIdDelete(rateId, options) { return exports.TaxTaxRateRepositoryV1ApiFp(configuration).taxTaxRateRepositoryV1DeleteByIdDelete(rateId, options)(fetch, basePath); }, /** * Get tax rate * @param {number} rateId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1GetGet(rateId, options) { return exports.TaxTaxRateRepositoryV1ApiFp(configuration).taxTaxRateRepositoryV1GetGet(rateId, options)(fetch, basePath); }, /** * Search TaxRates This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRateRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.TaxTaxRateRepositoryV1ApiFp(configuration).taxTaxRateRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Create or update tax rate * @param {any} [taxTaxRateRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1SavePost(taxTaxRateRepositoryV1SavePostBody, options) { return exports.TaxTaxRateRepositoryV1ApiFp(configuration).taxTaxRateRepositoryV1SavePost(taxTaxRateRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Create or update tax rate * @param {any} [taxTaxRateRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRateRepositoryV1SavePut(taxTaxRateRepositoryV1SavePutBody, options) { return exports.TaxTaxRateRepositoryV1ApiFp(configuration).taxTaxRateRepositoryV1SavePut(taxTaxRateRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.TaxTaxRateRepositoryV1ApiFactory = TaxTaxRateRepositoryV1ApiFactory; /** * TaxTaxRateRepositoryV1Api - object-oriented interface * @export * @class TaxTaxRateRepositoryV1Api * @extends {BaseAPI} */ class TaxTaxRateRepositoryV1Api extends BaseAPI { /** * Delete tax rate * @param {number} rateId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxRateRepositoryV1Api */ taxTaxRateRepositoryV1DeleteByIdDelete(rateId, options) { return exports.TaxTaxRateRepositoryV1ApiFp(this.configuration).taxTaxRateRepositoryV1DeleteByIdDelete(rateId, options)(this.fetch, this.basePath); } /** * Get tax rate * @param {number} rateId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxRateRepositoryV1Api */ taxTaxRateRepositoryV1GetGet(rateId, options) { return exports.TaxTaxRateRepositoryV1ApiFp(this.configuration).taxTaxRateRepositoryV1GetGet(rateId, options)(this.fetch, this.basePath); } /** * Search TaxRates This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRateRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxRateRepositoryV1Api */ taxTaxRateRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.TaxTaxRateRepositoryV1ApiFp(this.configuration).taxTaxRateRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Create or update tax rate * @param {any} [taxTaxRateRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxRateRepositoryV1Api */ taxTaxRateRepositoryV1SavePost(taxTaxRateRepositoryV1SavePostBody, options) { return exports.TaxTaxRateRepositoryV1ApiFp(this.configuration).taxTaxRateRepositoryV1SavePost(taxTaxRateRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Create or update tax rate * @param {any} [taxTaxRateRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxRateRepositoryV1Api */ taxTaxRateRepositoryV1SavePut(taxTaxRateRepositoryV1SavePutBody, options) { return exports.TaxTaxRateRepositoryV1ApiFp(this.configuration).taxTaxRateRepositoryV1SavePut(taxTaxRateRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.TaxTaxRateRepositoryV1Api = TaxTaxRateRepositoryV1Api; /** * TaxTaxRuleRepositoryV1Api - fetch parameter creator * @export */ const TaxTaxRuleRepositoryV1ApiFetchParamCreator = function (configuration) { return { /** * Delete TaxRule * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1DeleteByIdDelete(ruleId, options = {}) { // verify required parameter 'ruleId' is not null or undefined if (ruleId === null || ruleId === undefined) { throw new RequiredError('ruleId', 'Required parameter ruleId was null or undefined when calling taxTaxRuleRepositoryV1DeleteByIdDelete.'); } const localVarPath = `/V1/taxRules/{ruleId}` .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get TaxRule * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1GetGet(ruleId, options = {}) { // verify required parameter 'ruleId' is not null or undefined if (ruleId === null || ruleId === undefined) { throw new RequiredError('ruleId', 'Required parameter ruleId was null or undefined when calling taxTaxRuleRepositoryV1GetGet.'); } const localVarPath = `/V1/taxRules/{ruleId}` .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))); const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Search TaxRules This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRuleRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options = {}) { const localVarPath = `/V1/taxRules/search`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'GET' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (searchCriteriaFilterGroups0Filters0Field !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][field]'] = searchCriteriaFilterGroups0Filters0Field; } if (searchCriteriaFilterGroups0Filters0Value !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][value]'] = searchCriteriaFilterGroups0Filters0Value; } if (searchCriteriaFilterGroups0Filters0ConditionType !== undefined) { localVarQueryParameter['searchCriteria[filterGroups][0][filters][0][conditionType]'] = searchCriteriaFilterGroups0Filters0ConditionType; } if (searchCriteriaSortOrders0Field !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][field]'] = searchCriteriaSortOrders0Field; } if (searchCriteriaSortOrders0Direction !== undefined) { localVarQueryParameter['searchCriteria[sortOrders][0][direction]'] = searchCriteriaSortOrders0Direction; } if (searchCriteriaPageSize !== undefined) { localVarQueryParameter['searchCriteria[pageSize]'] = searchCriteriaPageSize; } if (searchCriteriaCurrentPage !== undefined) { localVarQueryParameter['searchCriteria[currentPage]'] = searchCriteriaCurrentPage; } localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save TaxRule * @param {any} [taxTaxRuleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1SavePost(taxTaxRuleRepositoryV1SavePostBody, options = {}) { const localVarPath = `/V1/taxRules`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(taxTaxRuleRepositoryV1SavePostBody || {}) : (taxTaxRuleRepositoryV1SavePostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Save TaxRule * @param {any} [taxTaxRuleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1SavePut(taxTaxRuleRepositoryV1SavePutBody, options = {}) { const localVarPath = `/V1/taxRules`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'PUT' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(taxTaxRuleRepositoryV1SavePutBody || {}) : (taxTaxRuleRepositoryV1SavePutBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.TaxTaxRuleRepositoryV1ApiFetchParamCreator = TaxTaxRuleRepositoryV1ApiFetchParamCreator; /** * TaxTaxRuleRepositoryV1Api - functional programming interface * @export */ const TaxTaxRuleRepositoryV1ApiFp = function (configuration) { return { /** * Delete TaxRule * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1DeleteByIdDelete(ruleId, options) { const localVarFetchArgs = exports.TaxTaxRuleRepositoryV1ApiFetchParamCreator(configuration).taxTaxRuleRepositoryV1DeleteByIdDelete(ruleId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Get TaxRule * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1GetGet(ruleId, options) { const localVarFetchArgs = exports.TaxTaxRuleRepositoryV1ApiFetchParamCreator(configuration).taxTaxRuleRepositoryV1GetGet(ruleId, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Search TaxRules This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRuleRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { const localVarFetchArgs = exports.TaxTaxRuleRepositoryV1ApiFetchParamCreator(configuration).taxTaxRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save TaxRule * @param {any} [taxTaxRuleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1SavePost(taxTaxRuleRepositoryV1SavePostBody, options) { const localVarFetchArgs = exports.TaxTaxRuleRepositoryV1ApiFetchParamCreator(configuration).taxTaxRuleRepositoryV1SavePost(taxTaxRuleRepositoryV1SavePostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, /** * Save TaxRule * @param {any} [taxTaxRuleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1SavePut(taxTaxRuleRepositoryV1SavePutBody, options) { const localVarFetchArgs = exports.TaxTaxRuleRepositoryV1ApiFetchParamCreator(configuration).taxTaxRuleRepositoryV1SavePut(taxTaxRuleRepositoryV1SavePutBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.TaxTaxRuleRepositoryV1ApiFp = TaxTaxRuleRepositoryV1ApiFp; /** * TaxTaxRuleRepositoryV1Api - factory interface * @export */ const TaxTaxRuleRepositoryV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Delete TaxRule * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1DeleteByIdDelete(ruleId, options) { return exports.TaxTaxRuleRepositoryV1ApiFp(configuration).taxTaxRuleRepositoryV1DeleteByIdDelete(ruleId, options)(fetch, basePath); }, /** * Get TaxRule * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1GetGet(ruleId, options) { return exports.TaxTaxRuleRepositoryV1ApiFp(configuration).taxTaxRuleRepositoryV1GetGet(ruleId, options)(fetch, basePath); }, /** * Search TaxRules This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRuleRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.TaxTaxRuleRepositoryV1ApiFp(configuration).taxTaxRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(fetch, basePath); }, /** * Save TaxRule * @param {any} [taxTaxRuleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1SavePost(taxTaxRuleRepositoryV1SavePostBody, options) { return exports.TaxTaxRuleRepositoryV1ApiFp(configuration).taxTaxRuleRepositoryV1SavePost(taxTaxRuleRepositoryV1SavePostBody, options)(fetch, basePath); }, /** * Save TaxRule * @param {any} [taxTaxRuleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ taxTaxRuleRepositoryV1SavePut(taxTaxRuleRepositoryV1SavePutBody, options) { return exports.TaxTaxRuleRepositoryV1ApiFp(configuration).taxTaxRuleRepositoryV1SavePut(taxTaxRuleRepositoryV1SavePutBody, options)(fetch, basePath); }, }; }; exports.TaxTaxRuleRepositoryV1ApiFactory = TaxTaxRuleRepositoryV1ApiFactory; /** * TaxTaxRuleRepositoryV1Api - object-oriented interface * @export * @class TaxTaxRuleRepositoryV1Api * @extends {BaseAPI} */ class TaxTaxRuleRepositoryV1Api extends BaseAPI { /** * Delete TaxRule * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxRuleRepositoryV1Api */ taxTaxRuleRepositoryV1DeleteByIdDelete(ruleId, options) { return exports.TaxTaxRuleRepositoryV1ApiFp(this.configuration).taxTaxRuleRepositoryV1DeleteByIdDelete(ruleId, options)(this.fetch, this.basePath); } /** * Get TaxRule * @param {number} ruleId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxRuleRepositoryV1Api */ taxTaxRuleRepositoryV1GetGet(ruleId, options) { return exports.TaxTaxRuleRepositoryV1ApiFp(this.configuration).taxTaxRuleRepositoryV1GetGet(ruleId, options)(this.fetch, this.basePath); } /** * Search TaxRules This call returns an array of objects, but detailed information about each object’s attributes might not be included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRuleRepositoryInterface to determine which call to use to get detailed information about all attributes for an object. * @param {string} [searchCriteriaFilterGroups0Filters0Field] Field * @param {string} [searchCriteriaFilterGroups0Filters0Value] Value * @param {string} [searchCriteriaFilterGroups0Filters0ConditionType] Condition type * @param {string} [searchCriteriaSortOrders0Field] Sorting field. * @param {string} [searchCriteriaSortOrders0Direction] Sorting direction. * @param {number} [searchCriteriaPageSize] Page size. * @param {number} [searchCriteriaCurrentPage] Current page. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxRuleRepositoryV1Api */ taxTaxRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options) { return exports.TaxTaxRuleRepositoryV1ApiFp(this.configuration).taxTaxRuleRepositoryV1GetListGet(searchCriteriaFilterGroups0Filters0Field, searchCriteriaFilterGroups0Filters0Value, searchCriteriaFilterGroups0Filters0ConditionType, searchCriteriaSortOrders0Field, searchCriteriaSortOrders0Direction, searchCriteriaPageSize, searchCriteriaCurrentPage, options)(this.fetch, this.basePath); } /** * Save TaxRule * @param {any} [taxTaxRuleRepositoryV1SavePostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxRuleRepositoryV1Api */ taxTaxRuleRepositoryV1SavePost(taxTaxRuleRepositoryV1SavePostBody, options) { return exports.TaxTaxRuleRepositoryV1ApiFp(this.configuration).taxTaxRuleRepositoryV1SavePost(taxTaxRuleRepositoryV1SavePostBody, options)(this.fetch, this.basePath); } /** * Save TaxRule * @param {any} [taxTaxRuleRepositoryV1SavePutBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TaxTaxRuleRepositoryV1Api */ taxTaxRuleRepositoryV1SavePut(taxTaxRuleRepositoryV1SavePutBody, options) { return exports.TaxTaxRuleRepositoryV1ApiFp(this.configuration).taxTaxRuleRepositoryV1SavePut(taxTaxRuleRepositoryV1SavePutBody, options)(this.fetch, this.basePath); } } exports.TaxTaxRuleRepositoryV1Api = TaxTaxRuleRepositoryV1Api; /** * VertexAddressValidationAddressManagementV1Api - fetch parameter creator * @export */ const VertexAddressValidationAddressManagementV1ApiFetchParamCreator = function (configuration) { return { /** * * @param {any} [vertexAddressValidationAddressManagementV1GetValidAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ vertexAddressValidationAddressManagementV1GetValidAddressPost(vertexAddressValidationAddressManagementV1GetValidAddressPostBody, options = {}) { const localVarPath = `/V1/vertex-address-validation/vertex-address`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(vertexAddressValidationAddressManagementV1GetValidAddressPostBody || {}) : (vertexAddressValidationAddressManagementV1GetValidAddressPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.VertexAddressValidationAddressManagementV1ApiFetchParamCreator = VertexAddressValidationAddressManagementV1ApiFetchParamCreator; /** * VertexAddressValidationAddressManagementV1Api - functional programming interface * @export */ const VertexAddressValidationAddressManagementV1ApiFp = function (configuration) { return { /** * * @param {any} [vertexAddressValidationAddressManagementV1GetValidAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ vertexAddressValidationAddressManagementV1GetValidAddressPost(vertexAddressValidationAddressManagementV1GetValidAddressPostBody, options) { const localVarFetchArgs = exports.VertexAddressValidationAddressManagementV1ApiFetchParamCreator(configuration).vertexAddressValidationAddressManagementV1GetValidAddressPost(vertexAddressValidationAddressManagementV1GetValidAddressPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.VertexAddressValidationAddressManagementV1ApiFp = VertexAddressValidationAddressManagementV1ApiFp; /** * VertexAddressValidationAddressManagementV1Api - factory interface * @export */ const VertexAddressValidationAddressManagementV1ApiFactory = function (configuration, fetch, basePath) { return { /** * * @param {any} [vertexAddressValidationAddressManagementV1GetValidAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ vertexAddressValidationAddressManagementV1GetValidAddressPost(vertexAddressValidationAddressManagementV1GetValidAddressPostBody, options) { return exports.VertexAddressValidationAddressManagementV1ApiFp(configuration).vertexAddressValidationAddressManagementV1GetValidAddressPost(vertexAddressValidationAddressManagementV1GetValidAddressPostBody, options)(fetch, basePath); }, }; }; exports.VertexAddressValidationAddressManagementV1ApiFactory = VertexAddressValidationAddressManagementV1ApiFactory; /** * VertexAddressValidationAddressManagementV1Api - object-oriented interface * @export * @class VertexAddressValidationAddressManagementV1Api * @extends {BaseAPI} */ class VertexAddressValidationAddressManagementV1Api extends BaseAPI { /** * * @param {any} [vertexAddressValidationAddressManagementV1GetValidAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VertexAddressValidationAddressManagementV1Api */ vertexAddressValidationAddressManagementV1GetValidAddressPost(vertexAddressValidationAddressManagementV1GetValidAddressPostBody, options) { return exports.VertexAddressValidationAddressManagementV1ApiFp(this.configuration).vertexAddressValidationAddressManagementV1GetValidAddressPost(vertexAddressValidationAddressManagementV1GetValidAddressPostBody, options)(this.fetch, this.basePath); } } exports.VertexAddressValidationAddressManagementV1Api = VertexAddressValidationAddressManagementV1Api; /** * VertexAddressValidationApiCleanseAddressV1Api - fetch parameter creator * @export */ const VertexAddressValidationApiCleanseAddressV1ApiFetchParamCreator = function (configuration) { return { /** * Query Vertex to cleanse an address * @param {any} [vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ vertexAddressValidationApiCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody, options = {}) { const localVarPath = `/V1/address/cleanse`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody || {}) : (vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.VertexAddressValidationApiCleanseAddressV1ApiFetchParamCreator = VertexAddressValidationApiCleanseAddressV1ApiFetchParamCreator; /** * VertexAddressValidationApiCleanseAddressV1Api - functional programming interface * @export */ const VertexAddressValidationApiCleanseAddressV1ApiFp = function (configuration) { return { /** * Query Vertex to cleanse an address * @param {any} [vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ vertexAddressValidationApiCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody, options) { const localVarFetchArgs = exports.VertexAddressValidationApiCleanseAddressV1ApiFetchParamCreator(configuration).vertexAddressValidationApiCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.VertexAddressValidationApiCleanseAddressV1ApiFp = VertexAddressValidationApiCleanseAddressV1ApiFp; /** * VertexAddressValidationApiCleanseAddressV1Api - factory interface * @export */ const VertexAddressValidationApiCleanseAddressV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Query Vertex to cleanse an address * @param {any} [vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ vertexAddressValidationApiCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody, options) { return exports.VertexAddressValidationApiCleanseAddressV1ApiFp(configuration).vertexAddressValidationApiCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody, options)(fetch, basePath); }, }; }; exports.VertexAddressValidationApiCleanseAddressV1ApiFactory = VertexAddressValidationApiCleanseAddressV1ApiFactory; /** * VertexAddressValidationApiCleanseAddressV1Api - object-oriented interface * @export * @class VertexAddressValidationApiCleanseAddressV1Api * @extends {BaseAPI} */ class VertexAddressValidationApiCleanseAddressV1Api extends BaseAPI { /** * Query Vertex to cleanse an address * @param {any} [vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VertexAddressValidationApiCleanseAddressV1Api */ vertexAddressValidationApiCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody, options) { return exports.VertexAddressValidationApiCleanseAddressV1ApiFp(this.configuration).vertexAddressValidationApiCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiCleanseAddressV1CleanseAddressPostBody, options)(this.fetch, this.basePath); } } exports.VertexAddressValidationApiCleanseAddressV1Api = VertexAddressValidationApiCleanseAddressV1Api; /** * VertexAddressValidationApiGuestCleanseAddressV1Api - fetch parameter creator * @export */ const VertexAddressValidationApiGuestCleanseAddressV1ApiFetchParamCreator = function (configuration) { return { /** * Query Vertex to cleanse an address * @param {any} [vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody, options = {}) { const localVarPath = `/V1/guest-address/cleanse`; const localVarUrlObj = url.parse(localVarPath, true); const localVarRequestOptions = Object.assign({ method: 'POST' }, options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 delete localVarUrlObj.search; localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); const needsSerialization = ("any" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody || {}) : (vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.VertexAddressValidationApiGuestCleanseAddressV1ApiFetchParamCreator = VertexAddressValidationApiGuestCleanseAddressV1ApiFetchParamCreator; /** * VertexAddressValidationApiGuestCleanseAddressV1Api - functional programming interface * @export */ const VertexAddressValidationApiGuestCleanseAddressV1ApiFp = function (configuration) { return { /** * Query Vertex to cleanse an address * @param {any} [vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody, options) { const localVarFetchArgs = exports.VertexAddressValidationApiGuestCleanseAddressV1ApiFetchParamCreator(configuration).vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody, options); return (fetch = portableFetch, basePath = BASE_PATH) => { return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { return response.json(); } else { throw response; } }); }; }, }; }; exports.VertexAddressValidationApiGuestCleanseAddressV1ApiFp = VertexAddressValidationApiGuestCleanseAddressV1ApiFp; /** * VertexAddressValidationApiGuestCleanseAddressV1Api - factory interface * @export */ const VertexAddressValidationApiGuestCleanseAddressV1ApiFactory = function (configuration, fetch, basePath) { return { /** * Query Vertex to cleanse an address * @param {any} [vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody, options) { return exports.VertexAddressValidationApiGuestCleanseAddressV1ApiFp(configuration).vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody, options)(fetch, basePath); }, }; }; exports.VertexAddressValidationApiGuestCleanseAddressV1ApiFactory = VertexAddressValidationApiGuestCleanseAddressV1ApiFactory; /** * VertexAddressValidationApiGuestCleanseAddressV1Api - object-oriented interface * @export * @class VertexAddressValidationApiGuestCleanseAddressV1Api * @extends {BaseAPI} */ class VertexAddressValidationApiGuestCleanseAddressV1Api extends BaseAPI { /** * Query Vertex to cleanse an address * @param {any} [vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VertexAddressValidationApiGuestCleanseAddressV1Api */ vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody, options) { return exports.VertexAddressValidationApiGuestCleanseAddressV1ApiFp(this.configuration).vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPost(vertexAddressValidationApiGuestCleanseAddressV1CleanseAddressPostBody, options)(this.fetch, this.basePath); } } exports.VertexAddressValidationApiGuestCleanseAddressV1Api = VertexAddressValidationApiGuestCleanseAddressV1Api; //# sourceMappingURL=api.js.map