def test1and8and14(self):
        legalEntityType = "INDIVIDUAL_SOLE_PROPRIETORSHIP"
        taxId = random.randint(100000000, 999999999)
        streetAddress1 = "900 Chelmsford St"
        legalEntityPostRequest = self.legalEntityPostRequest1 + legalEntityType + self.legalEntityPostRequest2 + str(
            taxId
        ) + self.legalEntityPostRequest3 + streetAddress1 + self.legalEntityPostRequest4
        expected_url_suffix = "/legalentity"
        response = communication.http_post_request(expected_url_suffix,
                                                   legalEntityPostRequest,
                                                   self.conf)

        legalEntityIdFromTest1 = response["legalEntityId"]

        pspMerchantId = random.randint(100, 999)
        submerchant_post_request = self.submerchant_post_request1 + str(
            pspMerchantId) + self.submerchant_post_request2
        expected_url_suffix2 = expected_url_suffix + "/" + legalEntityIdFromTest1 + "/submerchant"
        response2 = communication.http_post_request(expected_url_suffix2,
                                                    submerchant_post_request,
                                                    self.conf)

        subMerchantId = response2["subMerchantId"]
        expected_url_suffix3 = expected_url_suffix2 + "/" + subMerchantId
        response3 = communication.http_get_retrieval_request(
            expected_url_suffix3, self.conf)
    def test2and2a(self):
        legalEntityType = "INDIVIDUAL_SOLE_PROPRIETORSHIP"
        taxId = random.randint(100000000, 999999999)
        streetAddress1 = "900 Chelmsford St"
        legalEntityPostRequest = self.legalEntityPostRequest1 + legalEntityType + self.legalEntityPostRequest2 + str(
            taxId
        ) + self.legalEntityPostRequest3 + streetAddress1 + self.legalEntityPostRequest4
        expected_url_suffix = "/legalentity"
        response = communication.http_post_request(expected_url_suffix,
                                                   legalEntityPostRequest,
                                                   self.conf)

        legalEntityIdFromTest2 = response["legalEntityId"]
        expected_url_suffix2 = expected_url_suffix + "/" + legalEntityIdFromTest2
        response2 = communication.http_get_retrieval_request(
            expected_url_suffix2, self.conf)
Beispiel #3
0
def get_mcc():
    return communication.http_get_retrieval_request(SERVICE_ROUTE)
Beispiel #4
0
def get_by_legalEntityId(legalEntityId):
    url_suffix = SERVICE_ROUTE + "/" + legalEntityId
    return communication.http_get_retrieval_request(url_suffix)
def get_by_subMerchantId(legalEntityId, subMerchantId):
    url_suffix = SERVICE_ROUTE1 + legalEntityId + SERVICE_ROUTE2 + "/" + subMerchantId
    return communication.http_get_retrieval_request(url_suffix)
 def test_http_get_retrieval_request(self):
     response = communication.http_get_retrieval_request(
         "/legalentity/1000293")
     self.assertIsNotNone(response["transactionId"])
     self.assertEquals("1000293", response["legalEntityId"])