from .grpc_lib.invoice_pb2 import (
    CreateInvoiceRequest,
    InquiryInvoiceRetrieveRequest,
    InquiryPaymentRetrieveRequest,
    PaymentRequestRequest,
    UserListInvoiceRequest,
    VerifyPaymentRequest,
)
from .grpc_lib.invoice_pb2_grpc import (
    CreateInvoiceControllerStub,
    InquiryInvoiceControllerStub,
    InquiryPaymentControllerStub,
    PaymentInvoiceControllerStub,
    UserListInvoiceControllerStub,
)

SUCCESS_CODE = "0"


class InvoiceRequestMessages:
    CREATE = CreateInvoiceRequest()
    INQUIRY = InquiryInvoiceRetrieveRequest()
    FETCH_USER_INVOICES = UserListInvoiceRequest()


class PaymentRequestMessages:
    REQUEST = PaymentRequestRequest()
    VERIFY = VerifyPaymentRequest()
    INQUIRY = InquiryPaymentRetrieveRequest()


class InvoiceRPCMethodNames:
    CREATE = "Create"
    INQUIRY = "Retrieve"
    FETCH_USER_INSTANCES = "UserRelatedList"


class PaymentRPCMethodNames:
    REQUEST = "PaymentRequest"
    VERIFY = "VerifyPayment"
    INQUIRY = "Retrieve"


class InvoiceControllerStubs:
    CREATE = CreateInvoiceControllerStub()
    INQUIRY = InquiryInvoiceControllerStub()
    FETCH_USER_INVOICES = UserListInvoiceControllerStub()


class PaymentControllerStubs:
    INVOICE = PaymentInvoiceControllerStub()
    INQUIRY = InquiryPaymentControllerStub()
