Added sample.
This commit is contained in:
Родитель
7e0645b3c1
Коммит
bfc84cd348
|
@ -0,0 +1,37 @@
|
|||
// -----------------------------------------------------------------------
|
||||
// <copyright file="GetValidationStatus.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace Microsoft.Store.PartnerCenter.Samples.Customers
|
||||
{
|
||||
/// <summary>
|
||||
/// A scenario that showcases retrieving a customer's validation status.
|
||||
/// </summary>
|
||||
public class GetValidationStatus : BasePartnerScenario
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetValidationStatus"/> class.
|
||||
/// </summary>
|
||||
/// <param name="context">The scenario context.</param>
|
||||
public GetValidationStatus(IScenarioContext context) : base("Get customer validation status.", context)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes the scenario.
|
||||
/// </summary>
|
||||
protected override void RunScenario()
|
||||
{
|
||||
string customerIdToRetrieve = this.ObtainCustomerId("Enter the ID of the customer to retrieve the validation status for:");
|
||||
|
||||
var partnerOperations = this.Context.UserPartnerOperations;
|
||||
this.Context.ConsoleHelper.StartProgress($"Retrieving customer's validation status for type: {ValidationType.Account}");
|
||||
|
||||
var customerValidationStatus = partnerOperations.Customers.ById(customerIdToRetrieve).ValidationStatus.GetValidationStatus(validationTypeToFetch);
|
||||
|
||||
this.Context.ConsoleHelper.StopProgress();
|
||||
this.Context.ConsoleHelper.WriteObject(customerValidationStatus, "Customer Validation Status");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -137,6 +137,7 @@
|
|||
<Compile Include="Customers\CreateCustomerQualificationWithGCC.cs" />
|
||||
<Compile Include="Customers\DeletePartnerCustomerRelationship.cs" />
|
||||
<Compile Include="Customers\GetCustomerQualifications.cs" />
|
||||
<Compile Include="Customers\GetValidationStatus.cs" />
|
||||
<Compile Include="Customers\UpdateCustomerBillingProfile.cs" />
|
||||
<Compile Include="Customers\GetCustomerManagedServices.cs" />
|
||||
<Compile Include="Customers\FilterCustomers.cs" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче