Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 63b1b70

Browse files
authored
Invoice, user, and utilization feature update (#109)
* Invoice, user, and utilization feature update
1 parent a39244c commit 63b1b70

23 files changed

Lines changed: 62 additions & 87 deletions

ChangeLog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@
2020

2121
# Change Log
2222

23+
## Upcoming Release
24+
25+
* Invoices
26+
* Renamed the reconciliation line item objects
27+
* Users
28+
* No longer throw an error when searching for a user with UPN that does not exists.
29+
* Utilization
30+
* Modified the default end date value for the Get-PartnerCustomerSubscriptionUtilization command to use UTC time.
31+
2332
## 1.5.1903.6
2433

2534
* Products

src/PartnerCenter.TestFramework/PartnerCenter.TestFramework.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
<PackageProjectUrl>https://github.com/Microsoft/Partner-Center-PowerShell</PackageProjectUrl>
1313
<RepositoryUrl>https://github.com/Microsoft/Partner-Center-PowerShell.git</RepositoryUrl>
1414
<RepositoryType>git</RepositoryType>
15-
<Version>1.5.1903.6</Version>
15+
<Version>1.5.1903.7</Version>
1616
<NeutralLanguage>en-US</NeutralLanguage>
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.3">
20+
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.0">
2121
<PrivateAssets>all</PrivateAssets>
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
2323
</PackageReference>

src/PartnerCenter/Configuration/PartnerService.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@
516516
"GetInvoiceSummaries": {
517517
"Path": "invoices/summaries"
518518
},
519-
"GetReconLineItems": {
519+
"GetReconciliationLineItems": {
520520
"Path": "invoices/{0}/lineitems",
521521
"Parameters": {
522522
"Provider": "provider",

src/PartnerCenter/GlobalSuppressions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names", Justification = "Status is not plural.", Scope = "type", Target = "~T:Microsoft.Store.PartnerCenter.Models.ServiceIncidents.ServiceIncidentStatus")]
1212
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names", Justification = "Status is not plural.", Scope = "type", Target = "~T:Microsoft.Store.PartnerCenter.Models.Partners.VettingSubStatus")]
1313
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names", Justification = "Status is not plural.", Scope = "type", Target = "~T:Microsoft.Store.PartnerCenter.Models.Partners.VettingStatus")]
14-
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1308:Normalize strings to uppercase", Justification = "Value needs to be in lower case.", Scope = "member", Target = "~M:Microsoft.Store.PartnerCenter.Invoices.ReconLineItemCollectionOperations.GetAsync(System.Threading.CancellationToken)~System.Threading.Tasks.Task{Microsoft.Store.PartnerCenter.Models.SeekBasedResourceCollection{Microsoft.Store.PartnerCenter.Models.Invoices.InvoiceLineItem}}")]
14+
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1308:Normalize strings to uppercase", Justification = "Value needs to be in lower case.", Scope = "member", Target = "~M:Microsoft.Store.PartnerCenter.Invoices.ReconciliationLineItemCollectionOperations.GetAsync(System.Threading.CancellationToken)~System.Threading.Tasks.Task{Microsoft.Store.PartnerCenter.Models.SeekBasedResourceCollection{Microsoft.Store.PartnerCenter.Models.Invoices.InvoiceLineItem}}")]
1515

src/PartnerCenter/Invoices/EstimateCollectionOperations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public EstimateCollectionOperations(IPartner rootPartnerOperations)
2121
}
2222

2323
/// <summary>
24-
/// Gets the estimate links of the recon line items.
24+
/// Gets the estimate links of the reconciliation line items.
2525
/// </summary>
2626
public IEstimateLink Links => new EstimateLinkOperations(Partner);
2727
}

src/PartnerCenter/Invoices/IInvoice.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ public interface IInvoice : IPartnerComponent<string>, IEntityGetOperations<Invo
4141
/// <param name="period">The period for unbilled recon.</param>
4242
/// <param name="size">The page size.</param>
4343
/// <returns>The recon line item collection operations.</returns>
44-
IReconLineItemCollection By(BillingProvider provider, InvoiceLineItemType invoiceLineItemType, string currencyCode, BillingPeriod period, int? size = null);
44+
IReconciliationLineItemCollection By(BillingProvider provider, InvoiceLineItemType invoiceLineItemType, string currencyCode, BillingPeriod period, int? size = null);
4545
}
4646
}

