Пример #1
0
        public static TransactionDetail Retrieve(RetrieveTransactionDetailRequest request, Options options)
        {
            String url = options.BaseUrl
                         + "/v2/reporting/payment/details?paymentConversationId="
                         + request.PaymentConversationId;

            return(RestHttpClientV2.Create().Get <TransactionDetail>(url, GetHttpHeadersWithUrlParams(request, url, options)));
        }
Пример #2
0
        public static TransactionReport Retrieve(RetrieveTransactionReportRequest request, Options options)
        {
            string url = options.BaseUrl
                         + "/v2/reporting/payment/transactions?transactionDate="
                         + request.TransactionDate
                         + "&page="
                         + request.Page;

            return(RestHttpClientV2.Create().Get <TransactionReport>(url, GetHttpHeadersWithUrlParams(request, url, options)));
        }
Пример #3
0
        // Async
        public static async Task <ResponsePagingData <IyziLinkItem> > RetrieveAllAsync(PagingRequest request, Options options)
        {
            string queryParams        = GetQueryParams(request);
            string iyzilinkQueryParam = "productType=IYZILINK";

            queryParams = String.IsNullOrEmpty(queryParams)
                ? "?" + iyzilinkQueryParam
                : queryParams + "&" + iyzilinkQueryParam;

            string uri = options.BaseUrl + V2_IYZILINK_PRODUCTS + queryParams;

            return(await RestHttpClientV2.Create().GetAsync <ResponsePagingData <IyziLinkItem> >(uri, GetHttpHeadersWithUrlParams(request, uri, options)));
        }
