Ask A Question


You’re not receiving notifications from this thread.

Pattern for Managing Third Party Integrations

Matt Walston asked in Rails

I'm building a small internal app that is essentially glue between several open APIs. Namely, QuickBooks, G Suite, Stripe, and Twilio. Authorizing these third party integrations, maintaining tokens, refreshing tokens and providing an oauth2 client for these services has been a little disorganized. I've been able to find very little in terms of patterns or architectual guidance for organizing these integrations. Can anyone suggest an OSS project that's done this well or an article?


Bump! Interested in seeing if someone has an answer to this?


Hey Matt,

A pattern I've used is to create a folder called api_clients/ with subfolders for each api_wrapper.

For example, on one project, I did the following


Each of these folders contain the code I need to integrate with the apis. I generally organize each folder with like this

The aim is that I would be able to call something like

client =
client.invoices => Xero::Invoices class

Hope that helps.

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 84,256+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.