Exemplo n.º 1
0
        public virtual GetCustomerProfileResponse GetCustomerProfile(GetCustomerProfileRequest request)
        {
            Ensure.That(request, "request").IsNotNull();

            var httpRequest  = GetCustomerProfileHttpRequestFactory.Create(request);
            var httpResponse = Connection.Send(httpRequest);

            return(ResponseFactory.Create <GetCustomerProfileResponse>(httpResponse));
        }
Exemplo n.º 2
0
        public PaynovaClient(IHttpConnection connection)
        {
            Ensure.That(connection, "connection").IsNotNull();

            Connection = connection;
            Serializer = new DefaultJsonSerializer();

            CreateOrderHttpRequestFactory               = new CreateOrderHttpRequestFactory(Runtime.Instance, Serializer);
            AuthorizeInvoiceHttpRequestFactory          = new AuthorizeInvoiceHttpRequestFactory(Runtime.Instance, Serializer);
            InitializePaymentHttpRequestFactory         = new InitializePaymentHttpRequestFactory(Runtime.Instance, Serializer);
            RefundPaymentHttpRequestFactory             = new RefundPaymentHttpRequestFactory(Runtime.Instance, Serializer);
            FinalizeAuthorizationHttpRequestFactory     = new FinalizeAuthorizationHttpRequestFactory(Runtime.Instance, Serializer);
            AnnulAuthorizationHttpRequestFactory        = new AnnulAuthorizationHttpRequestFactory(Runtime.Instance, Serializer);
            GetAddressesHttpRequestFactory              = new GetAddressesHttpRequestFactory(Runtime.Instance, Serializer);
            GetCustomerProfileHttpRequestFactory        = new GetCustomerProfileHttpRequestFactory(Runtime.Instance, Serializer);
            GetPaymentOptionsHttpRequestFactory         = new GetPaymentOptionsHttpRequestFactory(Runtime.Instance, Serializer);
            RemoveCustomerProfileCardHttpRequestFactory = new RemoveCustomerProfileCardHttpRequestFactory(Runtime.Instance, Serializer);
            RemoveCustomerProfileHttpRequestFactory     = new RemoveCustomerProfileHttpRequestFactory(Runtime.Instance, Serializer);

            ResponseFactory = new GenericResponseFactory(Serializer);
        }