Пример #4
0
        public static CheckoutFormResource InitializeCheckoutForm(InitializeCheckoutFormRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/checkoutform/initialize";

            return(RestHttpClientV2.Create().Post <CheckoutFormResource>(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #5
0
        public static ResponsePagingData <SubscriptionResource> Search(SearchSubscriptionRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/subscriptions{GetQueryParams(request)}";

            return(RestHttpClientV2.Create().Get <ResponsePagingData <SubscriptionResource> >(uri, GetHttpHeadersWithUrlParams(request, uri, options)));
        }
Пример #6
0
        // Async
        public static async Task <ResponseData <IyziLinkSave> > UpdateAsync(string token, IyziLinkSaveRequest request, Options options)
        {
            string uri = options.BaseUrl + V2_IYZILINK_PRODUCTS + "/" + token + GetQueryParams(request);

            return(await RestHttpClientV2.Create().PutAsync <ResponseData <IyziLinkSave> >(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #7
0
        // Async
        public static async Task <ResponsePagingData <ProductResource> > RetrieveAllAsync(PagingRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/products{GetQueryParams(request)}";

            return(await RestHttpClientV2.Create().GetAsync <ResponsePagingData <ProductResource> >(uri, GetHttpHeadersWithUrlParams(request, uri, options)));
        }
Пример #8
0
        // Async
        public static async Task <IyzipayResourceV2> DeleteAsync(DeleteProductRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/products/{request.ProductReferenceCode}";

            return(await RestHttpClientV2.Create().DeleteAsync <IyzipayResourceV2>(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #9
0
        public static IyzipayResourceV2 Delete(DeletePlanRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/pricing-plans/{request.PricingPlanReferenceCode}";

            return(RestHttpClientV2.Create().Delete <IyzipayResourceV2>(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #10
0
        // Async
        public static async Task <ResponseData <CustomerResource> > CreateAsync(CreateCustomerRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/customers";

            return(await RestHttpClientV2.Create().PostAsync <ResponseData <CustomerResource> >(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #11
0
        // Async
        public static async Task <IyzipayResourceV2> UpgradeAsync(UpgradeSubscriptionRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/subscriptions/{request.SubscriptionReferenceCode}/upgrade";

            return(await RestHttpClientV2.Create().PostAsync <IyzipayResourceV2>(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #12
0
        // Async
        public static async Task <UpdateCardFormResource> UpdateCardAsync(UpdateCardRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/card-update/checkoutform/initialize";

            return(await RestHttpClientV2.Create().PostAsync <UpdateCardFormResource>(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #13
0
        // Async
        public static async Task <IyzipayResourceV2> DeleteAsync(string token, BaseRequestV2 request, Options options)
        {
            string uri = options.BaseUrl + V2_IYZILINK_PRODUCTS + "/" + token + GetQueryParams(request);

            return(await RestHttpClientV2.Create().DeleteAsync <IyzipayResourceV2>(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #14
0
        // Async
        public static async Task <ResponseData <IyziLinkItem> > RetrieveAsync(string token, BaseRequestV2 request, Options options)
        {
            string uri = options.BaseUrl + V2_IYZILINK_PRODUCTS + "/" + token + GetQueryParams(request);

            return(await RestHttpClientV2.Create().GetAsync <ResponseData <IyziLinkItem> >(uri, GetHttpHeadersWithUrlParams(request, uri, options)));
        }
Пример #15
0
        // sync
        public static ResponsePagingData <CustomerResource> RetrieveAll(PagingRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/customers{GetQueryParams(request)}";

            return(RestHttpClientV2.Create().Get <ResponsePagingData <CustomerResource> >(uri, GetHttpHeadersWithUrlParams(request, uri, options)));
        }
Пример #16
0
        public static ResponseData <PlanResource> Update(UpdatePlanRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/pricing-plans/{request.PricingPlanReferenceCode}";

            return(RestHttpClientV2.Create().Post <ResponseData <PlanResource> >(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #17
0
        public static ResponseData <SubscriptionCreatedResource> Initialize(SubscriptionInitializeRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/initialize";

            return(RestHttpClientV2.Create().Post <ResponseData <SubscriptionCreatedResource> >(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #18
0
        public static ResponsePagingData <PlanResource> RetrieveAll(RetrieveAllPlanRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/products/{request.ProductReferenceCode}/pricing-plans{GetQueryParams(request)}";

            return(RestHttpClientV2.Create().Get <ResponsePagingData <PlanResource> >(uri, GetHttpHeadersWithUrlParams(request, uri, options)));
        }
Пример #19
0
        public static IyzipayResourceV2 Retry(RetrySubscriptionRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/operation/retry";

            return(RestHttpClientV2.Create().Post <IyzipayResourceV2>(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #20
0
        // Async
        public static async Task <ResponseData <ProductResource> > UpdateAsync(UpdateProductRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/products/{request.ProductReferenceCode}";

            return(await RestHttpClientV2.Create().PostAsync <ResponseData <ProductResource> >(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #21
0
        public static IyzipayResourceV2 Cancel(CancelSubscriptionRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/subscriptions/{request.SubscriptionReferenceCode}/cancel";

            return(RestHttpClientV2.Create().Post <IyzipayResourceV2>(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #22
0
        // Async
        public static async Task <ResponseData <ProductResource> > RetrieveAsync(RetrieveProductRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/products/{request.ProductReferenceCode}";

            return(await RestHttpClientV2.Create().GetAsync <ResponseData <ProductResource> >(uri, GetHttpHeadersWithUrlParams(request, uri, options)));
        }
Пример #23
0
        public static ResponseData <SubscriptionResource> Retrieve(RetrieveSubscriptionRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/subscriptions/{request.SubscriptionReferenceCode}";

            return(RestHttpClientV2.Create().Get <ResponseData <SubscriptionResource> >(uri, GetHttpHeadersWithUrlParams(request, uri, options)));
        }
Пример #24
0
        // sync
        public static ResponseData <ProductResource> Create(CreateProductRequest request, Options options)
        {
            string uri = $"{options.BaseUrl}/v2/subscription/products";

            return(RestHttpClientV2.Create().Post <ResponseData <ProductResource> >(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }
Пример #25
0
        // sync
        public static ResponseData <IyziLinkSave> Create(IyziLinkSaveRequest request, Options options)
        {
            string uri = options.BaseUrl + V2_IYZILINK_PRODUCTS + GetQueryParams(request);

            return(RestHttpClientV2.Create().Post <ResponseData <IyziLinkSave> >(uri, GetHttpHeadersWithRequestBody(request, uri, options), request));
        }