Skip to content

Set active stripe account for both account and member#126

Draft
DaniyarAskarov wants to merge 10 commits intomasterfrom
feature/StripeAccountManagment
Draft

Set active stripe account for both account and member#126
DaniyarAskarov wants to merge 10 commits intomasterfrom
feature/StripeAccountManagment

Conversation

@DaniyarAskarov
Copy link
Collaborator

No description provided.

Task<Result> AddForMember(MemberRequest request, CancellationToken cancellationToken);
Task<Result> AddForAccount(Account request, CancellationToken cancellationToken);
Task<Result> AttachDefaultExternal(PayoutMethodRequest request, CancellationToken cancellationToken);
Task<Result> SetStripeAccountActive(string accountId, int memberId, CancellationToken cancellationToken);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SetActiveStripeAccount is better

public async Task<Result> SetStripeAccountActive(string stripeAccountId, int memberId, CancellationToken cancellationToken)
{
var targetMember = await _context.Members
.SingleAsync(m => m.Id == memberId, cancellationToken);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting




public async Task<Result> SetStripeAccountActive(string stripeAccountId, int memberId, CancellationToken cancellationToken)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be exposed publicly?

@@ -9,9 +9,9 @@ namespace TipCatDotNet.Api.Services.Payments;
public interface IStripeAccountService
{
Task<Result> AddForMember(MemberRequest request, CancellationToken cancellationToken);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one could be just Add after changes in AddForAccountAndManager name

[Flags]
public enum ActiveStripeAccountType
{
Organizational = 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better add a default value, like Undefined = 0, because of enum casting issues

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ...stripe-account/set-active is better to PUT

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we allow empty strings as account IDs? If not, you may use null here for simplicity

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

Successfully merging this pull request may close these issues.

2 participants