Skip to content

Instantly share code, notes, and snippets.

@Ananto30
Created March 24, 2020 16:40
Show Gist options
  • Save Ananto30/e2f4b72f75ef383a09a93f65f013ce92 to your computer and use it in GitHub Desktop.
Save Ananto30/e2f4b72f75ef383a09a93f65f013ce92 to your computer and use it in GitHub Desktop.
from ..serialization_types import Etypes, type_check
from .serializer import CreateOrderReq
class OrderOperations:
CREATE_ORDER = 'create_order'
GET_ORDER = 'get_order'
class CreateOrder(Etypes):
def __init__(self, request, response=None):
type_check(request, CreateOrderReq)
super().__init__(OrderOperations.CREATE_ORDER, request, response)
class GetOrder(Etypes):
def __init__(self, request, response=None):
super().__init__(OrderOperations.GET_ORDER, request, response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment