0.0.1 • Published 6 years ago

sap-commerce-webservices-v2 v0.0.1

Weekly downloads
5
License
-
Repository
-
Last release
6 years ago

commerce_webservices_v2

CommerceWebservicesV2 - JavaScript client for commerce_webservices_v2 Commerce Webservices Version 2 This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.0
  • Package version: 2.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install commerce_webservices_v2 --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your commerce_webservices_v2 from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('commerce_webservices_v2') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/commerce_webservices_v2 then install it via:

    npm install YOUR_USERNAME/commerce_webservices_v2 --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var CommerceWebservicesV2 = require('commerce_webservices_v2');

var defaultClient = CommerceWebservicesV2.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservicesV2.AddressApi()

var address = new CommerceWebservicesV2.AddressWsDTO(); // {AddressWsDTO} Address object.

var baseSiteId = "baseSiteId_example"; // {String} Base site identifier

var userId = "userId_example"; // {String} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var opts = { 
  'fields': "DEFAULT" // {String} Response configuration. This is the list of fields that should be returned in the response body.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createAddress(address, baseSiteId, userId, opts, callback);

Documentation for API Endpoints

All URIs are relative to http://re-ec-default-b3c5829e-8fbb-4440-a6ec-2156539041ea.kyma-integration.svc.cluster.local

