コード例 #1
0
    def get_by_id(self, event_id):
        event = get_event_by_id(event_id)

        if not event:
            raise NotExists(f'Event with {event_id} id does not exist!')

        event_entity = Event(**event)
        return event_entity
コード例 #2
0
    def get_by_id(self, order_id):
        order = get_order_by_id(order_id)

        if not order:
            raise NotExists(f'Order with {order_id} id does not exist!')

        order_entity = Order(**order)
        return order_entity
コード例 #3
0
    def get_by_id(self, customer_id):
        customer = get_customer_by_id(customer_id)

        if not customer:
            raise NotExists(f'Customer with {customer_id} id does not exist!')

        customer_entity = Customer(**customer)
        return customer_entity