src/PartnerCenter/Invoices/IReconLineItemCollection.cs renamed to src/PartnerCenter/Invoices/IReconciliationLineItemCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// -----------------------------------------------------------------------
2-
// <copyright file="IReconLineItemCollection.cs" company="Microsoft">
2+
// <copyright file="IReconciliationLineItemCollection.cs" company="Microsoft">
33
// Copyright (c) Microsoft Corporation. All rights reserved.
44
// </copyright>
55
// -----------------------------------------------------------------------
@@ -13,7 +13,7 @@ namespace Microsoft.Store.PartnerCenter.Invoices
1313
/// <summary>
1414
/// Represents the operations that can be done on partner's recon line items.
1515
/// </summary>
16-
public interface IReconLineItemCollection : IPartnerComponent<string>, IEntireEntityCollectionRetrievalOperations<InvoiceLineItem, SeekBasedResourceCollection<InvoiceLineItem>>
16+
public interface IReconciliationLineItemCollection : IPartnerComponent<string>, IEntireEntityCollectionRetrievalOperations<InvoiceLineItem, SeekBasedResourceCollection<InvoiceLineItem>>
1717
{
1818
}
1919
}

src/PartnerCenter/Invoices/InvoiceOperations.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public IInvoiceLineItemCollection By(BillingProvider billingProvider, InvoiceLin
5555
/// <param name="period">The period for unbilled recon.</param>
5656
/// <param name="size">The page size.</param>
5757
/// <returns>The recon line item collection operations.</returns>
58-
public IReconLineItemCollection By(BillingProvider provider, InvoiceLineItemType invoiceLineItemType, string currencyCode, BillingPeriod period, int? size = null)
59-
=> new ReconLineItemCollectionOperations(Partner, Context, provider, invoiceLineItemType, currencyCode, period, size);
58+
public IReconciliationLineItemCollection By(BillingProvider provider, InvoiceLineItemType invoiceLineItemType, string currencyCode, BillingPeriod period, int? size = null)
59+
=> new ReconciliationLineItemCollectionOperations(Partner, Context, provider, invoiceLineItemType, currencyCode, period, size);
6060

6161
/// <summary>
6262
/// Retrieves information about a specific invoice.

src/PartnerCenter/Invoices/ReconLineItemCollectionOperations.cs renamed to src/PartnerCenter/Invoices/ReconciliationLineItemCollectionOperations.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// -----------------------------------------------------------------------
2-
// <copyright file="ReconLineItemCollectionOperations.cs" company="Microsoft">
2+
// <copyright file="ReconciliationLineItemCollectionOperations.cs" company="Microsoft">
33
// Copyright (c) Microsoft Corporation. All rights reserved.
44
// </copyright>
55
// -----------------------------------------------------------------------
@@ -17,9 +17,9 @@ namespace Microsoft.Store.PartnerCenter.Invoices
1717
using Models.JsonConverters;
1818

1919
/// <summary>
20-
/// The operations available for the partner's recon line item collection.
20+
/// The operations available for the partner's reconciliation line item collection.
2121
/// </summary>
22-
internal class ReconLineItemCollectionOperations : BasePartnerComponent<string>, IReconLineItemCollection
22+
internal class ReconciliationLineItemCollectionOperations : BasePartnerComponent<string>, IReconciliationLineItemCollection
2323
{
2424
/// <summary>
2525
/// The maximum page size for recon line items.
@@ -52,16 +52,16 @@ internal class ReconLineItemCollectionOperations : BasePartnerComponent<string>,
5252
private readonly BillingPeriod period;
5353

5454
/// <summary>
55-
/// Initializes a new instance of the <see cref="ReconLineItemCollectionOperations"/> class.
55+
/// Initializes a new instance of the <see cref="ReconciliationLineItemCollectionOperations"/> class.
5656
/// </summary>
5757
/// <param name="rootPartnerOperations">The partner operations.</param>
58-
/// <param name="invoiceId">The invoice Id.</param>
58+
/// <param name="invoiceId">The invoice identifier.</param>
5959
/// <param name="billingProvider">The billing provider type.</param>
6060
/// <param name="invoiceLineItemType">The invoice line item type.</param>
6161
/// <param name="currencyCode">The currency code.</param>
6262
/// <param name="period">The period for unbilled recon.</param>
6363
/// <param name="size">The page size.</param>
64-
public ReconLineItemCollectionOperations(IPartner rootPartnerOperations, string invoiceId, BillingProvider billingProvider, InvoiceLineItemType invoiceLineItemType, string currencyCode, BillingPeriod period, int? size = null)
64+
public ReconciliationLineItemCollectionOperations(IPartner rootPartnerOperations, string invoiceId, BillingProvider billingProvider, InvoiceLineItemType invoiceLineItemType, string currencyCode, BillingPeriod period, int? size = null)
6565
: base(rootPartnerOperations, invoiceId)
6666
{
6767
invoiceId.AssertNotEmpty(nameof(invoiceId));
@@ -84,23 +84,23 @@ public async Task<SeekBasedResourceCollection<InvoiceLineItem>> GetAsync(Cancell
8484
IDictionary<string, string> parameters = new Dictionary<string, string>
8585
{
8686
{
87-
PartnerService.Instance.Configuration.Apis.GetReconLineItems.Parameters.CurrencyCode,
87+
PartnerService.Instance.Configuration.Apis.GetReconciliationLineItems.Parameters.CurrencyCode,
8888
currencyCode
8989
},
9090
{
91-
PartnerService.Instance.Configuration.Apis.GetReconLineItems.Parameters.InvoiceLineItemType,
91+
PartnerService.Instance.Configuration.Apis.GetReconciliationLineItems.Parameters.InvoiceLineItemType,
9292
invoiceLineItemType.ToString()
9393
},
9494
{
95-
PartnerService.Instance.Configuration.Apis.GetReconLineItems.Parameters.Period,
95+
PartnerService.Instance.Configuration.Apis.GetReconciliationLineItems.Parameters.Period,
9696
period.ToString().ToLower(CultureInfo.InvariantCulture)
9797
},
9898
{
99-
PartnerService.Instance.Configuration.Apis.GetReconLineItems.Parameters.Provider,
99+
PartnerService.Instance.Configuration.Apis.GetReconciliationLineItems.Parameters.Provider,
100100
billingProvider.ToString()
101101
},
102102
{
103-
PartnerService.Instance.Configuration.Apis.GetReconLineItems.Parameters.Size,
103+
PartnerService.Instance.Configuration.Apis.GetReconciliationLineItems.Parameters.Size,
104104
pageSize.ToString(CultureInfo.InvariantCulture)
105105
}
106106
};
@@ -109,7 +109,7 @@ public async Task<SeekBasedResourceCollection<InvoiceLineItem>> GetAsync(Cancell
109109
new Uri(
110110
string.Format(
111111
CultureInfo.InvariantCulture,
112-
$"/{PartnerService.Instance.ApiVersion}/{PartnerService.Instance.Configuration.Apis.GetReconLineItems.Path}",
112+
$"/{PartnerService.Instance.ApiVersion}/{PartnerService.Instance.Configuration.Apis.GetReconciliationLineItems.Path}",
113113
Context),
114114
UriKind.Relative),
115115
parameters,

src/PartnerCenter/Models/Invoices/DailyRatedUsageLineItem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.Store.PartnerCenter.Models.Invoices
1010
using System.Collections.Generic;
1111

1212
/// <summary>
13-
/// Represents unbilled, billed recon line items for daily rated usage.
13+
/// Represents unbilled, billed reconciliation line items for daily rated usage.
1414
/// </summary>
1515
public sealed class DailyRatedUsageLineItem : InvoiceLineItem
1616
{
@@ -25,7 +25,7 @@ public sealed class DailyRatedUsageLineItem : InvoiceLineItem
2525
public string PartnerName { get; set; }
2626

2727
/// <summary>
28-
/// Gets or sets the id of the customer that usage belongs to.
28+
/// Gets or sets the identifier of the customer that usage belongs to.
2929
/// </summary>
3030
public string CustomerId { get; set; }
3131

0 commit comments

Comments
 (0)