code-corps-api icon indicating copy to clipboard operation
code-corps-api copied to clipboard

Move status logic from StripeAccountView into a separate module

Open begedin opened this issue 8 years ago • 2 comments

Problem

The StripeConnectAccountView logic here can be moved into a separate module, with only the basic placeholder fields remaining in the view, to simplify things:


def recipient_status(record, _conn), do: AccountVerificationStatus.recipient(record)
def bank_account_status(record, _conn), do: AccountVerificationStatus.bank_account(record)
def personal_id_number_status(record, _conn), do: AccountVerificationStatus.personal_id_number(record)
def verification_document_status(record, _conn), do: AccountVerificationStatus.verification_document(record)

Subtasks

  • [ ] Move logic to separate module
  • [ ] Add "delegation" methods to view
  • [ ] Add tests for module, simplify tests for view

Discussion

Where do we put the module? I'm thinking something like lib/code_corps/presenters/account_verification_status.ex. Could use your thoughts, @joshsmith.

begedin avatar Jan 02 '17 11:01 begedin

I'll be happy to hop on this when I've got an open block.

arubis avatar Jan 10 '17 18:01 arubis

@arubis marking it as in-progress so you can take on it freely.

joshsmith avatar Jan 10 '17 21:01 joshsmith