This commit is contained in:
Pradeep Kodumuru 2022-07-25 13:31:58 -07:00
Родитель b9996078cf 9cf7994a5c
Коммит b7523acc82
3 изменённых файлов: 21 добавлений и 2 удалений

Просмотреть файл

@ -53,11 +53,21 @@ namespace Microsoft.Store.PartnerCenter.Samples.NewCommerceMigrations
newCommerceMigration = newCommerceMigrationOperations.ById(newCommerceMigration.Id).Get();
this.Context.ConsoleHelper.WriteObject(newCommerceMigration, "Final New-Commerce migration");
this.Context.ConsoleHelper.StopProgress();
this.Context.ConsoleHelper.StartProgress("Getting migration events");
var newCommerceMigrationEvents = newCommerceMigrationOperations.GetEvents(newCommerceMigration.Id, null);
this.Context.ConsoleHelper.WriteObject(newCommerceMigrationEvents, "New-Commerce migration events");
this.Context.ConsoleHelper.StopProgress();
}
else
{
this.Context.ConsoleHelper.Warning("The specified subscription is not eligibile for migrating to New-Commerce.");
}
this.Context.ConsoleHelper.StartProgress("Getting all New-Commerce migrations");
var newCommerceMigrations = newCommerceMigrationOperations.Get(customerId, null, null, null);
this.Context.ConsoleHelper.WriteObject(newCommerceMigrations, "New-Commerce migrations");
this.Context.ConsoleHelper.StopProgress();
}
}
}
}

Просмотреть файл

@ -83,6 +83,14 @@ namespace Microsoft.Store.PartnerCenter.Samples.Subscriptions
// prompt the user to enter the term duration for the scheduled change
string changeToTermDuration = this.Context.ConsoleHelper.ReadNonEmptyString("Enter the scheduled change term duration", "Scheduled change term duration can't be empty");
// prompt the user to enter the promotion id for the scheduled change
string changeToPromotionId = this.Context.ConsoleHelper.ReadOptionalString("Enter the scheduled promotion id or leave blank to automatically check and fill with an available promotion");
if (string.IsNullOrWhiteSpace(changeToPromotionId))
{
changeToPromotionId = null;
}
// prompt the user to enter the quantity for the scheduled change
string quantity = this.Context.ConsoleHelper.ReadNonEmptyString("Enter the scheduled change quantity", "Scheduled change term quantity can't be empty");
var changeToQuantity = int.Parse(quantity);
@ -105,6 +113,7 @@ namespace Microsoft.Store.PartnerCenter.Samples.Subscriptions
AvailabilityId = changeToAvailabilityId,
BillingCycle = changeToBillingCycle,
TermDuration = changeToTermDuration,
PromotionId = changeToPromotionId,
},
Quantity = changeToQuantity,
CustomTermEndDate = changeToCustomTermEndDate

Просмотреть файл

@ -6,7 +6,7 @@
<package id="Microsoft.Rest.ClientRuntime" version="2.3.20" targetFramework="net461" />
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.19" targetFramework="net461" />
<package id="Microsoft.Store.PartnerCenter" version="2.0.1" targetFramework="net461" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net461" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
<package id="System.ComponentModel.Annotations" version="4.7.0" targetFramework="net461" />
<package id="System.Data.DataSetExtensions" version="4.5.0" targetFramework="net461" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net461" />