/// <summary> /// /// <example> /// <code> /// var result = B2BAccountFactory.GetB2BAccounts(handler : handler, startIndex : startIndex, pageSize : pageSize, sortBy : sortBy, filter : filter, fields : fields, q : q, qLimit : qLimit, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<B2BAccountCollection/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.Customer.B2BAccountCollection GetB2BAccounts(ServiceClientMessageHandler handler, int?startIndex = null, int?pageSize = null, string sortBy = null, string filter = null, string fields = null, string q = null, int?qLimit = 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.B2BAccountClient.GetB2BAccountsClient( startIndex: startIndex, pageSize: pageSize, sortBy: sortBy, filter: filter, fields: fields, q: q, qLimit: qLimit, 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> /// Resets the password for a customer account. /// <example> /// <code> /// var result = CustomerAccountFactory.ResetPassword(handler : handler, resetPasswordInfo : resetPasswordInfo, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void ResetPassword(ServiceClientMessageHandler handler, Mozu.Api.Contracts.Customer.ResetPasswordInfo resetPasswordInfo, 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.ResetPasswordClient( resetPasswordInfo: resetPasswordInfo); 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> /// /// <example> /// <code> /// var result = LocationInventoryFactory.UpdateLocationInventory(handler : handler, locationInventoryAdjustments : locationInventoryAdjustments, productCode : productCode, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<List<LocationInventory>/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static List <Mozu.Api.Contracts.ProductAdmin.LocationInventory> UpdateLocationInventory(ServiceClientMessageHandler handler, List <Mozu.Api.Contracts.ProductAdmin.LocationInventoryAdjustment> locationInventoryAdjustments, string productCode, 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.Products.LocationInventoryClient.UpdateLocationInventoryClient( locationInventoryAdjustments: locationInventoryAdjustments, productCode: productCode, 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> /// Retrieves a list of the taxable territories configured for the site. /// <example> /// <code> /// var result = TaxableTerritoryFactory.GetTaxableTerritories(handler : handler, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<List<TaxableTerritory>/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static List <Mozu.Api.Contracts.SiteSettings.General.TaxableTerritory> GetTaxableTerritories(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.General.TaxableTerritoryClient.GetTaxableTerritoriesClient( ); 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 current login state of a customer account by providing the user name associated with the customer account. /// <example> /// <code> /// var result = CustomerAccountFactory.GetLoginStateByUserName(handler : handler, userName : userName, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<LoginState/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.Customer.LoginState GetLoginStateByUserName(ServiceClientMessageHandler handler, string userName, 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.GetLoginStateByUserNameClient( userName: userName, 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 = CurrencyLocalizationFactory.AddCurrencyLocalization(handler : handler, currencyLocalization : currencyLocalization, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<CurrencyLocalization/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ProductAdmin.CurrencyLocalization AddCurrencyLocalization(ServiceClientMessageHandler handler, Mozu.Api.Contracts.ProductAdmin.CurrencyLocalization currencyLocalization, 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.CurrencyLocalizationClient.AddCurrencyLocalizationClient( currencyLocalization: currencyLocalization, 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> /// /// <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).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> /// /// <example> /// <code> /// var result = PriceListFactory.BulkUpdatePriceListEntries(handler : handler, priceListEntriesIn : priceListEntriesIn, publishEvents : publishEvents, invalidateCache : invalidateCache, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void BulkUpdatePriceListEntries(ServiceClientMessageHandler handler, List <Mozu.Api.Contracts.ProductAdmin.PriceListEntry> priceListEntriesIn, bool?publishEvents = null, bool?invalidateCache = 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.PriceListClient.BulkUpdatePriceListEntriesClient( priceListEntriesIn: priceListEntriesIn, publishEvents: publishEvents, invalidateCache: invalidateCache); 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 = PaymentSettingsFactory.GetThirdPartyPaymentWorkflowWithValues(handler : handler, fullyQualifiedName : fullyQualifiedName, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<ExternalPaymentWorkflowDefinition/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.SiteSettings.Order.ExternalPaymentWorkflowDefinition GetThirdPartyPaymentWorkflowWithValues(ServiceClientMessageHandler handler, string fullyQualifiedName, 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.Settings.Checkout.PaymentSettingsClient.GetThirdPartyPaymentWorkflowWithValuesClient( fullyQualifiedName: fullyQualifiedName, 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> /// /// <example> /// <code> /// var result = ReferenceDataFactory.GetUnitsOfMeasure(handler : handler, filter : filter, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<UnitOfMeasureCollection/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.Reference.UnitOfMeasureCollection GetUnitsOfMeasure(ServiceClientMessageHandler handler, string filter = 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.ReferenceDataClient.GetUnitsOfMeasureClient( filter: filter, 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 record in the Mozu database based on the information supplied in the request. /// <example> /// <code> /// var result = UserDataFactory.CreateDBValue(handler : handler, value : value, dbEntryQuery : dbEntryQuery, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void CreateDBValue(ServiceClientMessageHandler handler, string value, 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.UserDataClient.CreateDBValueClient( value: value, dbEntryQuery: dbEntryQuery); 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> /// Removes a previously added item from a defined order. /// <example> /// <code> /// var result = OrderItemFactory.DeleteOrderItem(handler : handler, orderId : orderId, orderItemId : orderItemId, updateMode : updateMode, version : version, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<Order/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.CommerceRuntime.Orders.Order DeleteOrderItem(ServiceClientMessageHandler handler, string orderId, string orderItemId, string updateMode = null, string version = 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.OrderItemClient.DeleteOrderItemClient( orderId: orderId, orderItemId: orderItemId, updateMode: updateMode, version: version); 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 = PublicCardFactory.GetGiftCardBalance(handler : handler, balanceRequest : balanceRequest, cardId : cardId, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<SyncResponse/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.PaymentService.Response.SyncResponse GetGiftCardBalance(ServiceClientMessageHandler handler, Mozu.Api.Contracts.PaymentService.Request.GetGiftCardBalanceRequest balanceRequest, string cardId, 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.Payments.PublicCardClient.GetGiftCardBalanceClient( balanceRequest: balanceRequest, cardId: cardId, 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> /// /// <example> /// <code> /// var result = ProductFactory.GetProductCosts(handler : handler, query : query, responseFields : responseFields, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<ProductCostCollection/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ProductRuntime.ProductCostCollection GetProductCosts(ServiceClientMessageHandler handler, Mozu.Api.Contracts.ProductRuntime.ProductCostQuery query, 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.GetProductCostsClient( query: query, 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> /// /// <example> /// <code> /// var result = B2BAccountFactory.UpdateB2BAccountAttribute(handler : handler, attribute : attribute, accountId : accountId, attributeFQN : attributeFQN, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<CustomerAttribute/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.Customer.CustomerAttribute UpdateB2BAccountAttribute(ServiceClientMessageHandler handler, Mozu.Api.Contracts.Customer.CustomerAttribute attribute, int accountId, string attributeFQN, 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.B2BAccountClient.UpdateB2BAccountAttributeClient( attribute: attribute, accountId: accountId, attributeFQN: attributeFQN, 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> /// /// <example> /// <code> /// var result = DestinationFactory.GetDestinations(handler : handler, checkoutId : checkoutId, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<List<Destination>/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static List <Mozu.Api.Contracts.CommerceRuntime.Fulfillment.Destination> GetDestinations(ServiceClientMessageHandler handler, string checkoutId, 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.Checkouts.DestinationClient.GetDestinationsClient( checkoutId: checkoutId); 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> /// /// <example> /// <code> /// var result = B2BAccountFactory.RemoveUserRoleAsync(handler : handler, accountId : accountId, userId : userId, roleId : roleId, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void RemoveUserRoleAsync(ServiceClientMessageHandler handler, int accountId, string userId, int roleId, 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.B2BAccountClient.RemoveUserRoleAsyncClient( accountId: accountId, userId: userId, roleId: roleId); 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 = ShippingInclusionRuleFactory.UpdateShippingInclusionRule(handler : handler, rule : rule, profilecode : profilecode, id : id, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<ShippingInclusionRule/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static Mozu.Api.Contracts.ShippingAdmin.Profile.ShippingInclusionRule UpdateShippingInclusionRule(ServiceClientMessageHandler handler, Mozu.Api.Contracts.ShippingAdmin.Profile.ShippingInclusionRule rule, string profilecode, 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.Commerce.Shipping.Admin.Profiles.ShippingInclusionRuleClient.UpdateShippingInclusionRuleClient( rule: rule, profilecode: profilecode, id: id, 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> /// /// <example> /// <code> /// var result = CurrencyLocalizationFactory.DeleteCurrencyExchangeRate(handler : handler, currencyCode : currencyCode, toCurrencyCode : toCurrencyCode, expectedCode: expectedCode, successCode: successCode); /// var optionalCasting = ConvertClass<void/>(result); /// return optionalCasting; /// </code> /// </example> /// </summary> public static void DeleteCurrencyExchangeRate(ServiceClientMessageHandler handler, string currencyCode, string toCurrencyCode, 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.CurrencyLocalizationClient.DeleteCurrencyExchangeRateClient( currencyCode: currencyCode, toCurrencyCode: toCurrencyCode); 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 = ProductFactory.ConfiguredProduct(handler : handler, productOptionSelections : productOptionSelections, productCode : productCode, includeOptionDetails : includeOptionDetails, skipInventoryCheck : skipInventoryCheck, quantity : quantity, purchaseLocation : purchaseLocation, variationProductCodeFilter : variationProductCodeFilter, 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 purchaseLocation = null, string variationProductCodeFilter = 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, purchaseLocation: purchaseLocation, variationProductCodeFilter: variationProductCodeFilter, 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); }