-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
A method invocation like
var billingRequests = await _goCardlessClient.BillingRequests.ListAsync(new BillingRequestListRequest
{
CreatedAt = new BillingRequestListRequest.CreatedAtParam
{
GreaterThanOrEqual = DateTimeOffset.Parse("2025-11-19T09:26:35.1214323+00:00"),
LessThanOrEqual = DateTimeOffset.Parse("2025-11-26T09:26:35.1214323+00:00"),
},
});causes the following request (URL-decoded)
GET /billing_requests?created_at[gte]=2025-11-19T09:26:35.1214323+00:00&created_at[lte]=2025-11-26T09:26:35.1214323+00:00
which results in an error response
{
"error": {
"message": "One of your parameters was incorrectly typed",
"errors": [
{
"field": "created_at",
"message": "{\"gte\"=>\"2025-11-19T09:26:35.1214323 00:00\", \"lte\"=>\"2025-11-26T09:26:35.1214323 00:00\"} is not a string.",
"request_pointer": "/billing_requests/created_at"
}
],
"documentation_url": "https://developer.gocardless.com/api-reference#invalid_type",
"type": "invalid_api_usage",
"code": 422
}
}The issue is that these methods assume that CreatedAt has the same gt/gte/lt/lte filters that other endpoints like list mandates do, but the docs show that this parameter doesn't support these filters on this endpoint. As this is incongruent with every other endpoint, this one should be updated to match - i.e. this is an API, not client, bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels