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

Commit 612737a

Browse files
authored
Inovice and subscription feature update (#106)
* Inovice, order, and subscription feature update
1 parent 7eb98c2 commit 612737a

39 files changed

Lines changed: 286 additions & 165 deletions

ChangeLog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,16 @@
6767
* PublisherName
6868
* Corrected an issue with requesting products by country, target view, and target segment
6969
* Removed the SKU download operations. No commands where impacted by this change
70+
* Subscriptions
71+
* Added the following properties to the subscription model
72+
* IsMicrosoftProduct
73+
* PublisherName
74+
* RefundOptions
75+
* TermDuration
7076
* Users
7177
* Corrected an issue with performing a query for users from a customer
78+
* Utilization
79+
* Addressed an issue caused by the Partner Center API return a HTTP 204 no content when Azure utilization data is not yet ready in a dependent system.
7280
* Validations
7381
* Added the ability to request validation codes used to create Government Community Cloud customers
7482

src/PartnerCenter.TestFramework/PartnerCenter.TestFramework.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
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.2</Version>
15+
<Version>1.5.1903.5</Version>
1616
<NeutralLanguage>en-US</NeutralLanguage>
1717
</PropertyGroup>
1818

src/PartnerCenter/Configuration/PartnerService.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,6 @@
9595
"Country": "country"
9696
}
9797
},
98-
"GetSkuDownloadOptions": {
99-
"Path": "products/{0}/skus/{1}/downloadoptions",
100-
"Parameters": {
101-
"Country": "country"
102-
}
103-
},
10498
"GetAvailabilities": {
10599
"Path": "products/{0}/skus/{1}/availabilities",
106100
"Parameters": {
@@ -133,9 +127,6 @@
133127
"GetCustomerSku": {
134128
"Path": "customers/{0}/products/{1}/skus/{2}"
135129
},
136-
"GetCustomerSkuDownloadOptions": {
137-
"Path": "customers/{0}/products/{1}/skus/{2}/downloadoptions"
138-
},
139130
"GetCustomerAvailabilities": {
140131
"Path": "customers/{0}/products/{1}/skus/{2}/availabilities",
141132
"Parameters": {

src/PartnerCenter/Factories/IPartnerFactory.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace Microsoft.Store.PartnerCenter.Factories
88
{
9+
using System;
910
using System.Net.Http;
1011
using RequestContext;
1112

@@ -51,7 +52,7 @@ internal interface IPartnerFactory
5152
/// Builds a <see cref="IPartner" /> instance and configures it using the provided partner credentials.
5253
/// </summary>
5354
/// <param name="credentials">The partner credentials.</param>
54-
/// <param name="httpClient">The HTTP client to be used.</param>
55+
/// <param name="httpClient">The client used to perform HTTP operations.</param>
5556
/// <returns>A configured partner object.</returns>
5657
IPartner Build(IPartnerCredentials credentials, HttpClient httpClient);
5758

@@ -60,7 +61,7 @@ internal interface IPartnerFactory
6061
/// </summary>
6162
/// <param name="credentials">The partner credentials.</param>
6263
/// <param name="requestContext">The context used to perform operations.</param>
63-
/// <param name="httpClient">The HTTP client to be used.</param>
64+
/// <param name="httpClient">The client used to perform HTTP operations.</param>
6465
/// <returns>A configured partner object.</returns>
6566
IPartner Build(IPartnerCredentials credentials, IRequestContext requestContext, HttpClient httpClient);
6667
}

src/PartnerCenter/Factories/StandardPartnerFactory.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace Microsoft.Store.PartnerCenter.Factories
88
{
9+
using System;
910
using System.Net.Http;
1011
using RequestContext;
1112

@@ -62,7 +63,7 @@ public IPartner Build(IPartnerCredentials credentials, IRequestContext requestCo
6263
/// Builds a <see cref="IPartner" /> instance and configures it using the provided partner credentials.
6364
/// </summary>
6465
/// <param name="credentials">The partner credentials. Use the extensions to obtain these.</param>
65-
/// <param name="httpClient">The HTTP client to be used.</param>
66+
/// <param name="httpClient">The client used to perform HTTP operations.</param>
6667
/// <returns>A configured partner object.</returns>
6768
public IPartner Build(IPartnerCredentials credentials, HttpClient httpClient)
6869
{
@@ -74,7 +75,7 @@ public IPartner Build(IPartnerCredentials credentials, HttpClient httpClient)
7475
/// </summary>
7576
/// <param name="credentials">The partner credentials. Use the extensions to obtain these.</param>
7677
/// <param name="requestContext">The context used to perform operations.</param>
77-
/// <param name="httpClient">The HTTP client to be used.</param>
78+
/// <param name="httpClient">The client used to perform HTTP operations.</param>
7879
/// <returns>A configured partner object.</returns>
7980
public IPartner Build(IPartnerCredentials credentials, IRequestContext requestContext, HttpClient httpClient)
8081
{

src/PartnerCenter/Invoices/InvoiceOperations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ 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)
58+
public IReconLineItemCollection By(BillingProvider provider, InvoiceLineItemType invoiceLineItemType, string currencyCode, BillingPeriod period, int? size = null)
5959
=> new ReconLineItemCollectionOperations(Partner, Context, provider, invoiceLineItemType, currencyCode, period, size);
6060

6161
/// <summary>

src/PartnerCenter/Models/Invoices/DailyRatedUsageLineItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,4 @@ public sealed class DailyRatedUsageLineItem : InvoiceLineItem
244244
/// </summary>
245245
public override BillingProvider BillingProvider => BillingProvider.Marketplace;
246246
}
247-
}
247+
}

src/PartnerCenter/Models/Invoices/Invoice.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,29 @@ public sealed class Invoice : ResourceBaseWithLinks<StandardResourceLinks>
6868
/// <remarks>
6969
/// Paid amount is negative if a payment is received.
7070
/// </remarks>
71-
public Decimal PaidAmount { get; set; }
71+
public decimal PaidAmount { get; set; }
7272

7373
/// <summary>
7474
/// Gets or sets the link to download the invoice PDF document.
7575
/// </summary>
7676
/// <remarks>
7777
/// This value is not returned as part of the search results, and will only
78-
/// get populated if invoice is accessed by Id.
78+
/// get populated if invoice is accessed by identifier.
7979
/// This link auto expires in 30 minutes.
8080
/// </remarks>
8181
public Uri PdfDownloadLink { get; set; }
82-
82+
83+
/// <summary>
84+
/// Gets or sets the invoice tax receipts
85+
/// </summary>
86+
public IEnumerable<TaxReceipt> TaxReceipts { get; set; }
87+
8388
/// <summary>
8489
/// Gets or sets the total charges in this invoice.
8590
/// </summary>
8691
/// <remarks>
8792
/// Total charges includes the transactions charges and any adjustments.
8893
/// </remarks>
89-
public Decimal TotalCharges { get; set; }
94+
public decimal TotalCharges { get; set; }
9095
}
9196
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// -----------------------------------------------------------------------
2+
// <copyright file="TaxReceipt.cs" company="Microsoft">
3+
// Copyright (c) Microsoft Corporation. All rights reserved.
4+
// </copyright>
5+
// -----------------------------------------------------------------------
6+
7+
namespace Microsoft.Store.PartnerCenter.Models.Invoices
8+
{
9+
using System;
10+
11+
/// <summary>
12+
/// Represents the tax receipt details.
13+
/// </summary>
14+
public sealed class TaxReceipt
15+
{
16+
/// <summary>
17+
/// Gets or sets the tax receipt unique identifier.
18+
/// </summary>
19+
public string Id { get; set; }
20+
21+
/// <summary>
22+
/// Gets or sets the tax receipt download link.
23+
/// </summary>
24+
public Uri TaxReceiptPdfDownloadLink { get; set; }
25+
}
26+
}

src/PartnerCenter/Models/Orders/Order.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ public sealed class Order : ResourceBase
3030
/// </summary>
3131
public string CurrencyCode { get; set; }
3232

33+
/// <summary>
34+
/// Gets or sets the currency symbol.
35+
/// </summary>
36+
public string CurrencySymbol { get; set; }
37+
3338
/// <summary>
3439
/// Gets or sets the order identifier.
3540
/// </summary>

0 commit comments

Comments
 (0)