UNPKG

trade360-nodejs-sdk

Version:

LSports Trade360 SDK for Node.js

64 lines 2.98 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomersApiFactory = void 0; const common_1 = require("../common"); const services_1 = require("./services"); /** * Factory class for creating package distribution HTTP client. * @implements ICustomersApiFactory interface for creating package * distribution HTTP client. * @see ICustomersApiFactory interface for creating package */ class CustomersApiFactory { createPackageDistributionHttpClient(httpServiceConfig) { return new services_1.PackageDistributionHttpClient(httpServiceConfig); } /** * createMetadataHttpClient method is responsible for creating * a new instance of the MetadataHttpClient class. It creates a * new instance of the MetadataHttpClient class with the provided * HTTP service configuration and mapper. * @param httpServiceConfig The HTTP service configuration for the * metadata HTTP client to use in sending requests to the metadata * API. * @returns A new instance of the MetadataHttpClient class with the * provided HTTP service configuration and mapper. * @see MetadataHttpClient class for sending requests to the * metadata API. * @see IHttpServiceConfig interface for the configuration of the * HTTP service. * @see IMapper interface for mapping between different types of * objects. * @see Mapper class for mapping between different types of objects * in the application. */ createMetadataHttpClient(httpServiceConfig) { const mapper = new common_1.Mapper(httpServiceConfig.packageCredentials); return new services_1.MetadataHttpClient(httpServiceConfig, mapper); } /** * createSubscriptionHttpClient method is responsible for creating * a new instance of the SubscriptionHttpClient class. It creates a * new instance of the SubscriptionHttpClient class with the provided * HTTP service configuration and mapper. * @param httpServiceConfig The HTTP service configuration for the * subscription HTTP client to use in sending requests to the * subscription API. * @returns A new instance of the SubscriptionHttpClient class with * the provided HTTP service configuration and mapper. * @see SubscriptionHttpClient class for sending requests to the * subscription API. * @see IHttpServiceConfig interface for the configuration of the * HTTP service. * @see IMapper interface for mapping between different types of * objects. * @see Mapper class for mapping between different types of objects * in the application. */ createSubscriptionHttpClient(httpServiceConfig) { const mapper = new common_1.Mapper(httpServiceConfig.packageCredentials); return new services_1.SubscriptionHttpClient(httpServiceConfig, mapper); } } exports.CustomersApiFactory = CustomersApiFactory; //# sourceMappingURL=customer-api.js.map