microsoft / Partner-Center-Java

Partner Center SDK for Java
https://docs.microsoft.com/java/partnercenter/
31 stars 12 forks source link

Invoice-BillingProvider has wrong Enum value #47

Closed Viotcy closed 5 years ago

Viotcy commented 5 years ago

Steps to reproduce

Calling partnerOperations.getInvoices().get() occurs error , because data can't deserialize.

Original data : "billingProvider": "one_time" and BillingProvider's value are not consistent.

  /**
  * Bill is provided for one time purchases.
  */
  ONE_TIME("oneTime")

Expected behavior

Get all invoices' detail data

Actual behavior

Could not deserialize response. Detailed message: Cannot deserialize value of type com.microsoft.store.partnercenter.models.invoices.BillingProvider from String \"one_time\": value not one of declared Enum instance names: [all, oneTime, none, marketplace, office, azure]

Environment

Partner-Center 1.13.0

ghost commented 5 years ago

Hi @Viotcy,

The code changes have been made to address this issue. It will be resolved in the 1.13.1 release that we are planning for this week.

Viotcy commented 5 years ago

I find another bug. OneTimeInvoiceLineItem :

  /**
  *  Gets or sets the SKU name.
  */
  private double skuName;

  public double getSkuName()
   {
      return skuName;
   }

  public void setSkuName( double value )
  {
      skuName = value;
  }

This variable is String not double . Original Data : "skuName": "Free"

ghost commented 5 years ago

Hi @Viotcy,

Both issues have been resolved with the release of version 1.13.1. Thank you for opening this issue and helping us ensure the SDK works as intended.