Git Product home page Git Product logo

Comments (8)

mahmoudimus avatar mahmoudimus commented on August 12, 2024
  • 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.

from balanced-python.

mjallday avatar mjallday commented on August 12, 2024

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.

from balanced-python.

mahmoudimus avatar mahmoudimus commented on August 12, 2024
  • 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 [email protected]:

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
.

from balanced-python.

msherry avatar msherry commented on August 12, 2024

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

from balanced-python.

mjallday avatar mjallday commented on August 12, 2024

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.

from balanced-python.

mahmoudimus avatar mahmoudimus commented on August 12, 2024

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

from balanced-python.

mjallday avatar mjallday commented on August 12, 2024

Implementing in #36

from balanced-python.

mjallday avatar mjallday commented on August 12, 2024

Done!

from balanced-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.