-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
41 lines (32 loc) · 1.43 KB
/
app.py
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
import calls, classy, actions, content, display
print(content.introMessage)
setKey = content.demoCreds
sessionSeller = classy.Seller(setKey, True)
while True:
choice = input("\nEnter command number or (m) for menu: ").lower().strip(" ")
if choice == "q":
break
elif choice == "m":
print(content.menu)
elif choice == "s":
print(display.diplaySessionStatus(sessionSeller))
elif choice == "1":
resetKey = actions.set_auth()
sessionSeller.apiKey, sessionSeller.validKey = resetKey[1], resetKey[2]
sessionSeller.setSellerCarriers(resetKey[3])
print(resetKey[0])
elif choice == "2":
print(actions.add_fedex(sessionSeller))
elif choice == "3":
newShipment = actions.create_shipment(sessionSeller)
sessionSeller.addShipment(newShipment)
elif choice == "4":
print(actions.shop_for_rates(sessionSeller))
elif choice == "5":
print(actions.generate_label(sessionSeller))
elif choice == "v":
print(actions.void_label(sessionSeller))
elif choice == "t":
# menu option to test methods/functions
print(actions.testo("Rc62TSSygDf3bTARBLeRunyVM3yeTA60WcEMkdnCWCg", "se-15269871"))
print("\nThanks for take this time to check out a small portion of ShipEngine's API capabilities. Head over to https://docs.shipengine.com/docs for a more detailed look at our API library.\n\nShipEngine: You Can Call on Us.")