| Line 19... |
Line 19... |
| 19 |
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
|
19 |
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
|
| 20 |
print ''
|
20 |
print ''
|
| 21 |
print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
|
21 |
print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
|
| 22 |
print ''
|
22 |
print ''
|
| 23 |
print 'Functions:'
|
23 |
print 'Functions:'
|
| - |
|
24 |
print ' void closeSession()'
|
| 24 |
print ' i64 createTransaction(Transaction transaction)'
|
25 |
print ' i64 createTransaction(Transaction transaction)'
|
| 25 |
print ' Transaction getTransaction(i64 id)'
|
26 |
print ' Transaction getTransaction(i64 id)'
|
| 26 |
print ' getTransactionsForCustomer(i64 customerId, i64 from_date, i64 to_date, TransactionStatus status)'
|
27 |
print ' getTransactionsForCustomer(i64 customerId, i64 from_date, i64 to_date, TransactionStatus status)'
|
| 27 |
print ' getTransactionsForShoppingCartId(i64 shoppingCartId)'
|
28 |
print ' getTransactionsForShoppingCartId(i64 shoppingCartId)'
|
| 28 |
print ' TransactionStatus getTransactionStatus(i64 transactionId)'
|
29 |
print ' TransactionStatus getTransactionStatus(i64 transactionId)'
|
| Line 84... |
Line 85... |
| 84 |
transport = TTransport.TBufferedTransport(socket)
|
85 |
transport = TTransport.TBufferedTransport(socket)
|
| 85 |
protocol = TBinaryProtocol.TBinaryProtocol(transport)
|
86 |
protocol = TBinaryProtocol.TBinaryProtocol(transport)
|
| 86 |
client = TransactionService.Client(protocol)
|
87 |
client = TransactionService.Client(protocol)
|
| 87 |
transport.open()
|
88 |
transport.open()
|
| 88 |
|
89 |
|
| - |
|
90 |
if cmd == 'closeSession':
|
| - |
|
91 |
if len(args) != 0:
|
| - |
|
92 |
print 'closeSession requires 0 args'
|
| - |
|
93 |
sys.exit(1)
|
| - |
|
94 |
pp.pprint(client.closeSession())
|
| - |
|
95 |
|
| 89 |
if cmd == 'createTransaction':
|
96 |
elif cmd == 'createTransaction':
|
| 90 |
if len(args) != 1:
|
97 |
if len(args) != 1:
|
| 91 |
print 'createTransaction requires 1 args'
|
98 |
print 'createTransaction requires 1 args'
|
| 92 |
sys.exit(1)
|
99 |
sys.exit(1)
|
| 93 |
pp.pprint(client.createTransaction(eval(args[0]),))
|
100 |
pp.pprint(client.createTransaction(eval(args[0]),))
|
| 94 |
|
101 |
|