from .grpc_lib.discount_pb2 import (
    DiscountCalculateByItemRequest,
    DiscountCalculateByTokenRequest,
    DiscountRetrieveRequest,
    DiscountValidateRequest,
)
from .grpc_lib.discount_pb2_grpc import DiscountControllerStub

SUCCESS_CODE = "0"

CONTROLLER_STUB = DiscountControllerStub()


class RequestMessages:
    CALCULATE_BY_TOKEN = DiscountCalculateByTokenRequest()
    CALCULATE_BY_ITEM = DiscountCalculateByItemRequest()
    RETRIEVE = DiscountRetrieveRequest()
    VALIDATE = DiscountValidateRequest()


class RPCMethodNames:
    CALCULATE_BY_TOKEN = "CalculateByToken"
    CALCULATE_BY_ITEM = "CalculateByItem"
    RETRIEVE = "Retrieve"
    VALIDATE = "Validate"
