Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create "pay" command #18

Open
ThomasKranitsas opened this issue Sep 16, 2019 · 3 comments
Open

Create "pay" command #18

ThomasKranitsas opened this issue Sep 16, 2019 · 3 comments
Labels
enhancement New feature or request on hold Ticket on hold P3 Technical debt or non-critical issue. should resolve

Comments

@ThomasKranitsas
Copy link
Collaborator

ThomasKranitsas commented Sep 16, 2019

Create a pay command that will let copilot/managers process private task payments.

I built the following tool in the past that helps me process task payments.
Screenshot 2019-09-16 at 21 08 30

Main functionality

The flow is the following:

  • The tool asks for the task title, description, track (design/develop/data_science), payee username, amount in $, copilot payment, NDA
  • The tool shows all available projects and prompts the user to pick one.
  • Once the user selects a project, the tool processes the task payment and closes the challenge automatically.

Support copilot payments

If it's a copilot payment, the copilot will also be added as the member (registrant) which will be selected as the winner and the member payment will be $0.

API

You need to use the new V5 API https://github.com/topcoder-platform/challenge-api instead of the legacy (V4).

Refer to the Swagger definition on the above repo for details on how to use the API.

You will have to deploy the API locally.
Related services:

Flow description

The flow of creating payment is described below:

Call the challenge API to create the challenge

  • The typeId must be configurable
  • The phases can create only one phase for the review.
  • The reviewType should be INTERNAL
  • The tags can be ['Task Payment']

Call the resources API to create the resources

  • Call the resources API to create a resource for the copilot
  • Call the resources API to create a resource for the member (registrant)

Call the challenge API to close the challenge

  • Call the PATCH /challenges/:id endpoint to change the status to Completed and add a winners array to the challenge object to indicate the winner.
@cwdcwd cwdcwd added enhancement New feature or request P3 Technical debt or non-critical issue. should resolve labels Sep 17, 2019
@cwdcwd cwdcwd modified the milestones: Beta Release, 1.0 release Sep 17, 2019
@ThomasKranitsas ThomasKranitsas added the in progress There is a challenge currently running to fix this label Sep 26, 2019
@sharathkumaranbu
Copy link
Collaborator

@cwdcwd Should we target v4 challenge API for implementing this command or should we wait until v5 challenge API is up in production?

@cwdcwd
Copy link
Contributor

cwdcwd commented Dec 16, 2019

I'd prefer to do this one cleanly using the challenge API wrapper and do it on v5

@sharathkumaranbu
Copy link
Collaborator

Noted. I will keep it on hold until we have V5 Challenge API up and running properly.

@sharathkumaranbu sharathkumaranbu removed this from the 1.0 release milestone Dec 16, 2019
@sharathkumaranbu sharathkumaranbu added on hold Ticket on hold and removed in progress There is a challenge currently running to fix this labels Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on hold Ticket on hold P3 Technical debt or non-critical issue. should resolve
Projects
None yet
Development

No branches or pull requests

3 participants