Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the Customers resource #35

Closed
mjallday opened this issue May 6, 2013 · 8 comments
Closed

Implement the Customers resource #35

mjallday opened this issue May 6, 2013 · 8 comments

Comments

@mjallday
Copy link
Contributor

mjallday commented May 6, 2013

We have a new Customer resource.

With a customer you should be able to debit, credit, as well as add_card and add_bank_account. A customer should be able to tell you their active_card and active_bank_account.

@mahmoudimus
Copy link
Contributor

  • I disagree about .hold on a customer. You should perform a hold on a Card, not on a customer.
  • Also if you have an add_card method, there should be a remove_card method. I think the proper name should be associate_card and deassociate_card.

@mjallday
Copy link
Contributor Author

mjallday commented May 6, 2013

hold should at least be a helper.

I posit that most customers will have a single valid card associated at any given time. Writing customer.hold is much easier for the person integrating Balanced than writing card = customer.cards.filter(is_valid=True)[0]; card.hold.

@mahmoudimus
Copy link
Contributor

  • We return a primary source uri don't we?

I would write a property that will return a most_recently_added_card and
a most_recently_added_bank_account

On Mon, May 6, 2013 at 2:51 PM, Marshall Jones notifications@github.comwrote:

hold should at least be a helper.

I posit that most customers will have a single valid card associated at
any given time. Writing customer.hold is much easier for the person
integrating Balanced than writing card =
customer.cards.filter(is_valid=True)[0]; card.hold.


Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-17510631
.

@msherry
Copy link
Contributor

msherry commented May 6, 2013

default_card/default_bank_account? How does most_recently_added... work with setting cards/bank_accounts to invalid?

@mjallday
Copy link
Contributor Author

mjallday commented May 6, 2013

most_recently_added_bank_account should just be default_bank_account where the order of items returned is:

  1. whatever was set to default
  2. most recent, valid card

same for cards.

@mahmoudimus
Copy link
Contributor

That is perfect for me. Can we call it "active_card" and "active_bank_account" then?

@mjallday
Copy link
Contributor Author

mjallday commented May 7, 2013

Implementing in #36

@mjallday mjallday mentioned this issue May 9, 2013
@mjallday
Copy link
Contributor Author

mjallday commented May 9, 2013

Done!

@mjallday mjallday closed this as completed May 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants