Skip to content

README update and more changes #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,24 @@ Python SDK for the Authorize.Net API

Python - demo version commit
06/25/2015

Installations
--------------------------------------
- python 2.7
- pyxb 1.2.4
*install python before pyxb


Generating classes from xsd
--------------------------------------
- run generateObjectsFromXSD.bat script


Testing Controllers
--------------------------------------
- each controller has its corresponding test
- results recorded in the log

Testing demoTest
--------------------------------------
- uncomment the commented out helper function in ARBCreateSubscriptionController to run demoTest
5 changes: 5 additions & 0 deletions src/controller/ARBCreateSubscriptionController.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ def ARBCreateSubscriptionController(self, requestObject):
def getResponseClass(self):
return binding.ARBCreateSubscriptionResponse()

'''uncomment helper function for demoTest
def getSubscriptionIdFromResponse(self,):
order = binding.CreateFromDocument(response)
return order.subscriptionId
'''
9 changes: 2 additions & 7 deletions src/script/generateObjectsFromXSD.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
@echo off
rem first script
echo current folder..
dir
echo going into pyxb folder..
cd PyxB-1.2.4
echo running pyxbgen on %DATE%-%TIME%
echo what is %TEMP%
rem !!!set pyxbgenFilePath = C:/.../pyxbgen!!!
set xsd=https://apitest.authorize.net/xml/v1/schema/AnetApiSchema.xsd
rem !!Must have python already installed!!
python pyxbgen -u %xsd% -m bind
python %pyxbgenFilePath% -u %xsd% -m bind
echo file is generated
Pause
15 changes: 1 addition & 14 deletions src/tests/demoTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,4 @@ class demoTest():
'''4. Get subscription status
- execute getSubscriptionStatus request from previously created request object
'''
ARBGetSubscriptionStatusController.execute(statusRequest, ARBGetSubscriptionStatusController.getResponseClass())



'''helper function to be added to ARBOperationBase for demoTest
def getSubscriptionIdFromResponse(self,):
order = binding.CreateFromDocument(response)
return order.subscriptionId
'''





ARBGetSubscriptionStatusController.execute(statusRequest, ARBGetSubscriptionStatusController.getResponseClass())