Balanced Payments - Documentation on obtaining ref

2019-06-28 08:56发布

How would I get a reference to buyer and merchant accounts that have already been created?

I'm only finding examples for creating buyer and merchant accounts. I'm not finding any examples on getting that information back for reuse. Is there existing documentation on this or just what's in the rdoc?

2条回答
女痞
2楼-- · 2019-06-28 09:20

From the reference to rdoc I'll assume you're using the Ruby gem here.

There are two primary ways to lookup accounts using a unique identifier, by email_address:

account = Balanced::Account.find_by_email(email_address)

or by URI:

account = Balanced::Account.find(account_uri)

All resources within Balanced are referenced primarily by URI so you can do something like Balanced::Credit.find(credit_uri) as well.

查看更多
The star\"
3楼-- · 2019-06-28 09:28

This has been deprecated instead now you now use Balanced::Customer.find_by_email(email_address)

查看更多
登录 后发表回答