-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bug?Potentially a bugPotentially a bug
Description
Bug Report: Issue with state Filter in Recurly Java SDK
Summary
The state filter in the listAccountInvoices API of the Recurly Java SDK (com.recurly.v3:api-client:5.4.0) does not work as expected. When attempting to use the state filter, the code fails to compile with the following error:
error: cannot find symbol
queryParams.setState(Constants.InvoiceState);
^
symbol: variable InvoiceState
location: class Constants
Steps to Reproduce
- Use the Recurly Java SDK version
5.4.0. - Attempt to call the listAccountInvoices API with the state filter set to past_due.
- Compile and run the code.
- Code Example
import com.recurly.v3.Pager;
import com.recurly.v3.resources.Invoice;
public class RecurlyBugReportExample {
public static void main(String[] args) {
String apiKey = "your-api-key"; // Replace with your Recurly API key
String accountCode = "test-account-code"; // Replace with a valid account code
try (Client client = new Client(apiKey)) {
// Attempt to use the state filter
Pager<Invoice> invoices = client.listAccountInvoices(accountCode, "state=past_due");
// Print the invoices
invoices.forEach(invoice -> {
System.out.println("Invoice ID: " + invoice.getId());
System.out.println("State: " + invoice.getState());
});
} catch (Exception e) {
e.printStackTrace();
}
}
}
Expected Behavior
The listAccountInvoices API should return a list of invoices filtered by the state parameter (e.g., past_due).
Actual Behavior
The code fails to compile with the error:
queryParams.setState(Constants.InvoiceState);
^
symbol: variable InvoiceState
location: class Constants
Environment
SDK Version: com.recurly.v3:api-client:5.4.0
Java Version: OpenJDK 21
Operating System: macOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug?Potentially a bugPotentially a bug