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

feat: add managed card merchants feature #249

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

tessstoddard
Copy link
Contributor

@tessstoddard tessstoddard commented Sep 11, 2024

Summary of Changes

Adds list/get/update endpoints for managed card merchants

Downstream Consumer Impact

New functionality. Shouldn't affect anyone

How Has This Been Tested?

Did some super basic tests to verify this works in a connector

List merchants:

GET /managed_cards/1/merchants

HTTP/1.1 200

{
  "merchants": [
    {
      "id": "merchant1",
      "logo_url": "logoUrl1",
      "name": "Merchant 1",
      "status": "ALLOWED",
      "user_id": "U-00ue70ev9bAHgQq2A1d7"
    },
    {
      "id": "merchant2",
      "logo_url": "logoUrl2",
      "name": "Merchant 2",
      "status": "BLOCKED",
      "user_id": "U-00ue70ev9bAHgQq2A1d7"
    }
  ]
}

Get merchant:

GET /managed_cards/1/merchants/merchant1

HTTP/1.1 200

{
  "merchant": {
    "id": "merchant1",
    "logo_url": "logoUrl1",
    "name": "Merchant 1",
    "status": "ALLOWED",
    "user_id": "U-00ue70ev9bAHgQq2A1d7"
  }
}

Update merchant:

PUT /managed_cards/1/merchants/merchant1

{
  "merchant": {
    "status": "BLOCKED"
  }
}

HTTP/1.1 200 

{
  "merchant": {
    "id": "merchant1",
    "logo_url": "logoUrl1",
    "name": "Merchant 1",
    "status": "BLOCKED",
    "user_id": "U-00ue70ev9bAHgQq2A1d7"
  }
}

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Copy link
Contributor

@stevecl5 stevecl5 left a comment

Choose a reason for hiding this comment

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

LGTM!

@tessstoddard tessstoddard merged commit 5804ae7 into master Sep 12, 2024
4 checks passed
@tessstoddard tessstoddard deleted the tess/managed_cards_merchants branch September 12, 2024 19:38
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