@@ -20,6 +20,31 @@ def testPropertyFromFile(self):
20
20
self .assertIsNotNone (login )
21
21
self .assertIsNotNone (transactionkey )
22
22
23
+ class shippingAddressUnitTest (apitestbase .ApiTestBase ):
24
+ def testget_customer_shipping_address (self ):
25
+ # create get shipping address request
26
+ getShippingAddress = apicontractsv1 .getCustomerShippingAddressRequest ()
27
+ getShippingAddress .merchantAuthentication = self .merchantAuthentication
28
+ getShippingAddress .customerProfileId = '40812683'
29
+ getShippingAddress .customerAddressId = '38558024'
30
+
31
+ # Make the API call
32
+ getShippingAddressController = getCustomerShippingAddressController (getShippingAddress )
33
+ getShippingAddressController .execute ()
34
+ response = getShippingAddressController .getresponse ()
35
+ self .assertEquals ('Ok' , response .messages .resultCode )
36
+
37
+ class customerprofileUnitTest (apitestbase .ApiTestBase ):
38
+ def testget_customer_profile (self ):
39
+ getCustomerProfile = apicontractsv1 .getCustomerProfileRequest ()
40
+ getCustomerProfile .merchantAuthentication = self .merchantAuthentication
41
+ getCustomerProfile .customerProfileId = '40812683'
42
+ controller = getCustomerProfileController (getCustomerProfile )
43
+ controller .execute ()
44
+ response = controller .getresponse ()
45
+ self .assertEquals ('Ok' , response .messages .resultCode )
46
+
47
+
23
48
class test_TransactionReportingUnitTest (apitestbase .ApiTestBase ):
24
49
def testGetTransactionDetails (self ):
25
50
gettransactiondetailsrequest = apicontractsv1 .getTransactionDetailsRequest ()
@@ -29,7 +54,13 @@ def testGetTransactionDetails(self):
29
54
gettransactiondetailscontroller .execute ()
30
55
response = gettransactiondetailscontroller .getresponse ()
31
56
self .assertEquals ('Ok' , response .messages .resultCode )
32
- self .assertIsNotNone (response .transaction .payment .creditCard .cardNumber )
57
+ self .assertIsNotNone (response .transaction .payment .creditCard .cardNumber )
58
+ # value = getattr(response.messages.message, 'text')
59
+ # print ("value = %s" %value)
60
+ # if hasattr(response, 'messages') == True:
61
+ # if hasattr(response.messages, 'message') == True:
62
+ # if hasattr(response.messages.message, 'text') == True:
63
+ # print ("message code = %s " %(response.messages.message.text))
33
64
34
65
class test_RecurringBillingTest (apitestbase .ApiTestBase ):
35
66
createdSubscriptionId = None
@@ -186,6 +217,7 @@ def testGetTransactionDetails_UserAddsInvalidPropertyWhichIsNOTInRequestObject(s
186
217
self .assertIsNotNone (response .transaction .billTo .company )
187
218
self .assertIsNotNone (response .transaction .entryMethod )
188
219
self .assertIsNotNone (response .transaction .order .invoiceNumber )
220
+
189
221
'''
190
222
class test_PaymentTransactions(apitestbase.ApiTestBase):
191
223
#Testing SDK SimpleType
0 commit comments