/// <summary> /// /// <example> /// <code> /// var result = AttributeVocabularyValueFactory.AddAttributeVocabularyValueLocalizedContent(handler : handler, localizedContent : localizedContent, attributeFQN : attributeFQN, value : value, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<AttributeVocabularyValueLocalizedContent/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ProductAdmin.AttributeVocabularyValueLocalizedContent AddAttributeVocabularyValueLocalizedContent(ServiceClientMessageHandler handler, Mozu.Api.Contracts.ProductAdmin.AttributeVocabularyValueLocalizedContent localizedContent, string attributeFQN, string value, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.Created, HttpStatusCode successCode = HttpStatusCode.Created) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Admin.Attributedefinition.Attributes.AttributeVocabularyValueClient.AddAttributeVocabularyValueLocalizedContentClient( localizedContent: localizedContent, attributeFQN: attributeFQN, value: value, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).ExecuteAsync(default(CancellationToken)).Wait(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Evaluates whether a collection of discounts specified in the request can be redeemed for the supplied product code. /// <example> /// <code> /// var result = ProductFactory.ValidateDiscounts(handler : handler, discountSelections : discountSelections, productCode : productCode, variationProductCode : variationProductCode, customerAccountId : customerAccountId, allowInactive : allowInactive, skipInventoryCheck : skipInventoryCheck, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<DiscountValidationSummary/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ProductRuntime.DiscountValidationSummary ValidateDiscounts(ServiceClientMessageHandler handler, Mozu.Api.Contracts.ProductRuntime.DiscountSelections discountSelections, string productCode, string variationProductCode = null, int?customerAccountId = null, bool?allowInactive = null, bool?skipInventoryCheck = null, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Storefront.ProductClient.ValidateDiscountsClient( discountSelections: discountSelections, productCode: productCode, variationProductCode: variationProductCode, customerAccountId: customerAccountId, allowInactive: allowInactive, skipInventoryCheck: skipInventoryCheck, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Deletes a product reservation. For example, delete a reservation when an order is not processed to return the product quantity back to inventory. /// <example> /// <code> /// var result = ProductReservationFactory.DeleteProductReservation(handler : handler, productReservationId : productReservationId, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void DeleteProductReservation(ServiceClientMessageHandler handler, int productReservationId, DataViewMode dataViewMode = DataViewMode.Live, HttpStatusCode expectedCode = HttpStatusCode.NoContent, HttpStatusCode successCode = HttpStatusCode.NoContent) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Admin.ProductReservationClient.DeleteProductReservationClient( productReservationId: productReservationId, dataViewMode: dataViewMode); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } } var noResponse = ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null; }
/// <summary> /// orders-orderrefunds Put ResendRefundEmail description DOCUMENT_HERE /// <example> /// <code> /// var result = RefundFactory.ResendRefundEmail(handler : handler, orderId : orderId, refundId : refundId, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void ResendRefundEmail(ServiceClientMessageHandler handler, string orderId, string refundId, HttpStatusCode expectedCode = HttpStatusCode.NoContent, HttpStatusCode successCode = HttpStatusCode.NoContent) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Orders.RefundClient.ResendRefundEmailClient( orderId: orderId, refundId: refundId); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } } var noResponse = ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null; }
/// <summary> /// Retrieves information about a single product given its product code for to index in the search engine /// <example> /// <code> /// var result = ProductFactory.GetProductForIndexing(handler : handler, productCode : productCode, productVersion : productVersion, lastModifiedDate : lastModifiedDate, responseFields : responseFields, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<Product/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ProductRuntime.Product GetProductForIndexing(ServiceClientMessageHandler handler, string productCode, long?productVersion = null, DateTime?lastModifiedDate = null, string responseFields = null, DataViewMode dataViewMode = DataViewMode.Live, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Storefront.ProductClient.GetProductForIndexingClient( productCode: productCode, productVersion: productVersion, lastModifiedDate: lastModifiedDate, responseFields: responseFields, dataViewMode: dataViewMode); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// /// <example> /// <code> /// var result = PublishingScopeFactory.DeletePublishSet(handler : handler, publishSetCode : publishSetCode, discardDrafts : discardDrafts, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void DeletePublishSet(ServiceClientMessageHandler handler, string publishSetCode, bool?discardDrafts = null, HttpStatusCode expectedCode = HttpStatusCode.NoContent, HttpStatusCode successCode = HttpStatusCode.NoContent) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Admin.PublishingScopeClient.DeletePublishSetClient( publishSetCode: publishSetCode, discardDrafts: discardDrafts); try { apiClient.WithContext(handler.ApiContext).ExecuteAsync(default(CancellationToken)).Wait(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } } var noResponse = ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null; }
/// <summary> /// /// <example> /// <code> /// var result = ProductTypeFactory.GetProductType(handler : handler, productTypeId : productTypeId, responseFields : responseFields, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<ProductType/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ProductAdmin.ProductType GetProductType(ServiceClientMessageHandler handler, int productTypeId, string responseFields = null, DataViewMode dataViewMode = DataViewMode.Live, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Admin.Attributedefinition.ProductTypeClient.GetProductTypeClient( productTypeId: productTypeId, responseFields: responseFields, dataViewMode: dataViewMode); try { apiClient.WithContext(handler.ApiContext).ExecuteAsync(default(CancellationToken)).Wait(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Deletes the authentication ticket for the user by supplying the refresh token. /// <example> /// <code> /// var result = TenantAdminUserAuthTicketFactory.DeleteUserAuthTicket(handler : handler, refreshToken : refreshToken, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void DeleteUserAuthTicket(ServiceClientMessageHandler handler, string refreshToken, HttpStatusCode expectedCode = HttpStatusCode.NoContent, HttpStatusCode successCode = HttpStatusCode.NoContent) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Platform.Adminuser.TenantAdminUserAuthTicketClient.DeleteUserAuthTicketClient( refreshToken: refreshToken); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } } var noResponse = ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null; }
/// <summary> /// Creates an authentication ticket for the supplied user to specify in API requests associated with the supplied tenant. /// <example> /// <code> /// var result = TenantAdminUserAuthTicketFactory.CreateUserAuthTicket(handler : handler, userAuthInfo : userAuthInfo, tenantId : tenantId, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<TenantAdminUserAuthTicket/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.AdminUser.TenantAdminUserAuthTicket CreateUserAuthTicket(ServiceClientMessageHandler handler, Mozu.Api.Contracts.Core.UserAuthInfo userAuthInfo, int?tenantId = null, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.Created, HttpStatusCode successCode = HttpStatusCode.Created) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Platform.Adminuser.TenantAdminUserAuthTicketClient.CreateUserAuthTicketClient( userAuthInfo: userAuthInfo, tenantId: tenantId, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Retrieves the details of the third-party payment service workflows configured for the site. /// <example> /// <code> /// var result = PaymentSettingsFactory.GetThirdPartyPaymentWorkflows(handler : handler, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<List<ExternalPaymentWorkflowDefinition>/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static List <Mozu.Api.Contracts.SiteSettings.Order.ExternalPaymentWorkflowDefinition> GetThirdPartyPaymentWorkflows(ServiceClientMessageHandler handler, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Settings.Checkout.PaymentSettingsClient.GetThirdPartyPaymentWorkflowsClient( ); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Retrieves a collection of entity containers. Each container holds a set of entities per ID. /// <example> /// <code> /// var result = EntityContainerFactory.GetEntityContainers(handler : handler, entityListFullName : entityListFullName, pageSize : pageSize, startIndex : startIndex, filter : filter, sortBy : sortBy, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<EntityContainerCollection/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.MZDB.EntityContainerCollection GetEntityContainers(ServiceClientMessageHandler handler, string entityListFullName, int?pageSize = null, int?startIndex = null, string filter = null, string sortBy = null, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Platform.Entitylists.EntityContainerClient.GetEntityContainersClient( entityListFullName: entityListFullName, pageSize: pageSize, startIndex: startIndex, filter: filter, sortBy: sortBy, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// /// <example> /// <code> /// var result = PaymentSettingsFactory.DeleteThirdPartyPaymentWorkflow(handler : handler, fullyQualifiedName : fullyQualifiedName, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void DeleteThirdPartyPaymentWorkflow(ServiceClientMessageHandler handler, string fullyQualifiedName, HttpStatusCode expectedCode = HttpStatusCode.NoContent, HttpStatusCode successCode = HttpStatusCode.NoContent) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Settings.Checkout.PaymentSettingsClient.DeleteThirdPartyPaymentWorkflowClient( fullyQualifiedName: fullyQualifiedName); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } } var noResponse = ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null; }
/// <summary> /// payments-cards Put Update description DOCUMENT_HERE /// <example> /// <code> /// var result = PublicCardsFactory.Update(handler : handler, request : request, cardId : cardId, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<SyncResponse/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.PaymentService.Response.SyncResponse Update(ServiceClientMessageHandler handler, Mozu.Api.Contracts.PaymentService.PublicCard request, string cardId, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Payments.PublicCardsClient.UpdateClient( request: request, cardId: cardId); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Retrieves a collection of localized content for attributes based on a `localeCode`. /// <example> /// <code> /// var result = AttributeLocalizedContentFactory.GetAttributeLocalizedContents(handler : handler, attributeFQN : attributeFQN, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<List<AttributeLocalizedContent>/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static List <Mozu.Api.Contracts.ProductAdmin.AttributeLocalizedContent> GetAttributeLocalizedContents(ServiceClientMessageHandler handler, string attributeFQN, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Admin.Attributedefinition.Attributes.AttributeLocalizedContentClient.GetAttributeLocalizedContentsClient( attributeFQN: attributeFQN); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// /// <example> /// <code> /// var result = CredentialStoreEntryFactory.StoreCredentials(handler : handler, credentials : credentials, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void StoreCredentials(ServiceClientMessageHandler handler, Mozu.Api.Contracts.InstalledApplications.CredentialStoreEntry credentials, HttpStatusCode expectedCode = HttpStatusCode.NoContent, HttpStatusCode successCode = HttpStatusCode.NoContent) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Platform.Extensions.CredentialStoreEntryClient.StoreCredentialsClient( credentials: credentials); try { apiClient.WithContext(handler.ApiContext).ExecuteAsync(default(CancellationToken)).Wait(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } } var noResponse = ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null; }
/// <summary> /// Searches the categories displayed on the web storefront for products or product options that the shopper types in a search query. /// <example> /// <code> /// var result = ProductSearchResultFactory.Search(handler : handler, query : query, filter : filter, facetTemplate : facetTemplate, facetTemplateSubset : facetTemplateSubset, facet : facet, facetFieldRangeQuery : facetFieldRangeQuery, facetHierPrefix : facetHierPrefix, facetHierValue : facetHierValue, facetHierDepth : facetHierDepth, facetStartIndex : facetStartIndex, facetPageSize : facetPageSize, facetSettings : facetSettings, facetValueFilter : facetValueFilter, sortBy : sortBy, pageSize : pageSize, startIndex : startIndex, searchSettings : searchSettings, enableSearchTuningRules : enableSearchTuningRules, searchTuningRuleContext : searchTuningRuleContext, searchTuningRuleCode : searchTuningRuleCode, facetTemplateExclude : facetTemplateExclude, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<ProductSearchResult/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ProductRuntime.ProductSearchResult Search(ServiceClientMessageHandler handler, string query = null, string filter = null, string facetTemplate = null, string facetTemplateSubset = null, string facet = null, string facetFieldRangeQuery = null, string facetHierPrefix = null, string facetHierValue = null, string facetHierDepth = null, string facetStartIndex = null, string facetPageSize = null, string facetSettings = null, string facetValueFilter = null, string sortBy = null, int?pageSize = null, int?startIndex = null, string searchSettings = null, bool?enableSearchTuningRules = null, string searchTuningRuleContext = null, string searchTuningRuleCode = null, string facetTemplateExclude = null, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Storefront.ProductSearchResultClient.SearchClient( query: query, filter: filter, facetTemplate: facetTemplate, facetTemplateSubset: facetTemplateSubset, facet: facet, facetFieldRangeQuery: facetFieldRangeQuery, facetHierPrefix: facetHierPrefix, facetHierValue: facetHierValue, facetHierDepth: facetHierDepth, facetStartIndex: facetStartIndex, facetPageSize: facetPageSize, facetSettings: facetSettings, facetValueFilter: facetValueFilter, sortBy: sortBy, pageSize: pageSize, startIndex: startIndex, searchSettings: searchSettings, enableSearchTuningRules: enableSearchTuningRules, searchTuningRuleContext: searchTuningRuleContext, searchTuningRuleCode: searchTuningRuleCode, facetTemplateExclude: facetTemplateExclude, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// /// <example> /// <code> /// var result = ShipmentFactory.GetAvailableShipmentMethods(handler : handler, orderId : orderId, draft : draft, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<List<ShippingRate>/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static List <Mozu.Api.Contracts.CommerceRuntime.Fulfillment.ShippingRate> GetAvailableShipmentMethods(ServiceClientMessageHandler handler, string orderId, bool?draft = null, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Orders.ShipmentClient.GetAvailableShipmentMethodsClient( orderId: orderId, draft: draft); try { apiClient.WithContext(handler.ApiContext).ExecuteAsync(default(CancellationToken)).Wait(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Suggests possible search terms as the shopper enters search text. /// <example> /// <code> /// var result = ProductSearchResultFactory.Suggest(handler : handler, query : query, groups : groups, pageSize : pageSize, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<SearchSuggestionResult/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ProductRuntime.SearchSuggestionResult Suggest(ServiceClientMessageHandler handler, string query = null, string groups = null, int?pageSize = null, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Storefront.ProductSearchResultClient.SuggestClient( query: query, groups: groups, pageSize: pageSize, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Creates a shipment from one or more packages associated with a return replacement. /// <example> /// <code> /// var result = ShipmentFactory.CreatePackageShipments(handler : handler, packageIds : packageIds, returnId : returnId, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<List<Package>/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static List <Mozu.Api.Contracts.CommerceRuntime.Fulfillment.Package> CreatePackageShipments(ServiceClientMessageHandler handler, List <string> packageIds, string returnId, HttpStatusCode expectedCode = HttpStatusCode.Created, HttpStatusCode successCode = HttpStatusCode.Created) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Returns.ShipmentClient.CreatePackageShipmentsClient( packageIds: packageIds, returnId: returnId); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// /// <example> /// <code> /// var result = OrderItemFactory.UpdateQuoteItem(handler : handler, quoteItem : quoteItem, quoteId : quoteId, quoteItemId : quoteItemId, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<Quote/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.CommerceRuntime.Quotes.Quote UpdateQuoteItem(ServiceClientMessageHandler handler, Mozu.Api.Contracts.CommerceRuntime.Orders.OrderItem quoteItem, string quoteId, string quoteItemId, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Quotes.OrderItemClient.UpdateQuoteItemClient( quoteItem: quoteItem, quoteId: quoteId, quoteItemId: quoteItemId, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).ExecuteAsync(default(CancellationToken)).Wait(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Retrieves the specified contact for a customer account such as a billing or shipping contact. /// <example> /// <code> /// var result = CustomerContactFactory.GetAccountContact(handler : handler, accountId : accountId, contactId : contactId, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<CustomerContact/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.Customer.CustomerContact GetAccountContact(ServiceClientMessageHandler handler, int accountId, int contactId, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Customer.Accounts.CustomerContactClient.GetAccountContactClient( accountId: accountId, contactId: contactId, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// /// <example> /// <code> /// var result = CustomerAccountFactory.SetPasswordChangeRequired(handler : handler, isPasswordChangeRequired : isPasswordChangeRequired, accountId : accountId, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void SetPasswordChangeRequired(ServiceClientMessageHandler handler, bool isPasswordChangeRequired, int accountId, HttpStatusCode expectedCode = HttpStatusCode.NoContent, HttpStatusCode successCode = HttpStatusCode.NoContent) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Customer.CustomerAccountClient.SetPasswordChangeRequiredClient( isPasswordChangeRequired: isPasswordChangeRequired, accountId: accountId); try { apiClient.WithContext(handler.ApiContext).ExecuteAsync(default(CancellationToken)).Wait(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } } var noResponse = ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null; }
/// <summary> /// Retrieves information about a single product given its product code. /// <example> /// <code> /// var result = ProductFactory.GetProduct(handler : handler, productCode : productCode, variationProductCode : variationProductCode, allowInactive : allowInactive, skipInventoryCheck : skipInventoryCheck, supressOutOfStock404 : supressOutOfStock404, quantity : quantity, acceptVariantProductCode : acceptVariantProductCode, responseFields : responseFields, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<Product/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ProductRuntime.Product GetProduct(ServiceClientMessageHandler handler, string productCode, string variationProductCode = null, bool?allowInactive = null, bool?skipInventoryCheck = null, bool?supressOutOfStock404 = null, int?quantity = null, bool?acceptVariantProductCode = null, string responseFields = null, DataViewMode dataViewMode = DataViewMode.Live, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Storefront.ProductClient.GetProductClient( productCode: productCode, variationProductCode: variationProductCode, allowInactive: allowInactive, skipInventoryCheck: skipInventoryCheck, supressOutOfStock404: supressOutOfStock404, quantity: quantity, acceptVariantProductCode: acceptVariantProductCode, responseFields: responseFields, dataViewMode: dataViewMode); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// /// <example> /// <code> /// var result = CustomerAccountFactory.AddAccountAndLogin(handler : handler, accountAndAuthInfo : accountAndAuthInfo, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<CustomerAuthTicket/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.Customer.CustomerAuthTicket AddAccountAndLogin(ServiceClientMessageHandler handler, Mozu.Api.Contracts.Customer.CustomerAccountAndAuthInfo accountAndAuthInfo, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.Created, HttpStatusCode successCode = HttpStatusCode.Created) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Customer.CustomerAccountClient.AddAccountAndLoginClient( accountAndAuthInfo: accountAndAuthInfo, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).ExecuteAsync(default(CancellationToken)).Wait(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Creates a new product configuration each time a shopper selects a product option value. After the shopper defines values for all required product options, the shopper can add the product configuration to a cart. /// <example> /// <code> /// var result = ProductFactory.ConfiguredProduct(handler : handler, productOptionSelections : productOptionSelections, productCode : productCode, includeOptionDetails : includeOptionDetails, skipInventoryCheck : skipInventoryCheck, quantity : quantity, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<ConfiguredProduct/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ProductRuntime.ConfiguredProduct ConfiguredProduct(ServiceClientMessageHandler handler, Mozu.Api.Contracts.ProductRuntime.ProductOptionSelections productOptionSelections, string productCode, bool?includeOptionDetails = null, bool?skipInventoryCheck = null, int?quantity = null, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Storefront.ProductClient.ConfiguredProductClient( productOptionSelections: productOptionSelections, productCode: productCode, includeOptionDetails: includeOptionDetails, skipInventoryCheck: skipInventoryCheck, quantity: quantity, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// /// <example> /// <code> /// var result = CustomerAccountFactory.GetCustomersPurchaseOrderAccounts(handler : handler, startIndex : startIndex, pageSize : pageSize, sortBy : sortBy, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<CustomerPurchaseOrderAccountCollection/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.Customer.CustomerPurchaseOrderAccountCollection GetCustomersPurchaseOrderAccounts(ServiceClientMessageHandler handler, int?startIndex = null, int?pageSize = null, string sortBy = null, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Customer.CustomerAccountClient.GetCustomersPurchaseOrderAccountsClient( startIndex: startIndex, pageSize: pageSize, sortBy: sortBy, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).ExecuteAsync(default(CancellationToken)).Wait(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Updates an existing product reservation for a product. /// <example> /// <code> /// var result = ProductReservationFactory.UpdateProductReservations(handler : handler, productReservations : productReservations, skipInventoryCheck : skipInventoryCheck, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<List<ProductReservation>/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static List <Mozu.Api.Contracts.ProductAdmin.ProductReservation> UpdateProductReservations(ServiceClientMessageHandler handler, List <Mozu.Api.Contracts.ProductAdmin.ProductReservation> productReservations, bool?skipInventoryCheck = null, DataViewMode dataViewMode = DataViewMode.Live, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Admin.ProductReservationClient.UpdateProductReservationsClient( productReservations: productReservations, skipInventoryCheck: skipInventoryCheck, dataViewMode: dataViewMode); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// /// <example> /// <code> /// var result = SecureAppDataFactory.CreateDBValue(handler : handler, value : value, appKeyId : appKeyId, dbEntryQuery : dbEntryQuery, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void CreateDBValue(ServiceClientMessageHandler handler, JObject value, string appKeyId, string dbEntryQuery, HttpStatusCode expectedCode = HttpStatusCode.NoContent, HttpStatusCode successCode = HttpStatusCode.NoContent) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Platform.SecureAppDataClient.CreateDBValueClient( value: value, appKeyId: appKeyId, dbEntryQuery: dbEntryQuery); try { apiClient.WithContext(handler.ApiContext).ExecuteAsync(default(CancellationToken)).Wait(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } } var noResponse = ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null; }
/// <summary> /// Retrieves a list of product reservations according to any specified filter criteria and sort options. /// <example> /// <code> /// var result = ProductReservationFactory.GetProductReservations(handler : handler, startIndex : startIndex, pageSize : pageSize, sortBy : sortBy, filter : filter, responseFields : responseFields, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<ProductReservationCollection/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ProductAdmin.ProductReservationCollection GetProductReservations(ServiceClientMessageHandler handler, int?startIndex = null, int?pageSize = null, string sortBy = null, string filter = null, string responseFields = null, DataViewMode dataViewMode = DataViewMode.Live, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Commerce.Catalog.Admin.ProductReservationClient.GetProductReservationsClient( startIndex: startIndex, pageSize: pageSize, sortBy: sortBy, filter: filter, responseFields: responseFields, dataViewMode: dataViewMode); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }
/// <summary> /// Updates the content and associations for an existing entity. /// <example> /// <code> /// var result = EntityFactory.UpdateEntity(handler : handler, item : item, entityListFullName : entityListFullName, id : id, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<JObject/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static JObject UpdateEntity(ServiceClientMessageHandler handler, JObject item, string entityListFullName, string id, string responseFields = null, HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK) { SetSdKparameters(); var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name; var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; Debug.WriteLine(currentMethodName + '.' + currentMethodName); var apiClient = Mozu.Api.Clients.Platform.Entitylists.EntityClient.UpdateEntityClient( item: item, entityListFullName: entityListFullName, id: id, responseFields: responseFields); try { apiClient.WithContext(handler.ApiContext).Execute(); } catch (ApiException ex) { // Custom error handling for test cases can be placed here Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode); if (customException != null) { throw customException; } return(null); } return(ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode) ? (apiClient.Result()) : null); }