public Task <DisputesQueryResponse> Query(DisputesQueryFilter filter, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("filter", filter); return(ApiClient.Query <DisputesQueryResponse>(DisputesPath, SdkAuthorization(), filter, cancellationToken)); }
public Task <StatementReportResponse> QueryStatementsReport(QueryFilterDateRange filter, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("filter", filter); return(ApiClient.Query <StatementReportResponse>(BuildPath(ReportingPath, StatementsPath), SdkAuthorization(), filter, cancellationToken)); }
public Task <ReconciliationPaymentReportResponse> SinglePaymentReport(string paymentId, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("paymentId", paymentId); return(ApiClient.Get <ReconciliationPaymentReportResponse>(BuildPath(ReportingPath, PaymentsPath, paymentId), SdkAuthorization(), cancellationToken)); }
public Task <ReconciliationPaymentReportResponse> QueryPaymentsReport(ReconciliationQueryPaymentsFilter filter, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("filter", filter); return(ApiClient.Query <ReconciliationPaymentReportResponse>(BuildPath(ReportingPath, PaymentsPath), SdkAuthorization(), filter, cancellationToken)); }
public Task <DisputeDetailsResponse> GetDisputeDetails(string disputeId, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("disputeId", disputeId); return(ApiClient.Get <DisputeDetailsResponse>(BuildPath(DisputesPath, disputeId), SdkAuthorization(), cancellationToken)); }
public Task <ReflowResponse> ReflowBySubjectAndWorkflow(string subjectId, string workflowId) { CheckoutUtils.ValidateParams("subjectId", subjectId, WorkflowId, workflowId); return(ApiClient.Post <ReflowResponse>( BuildPath(WorkflowsPath, EventsPath, SubjectPath, subjectId, WorkflowPath, workflowId, ReflowPath), SdkAuthorization())); }
public Task <EmptyResponse> RetryWebhook(string eventId, string webhookId, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("eventId", eventId, "webhookId", webhookId); return(ApiClient.Post <EmptyResponse>(BuildPath(EventsPath, eventId, WebhooksPath, webhookId, RetryPath), SdkAuthorization(), null, cancellationToken, null)); }
private static ISender Create(JToken jToken) { CheckoutUtils.ValidateParams("jToken", jToken); var sourceType = GetSourceType(jToken); return(CreateResponse(sourceType)); }
public Task <HostedPaymentResponse> CreateHostedPaymentsPageSession(HostedPaymentRequest hostedPaymentRequest, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("hostedPaymentRequest", hostedPaymentRequest); return(ApiClient.Post <HostedPaymentResponse>(HostedPaymentsPath, SdkAuthorization(), hostedPaymentRequest, cancellationToken)); }
private async Task <GetSessionResponse> GetSessionDetails(string sessionId, SdkAuthorization sdkAuthorization, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams(SessionIdPath, sessionId, "sdkAuthorization", sdkAuthorization); return(await ApiClient.Get <GetSessionResponse>(BuildPath(SessionsPath, sessionId), sdkAuthorization, cancellationToken)); }
public static IServiceCollection AddCheckoutSdk( IServiceCollection serviceCollection, IConfiguration configuration, ILoggerFactory loggerFactory = null, IHttpClientFactory httpClientFactory = null) { CheckoutUtils.ValidateParams("serviceCollection", serviceCollection, "configuration", configuration); var checkoutOptions = configuration.GetCheckoutOptions(); if (checkoutOptions == null) { throw new CheckoutArgumentException("Checkout options was not initialized correctly"); } switch (checkoutOptions.PlatformType) { case PlatformType.Previous: return(AddSingletonPreviousSdk(serviceCollection, checkoutOptions, loggerFactory, httpClientFactory)); case PlatformType.Default: return(AddSingletonDefaultSdk(serviceCollection, checkoutOptions, loggerFactory, httpClientFactory)); case PlatformType.DefaultOAuth: return(AddSingletonDefaultOAuthSdk(serviceCollection, checkoutOptions, loggerFactory, httpClientFactory)); default: throw new CheckoutArgumentException($"Unsupported PlatformType:{checkoutOptions.PlatformType}"); } }
public Task <WebhookResponse> RegisterWebhook(WebhookRequest webhookRequest, string idempotencyKey = null, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("webhookRequest", webhookRequest); return(ApiClient.Post <WebhookResponse>(WebhooksPath, SdkAuthorization(), webhookRequest, cancellationToken, idempotencyKey)); }
public Task <EventsPageResponse> RetrieveEvents(RetrieveEventsRequest eventsRequest, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("eventsRequest", eventsRequest); return(ApiClient.Query <EventsPageResponse>(EventsPath, SdkAuthorization(), eventsRequest, cancellationToken)); }
public Task <RetrieveInstrumentResponse> Get(string instrumentId, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("instrumentId", instrumentId); return(ApiClient.Get <RetrieveInstrumentResponse>(BuildPath(InstrumentsPath, instrumentId), SdkAuthorization(), cancellationToken)); }
public Task <EmptyResponse> Update(string customerId, CustomerRequest customerRequest, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("customerId", customerId, "customerRequest", customerRequest); return(ApiClient.Patch <EmptyResponse>(BuildPath(Customers, customerId), SdkAuthorization(), customerRequest, cancellationToken)); }
private static GetInstrumentResponse Create(JToken jToken) { CheckoutUtils.ValidateParams("jToken", jToken); var sourceType = GetSourceType(jToken); return(Create(sourceType)); }
public Task <PaymentLinkResponse> Create(PaymentLinkRequest paymentLinkRequest, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("paymentLinkRequest", paymentLinkRequest); return(ApiClient.Post <PaymentLinkResponse>(PaymentLinksPath, SdkAuthorization(), paymentLinkRequest, cancellationToken, null)); }
private static IPaymentResponseDestination Create(JToken jToken) { CheckoutUtils.ValidateParams("jToken", jToken); var sourceType = GetSourceType(jToken); return(CreateRequest(sourceType)); }
private static WorkflowActionResponse Create(JToken jToken) { CheckoutUtils.ValidateParams("jToken", jToken); var sourceType = GetSourceType(jToken); return(Create(sourceType)); }
public Task <UpdateWorkflowResponse> UpdateWorkflow(string workflowId, UpdateWorkflowRequest updateWorkflowRequest) { CheckoutUtils.ValidateParams(WorkflowId, workflowId, "updateWorkflowRequest", updateWorkflowRequest); return(ApiClient.Patch <UpdateWorkflowResponse>(BuildPath(WorkflowsPath, workflowId), SdkAuthorization(), updateWorkflowRequest)); }
public Task <CreditSession> GetCreditSession(string sessionId, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("sessionId", sessionId); return(ApiClient.Get <CreditSession>(BuildPath(GetBaseUrl(), CreditSessionsPath, sessionId), SdkAuthorization(), cancellationToken)); }
public Task <TokenResponse> Request( WalletTokenRequest walletTokenRequest, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("walletTokenRequest", walletTokenRequest); return(ApiClient.Post <TokenResponse>(Tokens, SdkAuthorization(), walletTokenRequest, cancellationToken)); }
public async Task <GetSessionResponse> UpdateSession(string sessionSecret, string sessionId, ChannelData channelData, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("sessionSecret", sessionSecret, "sessionId", sessionId, "channelData", channelData); return(await UpdateSession(sessionId, channelData, SessionSecretAuthorization(sessionSecret), cancellationToken)); }
public Task <IdResponse> SubmitFile(string pathToFile, string purpose, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("pathToFile", pathToFile, "purpose", purpose); var dataContent = CreateMultipartRequest(pathToFile, purpose, "file"); return(ApiClient.Post <IdResponse>(Files, SdkAuthorization(), dataContent, cancellationToken)); }
public Task <EventNotificationResponse> RetrieveEventNotification(string eventId, string notificationId, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("eventId", eventId, "notificationId", notificationId); return(ApiClient.Get <EventNotificationResponse>( BuildPath(EventsPath, eventId, "notifications", notificationId), SdkAuthorization(), cancellationToken)); }
public Task <HostedPaymentDetailsResponse> GetHostedPaymentsPageDetails(string hostedPaymentId, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("hostedPaymentId", hostedPaymentId); return(ApiClient.Get <HostedPaymentDetailsResponse>(BuildPath(HostedPaymentsPath, hostedPaymentId), SdkAuthorization(), cancellationToken)); }
public Task <EmptyResponse> UpdateWorkflowCondition(string workflowId, string conditionId, WorkflowConditionRequest workflowConditionRequest) { CheckoutUtils.ValidateParams(WorkflowId, workflowId, "conditionId", conditionId, "workflowConditionRequest", workflowConditionRequest); return(ApiClient.Put <EmptyResponse>(BuildPath(WorkflowsPath, workflowId, ConditionsPath, conditionId), SdkAuthorization(), workflowConditionRequest)); }
public Task <WebhookResponse> PatchWebhook(string webhookId, WebhookRequest webhookRequest, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("webhookId", webhookId, "webhookRequest", webhookRequest); return(ApiClient.Patch <WebhookResponse>(BuildPath(WebhooksPath, webhookId), SdkAuthorization(), webhookRequest, cancellationToken)); }
public Task <EmptyResponse> PutEvidence(string disputeId, DisputeEvidenceRequest disputeEvidenceRequest, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("disputeId", disputeId, "disputeEvidenceRequest", disputeEvidenceRequest); return(ApiClient.Put <EmptyResponse>(BuildPath(DisputesPath, disputeId, EvidencePath), SdkAuthorization(), disputeEvidenceRequest, cancellationToken)); }
public async Task <IdResponse> SubmitFile(AccountsFileRequest accountsFileRequest, CancellationToken cancellationToken = default) { CheckoutUtils.ValidateParams("accountsFileRequest", accountsFileRequest, "accountsFileRequest.purpose", accountsFileRequest.Purpose); return(await SubmitFileToFilesApi(accountsFileRequest.File, accountsFileRequest.Purpose.Value, cancellationToken)); }