Skip to content

[WIP] ORM Style Interface#931

Open
shawndeprey wants to merge 1 commit into
v3-v2021-02-25from
recurly-orm-interface
Open

[WIP] ORM Style Interface#931
shawndeprey wants to merge 1 commit into
v3-v2021-02-25from
recurly-orm-interface

Conversation

@shawndeprey

@shawndeprey shawndeprey commented Jul 22, 2025

Copy link
Copy Markdown

This PR is intended to add an ORM style interface for all Recurly models. Additionally, to support the ORM style lookups, auto-configuration based on environment variables has been added for ease of use.

Example:

# Singular Lookup
Recurly::Account.find_by(id: 'wr9sz399pmt6')

# Plural Lookup
Recurly::Account.all.each # ...
Recurly::Account.where("limit = ? and order = ? and sort = ? and begin_time = ? and end_time = ?", 25, 'desc', 'updated_at', 2.days.ago, Time.current).each # ...

# Not filters
Recurly::Account.where("order = ? and sort = ? and state != ?", 'desc', 'updated_at', 'inactive').each # ...
Recurly::Coupon.where("order = ? and sort = ? and coupon_type != ? and state != ?", 'desc', 'updated_at', 'bulk', 'expired').each # ...

@shawndeprey shawndeprey added WIP V4 v2021-02-25 Client labels Jul 22, 2025
@shawndeprey shawndeprey force-pushed the recurly-orm-interface branch 3 times, most recently from 82f89c6 to 1f61080 Compare July 23, 2025 17:32
Comment thread lib/recurly/query_parser.rb Fixed
@shawndeprey shawndeprey force-pushed the recurly-orm-interface branch 3 times, most recently from 2a12e86 to 78ac029 Compare July 23, 2025 20:10
Comment thread lib/recurly/query_parser.rb Fixed
@shawndeprey shawndeprey force-pushed the recurly-orm-interface branch from 78ac029 to c2c4603 Compare July 23, 2025 20:12
Comment thread lib/recurly/query_parser.rb Dismissed
@shawndeprey shawndeprey force-pushed the recurly-orm-interface branch from c2c4603 to 34f00d6 Compare July 24, 2025 19:21
@shawndeprey shawndeprey force-pushed the recurly-orm-interface branch from 34f00d6 to bbf3585 Compare July 24, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

V4 v2021-02-25 Client WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants