
com.squareup.square.SquareClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of square Show documentation
Show all versions of square Show documentation
Java client library for the Square API
The newest version!
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.squareup.square;
import com.squareup.square.cashdrawers.CashDrawersClient;
import com.squareup.square.core.ClientOptions;
import com.squareup.square.core.Suppliers;
import com.squareup.square.webhooks.WebhooksClient;
import java.util.function.Supplier;
public class SquareClient {
protected final ClientOptions clientOptions;
protected final Supplier mobileClient;
protected final Supplier oAuthClient;
protected final Supplier v1TransactionsClient;
protected final Supplier applePayClient;
protected final Supplier bankAccountsClient;
protected final Supplier bookingsClient;
protected final Supplier cardsClient;
protected final Supplier catalogClient;
protected final Supplier customersClient;
protected final Supplier devicesClient;
protected final Supplier disputesClient;
protected final Supplier employeesClient;
protected final Supplier eventsClient;
protected final Supplier giftCardsClient;
protected final Supplier inventoryClient;
protected final Supplier invoicesClient;
protected final Supplier laborClient;
protected final Supplier locationsClient;
protected final Supplier loyaltyClient;
protected final Supplier merchantsClient;
protected final Supplier checkoutClient;
protected final Supplier ordersClient;
protected final Supplier paymentsClient;
protected final Supplier payoutsClient;
protected final Supplier refundsClient;
protected final Supplier sitesClient;
protected final Supplier snippetsClient;
protected final Supplier subscriptionsClient;
protected final Supplier teamMembersClient;
protected final Supplier teamClient;
protected final Supplier terminalClient;
protected final Supplier vendorsClient;
protected final Supplier cashDrawersClient;
protected final Supplier webhooksClient;
public SquareClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.mobileClient = Suppliers.memoize(() -> new MobileClient(clientOptions));
this.oAuthClient = Suppliers.memoize(() -> new OAuthClient(clientOptions));
this.v1TransactionsClient = Suppliers.memoize(() -> new V1TransactionsClient(clientOptions));
this.applePayClient = Suppliers.memoize(() -> new ApplePayClient(clientOptions));
this.bankAccountsClient = Suppliers.memoize(() -> new BankAccountsClient(clientOptions));
this.bookingsClient = Suppliers.memoize(() -> new BookingsClient(clientOptions));
this.cardsClient = Suppliers.memoize(() -> new CardsClient(clientOptions));
this.catalogClient = Suppliers.memoize(() -> new CatalogClient(clientOptions));
this.customersClient = Suppliers.memoize(() -> new CustomersClient(clientOptions));
this.devicesClient = Suppliers.memoize(() -> new DevicesClient(clientOptions));
this.disputesClient = Suppliers.memoize(() -> new DisputesClient(clientOptions));
this.employeesClient = Suppliers.memoize(() -> new EmployeesClient(clientOptions));
this.eventsClient = Suppliers.memoize(() -> new EventsClient(clientOptions));
this.giftCardsClient = Suppliers.memoize(() -> new GiftCardsClient(clientOptions));
this.inventoryClient = Suppliers.memoize(() -> new InventoryClient(clientOptions));
this.invoicesClient = Suppliers.memoize(() -> new InvoicesClient(clientOptions));
this.laborClient = Suppliers.memoize(() -> new LaborClient(clientOptions));
this.locationsClient = Suppliers.memoize(() -> new LocationsClient(clientOptions));
this.loyaltyClient = Suppliers.memoize(() -> new LoyaltyClient(clientOptions));
this.merchantsClient = Suppliers.memoize(() -> new MerchantsClient(clientOptions));
this.checkoutClient = Suppliers.memoize(() -> new CheckoutClient(clientOptions));
this.ordersClient = Suppliers.memoize(() -> new OrdersClient(clientOptions));
this.paymentsClient = Suppliers.memoize(() -> new PaymentsClient(clientOptions));
this.payoutsClient = Suppliers.memoize(() -> new PayoutsClient(clientOptions));
this.refundsClient = Suppliers.memoize(() -> new RefundsClient(clientOptions));
this.sitesClient = Suppliers.memoize(() -> new SitesClient(clientOptions));
this.snippetsClient = Suppliers.memoize(() -> new SnippetsClient(clientOptions));
this.subscriptionsClient = Suppliers.memoize(() -> new SubscriptionsClient(clientOptions));
this.teamMembersClient = Suppliers.memoize(() -> new TeamMembersClient(clientOptions));
this.teamClient = Suppliers.memoize(() -> new TeamClient(clientOptions));
this.terminalClient = Suppliers.memoize(() -> new TerminalClient(clientOptions));
this.vendorsClient = Suppliers.memoize(() -> new VendorsClient(clientOptions));
this.cashDrawersClient = Suppliers.memoize(() -> new CashDrawersClient(clientOptions));
this.webhooksClient = Suppliers.memoize(() -> new WebhooksClient(clientOptions));
}
public MobileClient mobile() {
return this.mobileClient.get();
}
public OAuthClient oAuth() {
return this.oAuthClient.get();
}
public V1TransactionsClient v1Transactions() {
return this.v1TransactionsClient.get();
}
public ApplePayClient applePay() {
return this.applePayClient.get();
}
public BankAccountsClient bankAccounts() {
return this.bankAccountsClient.get();
}
public BookingsClient bookings() {
return this.bookingsClient.get();
}
public CardsClient cards() {
return this.cardsClient.get();
}
public CatalogClient catalog() {
return this.catalogClient.get();
}
public CustomersClient customers() {
return this.customersClient.get();
}
public DevicesClient devices() {
return this.devicesClient.get();
}
public DisputesClient disputes() {
return this.disputesClient.get();
}
public EmployeesClient employees() {
return this.employeesClient.get();
}
public EventsClient events() {
return this.eventsClient.get();
}
public GiftCardsClient giftCards() {
return this.giftCardsClient.get();
}
public InventoryClient inventory() {
return this.inventoryClient.get();
}
public InvoicesClient invoices() {
return this.invoicesClient.get();
}
public LaborClient labor() {
return this.laborClient.get();
}
public LocationsClient locations() {
return this.locationsClient.get();
}
public LoyaltyClient loyalty() {
return this.loyaltyClient.get();
}
public MerchantsClient merchants() {
return this.merchantsClient.get();
}
public CheckoutClient checkout() {
return this.checkoutClient.get();
}
public OrdersClient orders() {
return this.ordersClient.get();
}
public PaymentsClient payments() {
return this.paymentsClient.get();
}
public PayoutsClient payouts() {
return this.payoutsClient.get();
}
public RefundsClient refunds() {
return this.refundsClient.get();
}
public SitesClient sites() {
return this.sitesClient.get();
}
public SnippetsClient snippets() {
return this.snippetsClient.get();
}
public SubscriptionsClient subscriptions() {
return this.subscriptionsClient.get();
}
public TeamMembersClient teamMembers() {
return this.teamMembersClient.get();
}
public TeamClient team() {
return this.teamClient.get();
}
public TerminalClient terminal() {
return this.terminalClient.get();
}
public VendorsClient vendors() {
return this.vendorsClient.get();
}
public CashDrawersClient cashDrawers() {
return this.cashDrawersClient.get();
}
public WebhooksClient webhooks() {
return this.webhooksClient.get();
}
public static SquareClientBuilder builder() {
return new SquareClientBuilder();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy