#matthew_api

1 messages ¡ Page 1 of 1 (latest)

gilded whaleBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1311152781171621988

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

rich horizon
#

Hi! You can only provide either starting_after or ending_after. Not both.

zealous yew
#

I understand. But like I sad, I'm not providing both.

#

There's a switch, I sometimes provide one, sometimes other, but never both.

#

if (direction > 0) {
params = PaymentIntentListParams.builder().setCreated(PaymentIntentListParams.Created.builder().setGte(dateFrom.getEpochSecond()).setLte(dateTo.getEpochSecond()).build()).setLimit(100L).setStartingAfter(lastFetched.getMaxCursor() != null ? lastFetched.getMaxCursor().getTransactionId() : null).build();
} else {
params = PaymentIntentListParams.builder().setCreated(PaymentIntentListParams.Created.builder().setGte(dateFrom.getEpochSecond()).setLte(dateTo.getEpochSecond()).build()).setLimit(100L).setEndingBefore(lastFetched.getMinCursor() != null ? lastFetched.getMinCursor().getTransactionId() : null).build();
}

#

as you can see, in the first case i use one, and in the other the second one.

rich horizon
#

You will need to check your code because something is setting both starting_after and ending_after as that is what we are receiving in the API call.

zealous yew
#

I literally did ctrl+f of the code, there is no other mention of setbefore or setafter in the entire project.

loud sun
#

Can you trace or log the params right before PaymentIntent.list(...) function to check the variables inside?

zealous yew
#

there is no way we're setting both. the setter is divided in two cases, it's only being set there.

loud sun
#

Could you share the request ID associated to this with endingBefore?

zealous yew
#

i'll reproduce it after my break and send it to you

#

thanks!

loud sun
#

You're no longer sending both starting_after and ending_after properties

zealous yew
#

The code is deployed on the test system, nobody is touching the code.