Beispiel #1
0
 def customer(self):
     custom = Customers()
     custom.passers()
     self.old = custom.old
     self.normal = custom.normal
     self.jogger = custom.jogger
     self.customers = custom.custom
Beispiel #2
0
def main():
    taxi1 = Taxi('Kia')

    dr1 = Driver('Armen', 1)
    dr2 = Driver('Karen', 2, 'Free')
    dr3 = Driver('Aram', 3, 'Busy')

    dr_list = Drivers()
    dr_list.addDriver(dr1)
    dr_list.addDriver(dr2)
    dr_list.addDriver(dr3)

    cus1 = Customer('Mari', 1)
    cus2 = Customer('Ani', 2)
    cus_list = Customers()
    cus_list.addCustomer(cus1)
    cus_list.addCustomer(cus2)
    print(cus_list.customers)
    dis = Dispatcher(dr_list)

    taxi1.drivers = dr_list
    taxi1.customers = cus_list.customers
    taxi1.dispatcher = dis
    print(taxi1.customers)
    cus1.request_taxi()
    ride1 = taxi1.start_ride()
    print(ride1.created_at)
Beispiel #3
0
def main():

    DBconnection()
    db = DBconnection.getInstance().connection

    while True:
        print("Acciones a realizar: \n \
                1. Cliente\n \
                2. Categorías de item\n \
                3. Items\n \
                4. Factura\n \
                5. Salir")
        action = input("Ingrese el número de la acción que desea realizar: ")
        if action == "1":
            customer = Customers(db)
        elif action == "2":
            category = ItemCategories(db)
        elif action == "3":
            item = Items(db)
        elif action == "4":
            bill = Bills(db)
        elif action == "5":
            exit()
        else:
            print("Ingrese un número válido")
Beispiel #4
0
    def __init__(self, username=None, password=None):
        self.general = General(self)
        self.model = Model(self)
        self.actions = Actions(self)
        self.groups = Groups(self)
        self.customers = Customers(self)
        self.segments = Segments(self)
        self.integrations = Integrations(self)

        if username and password:
            self.general.login(username, password)
    def test_顧客の情報をCSVで取得できる(self):
        customers = Customers()

        customers.add(customer("Ken", "Tanaka", 15))
        customers.add(customer("Tom", "Ford", 53))
        customers.add(customer("Ieyasu", "Tokugawa", 73))

        expected = "Ken Tanaka,15,1000\n" \
                   "Tom Ford,53,1500\n" \
                   "Ieyasu Tokugawa,73,1200"

        self.assertEqual(expected, customers.info_csv())
class Rent:
    while True:
        customer = Customers(name=input('Enter your name: '))
        customer_car = addCustomer(customer)
        print(customer.get_customer_name())
        calculatePrice(customer_car)
        customer.clear_cars()
        if input(
                "If you want to add another customer insert 'yes' or 'no' (default 'no')"
        ) == "yes":
            continue
        break
Beispiel #7
0
    def __init__(self,
                 username=None,
                 password=None,
                 timeout=TIMEOUT,
                 url=DEFAULT_URL):
        self.general = General(self)
        self.model = Model(self)
        self.actions = Actions(self)
        self.groups = Groups(self)
        self.customers = Customers(self)
        self.segments = Segments(self)
        self.integrations = Integrations(self)
        self.timeout = timeout
        self._url = url

        if username and password:
            self.general.login(username, password)
Beispiel #8
0
user3 = User(person3.name, person3.document_type, person3.id_crn,
             person3.phone, person3.address, "Jen", "*****@*****.**", 323)
toy_store.add_new_user(user3)

# b) Adding new warehouse staff

employee1 = Warehousestaff(user1.name, user1.document_type, user1.id_crn,
                           user1.phone, user1.address, user1.username,
                           user1.email, user1.password, "role1", 12, 30000.90)

toy_store.add_new_warehousestaff(employee1)

# c) Adding new customers

customer1 = Customers(user2.name, user2.document_type, user2.id_crn,
                      user2.phone, user2.address, user2.username, user2.email,
                      user2.password, " ")

toy_store.add_new_customer(customer1)

# d) Adding new sellers

seller1 = Marketplace(user3.name, user3.document_type, user3.id_crn,
                      user3.phone, user3.address, user3.username, user3.email,
                      user3.password, "Paul", 123244354, "", 0, 323, True, 30)

toy_store.add_new_marketplace_vendor(seller1)

# e) Adding new website products

website_product1 = Website_Products("Barbie Bee", 345, "Dolls", 20.00, True, 3,
Beispiel #9
0
import tornado.ioloop
import tornado.web
from customers import Customers
from addhandler import AddHandler
from delhandler import DelHandler
from gethandler import GetHandler

customers = Customers()

class MainHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Customers Microservice v1")

def make_app():
    return tornado.web.Application([
        (r"/v1", MainHandler),
        (r"/v1/addcust", AddHandler, dict(customers = customers)),
        (r"/v1/delcust", DelHandler, dict(customers = customers)),
        (r"/v1/getcust", GetHandler, dict(customers = customers)),
        ])

if __name__ == "__main__":
    app = make_app()
    app.listen(8888)
    tornado.ioloop.IOLoop.current().start()