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

Create StripeCountrySpec model and tests

Đang mở
#563 9 bình luận 0 reaction 0 người được giao Xem trên GitHub
in progress
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

We want a StripeCountrySpec that contains most data from this Stripe API: https://stripe.com/docs/api#country_spec_object

We can use Stripe's `id` as our `id`. For now, there will not be an API endpoint in our application to create/retrieve/update/delete these.

Instead, these records will be created and then will be updated regularly with a cron-like job to find the latest information for displaying the form fields that a user might possibly need for creating their Stripe account and verifying their identity, either as an individual or as a company representative.

The `StripeCountrySpec` will belong to a `StripeConnectAccount`, and we'll set the `stripe_country_spec_id` on the `StripeConnectAccount` in order to render form details out to the user.

We likely need to use embedded fields here in order to handle the deeply nested hash for the verification fields https://hexdocs.pm/ecto/Ecto.Schema.html#embeds_one/3

We probably want to simplify this to a combination of `IndividualMinimumVerificationFields`, `IndividualAdditionalVerificationFields`, `CompanyMinimumVerificationFields`, and `CompanyAdditionalVerificationFields` schemas, where the key/value pair is the field name (e.g. `legal_entity.address.city`) and a boolean.

For now, we can probably ignore implementing anything around `supported_bank_account_currencies`, `supported_payment_currencies`, and `supported_payment_methods`. We should track the `default_currency`, though.

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.