Craig-Ronald / capacitor-subscriptions

MIT License
14 stars 5 forks source link

[bug] CurrentEntitlementResponse does not always have an array of Transactions #4

Open TomDoesb opened 11 months ago

TomDoesb commented 11 months ago

In the interface it states that this is the CurrentEntitlementsResponse

export interface CurrentEntitlementsResponse {
    responseCode: CurrentEntitlementsResponseCode;
    responseMessage: CurrentEntitlementsResponseMessage;
    data?: Transaction[];
}

In practice when there is a single transaction its not an array (tested with iOS sandbox)

{
  "responseCode":0,
  "responseMessage":"Successfully found all entitlements across all product types",
  "data":{"114":{"originalStartDate":"2023-12 20T08:00:55Z","originalId":0,"productIdentifier":"tafeltrainer_all_multiplication_tables","transactionId":114,"expiryDate":"2023-12-20T08:59:16Z"}}
}