Class CdekServiceImpl

  • All Implemented Interfaces:
    CdekService

    @Service
    public class CdekServiceImpl
    extends java.lang.Object
    implements CdekService
    • Field Detail

      • authRequest

        private com.cdek.java.model.auth.request.AuthRequest authRequest
      • authRequestTest

        private com.cdek.java.model.auth.request.AuthRequest authRequestTest
      • cdekClient

        private com.cdek.java.client.CdekClientImpl cdekClient
      • cdekClientTest

        private com.cdek.java.client.CdekClientImpl cdekClientTest
      • mapper

        private final com.fasterxml.jackson.databind.ObjectMapper mapper
    • Constructor Detail

      • CdekServiceImpl

        public CdekServiceImpl()
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • isCdekKeysDefined

        public boolean isCdekKeysDefined()
        Description copied from interface: CdekService
        Checks if the CDEK keys are defined.
        Specified by:
        isCdekKeysDefined in interface CdekService
        Returns:
        true if the CDEK keys are defined, false otherwise.
      • isTestCdekKeysDefined

        public boolean isTestCdekKeysDefined()
        Description copied from interface: CdekService
        Checks if the CDEK test keys are defined.
        Specified by:
        isTestCdekKeysDefined in interface CdekService
        Returns:
        true if the CDEK test keys are defined, false otherwise.
      • authenticate

        public com.cdek.java.model.auth.response.AuthResponse authenticate()
        Specified by:
        authenticate in interface CdekService
      • authenticateTest

        public com.cdek.java.model.auth.response.AuthResponse authenticateTest()
        Specified by:
        authenticateTest in interface CdekService
      • calculate

        public com.cdek.java.model.calculator.response.Calculator calculate​(com.cdek.java.model.calculator.request.CalculatorRequest request)
        Specified by:
        calculate in interface CdekService
      • orderRegistration

        public com.cdek.java.model.order.response.OrderResponse orderRegistration​(com.cdek.java.model.order.request.OrderRequest request)
        Specified by:
        orderRegistration in interface CdekService
      • createCourierRequest

        public com.cdek.java.model.courier.response.CourierResponse createCourierRequest​(com.cdek.java.model.courier.request.CourierRequest request)
        Specified by:
        createCourierRequest in interface CdekService
      • getDeliveryPoints

        public java.util.List<com.cdek.java.model.deliverypoint.response.DeliveryPointResponse> getDeliveryPoints​(com.cdek.java.model.deliverypoint.request.DeliveryPointRequest request)
        Specified by:
        getDeliveryPoints in interface CdekService
      • getTariffs

        public com.cdek.java.model.calculator.response.Tariffs getTariffs​(com.cdek.java.model.calculator.request.CalculatorRequest calcReq)
        Specified by:
        getTariffs in interface CdekService
      • getTariffCode

        public com.cdek.java.model.calculator.response.TariffCode getTariffCode​(Order order)
        Specified by:
        getTariffCode in interface CdekService