FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sdk-python/script/generateObjectsFromXSD.bat at master · AuthorizeNet/sdk-python · GitHub
AuthorizeNet
/
sdk-python
Public
Notifications
You must be signed in to change notification settings
Fork
96
Star
59
Code
Issues
19
Pull requests
6
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Security and quality
Insights
Expand file tree
Breadcrumbs
sdk-python
/
script
/
generateObjectsFromXSD.bat
Copy path
More file actions
More file actions
Latest commit
History
History
History
49 lines (44 loc) · 1.44 KB
Breadcrumbs
sdk-python
/
script
/
generateObjectsFromXSD.bat
Copy path
File metadata and controls
49 lines (44 loc) · 1.44 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@
ECHO
OFF
@
REM
Script to generate the python contract from XSD
@
REM
Requires pyxb module to be installed and available in path
@
ECHO
Running Pyxbgen on
%DATE%
-
%TIME%
where
python
>
NUL
IF
"
0
"
==
"
%ERRORLEVEL%
"
(
@
ECHO
Found python
)
ELSE
(
@
ECHO
Unable to find python. Make sure python is installed.
EXIT
/b
1
)
where
pyxbgen
>
%TEMP%
\pyxbgenpath.txt
IF
"
0
"
==
"
%ERRORLEVEL%
"
(
@
ECHO
Found pyxbgen
)
ELSE
(
@
ECHO
Unable to find pyxbgen. Make sure pyxb package is installed.
EXIT
/b
1
)
SET
XSDPATH
=
https://apitest.authorize.net/xml/v1/schema/AnetApiSchema.xsd
SET
CONTRACTSDIR
=
authorizenet
SET
CONTRACTSFILE
=
apicontractsv1
SET
/p
PYXBGENPATH
=
<
%TEMP%
\pyxbgenpath.txt
SET
TEMPFILE
=
binding
@
ECHO
Using pyxb from
"
%PYXBGENPATH%
"
IF
EXIST
"
%TEMPFILE%
.py
"
(
DEL
"
%TEMPFILE%
.py
"
>
NUL
)
python
"
%PYXBGENPATH%
"
-u
%XSDPATH%
-m
%TEMPFILE%
IF
"
0
"
==
"
%ERRORLEVEL%
"
(
IF
EXIST
"
%CONTRACTSDIR%
\
%CONTRACTSFILE%
.old
"
(
DEL
"
%CONTRACTSDIR%
\
%CONTRACTSFILE%
.old
"
>
NUL
)
IF
EXIST
"
%CONTRACTSDIR%
\
%CONTRACTSFILE%
.py
"
(
DEL
"
%CONTRACTSDIR%
\
%CONTRACTSFILE%
.py
"
>
NUL
)
MOVE
"
%TEMPFILE%
.py
"
"
%CONTRACTSDIR%
\
%CONTRACTSFILE%
.py
"
>
NUL
@
ECHO
Bindings have been successfully generated from XSD in the file authorizenet\
%CONTRACTSFILE%
.py
@
ECHO
Old contracts have been moved to .old
)
ELSE
(
@
ECHO
Found python
@
ECHO
Error generating bindings from XSD. Review the errors and rerun the script.
EXIT
/b
1
)
EXIT
/b
0
Back
|
FazBrowse Home
|
New Git URL