swagger-client

SecurityMetrics' Application Programming Interface

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen For more information, please visit https://www.securitymetrics.com

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import swagger_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import swagger_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MerchantApi(swagger_client.ApiClient(configuration))
body = swagger_client.MerchantPost() # MerchantPost | Merchant to be added to the system
partner_uuid = 'partner_uuid_example' # str | UUID of Partner to add Merchant to

try:
    # Create a Merchant
    api_response = api_instance.create_merchant(body, partner_uuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MerchantApi->create_merchant: %s\n" % e)

# Configure API key authorization: Authorization
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MerchantApi(swagger_client.ApiClient(configuration))
merchant_uuid = 'merchant_uuid_example' # str | UUID of Merchant to delete

try:
    # Delete a Merchant by UUID
    api_instance.delete_merchant(merchant_uuid)
except ApiException as e:
    print("Exception when calling MerchantApi->delete_merchant: %s\n" % e)

# Configure API key authorization: Authorization
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MerchantApi(swagger_client.ApiClient(configuration))
merchant_uuid = 'merchant_uuid_example' # str | UUID of Merchant to query

try:
    # Find a single Merchant using their UUID
    api_response = api_instance.get_merchant(merchant_uuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MerchantApi->get_merchant: %s\n" % e)

# Configure API key authorization: Authorization
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MerchantApi(swagger_client.ApiClient(configuration))
merchant_uuid = 'merchant_uuid_example' # str | UUID of Merchant to query

try:
    # Find the compliance information for a single Merchant using their UUID
    api_response = api_instance.get_merchant_compliance(merchant_uuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MerchantApi->get_merchant_compliance: %s\n" % e)

# Configure API key authorization: Authorization
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MerchantApi(swagger_client.ApiClient(configuration))
sfdc_network_member_id = 'sfdc_network_member_id_example' # str | (Internal Use) Salesforce network member id. 'null' returns all records with a null sfdc_network_member_id. (optional)
last_modified_date = 'last_modified_date_example' # str | (Internal Use) date merchant was last modified (optional)
last_synced_date = 'last_synced_date_example' # str | (Internal Use) date merchant was last synced (optional)
unsynced = true # bool | (Internal Use) check if merchant.last_changed > merchant.last_synced_date (optional)
mid = 'mid_example' # str | Merchant ID (optional)

try:
    # Get all Merchants
    api_response = api_instance.get_merchants(sfdc_network_member_id=sfdc_network_member_id, last_modified_date=last_modified_date, last_synced_date=last_synced_date, unsynced=unsynced, mid=mid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MerchantApi->get_merchants: %s\n" % e)

# Configure API key authorization: Authorization
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MerchantApi(swagger_client.ApiClient(configuration))
partner_uuid = 'partner_uuid_example' # str | UUID of Partner to query for Merchants

try:
    # Get Merchants by Partner
    api_response = api_instance.get_merchants_by_partner_id(partner_uuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MerchantApi->get_merchants_by_partner_id: %s\n" % e)

# Configure API key authorization: Authorization
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MerchantApi(swagger_client.ApiClient(configuration))
body = swagger_client.MerchantPut() # MerchantPut | Fields to be updated on the Merchant
merchant_uuid = 'merchant_uuid_example' # str | UUID of a Merchant to update

try:
    # Update the information of a single Merchant
    api_response = api_instance.update_merchant(body, merchant_uuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MerchantApi->update_merchant: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://www.securitymetrics.com/smapi

Class Method HTTP request Description
MerchantApi create_merchant POST /partners/{partner_uuid}/merchants Create a Merchant
MerchantApi delete_merchant DELETE /merchants/{merchant_uuid} Delete a Merchant by UUID
MerchantApi get_merchant GET /merchants/{merchant_uuid} Find a single Merchant using their UUID
MerchantApi get_merchant_compliance GET /merchants/{merchant_uuid}/compliance Find the compliance information for a single Merchant using their UUID
MerchantApi get_merchants GET /merchants Get all Merchants
MerchantApi get_merchants_by_partner_id GET /partners/{partner_uuid}/merchants Get Merchants by Partner
MerchantApi update_merchant PUT /merchants/{merchant_uuid} Update the information of a single Merchant
PartnerApi create_bank POST /partners Create a Partner
PartnerApi create_merchant POST /partners/{partner_uuid}/merchants Create a Merchant
PartnerApi get_active_campaign_list_for_bank_uuid GET /partners/{partner_uuid}/active_campaign_emails Find active_campaign_emails
PartnerApi get_merchants_by_partner_id GET /partners/{partner_uuid}/merchants Get Merchants by Partner
PartnerApi get_partners GET /partners Get all Partners
PartnerApi get_partners_by_id GET /partners/{partner_uuid} Find an Partner by their UUID
PartnerApi modify_active_campaign_for_bank_uuid PUT /partners/{partner_uuid}/active_campaign_emails/{campaign_email_uuid} Start or stop a campaign
PartnerApi update_bank_by_uuid PUT /partners/{partner_uuid} Update the information of a single Partner

Documentation For Models

Documentation For Authorization

Authorization

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

support@securitymetrics.com