Skip to content

Missing Billing details with null ip_address_v4 causing deserialization exceptions #854

@markb-ss

Description

@markb-ss

Describe the bug

We are encountering a critical issue with transactions that have missing billing data, specifically when the ip_address_v4 field is null. This is causing exceptions during the deserialization process within the recruly-client-dotnet SDK when requesting all invoices or transactions for an account via

ListAccountInvoices - (API endpoint; /account/{accountId/transactions)
and
ListAccountTransactions - (API endpoint: accounts/{account_id}/invoices)

Exception message:

Unexpected token while deserializing object: PropertyName. Path 'data[2].ip_address_v4', line 1, position 5451.

Additional Information:
The latest Recurly .NET SDK (4.59.0) does not resolve this issue.
There is no workaround for the serialization failure within the SDK.

Options Considered:
As this is causing us to fail to retrieve ALL transactions/invoices for an account, we did consider using Limit 1 to try and retrieve each transaction/invoice individually. However, as the API uses a cursor pattern to provide a link/id to the next entity, this means that once we hit the deserialization error, we are no longer able to retrieve anything past this point.

To Reproduce

  1. In Recurly, for a test account, open Billing Info and click "Clear Billing Info".
  2. For the account, attempt to purchase a subscription (e.g. using CreatePurchase via the SDK)
  3. Query the API endpoints for these test accounts. Note that the billing info is missing, including a null ip_address_v4
  4. Query the ListTransactions via the SDK, and note the deserialization error returned.

Expected behavior
Client is able to handle null billing info fields, and deserialize JSON response successfully.

Your Environment

  • Which version of this library are you using? 4.59.0 (latest at time of writing)
  • Which version of the language are you using? .NET 8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions