# Path: pagarme/resources/handler_request.py
# TEMPORARY_COMPANY = 'https://api.pagar.me/1/companies/temporary'
# KEYS = {}
# def validate_response(pagarme_response):
# def create_temporary_company():
# def authentication_key(api_key=None, company_temporary=False):
# def delete(end_point, data = {}):
# def get(end_point, data = {}):
# def post(end_point, data={}):
# def put(end_point, data = {}):
# def error(data):
# 
# Path: pagarme/resources/routes/payment_link_routes.py
# BASE_URL = 'https://api.pagar.me/1/payment_links'
# CANCEL_PAYMENT_LINK = BASE_URL + '/{0}/cancel'
# PAYMENT_LINK_BY_ID = BASE_URL + '/{0}'
# GET_EVENTS_PAYMENT_LINK = BASE_URL + '/{0}/events'


from pagarme.resources import handler_request
from pagarme.resources.routes import payment_link_routes

def cancel(payment_link_id):
    return handler_request.post(payment_link_routes.CANCEL_PAYMENT_LINK.format(payment_link_id))

def create(dictionary):
    return handler_request.post(payment_link_routes.BASE_URL, dictionary)

def find_all():
    return handler_request.get(payment_link_routes.BASE_URL)

def find_by(search_params):
    return handler_request.get(payment_link_routes.BASE_URL, search_params)

def find_by_id(payment_link_id):

# Path: pagarme/resources/handler_request.py
# TEMPORARY_COMPANY = 'https://api.pagar.me/1/companies/temporary'
# KEYS = {}
# def validate_response(pagarme_response):
# def create_temporary_company():
# def authentication_key(api_key=None, company_temporary=False):
# def delete(end_point, data = {}):
# def get(end_point, data = {}):
# def post(end_point, data={}):
# def put(end_point, data = {}):
# def error(data):
# 
# Path: pagarme/resources/routes/payment_link_routes.py
# BASE_URL = 'https://api.pagar.me/1/payment_links'
# CANCEL_PAYMENT_LINK = BASE_URL + '/{0}/cancel'
# PAYMENT_LINK_BY_ID = BASE_URL + '/{0}'
# GET_EVENTS_PAYMENT_LINK = BASE_URL + '/{0}/events'


# Path: pagarme/payment_link.py
from pagarme.resources import handler_request
from pagarme.resources.routes import payment_link_routes


def cancel(payment_link_id):
    return handler_request.post(payment_link_routes.CANCEL_PAYMENT_LINK.format(payment_link_id))

def create(dictionary):
    return handler_request.post(payment_link_routes.BASE_URL, dictionary)

def find_all():
    return handler_request.get(payment_link_routes.BASE_URL)

def find_by(search_params):
    return handler_request.get(payment_link_routes.BASE_URL, search_params)

def find_by_id(payment_link_id):

    return handler_request.get(payment_link_routes.PAYMENT_LINK_BY_ID.format(payment_link_id))