Skip to content

Latest commit

 

History

History
88 lines (56 loc) · 1.96 KB

merchants.md

File metadata and controls

88 lines (56 loc) · 1.96 KB

Merchants

merchants_api = client.merchants

Class Name

MerchantsApi

Methods

List Merchants

Returns Merchant information for a given access token.

If you don't know a Merchant ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access.

If you know the merchant ID, you can also use the RetrieveMerchant endpoint to get the merchant information.

def list_merchants(self,
                  cursor=None)

Parameters

Parameter Type Tags Description
cursor int Query, Optional The cursor generated by the previous response.

Response Type

List Merchants Response

Example Usage

cursor = 210

result = merchants_api.list_merchants(cursor)

if result.is_success():
    print(result.body)
elif result.is_error():
    print(result.errors)

Retrieve Merchant

Retrieve a Merchant object for the given merchant_id.

def retrieve_merchant(self,
                     merchant_id)

Parameters

Parameter Type Tags Description
merchant_id string Template, Required The ID of the merchant to retrieve. If the string "me" is supplied as the ID,
then retrieve the merchant that is currently accessible to this call.

Response Type

Retrieve Merchant Response

Example Usage

merchant_id = 'merchant_id0'

result = merchants_api.retrieve_merchant(merchant_id)

if result.is_success():
    print(result.body)
elif result.is_error():
    print(result.errors)