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

Transaction API #3

Closed
18 tasks done
amirrustam opened this issue Jan 6, 2020 · 0 comments · Fixed by #17
Closed
18 tasks done

Transaction API #3

amirrustam opened this issue Jan 6, 2020 · 0 comments · Fixed by #17
Assignees
Labels

Comments

@amirrustam
Copy link
Contributor

amirrustam commented Jan 6, 2020

Data Model

  • id | string
  • uuid | string
  • source | BankAccount
  • amount | number
  • description | string
  • privacy_level | enumerated string: "public" | "private" | "contacts" (default User.default_privacy_level)
  • receiver_id | User
  • sender_id | User
  • balance_at_completion | number
  • status | enumrated string: "pending" | "incomplete" | "complete"
  • request (object)
    • status | enumrated string: "pending" | "accepted" | "rejected"
    • resolved_at | timestamp (ISO 8601)
  • created_at | timestamp (ISO 8601)
  • modified_at | timestamp (ISO 8601)

HTTP API

  • GET /transactions - scoped user, auth-required

  • GET /transactions/contacts - scoped user, auth-required

  • GET /transactions/public - auth-required

    • Validate params
    • Tested
    • Sorted
    • Query Params:
      • order
        • default: public transactions of contacts first ordered by most recent, then all other transactions ordered by most recent
  • POST /transactions - scoped-user

    • Validate params
    • Tested
    • Body Parameters:
      • type: "payment" | "request"
      • source: bank_account_id
      • amount
      • description
      • privacy_level: "public" | "private" | "contacts"
      • receiver_id
      • sender_id
  • PATCH /transactions/:transaction_id - scoped-user

    • Validate params
    • Tested
    • Body Parameters:
      • request_status: "accepted" | "rejected"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants