trevorhinesley / moonclerk Goto Github PK
View Code? Open in Web Editor NEWRuby wrapper around Moonclerk REST API
Ruby wrapper around Moonclerk REST API
Hello! I'm using the moonclerk gem to request last quarter's payments as follows:
payments = Moonclerk::Payment.where( status: "successful", date_from: from, date_to: to, count: 100 )
This works fine. However, if I page through the results using auto_paging_each
, it continues returning results outside of the specified date range. I believe the problem is with the next_page
function; I tried stepping through manually using payments = payments.next_page
and quickly stepped outside the date range.
A more minimal example that shows the issue is:
payments = Moonclerk::Payment.where( date_from: Date.today )
For my data set, this returns fewer than 10 records, and using next_page returns records from previous dates. Specifying the offset in the query works properly; e.g., if I add offset: 10
to this query, it returns an empty set.
It looks like either (a) I'm using the module wrong, which is more than possible, or (b) the class instance is storing the count and offset but not persisting the rest of the where() clause.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.