No cursor param returned in API responses

Hi guys,

I want to ask a question related to GitHub - square/square-ruby-sdk: Ruby client library for the Square API. Why API functions not return cursor param in response. In APIResponse class gem is also removing cursor from response. data.reject! { |k| k == :cursor || k == :errors }

does it return all objects at once? Please let me know If I am missing something.

Thanks

With our responses if a cursor isn’t present that means you got all the results. A cursor will only be present if there are additional results. :slightly_smiling_face:

I tried. but it is returning 125 records at max, while I have 200+ records.

APIs works fine, the issue I am talking about is with this gem GitHub - square/square-ruby-sdk: Ruby client library for the Square API

Hi @dev-alihaider, would love to figure this out with you. Which API are you using that isn’t returning the cursor through the SDK? I’m taking a look at the SDK now to see if I can notice the cause just looking at the code. I’m sorry I realize now that I misunderstood the what you were asking. I’m am looking into why it is written this way.

Thanks a lot. looking forward for a quick fix.

I was pointed to a line in the same class: @cursor = data.fetch(:cursor, nil), that pulls out the cursor from the data. It should, if I understand correctly, still be available to you.

Hmm, got it thanks a lot.