<commit_before># encoding: utf-8

import requests
import unittest
from pagarme.resources import handler_request

UNIT_TEST = unittest.TestCase
HANDLER_REQUEST = handler_request
TEMPORARY_COMPANY = 'https://api.pagar.me/1/companies/temporary'

def create_temporary_company():
    company = requests.post(TEMPORARY_COMPANY)
    valid_company = HANDLER_REQUEST.validate_response(company)
    return valid_company<commit_msg>create new function for generate postbacks url<commit_after># encoding: utf-8

import requests
import unittest
from pagarme.resources import handler_request

UNIT_TEST = unittest.TestCase
TEMPORARY_COMPANY = 'https://api.pagar.me/1/companies/temporary'
REQUESTBIN_BASE = 'https://requestb.in/api/v1/bins'

def create_temporary_company():
    company = requests.post(TEMPORARY_COMPANY)
    valid_company = handler_request.validate_response(company)
    return valid_company

def create_postback_url():
    request_bin_response = requests.post(REQUESTBIN_BASE)
    valid_resquest_bin = handler_request.validate_response(request_bin_response)
    if(valid_resquest_bin):
        return 'http://requestb.in/'+valid_resquest_bin['name']
    else:
        return 'No postback url'
{'fraction_non_alphanumeric': 0.08535564853556485, 'fraction_numerical': 0.0041841004184100415, 'mean_word_length': 5.644444444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2991556', 'n_tokens_mistral': 372, 'n_tokens_neox': 367, 'n_words': 69}