ClassMethodHTTP requestDescription
CommerceWebservicesV2.AddressApicreateAddressPOST /{baseSiteId}/users/{userId}/addressesCreates a new address.
CommerceWebservicesV2.AddressApigetAddressGET /{baseSiteId}/users/{userId}/addresses/{addressId}Get info about address
CommerceWebservicesV2.AddressApigetAddressesGET /{baseSiteId}/users/{userId}/addressesGet customer's addresses
CommerceWebservicesV2.AddressApiremoveAddressDELETE /{baseSiteId}/users/{userId}/addresses/{addressId}Delete customer's address.
CommerceWebservicesV2.AddressApireplaceAddressPUT /{baseSiteId}/users/{userId}/addresses/{addressId}Updates the address
CommerceWebservicesV2.AddressApiupdateAddressPATCH /{baseSiteId}/users/{userId}/addresses/{addressId}Updates the address
CommerceWebservicesV2.AddressApivalidateAddressPOST /{baseSiteId}/users/{userId}/addresses/verificationVerifies address.
CommerceWebservicesV2.BaseStoresApigetBaseStoreGET /{baseSiteId}/basestores/{baseStoreUid}Get a base store.
CommerceWebservicesV2.CartsApicreateCartPOST /{baseSiteId}/users/{userId}/cartsCreates or restore a cart for a user.
CommerceWebservicesV2.CartsApicreateCartDeliveryAddressPOST /{baseSiteId}/users/{userId}/carts/{cartId}/addresses/deliveryCreates a delivery address for the cart.
CommerceWebservicesV2.CartsApicreateCartEntryPOST /{baseSiteId}/users/{userId}/carts/{cartId}/entriesAdds a product to the cart.
CommerceWebservicesV2.CartsApicreateCartPaymentDetailsPOST /{baseSiteId}/users/{userId}/carts/{cartId}/paymentdetailsDefines and assigns details of a new credit card payment to the cart.
CommerceWebservicesV2.CartsApidoApplyCartPromotionPOST /{baseSiteId}/users/{userId}/carts/{cartId}/promotionsEnables promotions based on the promotionsId of the cart.
CommerceWebservicesV2.CartsApidoApplyCartVoucherPOST /{baseSiteId}/users/{userId}/carts/{cartId}/vouchersApplies a voucher based on the voucherId defined for the cart.
CommerceWebservicesV2.CartsApigetCartGET /{baseSiteId}/users/{userId}/carts/{cartId}Get a cart with a given identifier.
CommerceWebservicesV2.CartsApigetCartDeliveryModeGET /{baseSiteId}/users/{userId}/carts/{cartId}/deliverymodeGet the delivery mode selected for the cart.
CommerceWebservicesV2.CartsApigetCartDeliveryModesGET /{baseSiteId}/users/{userId}/carts/{cartId}/deliverymodesGet all delivery modes for the current store and delivery address.
CommerceWebservicesV2.CartsApigetCartEntriesGET /{baseSiteId}/users/{userId}/carts/{cartId}/entriesGet cart entries.
CommerceWebservicesV2.CartsApigetCartEntryGET /{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}Get the details of the cart entries.
CommerceWebservicesV2.CartsApigetCartPromotionGET /{baseSiteId}/users/{userId}/carts/{cartId}/promotions/{promotionId}Get information about promotion applied on cart.
CommerceWebservicesV2.CartsApigetCartPromotionsGET /{baseSiteId}/users/{userId}/carts/{cartId}/promotionsGet information about promotions applied on cart.
CommerceWebservicesV2.CartsApigetCartVouchersGET /{baseSiteId}/users/{userId}/carts/{cartId}/vouchersGet a list of vouchers applied to the cart.
CommerceWebservicesV2.CartsApigetCartsGET /{baseSiteId}/users/{userId}/cartsGet all customer carts.
CommerceWebservicesV2.CartsApiremoveCartDELETE /{baseSiteId}/users/{userId}/carts/{cartId}Deletes a cart with a given cart id.
CommerceWebservicesV2.CartsApiremoveCartDeliveryAddressDELETE /{baseSiteId}/users/{userId}/carts/{cartId}/addresses/deliveryDeletes the delivery address from the cart.
CommerceWebservicesV2.CartsApiremoveCartDeliveryModeDELETE /{baseSiteId}/users/{userId}/carts/{cartId}/deliverymodeDeletes the delivery mode from the cart.
CommerceWebservicesV2.CartsApiremoveCartEntryDELETE /{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}Deletes cart entry.
CommerceWebservicesV2.CartsApiremoveCartPromotionDELETE /{baseSiteId}/users/{userId}/carts/{cartId}/promotions/{promotionId}Disables the promotion based on the promotionsId of the cart.
CommerceWebservicesV2.CartsApiremoveCartVoucherDELETE /{baseSiteId}/users/{userId}/carts/{cartId}/vouchers/{voucherId}Deletes a voucher defined for the current cart.
CommerceWebservicesV2.CartsApireplaceCartDeliveryAddressPUT /{baseSiteId}/users/{userId}/carts/{cartId}/addresses/deliverySets a delivery address for the cart.
CommerceWebservicesV2.CartsApireplaceCartDeliveryModePUT /{baseSiteId}/users/{userId}/carts/{cartId}/deliverymodeSets the delivery mode for a cart.
CommerceWebservicesV2.CartsApireplaceCartEntryPUT /{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}Set quantity and store details of a cart entry.
CommerceWebservicesV2.CartsApireplaceCartGuestUserPUT /{baseSiteId}/users/{userId}/carts/{cartId}/emailAssigns an email to the cart.
CommerceWebservicesV2.CartsApireplaceCartPaymentDetailsPUT /{baseSiteId}/users/{userId}/carts/{cartId}/paymentdetailsSets credit card payment details for the cart.
CommerceWebservicesV2.CartsApiupdateCartEntryPATCH /{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}Update quantity and store details of a cart entry.
CommerceWebservicesV2.CatalogsApigetCatalogGET /{baseSiteId}/catalogs/{catalogId}Get a catalog
CommerceWebservicesV2.CatalogsApigetCatalogVersionGET /{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}Get information about catalog version
CommerceWebservicesV2.CatalogsApigetCatalogsGET /{baseSiteId}/catalogsGet a list of catalogs
CommerceWebservicesV2.CatalogsApigetCategoriesGET /{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}/categories/{categoryId}Get information about catagory in a catalog version
CommerceWebservicesV2.ComponentApigetComponentByIdListUsingPOSTPOST /{baseSiteId}/cms/componentsGet components' data by id given in body
CommerceWebservicesV2.ComponentApigetComponentByIdUsingGETGET /{baseSiteId}/cms/components/{componentId}Get component data
CommerceWebservicesV2.ConsentsApidoGiveConsentPOST /{baseSiteId}/users/{userId}/consentsA user can give consent.
CommerceWebservicesV2.ConsentsApigetConsentTemplateGET /{baseSiteId}/users/{userId}/consenttemplates/{consentTemplateId}Fetch the consent.
CommerceWebservicesV2.ConsentsApigetConsentTemplatesGET /{baseSiteId}/users/{userId}/consenttemplatesFetch the list of consents
CommerceWebservicesV2.ConsentsApiremoveConsentDELETE /{baseSiteId}/users/{userId}/consents/{consentCode}Withdraw the user consent for a given consent code.
CommerceWebservicesV2.CountriesApigetCountriesGET /{baseSiteId}/countriesGet a list of countries.
CommerceWebservicesV2.CountriesApigetCountryRegionsGET /{baseSiteId}/countries/{countyIsoCode}/regionsFetch the list of regions for the provided country.
CommerceWebservicesV2.CustomerGroupsApicreateCustomerGroupPOST /{baseSiteId}/customergroupsCreates a new customer group.
CommerceWebservicesV2.CustomerGroupsApigetCustomerGroupGET /{baseSiteId}/customergroups/{groupId}Get a specific customer group.
CommerceWebservicesV2.CustomerGroupsApigetCustomerGroupsGET /{baseSiteId}/customergroupsGet all subgroups of a customergroup.
CommerceWebservicesV2.CustomerGroupsApiremoveUsersFromCustomerGroupDELETE /{baseSiteId}/customergroups/{groupId}/members/{userId}Deletes a user from a customer group.
CommerceWebservicesV2.CustomerGroupsApireplaceUsersForCustomerGroupPUT /{baseSiteId}/customergroups/{groupId}/membersSets members for a user group.
CommerceWebservicesV2.CustomerGroupsApiupdateCustomerGroupWithUsersPATCH /{baseSiteId}/customergroups/{groupId}/membersAssigns user(s) to a customer group.
CommerceWebservicesV2.ExportApigetExportedProductsGET /{baseSiteId}/export/productsGet a list of product exports.
CommerceWebservicesV2.ExtendedCartsApicreateConsolidatedPickupLocationPOST /{baseSiteId}/users/{userId}/carts/{cartId}/consolidateHandles the consolidating pickup locations.
CommerceWebservicesV2.ExtendedCartsApidoHandleSopPaymentResponsePOST /{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/responseHandles response from payment provider and create payment details
CommerceWebservicesV2.ExtendedCartsApigetConsolidatedPickupLocationsGET /{baseSiteId}/users/{userId}/carts/{cartId}/consolidateGet consolidated pickup options.
CommerceWebservicesV2.ExtendedCartsApigetSopPaymentRequestDetailsGET /{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/requestGet information needed for create subscription
CommerceWebservicesV2.ExtendedCartsApigetSopPaymentResponseGET /{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/responseGet information about create subscription request results
CommerceWebservicesV2.ExtendedCartsApiremoveSopPaymentResponseDELETE /{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/responseDeletes payment provider response related to cart.
CommerceWebservicesV2.FeedsApigetOrderStatusFeedGET /{baseSiteId}/feeds/orders/statusfeedGet a list of orders with status updates.
CommerceWebservicesV2.ForgottenPasswordsApidoRestorePasswordPOST /{baseSiteId}/forgottenpasswordtokensGenerates a token to restore a customer's forgotten password.
CommerceWebservicesV2.MerchantCallbackApidoHandleCartMerchantCallbackPOST /{baseSiteId}/integration/users/{userId}/carts/{cartId}/payment/sop/responseVerify the decision of the Merchant for a cart
CommerceWebservicesV2.MerchantCallbackApidoHandleMerchantCallbackPOST /{baseSiteId}/integration/merchant_callbackVerify the decision of the Merchant
CommerceWebservicesV2.MiscsApigetCardTypesGET /{baseSiteId}/cardtypesGet a list of supported payment card types.
CommerceWebservicesV2.MiscsApigetCurrenciesGET /{baseSiteId}/currenciesGet a list of available currencies.
CommerceWebservicesV2.MiscsApigetDeliveryCountriesGET /{baseSiteId}/deliverycountriesGet a list of shipping countries.
CommerceWebservicesV2.MiscsApigetLanguagesGET /{baseSiteId}/languagesGet a list of available languages.
CommerceWebservicesV2.MiscsApigetTitlesGET /{baseSiteId}/titlesGet a list of all localized titles.
CommerceWebservicesV2.OrdersApicountUserOrdersHEAD /{baseSiteId}/users/{userId}/ordersGet total number of orders.
CommerceWebservicesV2.OrdersApigetOrderGET /{baseSiteId}/orders/{code}Get a order.
CommerceWebservicesV2.OrdersApigetUserOrderHistoryGET /{baseSiteId}/users/{userId}/ordersGet order history for user.
CommerceWebservicesV2.OrdersApigetUserOrdersGET /{baseSiteId}/users/{userId}/orders/{code}Get a order.
CommerceWebservicesV2.OrdersApiplaceOrderPOST /{baseSiteId}/users/{userId}/ordersPlace a order.
CommerceWebservicesV2.PageApigetPageDataUsingGETGET /{baseSiteId}/cms/pagesGet page data with list of cms content slots
CommerceWebservicesV2.PaymentDetailsApigetPaymentDetailsGET /{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}Get customer's credit card payment details.
CommerceWebservicesV2.PaymentDetailsApigetPaymentDetailsListGET /{baseSiteId}/users/{userId}/paymentdetailsGet customer's credit card payment details list.
CommerceWebservicesV2.PaymentDetailsApiremovePaymentDetailsDELETE /{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}Deletes customer's credit card payment details.
CommerceWebservicesV2.PaymentDetailsApireplacePaymentDetailsPUT /{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}Updates existing customer's credit card payment info.
CommerceWebservicesV2.PaymentDetailsApiupdatePaymentDetailsPATCH /{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}Updates existing customer's credit card payment details.
CommerceWebservicesV2.ProductsApicountProductStockByLocationHEAD /{baseSiteId}/products/{productCode}/stockGet header with a total number of product's stock levels.
CommerceWebservicesV2.ProductsApicountProductsHEAD /{baseSiteId}/products/searchGet a header with total number of products.
CommerceWebservicesV2.ProductsApicreateProductReviewPOST /{baseSiteId}/products/{productCode}/reviewsCreates a new customer review as an anonymous user.
CommerceWebservicesV2.ProductsApigetExpressUpdateProductsGET /{baseSiteId}/products/expressupdateGet products added to the express update feed.
CommerceWebservicesV2.ProductsApigetLocationProductStockGET /{baseSiteId}/products/{productCode}/stockGet a product's stock level.
CommerceWebservicesV2.ProductsApigetProductGET /{baseSiteId}/products/{productCode}Get product details.
CommerceWebservicesV2.ProductsApigetProductReferencesGET /{baseSiteId}/products/{productCode}/referencesGet a product reference
CommerceWebservicesV2.ProductsApigetProductReviewsGET /{baseSiteId}/products/{productCode}/reviewsGet reviews for a product
CommerceWebservicesV2.ProductsApigetProductsGET /{baseSiteId}/products/searchGet a list of products and additional data
CommerceWebservicesV2.ProductsApigetStoreProductStockGET /{baseSiteId}/products/{productCode}/stock/{storeName}Get a product's stock level for a store
CommerceWebservicesV2.ProductsApigetSuggestionsGET /{baseSiteId}/products/suggestionsGet a list of available suggestions
CommerceWebservicesV2.PromotionsApigetPromotionGET /{baseSiteId}/promotions/{code}Get a promotion based on code
CommerceWebservicesV2.PromotionsApigetPromotionsGET /{baseSiteId}/promotionsGet a list of promotions.
CommerceWebservicesV2.SaveCartApidoCartClonePOST /{baseSiteId}/users/{userId}/carts/{cartId}/clonesavedcartExplicitly clones a cart.
CommerceWebservicesV2.SaveCartApidoSaveCartPATCH /{baseSiteId}/users/{userId}/carts/{cartId}/saveExplicitly saves a cart.
CommerceWebservicesV2.SaveCartApidoUpdateFlagForDeletionPATCH /{baseSiteId}/users/{userId}/carts/{cartId}/flagForDeletionFlag a cart for deletion.
CommerceWebservicesV2.SaveCartApidoUpdateSavedCartPATCH /{baseSiteId}/users/{userId}/carts/{cartId}/restoresavedcartRestore a saved cart.
CommerceWebservicesV2.SaveCartApigetSavedCartGET /{baseSiteId}/users/{userId}/carts/{cartId}/savedcartGet a saved cart.
CommerceWebservicesV2.StoresApicountStoreLocationsHEAD /{baseSiteId}/storesGet a header with the number of store locations.
CommerceWebservicesV2.StoresApigetStoreLocationGET /{baseSiteId}/stores/{storeId}Get a store location.
CommerceWebservicesV2.StoresApigetStoreLocationsGET /{baseSiteId}/storesGet a list of store locations
CommerceWebservicesV2.UsersApicreateUserPOST /{baseSiteId}/usersRegisters a customer
CommerceWebservicesV2.UsersApigetUserGET /{baseSiteId}/users/{userId}Get customer profile
CommerceWebservicesV2.UsersApigetUserCustomerGroupsGET /{baseSiteId}/users/{userId}/customergroupsGet all customer groups of a customer.
CommerceWebservicesV2.UsersApiremoveUserDELETE /{baseSiteId}/users/{userId}Delete customer profile.
CommerceWebservicesV2.UsersApireplaceUserPUT /{baseSiteId}/users/{userId}Updates customer profile
CommerceWebservicesV2.UsersApireplaceUserLoginPUT /{baseSiteId}/users/{userId}/loginChanges customer's login name.
CommerceWebservicesV2.UsersApireplaceUserPasswordPUT /{baseSiteId}/users/{userId}/passwordChanges customer's password
CommerceWebservicesV2.UsersApiupdateUserPATCH /{baseSiteId}/users/{userId}Updates customer profile
CommerceWebservicesV2.VouchersApigetVoucherGET /{baseSiteId}/vouchers/{code}Get a voucher based on code.

Documentation for Models

Documentation for Authorization

oauth2_Password

  • Type: OAuth
  • Flow: password
  • Authorization URL:
  • Scopes:
    • basic:

oauth2_client_credentials

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
    • extended:
0.0.1

6 years ago