Skip to content

Commit

Permalink
Merge pull request #281 from blockchyp/develop
Browse files Browse the repository at this point in the history
Develop to Master
  • Loading branch information
devops-blockchyp committed Sep 12, 2024
1 parent d18c16c commit a45304d
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 1 deletion.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3978,6 +3978,50 @@ response = client.invite_merchant_user(request)
print("Response: %r" % response)


```

#### Add Gateway Merchant



* **API Credential Types:** Partner
* **Required Role:** Gateway Boarding

This is a partner level API that can be used to manually board gateway merchants. Use this API in conjunction
with Platform Configuration to instantly board gateway merchants. Note that most partners don't have
permission to do this and are unlikely to get it.

Settings can be changed by using the Update Merchant API.




```python
import os

import blockchyp

# initialize a client.
client = blockchyp.Client(
api_key=os.environ["BC_API_KEY"],
bearer_token=os.environ["BC_BEARER_TOKEN"],
signing_key=os.environ["BC_SIGNING_KEY"],
)

# populate request parameters.
request = {
"profile": {
"dbaName": "DBA Name",
"companyName": "Corporate Entity Name",
},
}

# run the transaction.
response = client.add_gateway_merchant(request)

print("Response: %r" % response)


```

#### Add Test Merchant
Expand Down
10 changes: 10 additions & 0 deletions blockchyp/blockchyp.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,16 @@ def invite_merchant_user(self, request):
body=request,
)

def add_gateway_merchant(self, request):
# type: (dict) -> dict
"""Adds a live gateway merchant account."""

return self._dashboard_request(
method="POST",
path="/api/add-gateway-merchant",
body=request,
)

def add_test_merchant(self, request):
# type: (dict) -> dict
"""Adds a test merchant account."""
Expand Down
23 changes: 23 additions & 0 deletions examples/add_gateway_merchant.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import os

import blockchyp

# initialize a client.
client = blockchyp.Client(
api_key=os.environ["BC_API_KEY"],
bearer_token=os.environ["BC_BEARER_TOKEN"],
signing_key=os.environ["BC_SIGNING_KEY"],
)

# populate request parameters.
request = {
"profile": {
"dbaName": "DBA Name",
"companyName": "Corporate Entity Name",
},
}

# run the transaction.
response = client.add_gateway_merchant(request)

print("Response: %r" % response)
1 change: 0 additions & 1 deletion examples/update_merchant_platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

# populate request parameters.
request = {
"merchantId": "XXXXXXXXXXXXX",
}

# run the transaction.
Expand Down
39 changes: 39 additions & 0 deletions tests/integration/add_gateway_merchant_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
# governed by a license that can be found in the LICENSE file.
#
# This file was generated automatically by the BlockChyp SDK Generator. Changes
# to this file will be lost every time the code is regenerated.
import os
import os.path
import time
import uuid
import pkg_resources

import pytest

import blockchyp

from .util import _get_test_client, _get_test_config


@pytest.mark.itest
def test_add_gateway_merchant():
"""Can add a gateway merchant."""


terminal = _get_test_config().get("defaultTerminalName")


client = _get_test_client("partner")

request = {
"profile": {
"dbaName": "DBA Name",
"companyName": "Corporate Entity Name",
},
}

response = client.add_gateway_merchant(request)
print("Response: %r" % response)

assert response.get("success") is True

0 comments on commit a45304d

Please sign in to comment.