code-corps / code-corps/code-corps-api

Move status logic from StripeAccountView into a separate module

Đang mở
#599 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Difficulty: Easy
Ngôn ngữ chính
Elixir
Star
234
Fork
82
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

# Problem

The `StripeConnectAccountView` logic [here](https://github.com/code-corps/code-corps-api/blob/develop/web/views/stripe_connect_account_view.ex#L78-L165) can be moved into a separate module, with only the basic placeholder fields remaining in the view, to simplify things:

```Elixir

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.