Questions Retrieving Customer Info with Rails Client
I'm using the CheddarGetter Rails client (https://github.com/BrentW/cheddargetter_client_rails). So far, creating and updating a customer in CG through this works well. However, I had a couple of questions.
1)
It doesn't appear to pull information from CG when viewing
information. I have the subscription information nested in my User
model (using has_subscription
in the User model). I
can use user.current_subscription
to see the
information, but I can't access it any other way. The primary
reason is to prepopulate the data in my Update Views; using
something like fields_for :subscription
to prepopulate
the form fields with information from CG doesn't seem to work.
While I do store the plan code information in my Rails model, I'd prefer to just pull the other information (like the last 4 CC digits and the CC last name and first name) directly from CG. My backup plan is to just store this data on the User model, but I'd like to understand how I can call up this data directly from CG through the client. Anybody else done something similar?
2)
Related to #1, what's the best way to check the status of a
customer in CG via the Rails client? Is
user.current_subscription
the best way? It appears
that the Rails client is creating an instance of the standard Ruby
client. However, it appears that all of the method calls are
different, for example, instead of client.get_customer
the Rails client uses client.customers_get
. I'm not
sure why the difference in method calls. Should I just make direct
calls to the Ruby client?
I appreciate any assistance from someone who has used this client. Similiar to other people, I also would greatly appreciate some additional materials on CG with integrating with Rails. Thanks!
Chris
Discussions are closed to public comments.
If you need help with Cheddar please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Marc Guyer on 06 Mar, 2013 02:39 PM
Hi Chris -- We're not intimately familiar with this implementation. I've copied the author here.
Hey Brent! -- Can you help out here?
Jess Pendley closed this discussion on 21 Nov, 2013 07:35 PM.