本文整理汇总了C#中Mozu.Api.Test.Helpers.ServiceClientMessageHandler类的典型用法代码示例。如果您正苦于以下问题:C# ServiceClientMessageHandler类的具体用法?C# ServiceClientMessageHandler怎么用?C# ServiceClientMessageHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServiceClientMessageHandler类属于Mozu.Api.Test.Helpers命名空间,在下文中一共展示了ServiceClientMessageHandler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TransformTreeDocumentContent
/// <summary>
///
/// <example>
/// <code>
/// var result = DocumentTreeFactory.TransformTreeDocumentContent(handler : handler, documentListName : documentListName, documentName : documentName, width : width, height : height, max : max, maxWidth : maxWidth, maxHeight : maxHeight, crop : crop, quality : quality, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<Stream/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static System.IO.Stream TransformTreeDocumentContent(ServiceClientMessageHandler handler,
string documentListName, string documentName, int? width = null, int? height = null, int? max = null, int? maxWidth = null, int? maxHeight = null, string crop = null, int? quality = 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.Content.Documentlists.DocumentTreeClient.TransformTreeDocumentContentClient(
documentListName : documentListName, documentName : documentName, width : width, height : height, max : max, maxWidth : maxWidth, maxHeight : maxHeight, crop : crop, quality : quality );
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;
}
开发者ID:eileenzhuang1,项目名称:mozu-dotnet,代码行数:37,代码来源:DocumentTreeFactory.cs
示例2: GetProductVariationLocalizedDeltaPrices
/// <summary>
///
/// <example>
/// <code>
/// var result = ProductVariationFactory.GetProductVariationLocalizedDeltaPrices(handler : handler, productCode : productCode, variationKey : variationKey, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<List<ProductVariationDeltaPrice>/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static List<Mozu.Api.Contracts.ProductAdmin.ProductVariationDeltaPrice> GetProductVariationLocalizedDeltaPrices(ServiceClientMessageHandler handler,
string productCode, string variationKey, 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.ProductVariationClient.GetProductVariationLocalizedDeltaPricesClient(
productCode : productCode, variationKey : variationKey, 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;
}
开发者ID:kevinwrightleft,项目名称:mozu-dotnet,代码行数:37,代码来源:ProductVariationFactory.cs
示例3: ApplyShippingAdjustment
/// <summary>
/// Applies a shipping adjustment to the specified order.
/// <example>
/// <code>
/// var result = AdjustmentFactory.ApplyShippingAdjustment(handler : handler, adjustment : adjustment, orderId : orderId, 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 ApplyShippingAdjustment(ServiceClientMessageHandler handler,
Mozu.Api.Contracts.CommerceRuntime.Commerce.Adjustment adjustment, string orderId, 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.AdjustmentClient.ApplyShippingAdjustmentClient(
adjustment : adjustment, orderId : orderId, 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;
}
开发者ID:warwickit,项目名称:MozuFreestyle,代码行数:36,代码来源:AdjustmentFactory.cs
示例4: DeleteOption
/// <summary>
/// Removes an option attribute definition for the specified product type.
/// <example>
/// <code>
/// var result = ProductTypeOptionFactory.DeleteOption(handler : handler, productTypeId : productTypeId, attributeFQN : attributeFQN, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<void/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static void DeleteOption(ServiceClientMessageHandler handler,
int productTypeId, string attributeFQN, 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.Attributedefinition.Producttypes.ProductTypeOptionClient.DeleteOptionClient(
productTypeId : productTypeId, attributeFQN : attributeFQN, 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;
}
开发者ID:warwickit,项目名称:MozuFreestyle,代码行数:35,代码来源:ProductTypeOptionFactory.cs
示例5: GetThirdPartyPaymentWorkflows
/// <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;
}
开发者ID:eileenzhuang1,项目名称:mozu-dotnet,代码行数:37,代码来源:PaymentSettingsFactory.cs
示例6: ConfiguredProduct
/// <summary>
/// Creates a new product selection. A create occurs each time a shopper selects a product option as they configure a product. Once all the required product options are configured, the product can be added to a cart.
/// <example>
/// <code>
/// var result = ProductFactory.ConfiguredProduct(handler : handler, productOptionSelections : productOptionSelections, productCode : productCode, includeOptionDetails : includeOptionDetails, skipInventoryCheck : skipInventoryCheck, 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,
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 );
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;
}
开发者ID:warwickit,项目名称:MozuFreestyle,代码行数:36,代码来源:StorefrontProductFactory.cs
示例7: GetRates
/// <summary>
///
/// <example>
/// <code>
/// var result = ObjectFactory.GetRates(handler : handler, rateRequest : rateRequest, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<RatesResponse/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static Mozu.Api.Contracts.ShippingRuntime.RatesResponse GetRates(ServiceClientMessageHandler handler,
Mozu.Api.Contracts.ShippingRuntime.RateRequest rateRequest,
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.ObjectClient.GetRatesClient(
rateRequest : rateRequest );
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;
}
开发者ID:kevinwrightleft,项目名称:mozu-dotnet,代码行数:37,代码来源:StorefrontObjectFactory.cs
示例8: GenerateProductVariations
/// <summary>
/// Generates the variations possible for a product associated with the product type based on the option values supplied in the request.
/// <example>
/// <code>
/// var result = ProductTypeVariationFactory.GenerateProductVariations(handler : handler, productOptionsIn : productOptionsIn, productTypeId : productTypeId, productCode : productCode, startIndex : startIndex, pageSize : pageSize, sortBy : sortBy, filter : filter, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<ProductVariationPagedCollection/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static Mozu.Api.Contracts.ProductAdmin.ProductVariationPagedCollection GenerateProductVariations(ServiceClientMessageHandler handler,
List<Mozu.Api.Contracts.ProductAdmin.ProductOption> productOptionsIn, int productTypeId, string productCode = null, int? startIndex = null, int? pageSize = null, string sortBy = null, string filter = 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.Producttypes.ProductTypeVariationClient.GenerateProductVariationsClient(
productOptionsIn : productOptionsIn, productTypeId : productTypeId, productCode : productCode, startIndex : startIndex, pageSize : pageSize, sortBy : sortBy, filter : filter, 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;
}
开发者ID:warwickit,项目名称:MozuFreestyle,代码行数:36,代码来源:ProductTypeVariationFactory.cs
示例9: CreatePackageShipments
/// <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;
}
开发者ID:rocky0904,项目名称:mozu-dotnet,代码行数:37,代码来源:ReturnsShipmentFactory.cs
示例10: RefreshDeveloperAuthTicket
/// <summary>
/// Generates a new developer account authentication ticket for the specified tenant by supplying the defined refresh token information.
/// <example>
/// <code>
/// var result = PublicDeveloperAdminAuthTicketFactory.RefreshDeveloperAuthTicket(handler : handler, existingAuthTicket : existingAuthTicket, developerAccountId : developerAccountId, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<DeveloperAdminUserAuthTicket/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static Mozu.Api.Contracts.AdminUser.DeveloperAdminUserAuthTicket RefreshDeveloperAuthTicket(ServiceClientMessageHandler handler,
Mozu.Api.Contracts.AdminUser.DeveloperAdminUserAuthTicket existingAuthTicket, int? developerAccountId = 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.Developer.DeveloperAdminUserAuthTicketClient.RefreshDeveloperAuthTicketClient(
existingAuthTicket : existingAuthTicket, developerAccountId : developerAccountId, 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;
}
开发者ID:rocky0904,项目名称:mozu-dotnet,代码行数:37,代码来源:PublicDeveloperAdminAuthTicketFactory.cs
示例11: Suggest
/// <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;
}
开发者ID:eileenzhuang1,项目名称:mozu-dotnet,代码行数:37,代码来源:StorefrontProductSearchResultFactory.cs
示例12: UpdateApplication
/// <summary>
///
/// <example>
/// <code>
/// var result = ApplicationFactory.UpdateApplication(handler : handler, application : application, appId : appId, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<Application/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static Mozu.Api.Contracts.InstalledApplications.Application UpdateApplication(ServiceClientMessageHandler handler,
Mozu.Api.Contracts.InstalledApplications.Application application, string appId,
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.ApplicationClient.UpdateApplicationClient(
application : application, appId : appId );
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;
}
开发者ID:warwickit,项目名称:MozuFreestyle,代码行数:36,代码来源:ApplicationFactory.cs
示例13: GetDeliveryAttemptSummary
/// <summary>
///
/// <example>
/// <code>
/// var result = EventDeliverySummaryFactory.GetDeliveryAttemptSummary(handler : handler, subscriptionId : subscriptionId, id : id, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<EventDeliverySummary/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static Mozu.Api.Contracts.Event.EventDeliverySummary GetDeliveryAttemptSummary(ServiceClientMessageHandler handler,
string subscriptionId, int? id = 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.Event.Push.Subscriptions.EventDeliverySummaryClient.GetDeliveryAttemptSummaryClient(
subscriptionId : subscriptionId, id : id );
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;
}
开发者ID:warwickit,项目名称:MozuFreestyle,代码行数:36,代码来源:EventDeliverySummaryFactory.cs
示例14: GetProductInventory
/// <summary>
/// Retrieves the active inventory level information associated with the product or location specified in the request.
/// <example>
/// <code>
/// var result = ProductFactory.GetProductInventory(handler : handler, productCode : productCode, locationCodes : locationCodes, responseFields : responseFields, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<LocationInventoryCollection/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static Mozu.Api.Contracts.ProductRuntime.LocationInventoryCollection GetProductInventory(ServiceClientMessageHandler handler,
string productCode, string locationCodes = 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.GetProductInventoryClient(
productCode : productCode, locationCodes : locationCodes, 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;
}
开发者ID:ezekielthao,项目名称:mozu-dotnet,代码行数:37,代码来源:StorefrontProductFactory.cs
示例15: Search
/// <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;
}
开发者ID:eileenzhuang1,项目名称:mozu-dotnet,代码行数:37,代码来源:StorefrontProductSearchResultFactory.cs
示例16: GetAvailablePaymentActions
/// <summary>
/// Retrieves the list of all available payment actions dependent on the order payment status by specifying the order ID.
/// <example>
/// <code>
/// var result = PaymentFactory.GetAvailablePaymentActions(handler : handler, orderId : orderId, paymentId : paymentId, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<List<string>/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static List<string> GetAvailablePaymentActions(ServiceClientMessageHandler handler,
string orderId, string paymentId,
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.PaymentClient.GetAvailablePaymentActionsClient(
orderId : orderId, paymentId : paymentId );
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;
}
开发者ID:warwickit,项目名称:MozuFreestyle,代码行数:36,代码来源:PaymentFactory.cs
示例17: UpdateStates
/// <summary>
/// Updates the details of the shipping states.
/// <example>
/// <code>
/// var result = ShippingStatesFactory.UpdateStates(handler : handler, states : states, profilecode : profilecode, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<List<ShippingStates>/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static List<Mozu.Api.Contracts.ShippingAdmin.Profile.ShippingStates> UpdateStates(ServiceClientMessageHandler handler,
List<Mozu.Api.Contracts.ShippingAdmin.Profile.ShippingStates> states, string profilecode,
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.ShippingStatesClient.UpdateStatesClient(
states : states, profilecode : profilecode );
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;
}
开发者ID:rocky0904,项目名称:mozu-dotnet,代码行数:37,代码来源:ShippingStatesFactory.cs
示例18: ApplyCoupon
/// <summary>
/// Applies a defined coupon to the cart specified in the request.
/// <example>
/// <code>
/// var result = AppliedDiscountFactory.ApplyCoupon(handler : handler, cartId : cartId, couponCode : couponCode, responseFields : responseFields, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<Cart/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static Mozu.Api.Contracts.CommerceRuntime.Carts.Cart ApplyCoupon(ServiceClientMessageHandler handler,
string cartId, string couponCode, 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.Carts.AppliedDiscountClient.ApplyCouponClient(
cartId : cartId, couponCode : couponCode, 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;
}
开发者ID:eileenzhuang1,项目名称:mozu-dotnet,代码行数:37,代码来源:AppliedDiscountCartsFactory.cs
-
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:18238|2023-10-27
-
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9667|2022-11-06
-
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8175|2022-11-06
-
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8547|2022-11-06
-
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8453|2022-11-06
-
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9383|2022-11-06
-
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8425|2022-11-06
-
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:7858|2022-11-06
-
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8410|2022-11-06
-
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7394|2022-11-06
|
请发表评论