com.global.api.services.ReportingService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of globalpayments-sdk Show documentation
Show all versions of globalpayments-sdk Show documentation
API for processing payments through Global Payments
package com.global.api.services;
import com.global.api.builders.ReportBuilder;
import com.global.api.builders.TransactionReportBuilder;
import com.global.api.builders.UserReportBuilder;
import com.global.api.entities.ActivityReport;
import com.global.api.entities.DisputeDocument;
import com.global.api.entities.TransactionSummary;
import com.global.api.entities.TransactionSummaryList;
import com.global.api.entities.enums.ReportType;
import com.global.api.entities.enums.TransactionModifier;
import com.global.api.entities.reporting.*;
public class ReportingService {
public static TransactionReportBuilder findTransactions() {
return new TransactionReportBuilder<>(ReportType.FindTransactions, TransactionSummaryList.class);
}
public static TransactionReportBuilder findTransactions(String transactionId) {
return new TransactionReportBuilder<>(ReportType.FindTransactions, TransactionSummary.class)
.withTransactionId(transactionId);
}
public static TransactionReportBuilder activity() {
return new TransactionReportBuilder<>(ReportType.Activity, ActivityReport.class);
}
public static TransactionReportBuilder transactionDetail(String transactionId) {
return new TransactionReportBuilder<>(ReportType.TransactionDetail, TransactionSummary.class)
.withTransactionId(transactionId);
}
public static TransactionReportBuilder depositDetail(String depositId) {
return new TransactionReportBuilder<>(ReportType.DepositDetail, DepositSummary.class)
.withDepositReference(depositId);
}
public static TransactionReportBuilder disputeDetail(String disputeId) {
return new TransactionReportBuilder<>(ReportType.DisputeDetail, DisputeSummary.class)
.withDisputeId(disputeId);
}
public static TransactionReportBuilder documentDisputeDetail(String disputeId) {
return new TransactionReportBuilder<>(ReportType.DocumentDisputeDetail, DisputeDocument.class)
.withDisputeId(disputeId);
}
public static TransactionReportBuilder settlementDisputeDetail(String settlementDisputeId) {
return new TransactionReportBuilder<>(ReportType.SettlementDisputeDetail, DisputeSummary.class)
.withSettlementDisputeId(settlementDisputeId);
}
public static TransactionReportBuilder storedPaymentMethodDetail(String storedPaymentMethodId) {
return new TransactionReportBuilder<>(ReportType.StoredPaymentMethodDetail, StoredPaymentMethodSummary.class)
.withStoredPaymentMethodId(storedPaymentMethodId);
}
public static TransactionReportBuilder actionDetail(String actionId) {
return new TransactionReportBuilder<>(ReportType.ActionDetail, ActionSummary.class)
.withActionId(actionId);
}
public static TransactionReportBuilder bankPaymentDetail(String bankPaymentId, int page, int pageSize) {
return new TransactionReportBuilder<>(ReportType.FindBankPayment, TransactionSummaryPaged.class)
.withBankPaymentId(bankPaymentId)
.withPaging(page, pageSize);
}
public static TransactionReportBuilder findBankPaymentTransactions(int page, int pageSize) {
return new TransactionReportBuilder<>(ReportType.FindBankPayment, TransactionSummaryPaged.class)
.withPaging(page, pageSize);
}
public static TransactionReportBuilder findTransactionsPaged(int page, int pageSize) {
return new TransactionReportBuilder<>(ReportType.FindTransactionsPaged, TransactionSummaryPaged.class)
.withPaging(page, pageSize);
}
public static TransactionReportBuilder findTransactionsPaged(int page, int pageSize, String transactionId) {
return new TransactionReportBuilder<>(ReportType.FindTransactionsPaged, TransactionSummaryPaged.class)
.withTransactionId(transactionId)
.withPaging(page, pageSize);
}
public static TransactionReportBuilder findSettlementTransactionsPaged(int page, int pageSize) {
return new TransactionReportBuilder<>(ReportType.FindSettlementTransactionsPaged, TransactionSummaryPaged.class)
.withPaging(page, pageSize);
}
public static TransactionReportBuilder findDepositsPaged(int page, int pageSize) {
return new TransactionReportBuilder<>(ReportType.FindDepositsPaged, DepositSummaryPaged.class)
.withPaging(page, pageSize);
}
public static TransactionReportBuilder findDisputesPaged(int page, int pageSize) {
return new TransactionReportBuilder<>(ReportType.FindDisputesPaged, DisputeSummaryPaged.class)
.withPaging(page, pageSize);
}
public static TransactionReportBuilder findSettlementDisputesPaged(int page, int pageSize) {
return new TransactionReportBuilder<>(ReportType.FindSettlementDisputesPaged, DisputeSummaryPaged.class)
.withPaging(page, pageSize);
}
public static TransactionReportBuilder findStoredPaymentMethodsPaged(int page, int pageSize) {
return new TransactionReportBuilder<>(ReportType.FindStoredPaymentMethodsPaged, StoredPaymentMethodSummaryPaged.class)
.withPaging(page, pageSize);
}
public static TransactionReportBuilder findActionsPaged(int page, int pageSize) {
return new TransactionReportBuilder<>(ReportType.FindActionsPaged, ActionSummaryPaged.class)
.withPaging(page, pageSize);
}
public static UserReportBuilder findMerchants(int page, int pageSize) {
return new UserReportBuilder<>(ReportType.FindMerchantsPaged, MerchantSummaryPaged.class)
.withModifier(TransactionModifier.Merchant)
.withPaging(page, pageSize);
}
public static UserReportBuilder findAccounts(int page, int pageSize) {
return new UserReportBuilder<>(ReportType.FindAccountsPaged, MerchantAccountSummaryPaged.class)
.withPaging(page, pageSize);
}
public static UserReportBuilder accountDetail(String accountId) {
return new UserReportBuilder<>(ReportType.FindAccountDetail, MerchantAccountSummary.class)
.withAccountId(accountId);
}
}