microsoft / Partner-Center-PowerShell

PowerShell module for managing Partner Center resources.
https://docs.microsoft.com/powershell/partnercenter/
MIT License
130 stars 59 forks source link

Could not deserialize subscription response when using Partner Center SDK v3.2.0 #404

Closed chuckadnm closed 1 year ago

chuckadnm commented 1 year ago

Steps to reproduce

When using C# Partner Center SDK v3.0.1:

I'm following this article in C#: https://learn.microsoft.com/en-us/partner-center/develop/get-all-of-a-customer-s-subscriptions

Call: var customerSubscription = await partnerOperations.Customers.ById("3E61CDC8-5FE5-457E-843D-DD253FA872B4").Subscriptions.GetAsync();

Expected behavior

Should return subscription for the user.

Actual behavior

Getting Error: Could not deserialize response Inner Exception: {"Requested value 'Disabled' was not found."}

Diagnostic logs

When calling POSTMAN: GET https://api.partnercenter.microsoft.com/v1/customers/3E61CDC8-5FE5-457E-843D-DD253FA872B4/subscriptions

I'm getting all user subscription result. The error happen only for this specific user when I try using C# Partner Center SDK v3.2.0

Environment

.Net Core 3.1

chuckadnm commented 1 year ago

New properties was added to status enum, so I updated to C# Partner Center SDK v3.2.0 and There wasn't a match in my C# Status Enum for 'Disabled' properties