# 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/plan_routes.py
# BASE_URL = 'https://api.pagar.me/1/plans'
# GET_ALL_PLANS = BASE_URL
# GET_PLAN_BY = BASE_URL
# UPDATE_PLAN = BASE_URL + '/{0}'


from pagarme.resources import handler_request
from pagarme.resources.routes import plan_routes


def create(params):
    return handler_request.post(plan_routes.BASE_URL, params)


def find_all():
    return handler_request.get(plan_routes.GET_ALL_PLANS)


def find_by(search_params):
    return handler_request.get(plan_routes.GET_PLAN_BY, search_params)


def update(plan_id, dictionary):

# 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/plan_routes.py
# BASE_URL = 'https://api.pagar.me/1/plans'
# GET_ALL_PLANS = BASE_URL
# GET_PLAN_BY = BASE_URL
# UPDATE_PLAN = BASE_URL + '/{0}'


# Path: pagarme/plan.py
from pagarme.resources import handler_request
from pagarme.resources.routes import plan_routes



def create(params):
    return handler_request.post(plan_routes.BASE_URL, params)


def find_all():
    return handler_request.get(plan_routes.GET_ALL_PLANS)


def find_by(search_params):
    return handler_request.get(plan_routes.GET_PLAN_BY, search_params)


def update(plan_id, dictionary):

    return handler_request.put(plan_routes.UPDATE_PLAN.format(plan_id), dictionary)