index
int64
0
0
repo_id
stringlengths
9
205
file_path
stringlengths
31
246
content
stringlengths
1
12.2M
__index_level_0__
int64
0
10k
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/PaymentsApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiException; import com.squareup.connect.models.CancelPaymentByIdempotencyKeyRequest; import com.squareup.connect.models.CancelPaymentByIdempotencyKeyResponse; import com.squareup.connect.models.CancelPaymentResponse; import com.squareup.connect.models.CompletePaymentResponse; import com.squareup.connect.models.CreatePaymentRequest; import com.squareup.connect.models.CreatePaymentResponse; import com.squareup.connect.models.GetPaymentResponse; import com.squareup.connect.models.ListPaymentsResponse; import org.junit.Test; import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for PaymentsApi */ @Ignore public class PaymentsApiTest { private final PaymentsApi api = new PaymentsApi(); /** * CancelPayment * * Cancels a payment. If you set `autocomplete` to false when creating a payment, you can cancel the payment using this endpoint. For more information, see [Delayed Payments](/payments-api/take-payments#delayed-payments). * * @throws ApiException * if the Api call fails */ @Test public void cancelPaymentTest() throws ApiException { String paymentId = null; CancelPaymentResponse response = api.cancelPayment(paymentId); // TODO: test validations } /** * CancelPaymentByIdempotencyKey * * Cancels a payment identified by the idenpotency key that is specified the request. Use this method when status of a CreatePayment request is unknown. For example, after you send a CreatePayment request a network error occurs and you don't get a response. In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in your CreatePayment request you want to cancel. After cancelling the payment, you can submit your CreatePayment request again. Note that if no payment with the specified idempotency key is found, no action is taken, the end point returns successfully. * * @throws ApiException * if the Api call fails */ @Test public void cancelPaymentByIdempotencyKeyTest() throws ApiException { CancelPaymentByIdempotencyKeyRequest body = null; CancelPaymentByIdempotencyKeyResponse response = api.cancelPaymentByIdempotencyKey(body); // TODO: test validations } /** * CompletePayment * * Completes a payment. By default, payments are set to complete immediately after they are created. If you set autocomplete to false when creating a payment, you can complete the payment using this endpoint. For more information, see [Delayed Payments](/payments-api/take-payments#delayed-payments). * * @throws ApiException * if the Api call fails */ @Test public void completePaymentTest() throws ApiException { String paymentId = null; CompletePaymentResponse response = api.completePayment(paymentId); // TODO: test validations } /** * CreatePayment * * Charges a payment source, for example, a card represented by customer's card on file or a card nonce. In addition to the payment source, the request must also include the amount to accept for the payment. There are several optional parameters that you can include in the request. For example, tip money, whether to autocomplete the payment, or a reference ID to correlate this payment with another system. For more information about these payment options, see [Take Payments](/payments-api/take-payments). The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. * * @throws ApiException * if the Api call fails */ @Test public void createPaymentTest() throws ApiException { CreatePaymentRequest body = null; CreatePaymentResponse response = api.createPayment(body); // TODO: test validations } /** * GetPayment * * Retrieves details for a specific Payment. * * @throws ApiException * if the Api call fails */ @Test public void getPaymentTest() throws ApiException { String paymentId = null; GetPaymentResponse response = api.getPayment(paymentId); // TODO: test validations } /** * ListPayments * * Retrieves a list of payments taken by the account making the request. Max results per page: 100 * * @throws ApiException * if the Api call fails */ @Test public void listPaymentsTest() throws ApiException { String beginTime = null; String endTime = null; String sortOrder = null; String cursor = null; String locationId = null; Long total = null; String last4 = null; String cardBrand = null; ListPaymentsResponse response = api.listPayments(beginTime, endTime, sortOrder, cursor, locationId, total, last4, cardBrand); // TODO: test validations } }
4,700
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/MobileAuthorizationApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiException; import com.squareup.connect.models.CreateMobileAuthorizationCodeRequest; import com.squareup.connect.models.CreateMobileAuthorizationCodeResponse; import org.junit.Test; import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for MobileAuthorizationApi */ @Ignore public class MobileAuthorizationApiTest { private final MobileAuthorizationApi api = new MobileAuthorizationApi(); /** * CreateMobileAuthorizationCode * * Generates code to authorize a mobile application to connect to a Square card reader Authorization codes are one-time-use and expire __60 minutes__ after being issued. __Important:__ The `Authorization` header you provide to this endpoint must have the following format: ``` Authorization: Bearer ACCESS_TOKEN ``` Replace `ACCESS_TOKEN` with a [valid production authorization credential](https://docs.connect.squareup.com/get-started#step-4-understand-the-different-application-credentials). * * @throws ApiException * if the Api call fails */ @Test public void createMobileAuthorizationCodeTest() throws ApiException { CreateMobileAuthorizationCodeRequest body = null; CreateMobileAuthorizationCodeResponse response = api.createMobileAuthorizationCode(body); // TODO: test validations } }
4,701
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/LaborApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiException; import com.squareup.connect.models.CreateBreakTypeRequest; import com.squareup.connect.models.CreateBreakTypeResponse; import com.squareup.connect.models.CreateShiftRequest; import com.squareup.connect.models.CreateShiftResponse; import com.squareup.connect.models.DeleteBreakTypeResponse; import com.squareup.connect.models.DeleteShiftResponse; import com.squareup.connect.models.GetBreakTypeResponse; import com.squareup.connect.models.GetEmployeeWageResponse; import com.squareup.connect.models.GetShiftResponse; import com.squareup.connect.models.ListBreakTypesResponse; import com.squareup.connect.models.ListEmployeeWagesResponse; import com.squareup.connect.models.ListWorkweekConfigsResponse; import com.squareup.connect.models.SearchShiftsRequest; import com.squareup.connect.models.SearchShiftsResponse; import com.squareup.connect.models.UpdateBreakTypeRequest; import com.squareup.connect.models.UpdateBreakTypeResponse; import com.squareup.connect.models.UpdateShiftRequest; import com.squareup.connect.models.UpdateShiftResponse; import com.squareup.connect.models.UpdateWorkweekConfigRequest; import com.squareup.connect.models.UpdateWorkweekConfigResponse; import org.junit.Test; import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for LaborApi */ @Ignore public class LaborApiTest { private final LaborApi api = new LaborApi(); /** * CreateBreakType * * Creates a new `BreakType`. A `BreakType` is a template for creating `Break` objects. You must provide the following values in your request to this endpoint: - `location_id` - `break_name` - `expected_duration` - `is_paid` You can only have 3 `BreakType` instances per location. If you attempt to add a 4th `BreakType` for a location, an `INVALID_REQUEST_ERROR` \"Exceeded limit of 3 breaks per location.\" is returned. * * @throws ApiException * if the Api call fails */ @Test public void createBreakTypeTest() throws ApiException { CreateBreakTypeRequest body = null; CreateBreakTypeResponse response = api.createBreakType(body); // TODO: test validations } /** * CreateShift * * Creates a new `Shift`. A `Shift` represents a complete work day for a single employee. You must provide the following values in your request to this endpoint: - `location_id` - `employee_id` - `start_at` An attempt to create a new `Shift` can result in a `BAD_REQUEST` error when: - The `status` of the new `Shift` is `OPEN` and the employee has another shift with an `OPEN` status. - The `start_at` date is in the future - the `start_at` or `end_at` overlaps another shift for the same employee - If `Break`s are set in the request, a break `start_at` must not be before the `Shift.start_at`. A break `end_at` must not be after the `Shift.end_at` * * @throws ApiException * if the Api call fails */ @Test public void createShiftTest() throws ApiException { CreateShiftRequest body = null; CreateShiftResponse response = api.createShift(body); // TODO: test validations } /** * DeleteBreakType * * Deletes an existing `BreakType`. A `BreakType` can be deleted even if it is referenced from a `Shift`. * * @throws ApiException * if the Api call fails */ @Test public void deleteBreakTypeTest() throws ApiException { String id = null; DeleteBreakTypeResponse response = api.deleteBreakType(id); // TODO: test validations } /** * DeleteShift * * Deletes a `Shift`. * * @throws ApiException * if the Api call fails */ @Test public void deleteShiftTest() throws ApiException { String id = null; DeleteShiftResponse response = api.deleteShift(id); // TODO: test validations } /** * GetBreakType * * Returns a single `BreakType` specified by id. * * @throws ApiException * if the Api call fails */ @Test public void getBreakTypeTest() throws ApiException { String id = null; GetBreakTypeResponse response = api.getBreakType(id); // TODO: test validations } /** * GetEmployeeWage * * Returns a single `EmployeeWage` specified by id. * * @throws ApiException * if the Api call fails */ @Test public void getEmployeeWageTest() throws ApiException { String id = null; GetEmployeeWageResponse response = api.getEmployeeWage(id); // TODO: test validations } /** * GetShift * * Returns a single `Shift` specified by id. * * @throws ApiException * if the Api call fails */ @Test public void getShiftTest() throws ApiException { String id = null; GetShiftResponse response = api.getShift(id); // TODO: test validations } /** * ListBreakTypes * * Returns a paginated list of `BreakType` instances for a business. * * @throws ApiException * if the Api call fails */ @Test public void listBreakTypesTest() throws ApiException { String locationId = null; Integer limit = null; String cursor = null; ListBreakTypesResponse response = api.listBreakTypes(locationId, limit, cursor); // TODO: test validations } /** * ListEmployeeWages * * Returns a paginated list of `EmployeeWage` instances for a business. * * @throws ApiException * if the Api call fails */ @Test public void listEmployeeWagesTest() throws ApiException { String employeeId = null; Integer limit = null; String cursor = null; ListEmployeeWagesResponse response = api.listEmployeeWages(employeeId, limit, cursor); // TODO: test validations } /** * ListWorkweekConfigs * * Returns a list of `WorkweekConfig` instances for a business. * * @throws ApiException * if the Api call fails */ @Test public void listWorkweekConfigsTest() throws ApiException { Integer limit = null; String cursor = null; ListWorkweekConfigsResponse response = api.listWorkweekConfigs(limit, cursor); // TODO: test validations } /** * SearchShifts * * Returns a paginated list of `Shift` records for a business. The list to be returned can be filtered by: - Location IDs **and** - employee IDs **and** - shift status (`OPEN`, `CLOSED`) **and** - shift start **and** - shift end **and** - work day details The list can be sorted by: - `start_at` - `end_at` - `created_at` - `updated_at` * * @throws ApiException * if the Api call fails */ @Test public void searchShiftsTest() throws ApiException { SearchShiftsRequest body = null; SearchShiftsResponse response = api.searchShifts(body); // TODO: test validations } /** * UpdateBreakType * * Updates an existing `BreakType`. * * @throws ApiException * if the Api call fails */ @Test public void updateBreakTypeTest() throws ApiException { String id = null; UpdateBreakTypeRequest body = null; UpdateBreakTypeResponse response = api.updateBreakType(id, body); // TODO: test validations } /** * UpdateShift * * Updates an existing `Shift`. When adding a `Break` to a `Shift`, any earlier `Breaks` in the `Shift` have the `end_at` property set to a valid RFC-3339 datetime string. When closing a `Shift`, all `Break` instances in the shift must be complete with `end_at` set on each `Break`. * * @throws ApiException * if the Api call fails */ @Test public void updateShiftTest() throws ApiException { String id = null; UpdateShiftRequest body = null; UpdateShiftResponse response = api.updateShift(id, body); // TODO: test validations } /** * UpdateWorkweekConfig * * Updates a `WorkweekConfig`. * * @throws ApiException * if the Api call fails */ @Test public void updateWorkweekConfigTest() throws ApiException { String id = null; UpdateWorkweekConfigRequest body = null; UpdateWorkweekConfigResponse response = api.updateWorkweekConfig(id, body); // TODO: test validations } }
4,702
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/MerchantsApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiException; import com.squareup.connect.models.RetrieveMerchantResponse; import org.junit.Test; import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for MerchantsApi */ @Ignore public class MerchantsApiTest { private final MerchantsApi api = new MerchantsApi(); /** * RetrieveMerchant * * Retrieve a `Merchant` object for the given `merchant_id`. * * @throws ApiException * if the Api call fails */ @Test public void retrieveMerchantTest() throws ApiException { String merchantId = null; RetrieveMerchantResponse response = api.retrieveMerchant(merchantId); // TODO: test validations } }
4,703
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/ReportingApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiClient; import com.squareup.connect.ApiException; import com.squareup.connect.Configuration; import com.squareup.connect.auth.OAuth; import com.squareup.connect.models.ListAdditionalRecipientReceivableRefundsResponse; import com.squareup.connect.models.ListAdditionalRecipientReceivablesResponse; import com.squareup.connect.utils.APITest; import com.squareup.connect.utils.Account; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for ReportingApi */ public class ReportingApiTest extends APITest { private final ApiClient defaultClient = Configuration.getDefaultApiClient(); private final ReportingApi api = new ReportingApi(); private String locationID; @Before public void setup() { Account account = accounts.get("US-Prod"); OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); oauth2.setAccessToken(account.accessToken); locationID = account.locationId; } /** * ListAdditionalRecipientReceivableRefunds * * Lists Additional Recipient Receivable Refunds for a particular location. Max results per [page](#paginatingresults): 50 * * @throws ApiException * if the Api call fails */ @Test public void listAdditionalRecipientReceivableRefundsTest() throws ApiException { String locationId = this.locationID; String beginTime = null; String endTime = null; String sortOrder = null; String cursor = null; ListAdditionalRecipientReceivableRefundsResponse response = api.listAdditionalRecipientReceivableRefunds(locationId, beginTime, endTime, sortOrder, cursor); } /** * ListAdditionalRecipientReceivables * * Lists Additional Recipient Receivables for a particular location. Max results per [page](#paginatingresults): 50 * * @throws ApiException * if the Api call fails */ @Test public void listAdditionalRecipientReceivablesTest() throws ApiException { String locationId = this.locationID; String beginTime = null; String endTime = null; String sortOrder = null; String cursor = null; ListAdditionalRecipientReceivablesResponse response = api.listAdditionalRecipientReceivables(locationId, beginTime, endTime, sortOrder, cursor); } }
4,704
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/CatalogApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiClient; import com.squareup.connect.ApiException; import com.squareup.connect.Configuration; import com.squareup.connect.auth.OAuth; import com.squareup.connect.models.BatchDeleteCatalogObjectsRequest; import com.squareup.connect.models.BatchDeleteCatalogObjectsResponse; import com.squareup.connect.models.BatchRetrieveCatalogObjectsRequest; import com.squareup.connect.models.BatchRetrieveCatalogObjectsResponse; import com.squareup.connect.models.BatchUpsertCatalogObjectsRequest; import com.squareup.connect.models.BatchUpsertCatalogObjectsResponse; import com.squareup.connect.models.CatalogCategory; import com.squareup.connect.models.CatalogDiscount; import com.squareup.connect.models.CatalogIdMapping; import com.squareup.connect.models.CatalogInfoResponse; import com.squareup.connect.models.CatalogItem; import com.squareup.connect.models.CatalogItemModifierListInfo; import com.squareup.connect.models.CatalogItemVariation; import com.squareup.connect.models.CatalogModifier; import com.squareup.connect.models.CatalogModifierList; import com.squareup.connect.models.CatalogObject; import com.squareup.connect.models.CatalogObjectBatch; import com.squareup.connect.models.CatalogQuery; import com.squareup.connect.models.CatalogQueryItemsForTax; import com.squareup.connect.models.CatalogQueryPrefix; import com.squareup.connect.models.CatalogTax; import com.squareup.connect.models.DeleteCatalogObjectResponse; import com.squareup.connect.models.ListCatalogResponse; import com.squareup.connect.models.Money; import com.squareup.connect.models.RetrieveCatalogObjectResponse; import com.squareup.connect.models.SearchCatalogObjectsRequest; import com.squareup.connect.models.SearchCatalogObjectsResponse; import com.squareup.connect.models.UpdateItemModifierListsRequest; import com.squareup.connect.models.UpdateItemModifierListsResponse; import com.squareup.connect.models.UpdateItemTaxesRequest; import com.squareup.connect.models.UpdateItemTaxesResponse; import com.squareup.connect.models.UpsertCatalogObjectRequest; import com.squareup.connect.models.UpsertCatalogObjectResponse; import com.squareup.connect.utils.APITest; import com.squareup.connect.utils.Account; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; /** * API tests for CatalogApi */ public class CatalogApiTest extends APITest { private final ApiClient defaultClient = Configuration.getDefaultApiClient(); private final CatalogApi api = new CatalogApi(); private static final CatalogObject beverages = new CatalogObject() .type("CATEGORY") .id("#Beverages") .categoryData(new CatalogCategory() .name("Beverages")); private static final CatalogObject milks = new CatalogObject() .type("MODIFIER_LIST") .id("#Milks") .modifierListData(new CatalogModifierList() .name("Milks") .modifiers(asList(new CatalogObject() .type("MODIFIER") .id("#WholeMilk") .modifierData(new CatalogModifier() .name("Whole Milk")), new CatalogObject() .type("MODIFIER") .id("#SkimMilk") .modifierData(new CatalogModifier() .name("Skim Milk")), new CatalogObject() .type("MODIFIER") .id("#SoyMilk") .modifierData(new CatalogModifier() .name("SoyMilk") .priceMoney(new Money().amount(50L).currency("USD")))))); private static final CatalogObject syrups = new CatalogObject() .type("MODIFIER_LIST") .id("#Syrups") .modifierListData(new CatalogModifierList() .name("Syrups") .modifiers(asList(new CatalogObject() .type("MODIFIER") .id("#Hazelnut") .modifierData(new CatalogModifier() .name("Hazelnut")), new CatalogObject() .type("MODIFIER") .id("#Vanilla") .modifierData(new CatalogModifier() .name("Vanilla")), new CatalogObject() .type("MODIFIER") .id("#Chocolate") .modifierData(new CatalogModifier() .name("Chocolate"))))); private static final CatalogObject coffee = new CatalogObject() .type("ITEM") .id("#Coffee") .presentAtAllLocations(true) .itemData(new CatalogItem() .name("Coffee") .description("Hot bean juice") .abbreviation("Co") .categoryId("#Beverages") .modifierListInfo(singletonList(new CatalogItemModifierListInfo().modifierListId("#Milks"))) .taxIds(singletonList("#SalesTax")) .variations(asList(new CatalogObject() .type("ITEM_VARIATION") .id("#SmallCoffee") .presentAtAllLocations(true) .itemVariationData(new CatalogItemVariation() .itemId("#Coffee") .name("Small") .pricingType("FIXED_PRICING") .priceMoney(new Money().amount(195L).currency("USD"))), new CatalogObject() .type("ITEM_VARIATION") .id("#LargeCoffee") .presentAtAllLocations(true) .itemVariationData(new CatalogItemVariation() .itemId("#Coffee") .name("Large") .pricingType("FIXED_PRICING") .priceMoney(new Money().amount(250L).currency("USD"))))) ); private static final CatalogObject tea = new CatalogObject() .type("ITEM") .id("#Tea") .presentAtAllLocations(true) .itemData(new CatalogItem() .name("Tea") .description("Hot leaf juice") .abbreviation("Te") .categoryId("#Beverages") .modifierListInfo(singletonList(new CatalogItemModifierListInfo().modifierListId("#Milks"))) .taxIds(singletonList("#SalesTax")) .variations(asList(new CatalogObject() .type("ITEM_VARIATION") .id("#SmallTea") .presentAtAllLocations(true) .itemVariationData(new CatalogItemVariation() .itemId("#Tea") .name("Small") .pricingType("FIXED_PRICING") .priceMoney(new Money().amount(150L).currency("USD"))), new CatalogObject() .type("ITEM_VARIATION") .id("#LargeTea") .presentAtAllLocations(true) .itemVariationData(new CatalogItemVariation() .itemId("#Tea") .name("Large") .pricingType("FIXED_PRICING") .priceMoney(new Money().amount(200L).currency("USD"))))) ); private static final CatalogObject salesTax = new CatalogObject() .type("TAX") .id("#SalesTax") .presentAtAllLocations(true) .taxData(new CatalogTax() .name("Sales Tax") .calculationPhase("TAX_SUBTOTAL_PHASE") .inclusionType("ADDITIVE") .percentage("5.0") .appliesToCustomAmounts(true) .enabled(true)); public static final List<CatalogObject> OBJECTS = asList(beverages, milks, syrups, coffee, tea, salesTax); // Mapping from client to server id, refreshed before each test. public Map<String,String> idMap = new HashMap<>(); @Before public void setup() { // The Catalog API does not run in the sandbox. Account testAccount = accounts.get("US-Prod"); OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); oauth2.setAccessToken(testAccount.accessToken); try { buildTestCatalog(); } catch (ApiException e) { fail(e.getMessage()); } } @After public void tearDown() { try { deleteTestCatalog(); } catch (ApiException e) { fail(e.getMessage()); } } private void buildTestCatalog() throws ApiException { BatchUpsertCatalogObjectsResponse response = api.batchUpsertCatalogObjects(new BatchUpsertCatalogObjectsRequest() .idempotencyKey(UUID.randomUUID().toString()) .addBatchesItem(new CatalogObjectBatch().objects(OBJECTS))); for (CatalogIdMapping idMapping : response.getIdMappings()) { idMap.put(idMapping.getClientObjectId(), idMapping.getObjectId()); } } private void deleteTestCatalog() throws ApiException { String cursor = ""; List<String> objectsToDelete = new ArrayList<>(); while (true) { ListCatalogResponse response = api.listCatalog(cursor, null); for (CatalogObject object : response.getObjects()) { objectsToDelete.add(object.getId()); } cursor = response.getCursor(); if (cursor == null || cursor.isEmpty()) { break; } } while (objectsToDelete.size() > 0) { int elements = Math.min(200, objectsToDelete.size()); BatchDeleteCatalogObjectsResponse response = api.batchDeleteCatalogObjects(new BatchDeleteCatalogObjectsRequest() .objectIds(objectsToDelete.subList(0, elements))); objectsToDelete = objectsToDelete.subList(elements, objectsToDelete.size()); } } /** * BatchDeleteCatalogObjects * <p> * Deletes a set of [CatalogItem](#type-catalogitem)s based on the provided list of target IDs and returns a set of successfully deleted IDs in the response. Deletion is a cascading event such that all children of the targeted object are also deleted. For example, deleting a CatalogItem will also delete all of its [CatalogItemVariation](#type-catalogitemvariation) children. &#x60;BatchDeleteCatalogObjects&#x60; succeeds even if only a portion of the targeted IDs can be deleted. The response will only include IDs that were actually deleted. * * @throws ApiException if the Api call fails */ @Test public void batchDeleteCatalogObjectsTest() throws ApiException { String coffeeId = idMap.get("#Coffee"); String smallCoffeeId = idMap.get("#SmallCoffee"); String largeCoffeeId = idMap.get("#LargeCoffee"); String smallTeaId = idMap.get("#SmallTea"); BatchDeleteCatalogObjectsRequest body = new BatchDeleteCatalogObjectsRequest() .objectIds(asList(coffeeId, smallTeaId)); BatchDeleteCatalogObjectsResponse response = api.batchDeleteCatalogObjects(body); assertEquals(4,response.getDeletedObjectIds().size()); assertTrue(response.getDeletedObjectIds().contains(coffeeId)); assertTrue(response.getDeletedObjectIds().contains(smallCoffeeId)); assertTrue(response.getDeletedObjectIds().contains(largeCoffeeId)); assertTrue(response.getDeletedObjectIds().contains(smallTeaId)); } /** * BatchRetrieveCatalogObjects * <p> * Returns a set of objects based on the provided ID. [CatalogItem](#type-catalogitem)s returned in the set include all of the child information including: all [CatalogItemVariation](#type-catalogitemvariation) objects, references to its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of any [CatalogTax](#type-catalogtax) objects that apply to it. * * @throws ApiException if the Api call fails */ @Test public void batchRetrieveCatalogObjectsTest() throws ApiException { String coffeeId = idMap.get("#Coffee"); String salesTaxId = idMap.get("#SalesTax"); String beveragesId = idMap.get("#Beverages"); String milksId = idMap.get("#Milks"); BatchRetrieveCatalogObjectsRequest body = new BatchRetrieveCatalogObjectsRequest() .addObjectIdsItem(coffeeId) .addObjectIdsItem(salesTaxId); BatchRetrieveCatalogObjectsResponse response = api.batchRetrieveCatalogObjects(body); assertEquals(2, response.getObjects().size()); CatalogObject actualCoffee = response.getObjects().get(0); assertEquals("ITEM", actualCoffee.getType()); assertEquals(coffeeId, actualCoffee.getId()); assertFalse(actualCoffee.getUpdatedAt().isEmpty()); assertTrue(actualCoffee.getVersion() != 0); assertFalse(actualCoffee.getIsDeleted()); assertTrue(actualCoffee.getCatalogV1Ids().isEmpty()); assertTrue(actualCoffee.getPresentAtAllLocations()); assertTrue(actualCoffee.getPresentAtLocationIds().isEmpty()); assertTrue(actualCoffee.getAbsentAtLocationIds().isEmpty()); assertEquals("Coffee", actualCoffee.getItemData().getName()); assertEquals("Hot bean juice", actualCoffee.getItemData().getDescription()); assertEquals("Co", actualCoffee.getItemData().getAbbreviation()); assertNull(actualCoffee.getItemData().getLabelColor()); assertNull(actualCoffee.getItemData().getAvailableOnline()); assertNull(actualCoffee.getItemData().getAvailableForPickup()); assertNull(actualCoffee.getItemData().getAvailableElectronically()); assertEquals(beveragesId, actualCoffee.getItemData().getCategoryId()); assertEquals(1, actualCoffee.getItemData().getTaxIds().size()); assertEquals(salesTaxId, actualCoffee.getItemData().getTaxIds().get(0)); assertEquals(1, actualCoffee.getItemData().getModifierListInfo().size()); assertEquals(milksId, actualCoffee.getItemData().getModifierListInfo().get(0).getModifierListId()); assertEquals(0, actualCoffee.getItemData().getModifierListInfo().get(0).getModifierOverrides().size()); assertNull(actualCoffee.getItemData().getModifierListInfo().get(0).getMinSelectedModifiers()); assertNull(actualCoffee.getItemData().getModifierListInfo().get(0).getMaxSelectedModifiers()); assertNull(actualCoffee.getItemData().getModifierListInfo().get(0).getEnabled()); assertEquals(2, actualCoffee.getItemData().getVariations().size()); assertEquals("Small", actualCoffee.getItemData().getVariations().get(0).getItemVariationData().getName()); assertEquals("FIXED_PRICING", actualCoffee.getItemData().getVariations().get(0).getItemVariationData().getPricingType()); assertEquals(Long.valueOf(195), actualCoffee.getItemData().getVariations().get(0).getItemVariationData().getPriceMoney().getAmount()); assertEquals("USD", actualCoffee.getItemData().getVariations().get(0).getItemVariationData().getPriceMoney().getCurrency()); assertEquals("Large", actualCoffee.getItemData().getVariations().get(1).getItemVariationData().getName()); assertEquals("FIXED_PRICING", actualCoffee.getItemData().getVariations().get(1).getItemVariationData().getPricingType()); assertEquals(Long.valueOf(250), actualCoffee.getItemData().getVariations().get(1).getItemVariationData().getPriceMoney().getAmount()); assertEquals("USD", actualCoffee.getItemData().getVariations().get(1).getItemVariationData().getPriceMoney().getCurrency()); assertNull(actualCoffee.getCategoryData()); assertNull(actualCoffee.getItemVariationData()); assertNull(actualCoffee.getTaxData()); assertNull(actualCoffee.getDiscountData()); assertNull(actualCoffee.getModifierListData()); assertNull(actualCoffee.getModifierData()); CatalogObject actualSalesTax = response.getObjects().get(1); assertEquals("TAX", actualSalesTax.getType()); assertEquals(salesTaxId, actualSalesTax.getId()); assertEquals("Sales Tax", actualSalesTax.getTaxData().getName()); } /** * BatchUpsertCatalogObjects * <p> * Creates or updates up to 10,000 target objects based on the provided list of objects. The target objects are grouped into batches and each batch is inserted/updated in an all-or-nothing manner. If an object within a batch is malformed in some way, or violates a database constraint, the entire batch containing that item will be disregarded. However, other batches in the same request may still succeed. Each batch may contain up to 1,000 objects, and batches will be processed in order as long as the total object count for the request (items, variations, modifier lists, discounts, and taxes) is no more than 10,000. * * @throws ApiException if the Api call fails */ @Test public void batchUpsertCatalogObjectsTest() throws ApiException { List<CatalogObjectBatch> batches = new ArrayList<>(); int numObjects = 0; for (int batchNum = 0; batchNum < 3; batchNum++) { CatalogObjectBatch batch = new CatalogObjectBatch(); batches.add(batch); for (int i = 0; i < 100; i++) { String itemId = "#Item-" + batchNum + "-" + i; String variationId = "#ItemVariation-" + batchNum + "-" + i; batch.addObjectsItem(new CatalogObject() .type("ITEM") .id(itemId) .itemData(new CatalogItem() .name("Item-" + batchNum + "-" + i) .addVariationsItem(new CatalogObject() .type("ITEM_VARIATION") .id(variationId) .itemVariationData(new CatalogItemVariation() .itemId(itemId) .name("Regular") .pricingType("VARIABLE_PRICING"))))); numObjects++; } } BatchUpsertCatalogObjectsRequest body = new BatchUpsertCatalogObjectsRequest() .idempotencyKey(UUID.randomUUID().toString()) .batches(batches); BatchUpsertCatalogObjectsResponse response = api.batchUpsertCatalogObjects(body); assertEquals(numObjects, response.getObjects().size()); } /** * CatalogInfo * <p> * Returns information about the Square Catalog API, such as batch size limits for &#x60;BatchUpsertCatalogObjects&#x60;. * * @throws ApiException if the Api call fails */ @Test public void catalogInfoTest() throws ApiException { CatalogInfoResponse response = api.catalogInfo(); assertEquals(Integer.valueOf(1000), response.getLimits().getBatchUpsertMaxObjectsPerBatch()); assertEquals(Integer.valueOf(10000), response.getLimits().getBatchUpsertMaxTotalObjects()); assertEquals(Integer.valueOf(1000), response.getLimits().getBatchRetrieveMaxObjectIds()); assertEquals(Integer.valueOf(1000), response.getLimits().getSearchMaxPageLimit()); assertEquals(Integer.valueOf(200), response.getLimits().getBatchDeleteMaxObjectIds()); assertEquals(Integer.valueOf(1000), response.getLimits().getUpdateItemTaxesMaxItemIds()); assertEquals(Integer.valueOf(1000), response.getLimits().getUpdateItemTaxesMaxTaxesToEnable()); assertEquals(Integer.valueOf(1000), response.getLimits().getUpdateItemTaxesMaxTaxesToDisable()); assertEquals(Integer.valueOf(1000), response.getLimits().getUpdateItemModifierListsMaxItemIds()); assertEquals(Integer.valueOf(1000), response.getLimits().getUpdateItemModifierListsMaxModifierListsToEnable()); assertEquals(Integer.valueOf(1000), response.getLimits().getUpdateItemModifierListsMaxModifierListsToDisable()); } /** * DeleteCatalogObject * <p> * Deletes a single [CatalogObject](#type-catalogobject) based on the provided ID and returns the set of successfully deleted IDs in the response. Deletion is a cascading event such that all children of the targeted object are also deleted. For example, deleting a [CatalogItem](#type-catalogitem) will also delete all of its [CatalogItemVariation](#type-catalogitemvariation) children. * * @throws ApiException if the Api call fails */ @Test public void deleteCatalogObjectTest() throws ApiException { String coffeeId = idMap.get("#Coffee"); String smallCoffeeId = idMap.get("#SmallCoffee"); String largeCoffeeId = idMap.get("#LargeCoffee"); DeleteCatalogObjectResponse response = api.deleteCatalogObject(coffeeId); assertEquals(3,response.getDeletedObjectIds().size()); assertTrue(response.getDeletedObjectIds().contains(coffeeId)); assertTrue(response.getDeletedObjectIds().contains(smallCoffeeId)); assertTrue(response.getDeletedObjectIds().contains(largeCoffeeId)); } /** * ListCatalog * <p> * Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The types parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: &#x60;ITEM&#x60;, &#x60;ITEM_VARIATION&#x60;, &#x60;MODIFIER&#x60;, &#x60;MODIFIER_LIST&#x60;, &#x60;CATEGORY&#x60;, &#x60;DISCOUNT&#x60;, &#x60;TAX&#x60;. * * @throws ApiException if the Api call fails */ @Test public void listCatalogTest() throws ApiException { String cursor = ""; List<String> allObjects = new ArrayList<>(); while (true) { ListCatalogResponse response = api.listCatalog(cursor, null); for (CatalogObject object : response.getObjects()) { allObjects.add(object.getId()); } cursor = response.getCursor(); if (cursor == null || cursor.isEmpty()) { break; } } assertEquals(OBJECTS.size(), allObjects.size()); } /** * RetrieveCatalogObject * <p> * Returns a single [CatalogItem](#type-catalogitem) as a [CatalogObject](#type-catalogobject) based on the provided ID. The returned object includes all of the relevant [CatalogItem](#type-catalogitem) information including: [CatalogItemVariation](#type-catalogitemvariation) children, references to its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of any [CatalogTax](#type-catalogtax) objects that apply to it. * * @throws ApiException if the Api call fails */ @Test public void retrieveCatalogObjectTest() throws ApiException { String objectId = idMap.get("#Coffee"); RetrieveCatalogObjectResponse response = api.retrieveCatalogObject(objectId, true); assertTrue(response.getErrors().isEmpty()); assertEquals(objectId, response.getObject().getId()); assertEquals(3, response.getRelatedObjects().size()); boolean gotMilks = false; boolean gotSalesTax = false; boolean gotBeverages = false; for (CatalogObject relatedObject : response.getRelatedObjects()) { if (relatedObject.getType().equals("MODIFIER_LIST") && relatedObject.getModifierListData().getName().equals("Milks")) { gotMilks = true; } if (relatedObject.getType().equals("TAX") && relatedObject.getTaxData().getName().equals("Sales Tax")) { gotSalesTax = true; } if (relatedObject.getType().equals("CATEGORY") && relatedObject.getCategoryData().getName().equals("Beverages")) { gotBeverages = true; } } assertTrue(gotMilks); assertTrue(gotSalesTax); assertTrue(gotBeverages); } /** * SearchCatalogObjects * <p> * Queries the targeted catalog using a variety of query types ([CatalogQuerySortedAttribute](#type-catalogquerysortedattribute), ([CatalogQueryExact](#type-catalogqueryexact, ([CatalogQueryRange](#type-catalogqueryrange), ([CatalogQueryText](#type-catalogquerytext), ([CatalogQueryItemsForTax](#type-catalogqueryitemsfortax), ([CatalogQueryItemsForModifierList](#type-catalogqueryitemsformodifierlist)). * * @throws ApiException if the Api call fails */ @Test public void searchCatalogObjectsTest() throws ApiException { SearchCatalogObjectsRequest query1 = new SearchCatalogObjectsRequest() .query(new CatalogQuery() .prefixQuery(new CatalogQueryPrefix().attributeName("name").attributePrefix("Sm"))) .includeDeletedObjects(false) .includeRelatedObjects(false); SearchCatalogObjectsResponse response = api.searchCatalogObjects(query1); assertEquals(2, response.getObjects().size()); assertEquals("ITEM_VARIATION", response.getObjects().get(0).getType()); assertEquals("Small", response.getObjects().get(0).getItemVariationData().getName()); assertEquals("ITEM_VARIATION", response.getObjects().get(1).getType()); assertEquals("Small", response.getObjects().get(1).getItemVariationData().getName()); SearchCatalogObjectsRequest query2 = new SearchCatalogObjectsRequest() .query(new CatalogQuery() .itemsForTaxQuery(new CatalogQueryItemsForTax().addTaxIdsItem(idMap.get("#SalesTax")))) .includeDeletedObjects(false) .includeRelatedObjects(false); SearchCatalogObjectsResponse response2 = api.searchCatalogObjects(query2); assertEquals(2, response2.getObjects().size()); assertEquals("ITEM", response2.getObjects().get(0).getType()); assertEquals("ITEM", response2.getObjects().get(1).getType()); boolean gotCoffee = false; boolean gotTea = false; for (CatalogObject obj : response2.getObjects()) { if (obj.getItemData().getName().equals("Coffee")) { gotCoffee = true; } if (obj.getItemData().getName().equals("Tea")) { gotTea = true; } } assertTrue(gotCoffee); assertTrue(gotTea); } /** * UpdateItemModifierLists * <p> * Updates the [CatalogModifierList](#type-catalogmodifierlist) objects that apply to the targeted [CatalogItem](#type-catalogitem) without having to perform an upsert on the entire item. * * @throws ApiException if the Api call fails */ @Test public void updateItemModifierListsTest() throws ApiException { String coffeeId = idMap.get("#Coffee"); String milksId = idMap.get("#Milks"); String syrupsId = idMap.get("#Syrups"); RetrieveCatalogObjectResponse objectBefore = api.retrieveCatalogObject(coffeeId, false); assertEquals(1, objectBefore.getObject().getItemData().getModifierListInfo().size()); assertEquals(milksId, objectBefore.getObject().getItemData().getModifierListInfo().get(0).getModifierListId()); UpdateItemModifierListsRequest body = new UpdateItemModifierListsRequest() .addItemIdsItem(coffeeId) .addModifierListsToDisableItem(milksId) .addModifierListsToEnableItem(syrupsId); UpdateItemModifierListsResponse response = api.updateItemModifierLists(body); RetrieveCatalogObjectResponse objectAfter = api.retrieveCatalogObject(coffeeId, false); assertEquals(1, objectAfter.getObject().getItemData().getModifierListInfo().size()); assertEquals(syrupsId, objectAfter.getObject().getItemData().getModifierListInfo().get(0).getModifierListId()); } /** * UpdateItemTaxes * <p> * Updates the [CatalogTax](#type-catalogtax) objects that apply to the targeted [CatalogItem](#type-catalogitem) without having to perform an upsert on the entire item. * * @throws ApiException if the Api call fails */ @Test public void updateItemTaxesTest() throws ApiException { String coffeeId = idMap.get("#Coffee"); String salesTaxId = idMap.get("#SalesTax"); RetrieveCatalogObjectResponse objectBefore = api.retrieveCatalogObject(coffeeId, false); assertEquals(1, objectBefore.getObject().getItemData().getTaxIds().size()); UpdateItemTaxesRequest body = new UpdateItemTaxesRequest() .addItemIdsItem(coffeeId) .addTaxesToDisableItem(salesTaxId); UpdateItemTaxesResponse response = api.updateItemTaxes(body); RetrieveCatalogObjectResponse objectAfter = api.retrieveCatalogObject(coffeeId, false); assertEquals(0, objectAfter.getObject().getItemData().getTaxIds().size()); } /** * UpsertCatalogObject * <p> * Creates or updates the target [CatalogObject](#type-catalogobject). * * @throws ApiException if the Api call fails */ @Test public void upsertCatalogObjectTest() throws ApiException { UpsertCatalogObjectRequest body = new UpsertCatalogObjectRequest() .idempotencyKey(UUID.randomUUID().toString()) .object(new CatalogObject() .type("DISCOUNT") .id("#Discount") .discountData(new CatalogDiscount() .name("Half off") .percentage("50.0") ) ); UpsertCatalogObjectResponse response = api.upsertCatalogObject(body); assertEquals("Half off", response.getCatalogObject().getDiscountData().getName()); assertNotNull(response.getCatalogObject().getId()); assertNotNull(response.getCatalogObject().getUpdatedAt()); assertNotNull(response.getCatalogObject().getVersion()); assertFalse(response.getCatalogObject().getIsDeleted()); assertEquals(1, response.getIdMappings().size()); assertEquals("#Discount", response.getIdMappings().get(0).getClientObjectId()); } }
4,705
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/ApplePayApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiException; import com.squareup.connect.models.RegisterDomainRequest; import com.squareup.connect.models.RegisterDomainResponse; import org.junit.Test; import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for ApplePayApi */ @Ignore public class ApplePayApiTest { private final ApplePayApi api = new ApplePayApi(); /** * RegisterDomain * * Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](https://docs.connect.squareup.com/articles/adding-payment-form) guide. * * @throws ApiException * if the Api call fails */ @Test public void registerDomainTest() throws ApiException { RegisterDomainRequest body = null; RegisterDomainResponse response = api.registerDomain(body); // TODO: test validations } }
4,706
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/CustomersApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiClient; import com.squareup.connect.ApiException; import com.squareup.connect.Configuration; import com.squareup.connect.auth.OAuth; import com.squareup.connect.models.Address; import com.squareup.connect.models.Card; import com.squareup.connect.models.CreateCustomerCardRequest; import com.squareup.connect.models.CreateCustomerCardResponse; import com.squareup.connect.models.CreateCustomerRequest; import com.squareup.connect.models.CreateCustomerResponse; import com.squareup.connect.models.Customer; import com.squareup.connect.models.DeleteCustomerCardResponse; import com.squareup.connect.models.DeleteCustomerResponse; import com.squareup.connect.models.ListCustomersResponse; import com.squareup.connect.models.RetrieveCustomerResponse; import com.squareup.connect.models.UpdateCustomerRequest; import com.squareup.connect.models.UpdateCustomerResponse; import com.squareup.connect.utils.APITest; import com.squareup.connect.utils.Account; import org.junit.After; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; /** * API tests for CustomersApi */ public class CustomersApiTest extends APITest { private final ApiClient defaultClient = Configuration.getDefaultApiClient(); private final CustomersApi api = new CustomersApi(); @Before public void setup() { Account testAccount = accounts.get("US-Prod-Sandbox"); OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); oauth2.setAccessToken(testAccount.accessToken); } @After public void tearDown() throws ApiException { deleteCustomers(); } private void deleteCustomers() throws ApiException { while(true) { ListCustomersResponse response = api.listCustomers(null, null, null); if (response.getCustomers() == null || response.getCustomers().isEmpty()) { return; } response.getCustomers().stream().map(Customer::getId).forEach(customerId -> { try { api.deleteCustomer(customerId); } catch (ApiException e) { throw new RuntimeException(e); } }); } } /** * CreateCustomer * * Creates a new customer for a business, which can have associated cards on file. You must provide __at least one__ of the following values in your request to this endpoint: - &#x60;given_name&#x60; - &#x60;family_name&#x60; - &#x60;company_name&#x60; - &#x60;email_address&#x60; - &#x60;phone_number&#x60; This endpoint does not accept an idempotency key. If you accidentally create a duplicate customer, you can delete it with the [DeleteCustomer](#endpoint-deletecustomer) endpoint. * * @throws ApiException * if the Api call fails */ @Test public void createCustomerTest() throws ApiException { CreateCustomerRequest body = new CreateCustomerRequest() .givenName("Amelia") .familyName("Earhart") .emailAddress("Amelia.Earhart@example.com") .address(new Address() .addressLine1("500 Electric Ave") .addressLine2("Suite 600") .locality("New York") .administrativeDistrictLevel1("NY") .postalCode("20003") .country("US") ) .phoneNumber("1-555-555-0122") .referenceId("YOUR_REFERENCE_ID") .note("a customer"); CreateCustomerResponse response = api.createCustomer(body); assertTrue(response.getErrors().isEmpty()); assertNotNull(response.getCustomer().getId()); } /** * CreateCustomerCard * * Adds a card on file to an existing customer. * * @throws ApiException * if the Api call fails */ @Test public void createCustomerCardTest() throws ApiException { Customer customer = api.createCustomer(new CreateCustomerRequest() .givenName("Amelia") .familyName("Earhart") .emailAddress("Amelia.Earhart@example.com")).getCustomer(); String cardNonce = "fake-card-nonce-ok"; CreateCustomerCardRequest body = new CreateCustomerCardRequest() .cardNonce(cardNonce) .billingAddress(new Address() .addressLine1("500 Electric Ave") .addressLine2("Suite 600") .locality("New York") .administrativeDistrictLevel1("NY") .postalCode("94103") .country("US")) .cardholderName("Amelia Earhart"); CreateCustomerCardResponse response = api.createCustomerCard(customer.getId(), body); assertTrue(response.getErrors().isEmpty()); assertNotNull(response.getCard().getId()); } /** * DeleteCustomer * * Deletes a customer from a business, along with any linked cards on file. * * @throws ApiException * if the Api call fails */ @Test public void deleteCustomerTest() throws ApiException { Customer customer = api.createCustomer(new CreateCustomerRequest() .givenName("Amelia") .familyName("Earhart") .emailAddress("Amelia.Earhart@example.com")).getCustomer(); DeleteCustomerResponse response = api.deleteCustomer(customer.getId()); assertTrue(response.getErrors().isEmpty()); } /** * DeleteCustomerCard * * Removes a card on file from a customer. * * @throws ApiException * if the Api call fails */ @Test public void deleteCustomerCardTest() throws ApiException { Customer customer = api.createCustomer(new CreateCustomerRequest() .givenName("Amelia") .familyName("Earhart") .emailAddress("Amelia.Earhart@example.com")).getCustomer(); String cardNonce = "fake-card-nonce-ok"; CreateCustomerCardRequest body = new CreateCustomerCardRequest() .cardNonce(cardNonce) .billingAddress(new Address() .addressLine1("500 Electric Ave") .addressLine2("Suite 600") .locality("New York") .administrativeDistrictLevel1("NY") .postalCode("94103") .country("US")) .cardholderName("Amelia Earhart"); Card card = api.createCustomerCard(customer.getId(), body).getCard(); DeleteCustomerCardResponse response = api.deleteCustomerCard(customer.getId(), card.getId()); assertTrue(response.getErrors().isEmpty()); } /** * ListCustomers * * Lists a business&#39;s customers. * * @throws ApiException * if the Api call fails */ @Test public void listCustomersTest() throws ApiException { String cursor = null; ListCustomersResponse response = api.listCustomers(cursor, null, null); // TODO: test validations } /** * RetrieveCustomer * * Returns details for a single customer. * * @throws ApiException * if the Api call fails */ @Test public void retrieveCustomerTest() throws ApiException { Customer customer = api.createCustomer(new CreateCustomerRequest() .givenName("Amelia") .familyName("Earhart") .emailAddress("Amelia.Earhart@example.com")).getCustomer(); RetrieveCustomerResponse response = api.retrieveCustomer(customer.getId()); assertTrue(response.getErrors().isEmpty()); assertEquals(customer.getId(), response.getCustomer().getId()); } /** * UpdateCustomer * * Updates the details of an existing customer. You cannot edit a customer&#39;s cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-createcustomercard) endpoint. * * @throws ApiException * if the Api call fails */ @Test public void updateCustomerTest() throws ApiException { Customer customer = api.createCustomer(new CreateCustomerRequest() .givenName("Amelia") .familyName("Earhart") .emailAddress("Amelia.Earhart@example.com")).getCustomer(); UpdateCustomerRequest body = new UpdateCustomerRequest() .phoneNumber("1-555-555-0123") .emailAddress("New.Amelia.Earhart@example.com") .note("updated customer note"); UpdateCustomerResponse response = api.updateCustomer(customer.getId(), body); assertTrue(response.getErrors().isEmpty()); assertEquals("New.Amelia.Earhart@example.com", response.getCustomer().getEmailAddress()); } }
4,707
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/LocationsApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiClient; import com.squareup.connect.ApiException; import com.squareup.connect.Configuration; import com.squareup.connect.auth.OAuth; import com.squareup.connect.models.ListLocationsResponse; import com.squareup.connect.utils.APITest; import com.squareup.connect.utils.Account; import org.junit.Test; import org.junit.Assert; import org.junit.Before; /** * API tests for LocationsApi */ public class LocationsApiTest extends APITest { private final ApiClient defaultClient = Configuration.getDefaultApiClient(); private final LocationsApi api = new LocationsApi(); @Before public void setup() { Account sandboxAccount = accounts.get("US-Prod-Sandbox"); OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); oauth2.setAccessToken(sandboxAccount.accessToken); } /** * ListLocations * * Provides the details for all of a business&#39;s locations. Most other Connect API endpoints have a required &#x60;location_id&#x60; path parameter. The &#x60;id&#x60; field of the [&#x60;Location&#x60;](#type-location) objects returned by this endpoint correspond to that &#x60;location_id&#x60; parameter. * * @throws ApiException * if the Api call fails */ @Test public void listLocationsTest() throws ApiException { ListLocationsResponse response = api.listLocations(); Assert.assertEquals(accounts.get("US-Prod-Sandbox").locationId, response.getLocations().get(0).getId()); } }
4,708
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/EmployeesApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiException; import com.squareup.connect.models.ListEmployeesResponse; import com.squareup.connect.models.RetrieveEmployeeResponse; import org.junit.Test; import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for EmployeesApi */ @Ignore public class EmployeesApiTest { private final EmployeesApi api = new EmployeesApi(); /** * ListEmployees * * Gets a list of &#x60;Employee&#x60; objects for a business. * * @throws ApiException * if the Api call fails */ @Test public void listEmployeesTest() throws ApiException { String locationId = null; String status = null; Integer limit = null; String cursor = null; ListEmployeesResponse response = api.listEmployees(locationId, status, limit, cursor); // TODO: test validations } /** * RetrieveEmployee * * Gets an &#x60;Employee&#x60; by Square-assigned employee &#x60;ID&#x60; (UUID) * * @throws ApiException * if the Api call fails */ @Test public void retrieveEmployeeTest() throws ApiException { String id = null; RetrieveEmployeeResponse response = api.retrieveEmployee(id); // TODO: test validations } }
4,709
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/RefundsApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiException; import com.squareup.connect.models.GetPaymentRefundResponse; import com.squareup.connect.models.ListPaymentRefundsResponse; import com.squareup.connect.models.RefundPaymentRequest; import com.squareup.connect.models.RefundPaymentResponse; import org.junit.Test; import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for RefundsApi */ @Ignore public class RefundsApiTest { private final RefundsApi api = new RefundsApi(); /** * GetPaymentRefund * * Retrieves a specific &#x60;Refund&#x60; using the &#x60;refund_id&#x60;. * * @throws ApiException * if the Api call fails */ @Test public void getPaymentRefundTest() throws ApiException { String refundId = null; GetPaymentRefundResponse response = api.getPaymentRefund(refundId); // TODO: test validations } /** * ListPaymentRefunds * * Retrieves a list of refunds for the account making the request. Max results per page: 100 * * @throws ApiException * if the Api call fails */ @Test public void listPaymentRefundsTest() throws ApiException { String beginTime = null; String endTime = null; String sortOrder = null; String cursor = null; String locationId = null; String status = null; String sourceType = null; ListPaymentRefundsResponse response = api.listPaymentRefunds(beginTime, endTime, sortOrder, cursor, locationId, status, sourceType); // TODO: test validations } /** * RefundPayment * * Refunds a payment. You can refund the entire payment amount or a portion of it. For more information, see [Payments and Refunds Overview](/payments-api/overview). * * @throws ApiException * if the Api call fails */ @Test public void refundPaymentTest() throws ApiException { RefundPaymentRequest body = null; RefundPaymentResponse response = api.refundPayment(body); // TODO: test validations } }
4,710
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/InventoryApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiException; import com.squareup.connect.models.BatchChangeInventoryRequest; import com.squareup.connect.models.BatchChangeInventoryResponse; import com.squareup.connect.models.BatchRetrieveInventoryChangesRequest; import com.squareup.connect.models.BatchRetrieveInventoryChangesResponse; import com.squareup.connect.models.BatchRetrieveInventoryCountsRequest; import com.squareup.connect.models.BatchRetrieveInventoryCountsResponse; import com.squareup.connect.models.RetrieveInventoryAdjustmentResponse; import com.squareup.connect.models.RetrieveInventoryChangesResponse; import com.squareup.connect.models.RetrieveInventoryCountResponse; import com.squareup.connect.models.RetrieveInventoryPhysicalCountResponse; import org.junit.Test; import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for InventoryApi */ @Ignore public class InventoryApiTest { private final InventoryApi api = new InventoryApi(); /** * BatchChangeInventory * * Applies new adjustments and counts to inventory. The response will contain the current calculated counts for all objects referenced in the request. * * @throws ApiException * if the Api call fails */ @Test public void batchChangeInventoryTest() throws ApiException { BatchChangeInventoryRequest body = null; BatchChangeInventoryResponse response = api.batchChangeInventory(body); // TODO: test validations } /** * BatchRetrieveInventoryChanges * * Retrieves historical physical counts and adjustments. The set of physical counts and adjustments to return may be limited along several dimensions. The results appear in ascending order of server timestamp (oldest first), and are paginated. This endpoint is intended as a catch-all for queries that cannot be handled by the previous simpler endpoints. * * @throws ApiException * if the Api call fails */ @Test public void batchRetrieveInventoryChangesTest() throws ApiException { BatchRetrieveInventoryChangesRequest body = null; BatchRetrieveInventoryChangesResponse response = api.batchRetrieveInventoryChanges(body); // TODO: test validations } /** * BatchRetrieveInventoryCounts * * Retrieves current counts for a set of [CatalogObject](#type-catalogobject)s at a set of [Location](#type-location)s. If &#x60;updated_at&#x60; is specified, only counts that have changed since that time (based on the server timestamp for the most recent change) are returned. This allows clients to perform a \&quot;sync\&quot; operation, for example in response to receiving a Webhook. The results are sorted by [CatalogObject](#type-catalogobject) id and are paginated. * * @throws ApiException * if the Api call fails */ @Test public void batchRetrieveInventoryCountsTest() throws ApiException { BatchRetrieveInventoryCountsRequest body = null; BatchRetrieveInventoryCountsResponse response = api.batchRetrieveInventoryCounts(body); // TODO: test validations } /** * RetrieveInventoryAdjustment * * Retrieves the [InventoryAdjustment](#type-inventoryadjustment) with the given &#x60;adjustment_id&#x60;. * * @throws ApiException * if the Api call fails */ @Test public void retrieveInventoryAdjustmentTest() throws ApiException { String adjustmentId = null; RetrieveInventoryAdjustmentResponse response = api.retrieveInventoryAdjustment(adjustmentId); // TODO: test validations } /** * RetrieveInventoryChanges * * Retrieves the set of inventory physical counts and adjustments for a given [CatalogObject](#type-catalogobject) at a given set of [Location](#type-location)s. The results appear in descending order of &#x60;occurred_at&#x60;/&#x60;counted_at&#x60; timestamp (newest first), and are paginated. There is no limits on how far back the caller can page. This endpoint is useful when displaying recent changes for a specific item. For more sophisticated queries, use a batch endpoint. * * @throws ApiException * if the Api call fails */ @Test public void retrieveInventoryChangesTest() throws ApiException { String catalogObjectId = null; String locationIds = null; String cursor = null; RetrieveInventoryChangesResponse response = api.retrieveInventoryChanges(catalogObjectId, locationIds, cursor); // TODO: test validations } /** * RetrieveInventoryCount * * Retrieves the current (calculated) stock count for a given [CatalogObject](#type-catalogobject) at a given set of [Location](#type-location)s. The response may be paginated when the number of locations is large. The sort order of current counts in the response is unspecified. For more sophisticated queries, use a batch endpoint. * * @throws ApiException * if the Api call fails */ @Test public void retrieveInventoryCountTest() throws ApiException { String catalogObjectId = null; String locationIds = null; String cursor = null; RetrieveInventoryCountResponse response = api.retrieveInventoryCount(catalogObjectId, locationIds, cursor); // TODO: test validations } /** * RetrieveInventoryPhysicalCount * * Retrieves the [InventoryPhysicalCount](#type-inventoryphysicalcount) with the given &#x60;physical_count_id&#x60;. * * @throws ApiException * if the Api call fails */ @Test public void retrieveInventoryPhysicalCountTest() throws ApiException { String physicalCountId = null; RetrieveInventoryPhysicalCountResponse response = api.retrieveInventoryPhysicalCount(physicalCountId); // TODO: test validations } }
4,711
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/V1TransactionsApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiException; import com.squareup.connect.models.V1Refund; import com.squareup.connect.models.V1CreateRefundRequest; import com.squareup.connect.models.V1BankAccount; import com.squareup.connect.models.V1Order; import com.squareup.connect.models.V1Payment; import com.squareup.connect.models.V1Settlement; import com.squareup.connect.models.V1UpdateOrderRequest; import org.junit.Test; import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for VTransactionsApi */ @Ignore public class V1TransactionsApiTest { private final V1TransactionsApi api = new V1TransactionsApi(); /** * Issues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment. * * Issues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment. * * @throws ApiException * if the Api call fails */ @Test public void createRefundTest() throws ApiException { String locationId = null; V1CreateRefundRequest body = null; V1Refund response = api.createRefund(locationId, body); // TODO: test validations } /** * Provides non-confidential details for all of a location&#39;s associated bank accounts. This endpoint does not provide full bank account numbers, and there is no way to obtain a full bank account number with the Connect API. * * Provides non-confidential details for all of a location&#39;s associated bank accounts. This endpoint does not provide full bank account numbers, and there is no way to obtain a full bank account number with the Connect API. * * @throws ApiException * if the Api call fails */ @Test public void listBankAccountsTest() throws ApiException { String locationId = null; List<V1BankAccount> response = api.listBankAccounts(locationId); // TODO: test validations } /** * Provides summary information for a merchant&#39;s online store orders. * * Provides summary information for a merchant&#39;s online store orders. * * @throws ApiException * if the Api call fails */ @Test public void listOrdersTest() throws ApiException { String locationId = null; String order = null; Integer limit = null; String batchToken = null; List<V1Order> response = api.listOrders(locationId, order, limit, batchToken); // TODO: test validations } /** * Provides summary information for all payments taken by a merchant or any of the merchant&#39;s mobile staff during a date range. Date ranges cannot exceed one year in length. See Date ranges for details of inclusive and exclusive dates. * * Provides summary information for all payments taken by a merchant or any of the merchant&#39;s mobile staff during a date range. Date ranges cannot exceed one year in length. See Date ranges for details of inclusive and exclusive dates. * * @throws ApiException * if the Api call fails */ @Test public void listPaymentsTest() throws ApiException { String locationId = null; String order = null; String beginTime = null; String endTime = null; Integer limit = null; String batchToken = null; List<V1Payment> response = api.listPayments(locationId, order, beginTime, endTime, limit, batchToken, true); // TODO: test validations } /** * Provides the details for all refunds initiated by a merchant or any of the merchant&#39;s mobile staff during a date range. Date ranges cannot exceed one year in length. * * Provides the details for all refunds initiated by a merchant or any of the merchant&#39;s mobile staff during a date range. Date ranges cannot exceed one year in length. * * @throws ApiException * if the Api call fails */ @Test public void listRefundsTest() throws ApiException { String locationId = null; String order = null; String beginTime = null; String endTime = null; Integer limit = null; String batchToken = null; List<V1Refund> response = api.listRefunds(locationId, order, beginTime, endTime, limit, batchToken); // TODO: test validations } /** * Provides summary information for all deposits and withdrawals initiated by Square to a merchant&#39;s bank account during a date range. Date ranges cannot exceed one year in length. * * Provides summary information for all deposits and withdrawals initiated by Square to a merchant&#39;s bank account during a date range. Date ranges cannot exceed one year in length. * * @throws ApiException * if the Api call fails */ @Test public void listSettlementsTest() throws ApiException { String locationId = null; String order = null; String beginTime = null; String endTime = null; Integer limit = null; String status = null; String batchToken = null; List<V1Settlement> response = api.listSettlements(locationId, order, beginTime, endTime, limit, status, batchToken); // TODO: test validations } /** * Provides non-confidential details for a merchant&#39;s associated bank account. This endpoint does not provide full bank account numbers, and there is no way to obtain a full bank account number with the Connect API. * * Provides non-confidential details for a merchant&#39;s associated bank account. This endpoint does not provide full bank account numbers, and there is no way to obtain a full bank account number with the Connect API. * * @throws ApiException * if the Api call fails */ @Test public void retrieveBankAccountTest() throws ApiException { String locationId = null; String bankAccountId = null; V1BankAccount response = api.retrieveBankAccount(locationId, bankAccountId); // TODO: test validations } /** * Provides comprehensive information for a single online store order, including the order&#39;s history. * * Provides comprehensive information for a single online store order, including the order&#39;s history. * * @throws ApiException * if the Api call fails */ @Test public void retrieveOrderTest() throws ApiException { String locationId = null; String orderId = null; V1Order response = api.retrieveOrder(locationId, orderId); // TODO: test validations } /** * Provides comprehensive information for a single payment. * * Provides comprehensive information for a single payment. * * @throws ApiException * if the Api call fails */ @Test public void retrievePaymentTest() throws ApiException { String locationId = null; String paymentId = null; V1Payment response = api.retrievePayment(locationId, paymentId); // TODO: test validations } /** * Provides comprehensive information for a single settlement, including the entries that contribute to the settlement&#39;s total. * * Provides comprehensive information for a single settlement, including the entries that contribute to the settlement&#39;s total. * * @throws ApiException * if the Api call fails */ @Test public void retrieveSettlementTest() throws ApiException { String locationId = null; String settlementId = null; V1Settlement response = api.retrieveSettlement(locationId, settlementId); // TODO: test validations } /** * Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions: * * Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions: * * @throws ApiException * if the Api call fails */ @Test public void updateOrderTest() throws ApiException { String locationId = null; String orderId = null; V1UpdateOrderRequest body = null; V1Order response = api.updateOrder(locationId, orderId, body); // TODO: test validations } }
4,712
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/OAuthApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiException; import com.squareup.connect.models.ObtainTokenRequest; import com.squareup.connect.models.ObtainTokenResponse; import com.squareup.connect.models.RenewTokenRequest; import com.squareup.connect.models.RenewTokenResponse; import com.squareup.connect.models.RevokeTokenRequest; import com.squareup.connect.models.RevokeTokenResponse; import org.junit.Test; import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * API tests for OAuthApi */ @Ignore public class OAuthApiTest { private final OAuthApi api = new OAuthApi(); /** * ObtainToken * * Exchanges the authorization code for an access token. After a merchant authorizes your application with the permissions form, an authorization code is sent to the application&#39;s redirect URL (See [Implementing OAuth](https://docs.connect.squareup.com/api/oauth#implementingoauth) for information about how to set up the redirect URL). * * @throws ApiException * if the Api call fails */ @Test public void obtainTokenTest() throws ApiException { ObtainTokenRequest body = null; ObtainTokenResponse response = api.obtainToken(body); // TODO: test validations } /** * RenewToken * * Renews an OAuth access token before it expires. OAuth access tokens besides your application&#39;s personal access token expire after __30 days__. You can also renew expired tokens within __15 days__ of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated merchant must complete the [OAuth flow](https://docs.connect.squareup.com/api/oauth#implementingoauth) from the beginning. __Important:__ The &#x60;Authorization&#x60; header you provide to this endpoint must have the following format: &#x60;&#x60;&#x60; Authorization: Client APPLICATION_SECRET &#x60;&#x60;&#x60; Replace &#x60;APPLICATION_SECRET&#x60; with your application&#39;s secret, available from the [application dashboard](https://connect.squareup.com/apps). * * @throws ApiException * if the Api call fails */ @Test public void renewTokenTest() throws ApiException { String clientId = null; RenewTokenRequest body = null; RenewTokenResponse response = api.renewToken(clientId, body); // TODO: test validations } /** * RevokeToken * * Revokes an access token generated with the OAuth flow. If a merchant has more than one access token for your application, this endpoint revokes all of them, regardless of which token you specify. If you revoke a merchant&#39;s access token, all of the merchant&#39;s active subscriptions associated with your application are canceled immediately. __Important:__ The &#x60;Authorization&#x60; header you provide to this endpoint must have the following format: &#x60;&#x60;&#x60; Authorization: Client APPLICATION_SECRET &#x60;&#x60;&#x60; Replace &#x60;APPLICATION_SECRET&#x60; with your application&#39;s secret, available from the [application dashboard](https://connect.squareup.com/apps). * * @throws ApiException * if the Api call fails */ @Test public void revokeTokenTest() throws ApiException { RevokeTokenRequest body = null; RevokeTokenResponse response = api.revokeToken(body); // TODO: test validations } }
4,713
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/TransactionsApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiClient; import com.squareup.connect.ApiException; import com.squareup.connect.Configuration; import com.squareup.connect.auth.OAuth; import com.squareup.connect.models.Address; import com.squareup.connect.models.CaptureTransactionResponse; import com.squareup.connect.models.ChargeRequest; import com.squareup.connect.models.ChargeResponse; import com.squareup.connect.models.CreateRefundRequest; import com.squareup.connect.models.CreateRefundResponse; import com.squareup.connect.models.ListRefundsResponse; import com.squareup.connect.models.ListTransactionsResponse; import com.squareup.connect.models.Money; import com.squareup.connect.models.RetrieveTransactionResponse; import com.squareup.connect.models.Transaction; import com.squareup.connect.models.VoidTransactionResponse; import com.squareup.connect.utils.APITest; import com.squareup.connect.utils.Account; import java.util.UUID; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; /** * API tests for TransactionsApi */ public class TransactionsApiTest extends APITest { private final ApiClient defaultClient = Configuration.getDefaultApiClient(); private final TransactionsApi api = new TransactionsApi(); private final String cardNonce = "fake-card-nonce-ok"; private String locationId; @Before public void setup() { Account testAccount = accounts.get("US-Prod-Sandbox"); OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); oauth2.setAccessToken(testAccount.accessToken); this.locationId = testAccount.locationId; } /** * CaptureTransaction * * Captures a transaction that was created with the [Charge](#endpoint-charge) endpoint with a &#x60;delay_capture&#x60; value of &#x60;true&#x60;. See [Delayed capture transactions](/articles/delayed-capture-transactions/) for more information. * * @throws ApiException * if the Api call fails */ @Test public void captureTransactionTest() throws ApiException { Transaction transaction = api.charge(locationId, new ChargeRequest() .idempotencyKey(UUID.randomUUID().toString()) .delayCapture(true) .amountMoney(new Money() .amount(200L) .currency("USD")) .cardNonce(cardNonce)).getTransaction(); CaptureTransactionResponse response = api.captureTransaction(locationId, transaction.getId()); assertTrue(response.getErrors().isEmpty()); } /** * Charge * * Charges a card represented by a card nonce or a customer&#39;s card on file. Your request to this endpoint must include _either_: - A value for the &#x60;card_nonce&#x60; parameter (to charge a card nonce generated with the &#x60;SqPaymentForm&#x60;) - Values for the &#x60;customer_card_id&#x60; and &#x60;customer_id&#x60; parameters (to charge a customer&#39;s card on file) In order for an e-commerce payment to potentially qualify for [Square chargeback protection](https://squareup.com/help/article/5394), you _must_ provide values for the following parameters in your request: - &#x60;buyer_email_address&#x60; - At least one of &#x60;billing_address&#x60; or &#x60;shipping_address&#x60; When this response is returned, the amount of Square&#39;s processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-retrievetransaction). See the &#x60;processing_fee_money&#x60; field of each [Tender included](#type-tender) in the transaction. * * @throws ApiException * if the Api call fails */ @Test public void chargeTest() throws ApiException { // Check different sandbox values here https://docs.connect.squareup.com/articles/using-sandbox String idempotencyKey = UUID.randomUUID().toString(); ChargeRequest body = new ChargeRequest() .idempotencyKey(idempotencyKey) .amountMoney(new Money() .amount(200L) .currency("USD")) .cardNonce(cardNonce) .shippingAddress(new Address() .addressLine1("123 Main St") .locality("San Francisco") .administrativeDistrictLevel1("CA") .postalCode("94114") .country("US")) .billingAddress(new Address() .addressLine1("500 Electric Ave") .addressLine2("Suite 600") .administrativeDistrictLevel1("NY") .locality("New York") .postalCode("10003") .country("US")) .referenceId("optional reference #112358") .note("optional note"); ChargeResponse response = api.charge(locationId, body); assertTrue(response.getErrors().isEmpty()); assertNotNull(response.getTransaction().getId()); } /** * CreateRefund * * Initiates a refund for a previously charged tender. * * @throws ApiException * if the Api call fails */ @Test public void createRefundTest() throws ApiException { Transaction transaction = api.charge(locationId, new ChargeRequest() .idempotencyKey(UUID.randomUUID().toString()) .amountMoney(new Money() .amount(200L) .currency("USD")) .cardNonce(cardNonce)).getTransaction(); String idempotencyKey = UUID.randomUUID().toString(); CreateRefundRequest body = new CreateRefundRequest() .idempotencyKey(idempotencyKey) .tenderId(transaction.getTenders().get(0).getId()) .amountMoney(new Money() .amount(100L) .currency("USD")) .reason("Cancelled order"); CreateRefundResponse response = api.createRefund(locationId, transaction.getId(), body); assertTrue(response.getErrors().isEmpty()); assertNotNull(response.getRefund().getId()); } /** * ListRefunds * * Lists refunds for one of a business&#39;s locations. Refunds with a &#x60;status&#x60; of &#x60;PENDING&#x60; are not currently included in this endpoint&#39;s response. Max results per [page](#paginatingresults): 50 * * @throws ApiException * if the Api call fails */ @Test public void listRefundsTest() throws ApiException { String beginTime = null; String endTime = null; String sortOrder = null; String cursor = null; ListRefundsResponse response = api.listRefunds(locationId, beginTime, endTime, sortOrder, cursor); assertTrue(response.getErrors().isEmpty()); assertFalse(response.getRefunds().isEmpty()); } /** * ListTransactions * * Lists transactions for a particular location. Max results per [page](#paginatingresults): 50 * * @throws ApiException * if the Api call fails */ @Test public void listTransactionsTest() throws ApiException { String beginTime = null; String endTime = null; String sortOrder = null; String cursor = null; ListTransactionsResponse response = api.listTransactions(locationId, beginTime, endTime, sortOrder, cursor); assertTrue(response.getErrors().isEmpty()); assertFalse(response.getTransactions().isEmpty()); } /** * RetrieveTransaction * * Retrieves details for a single transaction. * * @throws ApiException * if the Api call fails */ @Test public void retrieveTransactionTest() throws ApiException { Transaction transaction = api.charge(locationId, new ChargeRequest() .idempotencyKey(UUID.randomUUID().toString()) .amountMoney(new Money() .amount(200L) .currency("USD")) .cardNonce(cardNonce)).getTransaction(); RetrieveTransactionResponse response = api.retrieveTransaction(locationId, transaction.getId()); assertTrue(response.getErrors().isEmpty()); assertEquals(transaction.getId(), response.getTransaction().getId()); } /** * VoidTransaction * * Cancels a transaction that was created with the [Charge](#endpoint-charge) endpoint with a &#x60;delay_capture&#x60; value of &#x60;true&#x60;. See [Delayed capture transactions](/articles/delayed-capture-transactions/) for more information. * * @throws ApiException * if the Api call fails */ @Test public void voidTransactionTest() throws ApiException { Transaction transaction = api.charge(locationId, new ChargeRequest() .idempotencyKey(UUID.randomUUID().toString()) .delayCapture(true) .amountMoney(new Money() .amount(200L) .currency("USD")) .cardNonce(cardNonce)).getTransaction(); VoidTransactionResponse response = api.voidTransaction(locationId, transaction.getId()); assertTrue(response.getErrors().isEmpty()); } }
4,714
0
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect
Create_ds/connect-java-sdk/src/test/java/com/squareup/connect/api/CheckoutApiTest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.api; import com.squareup.connect.ApiClient; import com.squareup.connect.ApiException; import com.squareup.connect.Configuration; import com.squareup.connect.auth.OAuth; import com.squareup.connect.models.Address; import com.squareup.connect.models.CreateCheckoutRequest; import com.squareup.connect.models.CreateCheckoutResponse; import com.squareup.connect.models.CreateOrderRequest; import com.squareup.connect.models.CreateOrderRequestDiscount; import com.squareup.connect.models.CreateOrderRequestLineItem; import com.squareup.connect.models.CreateOrderRequestTax; import com.squareup.connect.models.Money; import com.squareup.connect.utils.APITest; import com.squareup.connect.utils.Account; import java.util.Arrays; import java.util.UUID; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertTrue; /** * API tests for CheckoutApi */ public class CheckoutApiTest extends APITest { private final ApiClient defaultClient = Configuration.getDefaultApiClient(); private final CheckoutApi api = new CheckoutApi(); private String locationId; @Before public void setup() { Account testAccount = accounts.get("US-Prod-Sandbox"); OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); oauth2.setAccessToken(testAccount.accessToken); this.locationId = testAccount.locationId; } /** * CreateCheckout * * Creates a [Checkout](#type-checkout) response that links a &#x60;checkoutId&#x60; and * &#x60;checkout_page_url&#x60; that customers can be directed to in order to provide their * payment information using a payment processing workflow hosted on connect.squareup.com. * * @throws ApiException if the Api call fails */ @Test public void createCheckoutTest() throws ApiException { CreateCheckoutRequest body = new CreateCheckoutRequest() .idempotencyKey(UUID.randomUUID().toString()) .order(new CreateOrderRequest() .referenceId("reference_id") .lineItems(Arrays.asList( new CreateOrderRequestLineItem() .name("Printed T Shirt") .quantity("2") .basePriceMoney(new Money() .amount(1500L) .currency("USD")) .addDiscountsItem( new CreateOrderRequestDiscount() .name("7% off previous season item") .percentage("7") ) .addDiscountsItem( new CreateOrderRequestDiscount() .name("$3 off Customer Discount") .amountMoney(new Money() .amount(300L) .currency("USD")) ), new CreateOrderRequestLineItem() .name("Slim Jeans") .quantity("1") .basePriceMoney(new Money() .amount(2500L) .currency("USD")), new CreateOrderRequestLineItem() .name("Woven Sweate") .quantity("3") .basePriceMoney(new Money() .amount(3500L) .currency("USD")) .addDiscountsItem(new CreateOrderRequestDiscount() .name("$11 off Customer Discount") .amountMoney(new Money() .amount(1100L) .currency("USD"))) .addTaxesItem(new CreateOrderRequestTax() .name("Fair Trade Tax") .percentage("5") ) )) .discounts(Arrays.asList( new CreateOrderRequestDiscount() .name("Father's day 12% OFF") .percentage("12"), new CreateOrderRequestDiscount() .name("Global Sales $55 OFF") .amountMoney(new Money() .amount(5500L) .currency("USD")) )) .addTaxesItem(new CreateOrderRequestTax() .name("Sales Tax") .type("ADDITIVE") .percentage("8.5") ) ) .askForShippingAddress(true) .merchantSupportEmail("merchant+support@website.com") .prePopulateBuyerEmail("example@email.com") .prePopulateShippingAddress(new Address() .addressLine1("1455 Market St.") .addressLine2("Suite 600") .locality("San Francisco") .administrativeDistrictLevel1("CA") .postalCode("94103") .country("US") .firstName("Jane") .lastName("Doe") ) .redirectUrl("https://docs.connect.squareup.com/order-confirm"); CreateCheckoutResponse response = api.createCheckout(locationId, body); assertTrue(response.getErrors().isEmpty()); assertTrue(response.getCheckout().getCheckoutPageUrl().startsWith("https://connect.")); } }
4,715
0
Create_ds/connect-java-sdk/src/main/java/com/squareup
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/ApiClient.java
package com.squareup.connect; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.Entity; import javax.ws.rs.client.Invocation; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.Form; import javax.ws.rs.core.GenericType; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.ClientProperties; import org.glassfish.jersey.filter.LoggingFilter; import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.MultiPart; import org.glassfish.jersey.media.multipart.MultiPartFeature; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.util.Collection; import java.util.Collections; import java.util.Map; import java.util.Map.Entry; import java.util.HashMap; import java.util.List; import java.util.ArrayList; import java.util.Date; import java.util.TimeZone; import java.util.TreeMap; import java.net.URLEncoder; import java.io.File; import java.io.UnsupportedEncodingException; import java.text.DateFormat; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.squareup.connect.auth.Authentication; import com.squareup.connect.auth.HttpBasicAuth; import com.squareup.connect.auth.ApiKeyAuth; import com.squareup.connect.auth.OAuth; public class ApiClient { private Map<String, String> defaultHeaderMap = new HashMap<String, String>(); private String basePath = "https://connect.squareup.com"; private boolean debugging = false; private int connectionTimeout = 0; private Client httpClient; private JSON json; private String tempFolderPath = null; private Map<String, Authentication> authentications; private int statusCode; private Map<String, List<String>> responseHeaders; private DateFormat dateFormat; public ApiClient() { json = new JSON(); httpClient = buildHttpClient(debugging); this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. setUserAgent("Square-Connect-Java/2.20191120.0"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<String, Authentication>(); authentications.put("oauth2", new OAuth()); authentications.put("oauth2ClientSecret", new ApiKeyAuth("header", "Authorization")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } /** * Gets the JSON instance to do JSON serialization and deserialization. * @return JSON */ public JSON getJSON() { return json; } public Client getHttpClient() { return httpClient; } public ApiClient setHttpClient(Client httpClient) { this.httpClient = httpClient; return this; } public String getBasePath() { return basePath; } public ApiClient setBasePath(String basePath) { this.basePath = basePath; return this; } /** * Gets the status code of the previous request * @return Status code */ public int getStatusCode() { return statusCode; } /** * Gets the response headers of the previous request * @return Response headers */ public Map<String, List<String>> getResponseHeaders() { return responseHeaders; } /** * Get authentications (key: authentication name, value: authentication). * @return Map of authentication object */ public Map<String, Authentication> getAuthentications() { return authentications; } /** * Get authentication for the given name. * * @param authName The authentication name * @return The authentication, null if not found */ public Authentication getAuthentication(String authName) { return authentications.get(authName); } /** * Helper method to set username for the first HTTP basic authentication. * @param username Username */ public void setUsername(String username) { for (Authentication auth : authentications.values()) { if (auth instanceof HttpBasicAuth) { ((HttpBasicAuth) auth).setUsername(username); return; } } throw new RuntimeException("No HTTP basic authentication configured!"); } /** * Helper method to set password for the first HTTP basic authentication. * @param password Password */ public void setPassword(String password) { for (Authentication auth : authentications.values()) { if (auth instanceof HttpBasicAuth) { ((HttpBasicAuth) auth).setPassword(password); return; } } throw new RuntimeException("No HTTP basic authentication configured!"); } /** * Helper method to set API key value for the first API key authentication. * @param apiKey API key */ public void setApiKey(String apiKey) { for (Authentication auth : authentications.values()) { if (auth instanceof ApiKeyAuth) { ((ApiKeyAuth) auth).setApiKey(apiKey); return; } } throw new RuntimeException("No API key authentication configured!"); } /** * Helper method to set API key prefix for the first API key authentication. * @param apiKeyPrefix API key prefix */ public void setApiKeyPrefix(String apiKeyPrefix) { for (Authentication auth : authentications.values()) { if (auth instanceof ApiKeyAuth) { ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); return; } } throw new RuntimeException("No API key authentication configured!"); } /** * Helper method to set access token for the first OAuth2 authentication. * @param accessToken Access token */ public void setAccessToken(String accessToken) { for (Authentication auth : authentications.values()) { if (auth instanceof OAuth) { ((OAuth) auth).setAccessToken(accessToken); return; } } throw new RuntimeException("No OAuth2 authentication configured!"); } /** * Set the User-Agent header's value (by adding to the default header map). * @param userAgent Http user agent * @return API client */ public ApiClient setUserAgent(String userAgent) { addDefaultHeader("User-Agent", userAgent); return this; } /** * Add a default header. * * @param key The header's key * @param value The header's value * @return API client */ public ApiClient addDefaultHeader(String key, String value) { defaultHeaderMap.put(key, value); return this; } /** * Check that whether debugging is enabled for this API client. * @return True if debugging is switched on */ public boolean isDebugging() { return debugging; } /** * Enable/disable debugging for this API client. * * @param debugging To enable (true) or disable (false) debugging * @return API client */ public ApiClient setDebugging(boolean debugging) { this.debugging = debugging; // Rebuild HTTP Client according to the new "debugging" value. this.httpClient = buildHttpClient(debugging); return this; } /** * The path of temporary folder used to store downloaded files from endpoints * with file response. The default value is <code>null</code>, i.e. using * the system's default tempopary folder. * * @return Temp folder path */ public String getTempFolderPath() { return tempFolderPath; } /** * Set temp folder path * @param tempFolderPath Temp folder path * @return API client */ public ApiClient setTempFolderPath(String tempFolderPath) { this.tempFolderPath = tempFolderPath; return this; } /** * Connect timeout (in milliseconds). * @return Connection timeout */ public int getConnectTimeout() { return connectionTimeout; } /** * Set the connect timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and * {@link Integer#MAX_VALUE}. * @param connectionTimeout Connection timeout in milliseconds * @return API client */ public ApiClient setConnectTimeout(int connectionTimeout) { this.connectionTimeout = connectionTimeout; httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout); return this; } /** * Get the date format used to parse/format date parameters. * @return Date format */ public DateFormat getDateFormat() { return dateFormat; } /** * Set the date format used to parse/format date parameters. * @param dateFormat Date format * @return API client */ public ApiClient setDateFormat(DateFormat dateFormat) { this.dateFormat = dateFormat; // also set the date format for model (de)serialization with Date properties this.json.setDateFormat((DateFormat) dateFormat.clone()); return this; } /** * Parse the given string into Date object. * @param str String * @return Date */ public Date parseDate(String str) { try { return dateFormat.parse(str); } catch (java.text.ParseException e) { throw new RuntimeException(e); } } /** * Format the given Date object into string. * @param date Date * @return Date in string format */ public String formatDate(Date date) { return dateFormat.format(date); } /** * Format the given parameter object into string. * @param param Object * @return Object in string format */ public String parameterToString(Object param) { if (param == null) { return ""; } else if (param instanceof Date) { return formatDate((Date) param); } else if (param instanceof Collection) { StringBuilder b = new StringBuilder(); for(Object o : (Collection)param) { if(b.length() > 0) { b.append(','); } b.append(String.valueOf(o)); } return b.toString(); } else { return String.valueOf(param); } } /* * Format to {@code Pair} objects. * @param collectionFormat Collection format * @param name Name * @param value Value * @return List of pairs */ public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){ List<Pair> params = new ArrayList<Pair>(); // preconditions if (name == null || name.isEmpty() || value == null) return params; Collection valueCollection; if (value instanceof Collection) { valueCollection = (Collection) value; } else { params.add(new Pair(name, parameterToString(value))); return params; } if (valueCollection.isEmpty()){ return params; } // get the collection format (default: csv) String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // create the params based on the collection format if ("multi".equals(format)) { for (Object item : valueCollection) { params.add(new Pair(name, parameterToString(item))); } return params; } String delimiter = ","; if ("csv".equals(format)) { delimiter = ","; } else if ("ssv".equals(format)) { delimiter = " "; } else if ("tsv".equals(format)) { delimiter = "\t"; } else if ("pipes".equals(format)) { delimiter = "|"; } StringBuilder sb = new StringBuilder() ; for (Object item : valueCollection) { sb.append(delimiter); sb.append(parameterToString(item)); } params.add(new Pair(name, sb.substring(1))); return params; } /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * @param mime MIME * @return True if the MIME type is JSON */ public boolean isJsonMime(String mime) { return mime != null && mime.matches("(?i)application\\/json(;.*)?"); } /** * Select the Accept header's value from the given accepts array: * if JSON exists in the given array, use it; * otherwise use all of them (joining into a string) * * @param accepts The accepts array to select from * @return The Accept header to use. If the given array is empty, * null will be returned (not to set the Accept header explicitly). */ public String selectHeaderAccept(String[] accepts) { if (accepts.length == 0) { return null; } for (String accept : accepts) { if (isJsonMime(accept)) { return accept; } } return StringUtil.join(accepts, ","); } /** * Select the Content-Type header's value from the given array: * if JSON exists in the given array, use it; * otherwise use the first one of the array. * * @param contentTypes The Content-Type array to select from * @return The Content-Type header to use. If the given array is empty, * JSON will be used. */ public String selectHeaderContentType(String[] contentTypes) { if (contentTypes.length == 0) { return "application/json"; } for (String contentType : contentTypes) { if (isJsonMime(contentType)) { return contentType; } } return contentTypes[0]; } /** * Escape the given string to be used as URL query value. * @param str String * @return Escaped string */ public String escapeString(String str) { try { return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); } catch (UnsupportedEncodingException e) { return str; } } /** * Serialize the given Java object into string entity according the given * Content-Type (only JSON is supported for now). * @param obj Object * @param formParams Form parameters * @param contentType Context type * @return Entity * @throws ApiException API exception */ public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType) throws ApiException { Entity<?> entity; if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry<String, Object> param: formParams.entrySet()) { if (param.getValue() instanceof File) { File file = (File) param.getValue(); FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) .fileName(file.getName()).size(file.length()).build(); multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE)); } else { FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); } else if (contentType.startsWith("application/x-www-form-urlencoded")) { Form form = new Form(); for (Entry<String, Object> param: formParams.entrySet()) { form.param(param.getKey(), parameterToString(param.getValue())); } entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); } else { // We let jersey handle the serialization entity = Entity.entity(obj, contentType); } return entity; } /** * Deserialize response body to Java object according to the Content-Type. * @param <T> Type * @param response Response * @param returnType Return type * @return Deserialize object * @throws ApiException API exception */ @SuppressWarnings("unchecked") public <T> T deserialize(Response response, GenericType<T> returnType) throws ApiException { if (response == null || returnType == null) { return null; } if ("byte[]".equals(returnType.toString())) { // Handle binary response (byte array). return (T) response.readEntity(byte[].class); } else if (returnType.getRawType() == File.class) { // Handle file downloading. T file = (T) downloadFileFromResponse(response); return file; } String contentType = null; List<Object> contentTypes = response.getHeaders().get("Content-Type"); if (contentTypes != null && !contentTypes.isEmpty()) contentType = String.valueOf(contentTypes.get(0)); if (contentType == null) throw new ApiException(500, "missing Content-Type in response"); return response.readEntity(returnType); } /** * Download file from the given response. * @param response Response * @return File * @throws ApiException If fail to read file content from response and write to disk */ public File downloadFileFromResponse(Response response) throws ApiException { try { File file = prepareDownloadFile(response); Files.copy(response.readEntity(InputStream.class), file.toPath()); return file; } catch (IOException e) { throw new ApiException(e); } } public File prepareDownloadFile(Response response) throws IOException { String filename = null; String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); if (contentDisposition != null && !"".equals(contentDisposition)) { // Get filename from the Content-Disposition header. Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); Matcher matcher = pattern.matcher(contentDisposition); if (matcher.find()) filename = matcher.group(1); } String prefix; String suffix = null; if (filename == null) { prefix = "download-"; suffix = ""; } else { int pos = filename.lastIndexOf('.'); if (pos == -1) { prefix = filename + "-"; } else { prefix = filename.substring(0, pos) + "-"; suffix = filename.substring(pos); } // File.createTempFile requires the prefix to be at least three characters long if (prefix.length() < 3) prefix = "download-"; } if (tempFolderPath == null) return File.createTempFile(prefix, suffix); else return File.createTempFile(prefix, suffix, new File(tempFolderPath)); } /** * Invoke API by sending HTTP request with the given options. * * @param <T> Type * @param path The sub-path of the HTTP URL * @param method The request method, one of "GET", "POST", "PUT", and "DELETE" * @param queryParams The query parameters * @param body The request body object * @param headerParams The header parameters * @param formParams The form parameters * @param accept The request's Accept header * @param contentType The request's Content-Type header * @param authNames The authentications to apply * @param returnType The return type into which to deserialize the response * @return The response body in type of string * @throws ApiException API exception */ public <T> CompleteResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType) throws ApiException { updateParamsForAuth(authNames, queryParams, headerParams); // Not using `.target(this.basePath).path(path)` below, // to support (constant) query string in `path`, e.g. "/posts?draft=1" WebTarget target = httpClient.target(this.basePath + path); if (queryParams != null) { for (Pair queryParam : queryParams) { if (queryParam.getValue() != null) { target = target.queryParam(queryParam.getName(), queryParam.getValue()); } } } Invocation.Builder invocationBuilder = target.request().accept(accept); for (Entry<String, String> entry : headerParams.entrySet()) { String value = entry.getValue(); if (value != null) { invocationBuilder = invocationBuilder.header(entry.getKey(), value); } } for (Entry<String, String> entry : defaultHeaderMap.entrySet()) { String key = entry.getKey(); if (!headerParams.containsKey(key)) { String value = entry.getValue(); if (value != null) { invocationBuilder = invocationBuilder.header(key, value); } } } Entity<?> entity = serialize(body, formParams, contentType); Response response; if ("GET".equals(method)) { response = invocationBuilder.get(); } else if ("POST".equals(method)) { response = invocationBuilder.post(entity); } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { response = invocationBuilder.delete(); } else if ("PATCH".equals(method)) { response = invocationBuilder.header("X-HTTP-Method-Override", "PATCH").post(entity); } else { throw new ApiException(500, "unknown method type " + method); } statusCode = response.getStatusInfo().getStatusCode(); responseHeaders = buildResponseHeaders(response); if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) { return null; } else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) { if (returnType == null) return null; else return new CompleteResponse<T>(deserialize(response, returnType), response); } else { String message = "error"; String respBody = null; if (response.hasEntity()) { try { respBody = String.valueOf(response.readEntity(String.class)); message = respBody; } catch (RuntimeException e) { // e.printStackTrace(); } } throw new ApiException( response.getStatus(), message, buildResponseHeaders(response), respBody); } } /** * Build the Client used to make HTTP requests. * @param debugging Debug setting * @return Client */ private Client buildHttpClient(boolean debugging) { final ClientConfig clientConfig = new ClientConfig(); clientConfig.register(MultiPartFeature.class); clientConfig.register(json); clientConfig.register(JacksonFeature.class); if (debugging) { clientConfig.register(LoggingFilter.class); } return ClientBuilder.newClient(clientConfig); } private Map<String, List<String>> buildResponseHeaders(Response response) { /** * HTTP/2 requires that all headers be lowercase. To preserve functionality in case of future * API changes, response header case should be ignored. * */ Map<String, List<String>> responseHeaders = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER); for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) { List<Object> values = entry.getValue(); List<String> headers = new ArrayList<String>(); for (Object o : values) { headers.add(String.valueOf(o)); } responseHeaders.put(entry.getKey(), headers); } return responseHeaders; } /** * Update query and header parameters based on authentication settings. * * @param authNames The authentications to apply */ private void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); auth.applyToParams(queryParams, headerParams); } } }
4,716
0
Create_ds/connect-java-sdk/src/main/java/com/squareup
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/ApiException.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect; import java.util.Map; import java.util.List; public class ApiException extends Exception { private int code = 0; private Map<String, List<String>> responseHeaders = null; private String responseBody = null; public ApiException() {} public ApiException(Throwable throwable) { super(throwable); } public ApiException(String message) { super(message); } public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders, String responseBody) { super(message, throwable); this.code = code; this.responseHeaders = responseHeaders; this.responseBody = responseBody; } public ApiException(String message, int code, Map<String, List<String>> responseHeaders, String responseBody) { this(message, (Throwable) null, code, responseHeaders, responseBody); } public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders) { this(message, throwable, code, responseHeaders, null); } public ApiException(int code, Map<String, List<String>> responseHeaders, String responseBody) { this((String) null, (Throwable) null, code, responseHeaders, responseBody); } public ApiException(int code, String message) { super(message); this.code = code; } public ApiException(int code, String message, Map<String, List<String>> responseHeaders, String responseBody) { this(code, message); this.responseHeaders = responseHeaders; this.responseBody = responseBody; } /** * Get the HTTP status code. * * @return HTTP status code */ public int getCode() { return code; } /** * Get the HTTP response headers. * * @return A map of list of string */ public Map<String, List<String>> getResponseHeaders() { return responseHeaders; } /** * Get the HTTP response body. * * @return Response body in the form of string */ public String getResponseBody() { return responseBody; } }
4,717
0
Create_ds/connect-java-sdk/src/main/java/com/squareup
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/Pair.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect; public class Pair { private String name = ""; private String value = ""; public Pair (String name, String value) { setName(name); setValue(value); } private void setName(String name) { if (!isValidString(name)) return; this.name = name; } private void setValue(String value) { if (!isValidString(value)) return; this.value = value; } public String getName() { return this.name; } public String getValue() { return this.value; } private boolean isValidString(String arg) { if (arg == null) return false; if (arg.trim().isEmpty()) return false; return true; } }
4,718
0
Create_ds/connect-java-sdk/src/main/java/com/squareup
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/JSON.java
package com.squareup.connect; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.datatype.jsr310.*; import java.text.DateFormat; import javax.ws.rs.ext.ContextResolver; public class JSON implements ContextResolver<ObjectMapper> { private ObjectMapper mapper; public JSON() { mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); mapper.setDateFormat(new RFC3339DateFormat()); mapper.registerModule(new JavaTimeModule()); } /** * Set the date format for JSON (de)serialization with Date properties. * @param dateFormat Date format */ public void setDateFormat(DateFormat dateFormat) { mapper.setDateFormat(dateFormat); } @Override public ObjectMapper getContext(Class<?> type) { return mapper; } }
4,719
0
Create_ds/connect-java-sdk/src/main/java/com/squareup
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/RFC3339DateFormat.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect; import com.fasterxml.jackson.databind.util.ISO8601DateFormat; import com.fasterxml.jackson.databind.util.ISO8601Utils; import java.text.FieldPosition; import java.util.Date; public class RFC3339DateFormat extends ISO8601DateFormat { // Same as ISO8601DateFormat but serializing milliseconds. @Override public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { String value = ISO8601Utils.format(date, true); toAppendTo.append(value); return toAppendTo; } }
4,720
0
Create_ds/connect-java-sdk/src/main/java/com/squareup
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/StringUtil.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect; public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). * * @param array The array * @param value The value to search * @return true if the array contains the value */ public static boolean containsIgnoreCase(String[] array, String value) { for (String str : array) { if (value == null && str == null) return true; if (value != null && value.equalsIgnoreCase(str)) return true; } return false; } /** * Join an array of strings with the given separator. * <p> * Note: This might be replaced by utility method from commons-lang or guava someday * if one of those libraries is added as dependency. * </p> * * @param array The array of strings * @param separator The separator * @return the resulting string */ public static String join(String[] array, String separator) { int len = array.length; if (len == 0) return ""; StringBuilder out = new StringBuilder(); out.append(array[0]); for (int i = 1; i < len; i++) { out.append(separator).append(array[i]); } return out.toString(); } }
4,721
0
Create_ds/connect-java-sdk/src/main/java/com/squareup
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/Configuration.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect; public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); /** * Get the default API client, which would be used when creating API * instances without providing an API client. * * @return Default API client */ public static ApiClient getDefaultApiClient() { return defaultApiClient; } /** * Set the default API client, which would be used when creating API * instances without providing an API client. * * @param apiClient API client */ public static void setDefaultApiClient(ApiClient apiClient) { defaultApiClient = apiClient; } }
4,722
0
Create_ds/connect-java-sdk/src/main/java/com/squareup
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/CompleteResponse.java
package com.squareup.connect; import javax.ws.rs.core.Response; import javax.ws.rs.core.Link; import javax.ws.rs.core.MultivaluedMap; import org.glassfish.jersey.uri.UriComponent; public class CompleteResponse<T> { private final T data; private final Response response; public CompleteResponse(T data, Response response) { this.data = data; this.response = response; } public T getData() { return this.data; } public Response getResponse() { return this.response; } public String getBatchToken() { Link link = this.response.getLink("'next'"); if (link != null) { MultivaluedMap<String, String> parameters = UriComponent.decodeQuery(link.getUri(), true); return parameters.getFirst("batch_token"); } return null; } }
4,723
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/auth/HttpBasicAuth.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.auth; import com.squareup.connect.Pair; import com.migcomponents.migbase64.Base64; import java.util.Map; import java.util.List; import java.io.UnsupportedEncodingException; public class HttpBasicAuth implements Authentication { private String username; private String password; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Override public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) { if (username == null && password == null) { return; } String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); try { headerParams.put("Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false)); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } }
4,724
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/auth/ApiKeyAuth.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.auth; import com.squareup.connect.Pair; import java.util.Map; import java.util.List; public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; private String apiKey; private String apiKeyPrefix; public ApiKeyAuth(String location, String paramName) { this.location = location; this.paramName = paramName; } public String getLocation() { return location; } public String getParamName() { return paramName; } public String getApiKey() { return apiKey; } public void setApiKey(String apiKey) { this.apiKey = apiKey; } public String getApiKeyPrefix() { return apiKeyPrefix; } public void setApiKeyPrefix(String apiKeyPrefix) { this.apiKeyPrefix = apiKeyPrefix; } @Override public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) { if (apiKey == null) { return; } String value; if (apiKeyPrefix != null) { value = apiKeyPrefix + " " + apiKey; } else { value = apiKey; } if ("query".equals(location)) { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); } } }
4,725
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/auth/OAuth.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.auth; import com.squareup.connect.Pair; import java.util.Map; import java.util.List; public class OAuth implements Authentication { private String accessToken; public String getAccessToken() { return accessToken; } public void setAccessToken(String accessToken) { this.accessToken = accessToken; } @Override public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) { if (accessToken != null) { headerParams.put("Authorization", "Bearer " + accessToken); } } }
4,726
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/auth/Authentication.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.auth; import com.squareup.connect.Pair; import java.util.Map; import java.util.List; public interface Authentication { /** * Apply authentication settings to header and query params. * * @param queryParams List of query parameters * @param headerParams Map of header parameters */ void applyToParams(List<Pair> queryParams, Map<String, String> headerParams); }
4,727
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CancelPaymentByIdempotencyKeyRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Specifies idempotency key of a payment to cancel. */ @ApiModel(description = "Specifies idempotency key of a payment to cancel.") public class CancelPaymentByIdempotencyKeyRequest { @JsonProperty("idempotency_key") private String idempotencyKey = null; public CancelPaymentByIdempotencyKeyRequest idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; } /** * `idempotency_key` identifying the payment to be canceled. * @return idempotencyKey **/ @ApiModelProperty(required = true, value = "`idempotency_key` identifying the payment to be canceled.") public String getIdempotencyKey() { return idempotencyKey; } public void setIdempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CancelPaymentByIdempotencyKeyRequest cancelPaymentByIdempotencyKeyRequest = (CancelPaymentByIdempotencyKeyRequest) o; return Objects.equals(this.idempotencyKey, cancelPaymentByIdempotencyKeyRequest.idempotencyKey); } @Override public int hashCode() { return Objects.hash(idempotencyKey); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CancelPaymentByIdempotencyKeyRequest {\n"); sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,728
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/BatchChangeInventoryRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.InventoryChange; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class BatchChangeInventoryRequest { @JsonProperty("idempotency_key") private String idempotencyKey = null; @JsonProperty("changes") private List<InventoryChange> changes = new ArrayList<InventoryChange>(); @JsonProperty("ignore_unchanged_counts") private Boolean ignoreUnchangedCounts = null; public BatchChangeInventoryRequest idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; } /** * A client-supplied, universally unique identifier (UUID) for the request. See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) in the [API Development 101](https://developer.squareup.com/docs/basics/api101/overview) section for more information. * @return idempotencyKey **/ @ApiModelProperty(value = "A client-supplied, universally unique identifier (UUID) for the request. See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) in the [API Development 101](https://developer.squareup.com/docs/basics/api101/overview) section for more information.") public String getIdempotencyKey() { return idempotencyKey; } public void setIdempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; } public BatchChangeInventoryRequest changes(List<InventoryChange> changes) { this.changes = changes; return this; } public BatchChangeInventoryRequest addChangesItem(InventoryChange changesItem) { this.changes.add(changesItem); return this; } /** * The set of physical counts and inventory adjustments to be made. Changes are applied based on the client-supplied timestamp and may be sent out of order. Max size is 100 changes. * @return changes **/ @ApiModelProperty(value = "The set of physical counts and inventory adjustments to be made. Changes are applied based on the client-supplied timestamp and may be sent out of order. Max size is 100 changes.") public List<InventoryChange> getChanges() { return changes; } public void setChanges(List<InventoryChange> changes) { this.changes = changes; } public BatchChangeInventoryRequest ignoreUnchangedCounts(Boolean ignoreUnchangedCounts) { this.ignoreUnchangedCounts = ignoreUnchangedCounts; return this; } /** * Indicates whether the current physical count should be ignored if the quantity is unchanged since the last physical count. Default: `true`. * @return ignoreUnchangedCounts **/ @ApiModelProperty(value = "Indicates whether the current physical count should be ignored if the quantity is unchanged since the last physical count. Default: `true`.") public Boolean getIgnoreUnchangedCounts() { return ignoreUnchangedCounts; } public void setIgnoreUnchangedCounts(Boolean ignoreUnchangedCounts) { this.ignoreUnchangedCounts = ignoreUnchangedCounts; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BatchChangeInventoryRequest batchChangeInventoryRequest = (BatchChangeInventoryRequest) o; return Objects.equals(this.idempotencyKey, batchChangeInventoryRequest.idempotencyKey) && Objects.equals(this.changes, batchChangeInventoryRequest.changes) && Objects.equals(this.ignoreUnchangedCounts, batchChangeInventoryRequest.ignoreUnchangedCounts); } @Override public int hashCode() { return Objects.hash(idempotencyKey, changes, ignoreUnchangedCounts); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BatchChangeInventoryRequest {\n"); sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); sb.append(" changes: ").append(toIndentedString(changes)).append("\n"); sb.append(" ignoreUnchangedCounts: ").append(toIndentedString(ignoreUnchangedCounts)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,729
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/SearchCatalogObjectsRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.CatalogQuery; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class SearchCatalogObjectsRequest { @JsonProperty("cursor") private String cursor = null; @JsonProperty("object_types") private List<String> objectTypes = new ArrayList<String>(); @JsonProperty("include_deleted_objects") private Boolean includeDeletedObjects = null; @JsonProperty("include_related_objects") private Boolean includeRelatedObjects = null; @JsonProperty("begin_time") private String beginTime = null; @JsonProperty("query") private CatalogQuery query = null; @JsonProperty("limit") private Integer limit = null; public SearchCatalogObjectsRequest cursor(String cursor) { this.cursor = cursor; return this; } /** * The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. * @return cursor **/ @ApiModelProperty(value = "The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information.") public String getCursor() { return cursor; } public void setCursor(String cursor) { this.cursor = cursor; } public SearchCatalogObjectsRequest objectTypes(List<String> objectTypes) { this.objectTypes = objectTypes; return this; } public SearchCatalogObjectsRequest addObjectTypesItem(String objectTypesItem) { this.objectTypes.add(objectTypesItem); return this; } /** * The desired set of object types to appear in the search results. The legal values are taken from the CatalogObjectType enum: `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`. See [CatalogObjectType](#type-catalogobjecttype) for possible values * @return objectTypes **/ @ApiModelProperty(value = "The desired set of object types to appear in the search results. The legal values are taken from the CatalogObjectType enum: `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`. See [CatalogObjectType](#type-catalogobjecttype) for possible values") public List<String> getObjectTypes() { return objectTypes; } public void setObjectTypes(List<String> objectTypes) { this.objectTypes = objectTypes; } public SearchCatalogObjectsRequest includeDeletedObjects(Boolean includeDeletedObjects) { this.includeDeletedObjects = includeDeletedObjects; return this; } /** * If `true`, deleted objects will be included in the results. Deleted objects will have their `is_deleted` field set to `true`. * @return includeDeletedObjects **/ @ApiModelProperty(value = "If `true`, deleted objects will be included in the results. Deleted objects will have their `is_deleted` field set to `true`.") public Boolean getIncludeDeletedObjects() { return includeDeletedObjects; } public void setIncludeDeletedObjects(Boolean includeDeletedObjects) { this.includeDeletedObjects = includeDeletedObjects; } public SearchCatalogObjectsRequest includeRelatedObjects(Boolean includeRelatedObjects) { this.includeRelatedObjects = includeRelatedObjects; return this; } /** * If `true`, the response will include additional objects that are related to the requested object, as follows: If a CatalogItem is returned in the object field of the response, its associated CatalogCategory, CatalogTax objects, CatalogImage objects and CatalogModifierList objects will be included in the `related_objects` field of the response. If a CatalogItemVariation is returned in the object field of the response, its parent CatalogItem will be included in the `related_objects` field of the response. * @return includeRelatedObjects **/ @ApiModelProperty(value = "If `true`, the response will include additional objects that are related to the requested object, as follows: If a CatalogItem is returned in the object field of the response, its associated CatalogCategory, CatalogTax objects, CatalogImage objects and CatalogModifierList objects will be included in the `related_objects` field of the response. If a CatalogItemVariation is returned in the object field of the response, its parent CatalogItem will be included in the `related_objects` field of the response.") public Boolean getIncludeRelatedObjects() { return includeRelatedObjects; } public void setIncludeRelatedObjects(Boolean includeRelatedObjects) { this.includeRelatedObjects = includeRelatedObjects; } public SearchCatalogObjectsRequest beginTime(String beginTime) { this.beginTime = beginTime; return this; } /** * Return objects modified after this [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates), in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. The timestamp is exclusive - objects with a timestamp equal to `begin_time` will not be included in the response. * @return beginTime **/ @ApiModelProperty(value = "Return objects modified after this [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates), in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. The timestamp is exclusive - objects with a timestamp equal to `begin_time` will not be included in the response.") public String getBeginTime() { return beginTime; } public void setBeginTime(String beginTime) { this.beginTime = beginTime; } public SearchCatalogObjectsRequest query(CatalogQuery query) { this.query = query; return this; } /** * A query to be used to filter or sort the results. If no query is specified, the entire catalog will be returned. * @return query **/ @ApiModelProperty(value = "A query to be used to filter or sort the results. If no query is specified, the entire catalog will be returned.") public CatalogQuery getQuery() { return query; } public void setQuery(CatalogQuery query) { this.query = query; } public SearchCatalogObjectsRequest limit(Integer limit) { this.limit = limit; return this; } /** * A limit on the number of results to be returned in a single page. The limit is advisory - the implementation may return more or fewer results. If the supplied limit is negative, zero, or is higher than the maximum limit of 1,000, it will be ignored. * @return limit **/ @ApiModelProperty(value = "A limit on the number of results to be returned in a single page. The limit is advisory - the implementation may return more or fewer results. If the supplied limit is negative, zero, or is higher than the maximum limit of 1,000, it will be ignored.") public Integer getLimit() { return limit; } public void setLimit(Integer limit) { this.limit = limit; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SearchCatalogObjectsRequest searchCatalogObjectsRequest = (SearchCatalogObjectsRequest) o; return Objects.equals(this.cursor, searchCatalogObjectsRequest.cursor) && Objects.equals(this.objectTypes, searchCatalogObjectsRequest.objectTypes) && Objects.equals(this.includeDeletedObjects, searchCatalogObjectsRequest.includeDeletedObjects) && Objects.equals(this.includeRelatedObjects, searchCatalogObjectsRequest.includeRelatedObjects) && Objects.equals(this.beginTime, searchCatalogObjectsRequest.beginTime) && Objects.equals(this.query, searchCatalogObjectsRequest.query) && Objects.equals(this.limit, searchCatalogObjectsRequest.limit); } @Override public int hashCode() { return Objects.hash(cursor, objectTypes, includeDeletedObjects, includeRelatedObjects, beginTime, query, limit); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SearchCatalogObjectsRequest {\n"); sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); sb.append(" objectTypes: ").append(toIndentedString(objectTypes)).append("\n"); sb.append(" includeDeletedObjects: ").append(toIndentedString(includeDeletedObjects)).append("\n"); sb.append(" includeRelatedObjects: ").append(toIndentedString(includeRelatedObjects)).append("\n"); sb.append(" beginTime: ").append(toIndentedString(beginTime)).append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,730
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1UpdateModifierOptionRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.V1ModifierOption; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * */ @ApiModel(description = "") public class V1UpdateModifierOptionRequest { @JsonProperty("body") private V1ModifierOption body = null; public V1UpdateModifierOptionRequest body(V1ModifierOption body) { this.body = body; return this; } /** * An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return body **/ @ApiModelProperty(required = true, value = "An object containing the fields to POST for the request. See the corresponding object definition for field details.") public V1ModifierOption getBody() { return body; } public void setBody(V1ModifierOption body) { this.body = body; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1UpdateModifierOptionRequest v1UpdateModifierOptionRequest = (V1UpdateModifierOptionRequest) o; return Objects.equals(this.body, v1UpdateModifierOptionRequest.body); } @Override public int hashCode() { return Objects.hash(body); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1UpdateModifierOptionRequest {\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,731
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CatalogItemOption.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.CatalogObject; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * A group of variations for a &#x60;CatalogItem&#x60;. */ @ApiModel(description = "A group of variations for a `CatalogItem`.") public class CatalogItemOption { @JsonProperty("name") private String name = null; @JsonProperty("display_name") private String displayName = null; @JsonProperty("description") private String description = null; @JsonProperty("show_colors") private Boolean showColors = null; @JsonProperty("values") private List<CatalogObject> values = new ArrayList<CatalogObject>(); @JsonProperty("item_count") private Long itemCount = null; public CatalogItemOption name(String name) { this.name = name; return this; } /** * The item option's display name for the seller. Must be unique across all item options. Searchable. * @return name **/ @ApiModelProperty(value = "The item option's display name for the seller. Must be unique across all item options. Searchable.") public String getName() { return name; } public void setName(String name) { this.name = name; } public CatalogItemOption displayName(String displayName) { this.displayName = displayName; return this; } /** * The item option's display name for the customer. Searchable. * @return displayName **/ @ApiModelProperty(value = "The item option's display name for the customer. Searchable.") public String getDisplayName() { return displayName; } public void setDisplayName(String displayName) { this.displayName = displayName; } public CatalogItemOption description(String description) { this.description = description; return this; } /** * The item option's human-readable description. Displayed in the Square Point of Sale app for the seller and in the Online Store or on receipts for the buyer. * @return description **/ @ApiModelProperty(value = "The item option's human-readable description. Displayed in the Square Point of Sale app for the seller and in the Online Store or on receipts for the buyer.") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public CatalogItemOption showColors(Boolean showColors) { this.showColors = showColors; return this; } /** * If true, display colors for entries in `values` when present. * @return showColors **/ @ApiModelProperty(value = "If true, display colors for entries in `values` when present.") public Boolean getShowColors() { return showColors; } public void setShowColors(Boolean showColors) { this.showColors = showColors; } public CatalogItemOption values(List<CatalogObject> values) { this.values = values; return this; } public CatalogItemOption addValuesItem(CatalogObject valuesItem) { this.values.add(valuesItem); return this; } /** * A list of CatalogObjects containing the `CatalogItemOptionValue`s for this item. * @return values **/ @ApiModelProperty(value = "A list of CatalogObjects containing the `CatalogItemOptionValue`s for this item.") public List<CatalogObject> getValues() { return values; } public void setValues(List<CatalogObject> values) { this.values = values; } public CatalogItemOption itemCount(Long itemCount) { this.itemCount = itemCount; return this; } /** * The number of `CatalogItem`s currently associated with this item option. Present only if the `include_counts` was specified in the request. Any count over 100 will be returned as `100`. * @return itemCount **/ @ApiModelProperty(value = "The number of `CatalogItem`s currently associated with this item option. Present only if the `include_counts` was specified in the request. Any count over 100 will be returned as `100`.") public Long getItemCount() { return itemCount; } public void setItemCount(Long itemCount) { this.itemCount = itemCount; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CatalogItemOption catalogItemOption = (CatalogItemOption) o; return Objects.equals(this.name, catalogItemOption.name) && Objects.equals(this.displayName, catalogItemOption.displayName) && Objects.equals(this.description, catalogItemOption.description) && Objects.equals(this.showColors, catalogItemOption.showColors) && Objects.equals(this.values, catalogItemOption.values) && Objects.equals(this.itemCount, catalogItemOption.itemCount); } @Override public int hashCode() { return Objects.hash(name, displayName, description, showColors, values, itemCount); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatalogItemOption {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" showColors: ").append(toIndentedString(showColors)).append("\n"); sb.append(" values: ").append(toIndentedString(values)).append("\n"); sb.append(" itemCount: ").append(toIndentedString(itemCount)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,732
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CatalogModifierOverride.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * */ @ApiModel(description = "") public class CatalogModifierOverride { @JsonProperty("modifier_id") private String modifierId = null; @JsonProperty("on_by_default") private Boolean onByDefault = null; public CatalogModifierOverride modifierId(String modifierId) { this.modifierId = modifierId; return this; } /** * The ID of the `CatalogModifier` whose default behavior is being overridden. * @return modifierId **/ @ApiModelProperty(required = true, value = "The ID of the `CatalogModifier` whose default behavior is being overridden.") public String getModifierId() { return modifierId; } public void setModifierId(String modifierId) { this.modifierId = modifierId; } public CatalogModifierOverride onByDefault(Boolean onByDefault) { this.onByDefault = onByDefault; return this; } /** * If `true`, this `CatalogModifier` should be selected by default for this `CatalogItem`. * @return onByDefault **/ @ApiModelProperty(value = "If `true`, this `CatalogModifier` should be selected by default for this `CatalogItem`.") public Boolean getOnByDefault() { return onByDefault; } public void setOnByDefault(Boolean onByDefault) { this.onByDefault = onByDefault; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CatalogModifierOverride catalogModifierOverride = (CatalogModifierOverride) o; return Objects.equals(this.modifierId, catalogModifierOverride.modifierId) && Objects.equals(this.onByDefault, catalogModifierOverride.onByDefault); } @Override public int hashCode() { return Objects.hash(modifierId, onByDefault); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatalogModifierOverride {\n"); sb.append(" modifierId: ").append(toIndentedString(modifierId)).append("\n"); sb.append(" onByDefault: ").append(toIndentedString(onByDefault)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,733
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/ListMerchantsRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Request object for the [ListMerchant](#endpoint-listmerchant) endpoint. */ @ApiModel(description = "Request object for the [ListMerchant](#endpoint-listmerchant) endpoint.") public class ListMerchantsRequest { @JsonProperty("cursor") private Integer cursor = null; public ListMerchantsRequest cursor(Integer cursor) { this.cursor = cursor; return this; } /** * The cursor generated by the previous response. * @return cursor **/ @ApiModelProperty(value = "The cursor generated by the previous response.") public Integer getCursor() { return cursor; } public void setCursor(Integer cursor) { this.cursor = cursor; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ListMerchantsRequest listMerchantsRequest = (ListMerchantsRequest) o; return Objects.equals(this.cursor, listMerchantsRequest.cursor); } @Override public int hashCode() { return Objects.hash(cursor); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListMerchantsRequest {\n"); sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,734
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CreateMobileAuthorizationCodeResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Defines the fields that are included in the response body of a request to the __CreateMobileAuthorizationCode__ endpoint. */ @ApiModel(description = "Defines the fields that are included in the response body of a request to the __CreateMobileAuthorizationCode__ endpoint.") public class CreateMobileAuthorizationCodeResponse { @JsonProperty("authorization_code") private String authorizationCode = null; @JsonProperty("expires_at") private String expiresAt = null; @JsonProperty("error") private Error error = null; public CreateMobileAuthorizationCodeResponse authorizationCode(String authorizationCode) { this.authorizationCode = authorizationCode; return this; } /** * Generated authorization code that connects a mobile application instance to a Square account. * @return authorizationCode **/ @ApiModelProperty(value = "Generated authorization code that connects a mobile application instance to a Square account.") public String getAuthorizationCode() { return authorizationCode; } public void setAuthorizationCode(String authorizationCode) { this.authorizationCode = authorizationCode; } public CreateMobileAuthorizationCodeResponse expiresAt(String expiresAt) { this.expiresAt = expiresAt; return this; } /** * The timestamp when `authorization_code` expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, e.g., \"2016-09-04T23:59:33.123Z\". * @return expiresAt **/ @ApiModelProperty(value = "The timestamp when `authorization_code` expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, e.g., \"2016-09-04T23:59:33.123Z\".") public String getExpiresAt() { return expiresAt; } public void setExpiresAt(String expiresAt) { this.expiresAt = expiresAt; } public CreateMobileAuthorizationCodeResponse error(Error error) { this.error = error; return this; } /** * An error object that provides details about how creation of authorization code failed. * @return error **/ @ApiModelProperty(value = "An error object that provides details about how creation of authorization code failed.") public Error getError() { return error; } public void setError(Error error) { this.error = error; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CreateMobileAuthorizationCodeResponse createMobileAuthorizationCodeResponse = (CreateMobileAuthorizationCodeResponse) o; return Objects.equals(this.authorizationCode, createMobileAuthorizationCodeResponse.authorizationCode) && Objects.equals(this.expiresAt, createMobileAuthorizationCodeResponse.expiresAt) && Objects.equals(this.error, createMobileAuthorizationCodeResponse.error); } @Override public int hashCode() { return Objects.hash(authorizationCode, expiresAt, error); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateMobileAuthorizationCodeResponse {\n"); sb.append(" authorizationCode: ").append(toIndentedString(authorizationCode)).append("\n"); sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,735
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CreateOrderRequestModifier.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Money; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * __Deprecated__: Please use the [OrderLineItemModifier](#type-orderlineitemmodifier) type instead. Represents a modifier applied to a single line item. Modifiers can reference existing objects in a merchant catalog or be constructed ad hoc at the time of purchase by providing a name and price. */ @ApiModel(description = "__Deprecated__: Please use the [OrderLineItemModifier](#type-orderlineitemmodifier) type instead. Represents a modifier applied to a single line item. Modifiers can reference existing objects in a merchant catalog or be constructed ad hoc at the time of purchase by providing a name and price.") public class CreateOrderRequestModifier { @JsonProperty("catalog_object_id") private String catalogObjectId = null; @JsonProperty("name") private String name = null; @JsonProperty("base_price_money") private Money basePriceMoney = null; public CreateOrderRequestModifier catalogObjectId(String catalogObjectId) { this.catalogObjectId = catalogObjectId; return this; } /** * The catalog object ID of a `CatalogModifier`. * @return catalogObjectId **/ @ApiModelProperty(value = "The catalog object ID of a `CatalogModifier`.") public String getCatalogObjectId() { return catalogObjectId; } public void setCatalogObjectId(String catalogObjectId) { this.catalogObjectId = catalogObjectId; } public CreateOrderRequestModifier name(String name) { this.name = name; return this; } /** * Only used for ad hoc modifiers. The name of the modifier. `name` cannot exceed 255 characters. Do not provide a value for `name` if you provide a value for `catalog_object_id`. * @return name **/ @ApiModelProperty(value = "Only used for ad hoc modifiers. The name of the modifier. `name` cannot exceed 255 characters. Do not provide a value for `name` if you provide a value for `catalog_object_id`.") public String getName() { return name; } public void setName(String name) { this.name = name; } public CreateOrderRequestModifier basePriceMoney(Money basePriceMoney) { this.basePriceMoney = basePriceMoney; return this; } /** * The base price for the modifier. `base_price_money` is required for ad hoc modifiers. If both `catalog_object_id` and `base_price_money` are set, `base_price_money` will override the predefined `CatalogModifier` price. * @return basePriceMoney **/ @ApiModelProperty(value = "The base price for the modifier. `base_price_money` is required for ad hoc modifiers. If both `catalog_object_id` and `base_price_money` are set, `base_price_money` will override the predefined `CatalogModifier` price.") public Money getBasePriceMoney() { return basePriceMoney; } public void setBasePriceMoney(Money basePriceMoney) { this.basePriceMoney = basePriceMoney; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CreateOrderRequestModifier createOrderRequestModifier = (CreateOrderRequestModifier) o; return Objects.equals(this.catalogObjectId, createOrderRequestModifier.catalogObjectId) && Objects.equals(this.name, createOrderRequestModifier.name) && Objects.equals(this.basePriceMoney, createOrderRequestModifier.basePriceMoney); } @Override public int hashCode() { return Objects.hash(catalogObjectId, name, basePriceMoney); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateOrderRequestModifier {\n"); sb.append(" catalogObjectId: ").append(toIndentedString(catalogObjectId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" basePriceMoney: ").append(toIndentedString(basePriceMoney)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,736
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1ListBankAccountsRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import io.swagger.annotations.ApiModel; /** * */ @ApiModel(description = "") public class V1ListBankAccountsRequest { @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return true; } @Override public int hashCode() { return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1ListBankAccountsRequest {\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,737
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1RemoveModifierListRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import io.swagger.annotations.ApiModel; /** * */ @ApiModel(description = "") public class V1RemoveModifierListRequest { @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return true; } @Override public int hashCode() { return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1RemoveModifierListRequest {\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,738
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1ListFeesResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.V1Fee; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class V1ListFeesResponse { @JsonProperty("items") private List<V1Fee> items = new ArrayList<V1Fee>(); public V1ListFeesResponse items(List<V1Fee> items) { this.items = items; return this; } public V1ListFeesResponse addItemsItem(V1Fee itemsItem) { this.items.add(itemsItem); return this; } /** * * @return items **/ @ApiModelProperty(value = "") public List<V1Fee> getItems() { return items; } public void setItems(List<V1Fee> items) { this.items = items; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1ListFeesResponse v1ListFeesResponse = (V1ListFeesResponse) o; return Objects.equals(this.items, v1ListFeesResponse.items); } @Override public int hashCode() { return Objects.hash(items); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1ListFeesResponse {\n"); sb.append(" items: ").append(toIndentedString(items)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,739
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/DeleteBreakTypeRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import io.swagger.annotations.ApiModel; /** * A request to delete a &#x60;BreakType&#x60; */ @ApiModel(description = "A request to delete a `BreakType`") public class DeleteBreakTypeRequest { @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return true; } @Override public int hashCode() { return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeleteBreakTypeRequest {\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,740
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/RetrieveInventoryCountResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Error; import com.squareup.connect.models.InventoryCount; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class RetrieveInventoryCountResponse { @JsonProperty("errors") private List<Error> errors = new ArrayList<Error>(); @JsonProperty("counts") private List<InventoryCount> counts = new ArrayList<InventoryCount>(); @JsonProperty("cursor") private String cursor = null; public RetrieveInventoryCountResponse errors(List<Error> errors) { this.errors = errors; return this; } public RetrieveInventoryCountResponse addErrorsItem(Error errorsItem) { this.errors.add(errorsItem); return this; } /** * Any errors that occurred during the request. * @return errors **/ @ApiModelProperty(value = "Any errors that occurred during the request.") public List<Error> getErrors() { return errors; } public void setErrors(List<Error> errors) { this.errors = errors; } public RetrieveInventoryCountResponse counts(List<InventoryCount> counts) { this.counts = counts; return this; } public RetrieveInventoryCountResponse addCountsItem(InventoryCount countsItem) { this.counts.add(countsItem); return this; } /** * The current calculated inventory counts for the requested object and locations. * @return counts **/ @ApiModelProperty(value = "The current calculated inventory counts for the requested object and locations.") public List<InventoryCount> getCounts() { return counts; } public void setCounts(List<InventoryCount> counts) { this.counts = counts; } public RetrieveInventoryCountResponse cursor(String cursor) { this.cursor = cursor; return this; } /** * The pagination cursor to be used in a subsequent request. If unset, this is the final response. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. * @return cursor **/ @ApiModelProperty(value = "The pagination cursor to be used in a subsequent request. If unset, this is the final response. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information.") public String getCursor() { return cursor; } public void setCursor(String cursor) { this.cursor = cursor; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } RetrieveInventoryCountResponse retrieveInventoryCountResponse = (RetrieveInventoryCountResponse) o; return Objects.equals(this.errors, retrieveInventoryCountResponse.errors) && Objects.equals(this.counts, retrieveInventoryCountResponse.counts) && Objects.equals(this.cursor, retrieveInventoryCountResponse.cursor); } @Override public int hashCode() { return Objects.hash(errors, counts, cursor); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RetrieveInventoryCountResponse {\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" counts: ").append(toIndentedString(counts)).append("\n"); sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,741
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1ListCashDrawerShiftsRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * */ @ApiModel(description = "") public class V1ListCashDrawerShiftsRequest { @JsonProperty("order") private String order = null; @JsonProperty("begin_time") private String beginTime = null; @JsonProperty("end_time") private String endTime = null; public V1ListCashDrawerShiftsRequest order(String order) { this.order = order; return this; } /** * The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC See [SortOrder](#type-sortorder) for possible values * @return order **/ @ApiModelProperty(value = "The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC See [SortOrder](#type-sortorder) for possible values") public String getOrder() { return order; } public void setOrder(String order) { this.order = order; } public V1ListCashDrawerShiftsRequest beginTime(String beginTime) { this.beginTime = beginTime; return this; } /** * The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days. * @return beginTime **/ @ApiModelProperty(value = "The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days.") public String getBeginTime() { return beginTime; } public void setBeginTime(String beginTime) { this.beginTime = beginTime; } public V1ListCashDrawerShiftsRequest endTime(String endTime) { this.endTime = endTime; return this; } /** * The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time. * @return endTime **/ @ApiModelProperty(value = "The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time.") public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1ListCashDrawerShiftsRequest v1ListCashDrawerShiftsRequest = (V1ListCashDrawerShiftsRequest) o; return Objects.equals(this.order, v1ListCashDrawerShiftsRequest.order) && Objects.equals(this.beginTime, v1ListCashDrawerShiftsRequest.beginTime) && Objects.equals(this.endTime, v1ListCashDrawerShiftsRequest.endTime); } @Override public int hashCode() { return Objects.hash(order, beginTime, endTime); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1ListCashDrawerShiftsRequest {\n"); sb.append(" order: ").append(toIndentedString(order)).append("\n"); sb.append(" beginTime: ").append(toIndentedString(beginTime)).append("\n"); sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,742
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/DeleteCatalogObjectResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class DeleteCatalogObjectResponse { @JsonProperty("errors") private List<Error> errors = new ArrayList<Error>(); @JsonProperty("deleted_object_ids") private List<String> deletedObjectIds = new ArrayList<String>(); @JsonProperty("deleted_at") private String deletedAt = null; public DeleteCatalogObjectResponse errors(List<Error> errors) { this.errors = errors; return this; } public DeleteCatalogObjectResponse addErrorsItem(Error errorsItem) { this.errors.add(errorsItem); return this; } /** * Information on any errors encountered. * @return errors **/ @ApiModelProperty(value = "Information on any errors encountered.") public List<Error> getErrors() { return errors; } public void setErrors(List<Error> errors) { this.errors = errors; } public DeleteCatalogObjectResponse deletedObjectIds(List<String> deletedObjectIds) { this.deletedObjectIds = deletedObjectIds; return this; } public DeleteCatalogObjectResponse addDeletedObjectIdsItem(String deletedObjectIdsItem) { this.deletedObjectIds.add(deletedObjectIdsItem); return this; } /** * The IDs of all catalog objects deleted by this request. Multiple IDs may be returned when associated objects are also deleted, for example a catalog item variation will be deleted (and its ID included in this field) when its parent catalog item is deleted. * @return deletedObjectIds **/ @ApiModelProperty(value = "The IDs of all catalog objects deleted by this request. Multiple IDs may be returned when associated objects are also deleted, for example a catalog item variation will be deleted (and its ID included in this field) when its parent catalog item is deleted.") public List<String> getDeletedObjectIds() { return deletedObjectIds; } public void setDeletedObjectIds(List<String> deletedObjectIds) { this.deletedObjectIds = deletedObjectIds; } public DeleteCatalogObjectResponse deletedAt(String deletedAt) { this.deletedAt = deletedAt; return this; } /** * The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this deletion in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. * @return deletedAt **/ @ApiModelProperty(value = "The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this deletion in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`.") public String getDeletedAt() { return deletedAt; } public void setDeletedAt(String deletedAt) { this.deletedAt = deletedAt; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DeleteCatalogObjectResponse deleteCatalogObjectResponse = (DeleteCatalogObjectResponse) o; return Objects.equals(this.errors, deleteCatalogObjectResponse.errors) && Objects.equals(this.deletedObjectIds, deleteCatalogObjectResponse.deletedObjectIds) && Objects.equals(this.deletedAt, deleteCatalogObjectResponse.deletedAt); } @Override public int hashCode() { return Objects.hash(errors, deletedObjectIds, deletedAt); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeleteCatalogObjectResponse {\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" deletedObjectIds: ").append(toIndentedString(deletedObjectIds)).append("\n"); sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,743
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/ListCustomersResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Customer; import com.squareup.connect.models.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * Defines the fields that are included in the response body of a request to the ListCustomers endpoint. One of &#x60;errors&#x60; or &#x60;customers&#x60; is present in a given response (never both). */ @ApiModel(description = "Defines the fields that are included in the response body of a request to the ListCustomers endpoint. One of `errors` or `customers` is present in a given response (never both).") public class ListCustomersResponse { @JsonProperty("errors") private List<Error> errors = new ArrayList<Error>(); @JsonProperty("customers") private List<Customer> customers = new ArrayList<Customer>(); @JsonProperty("cursor") private String cursor = null; public ListCustomersResponse errors(List<Error> errors) { this.errors = errors; return this; } public ListCustomersResponse addErrorsItem(Error errorsItem) { this.errors.add(errorsItem); return this; } /** * Any errors that occurred during the request. * @return errors **/ @ApiModelProperty(value = "Any errors that occurred during the request.") public List<Error> getErrors() { return errors; } public void setErrors(List<Error> errors) { this.errors = errors; } public ListCustomersResponse customers(List<Customer> customers) { this.customers = customers; return this; } public ListCustomersResponse addCustomersItem(Customer customersItem) { this.customers.add(customersItem); return this; } /** * An array of `Customer` objects that match the provided query. * @return customers **/ @ApiModelProperty(value = "An array of `Customer` objects that match the provided query.") public List<Customer> getCustomers() { return customers; } public void setCustomers(List<Customer> customers) { this.customers = customers; } public ListCustomersResponse cursor(String cursor) { this.cursor = cursor; return this; } /** * A pagination cursor to retrieve the next set of results for the original query. Only present if the request succeeded and additional results are available. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. * @return cursor **/ @ApiModelProperty(value = "A pagination cursor to retrieve the next set of results for the original query. Only present if the request succeeded and additional results are available. See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.") public String getCursor() { return cursor; } public void setCursor(String cursor) { this.cursor = cursor; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ListCustomersResponse listCustomersResponse = (ListCustomersResponse) o; return Objects.equals(this.errors, listCustomersResponse.errors) && Objects.equals(this.customers, listCustomersResponse.customers) && Objects.equals(this.cursor, listCustomersResponse.cursor); } @Override public int hashCode() { return Objects.hash(errors, customers, cursor); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListCustomersResponse {\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" customers: ").append(toIndentedString(customers)).append("\n"); sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,744
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1MerchantLocationDetails.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Additional information for a single-location account specified by its associated business account, if it has one. */ @ApiModel(description = "Additional information for a single-location account specified by its associated business account, if it has one.") public class V1MerchantLocationDetails { @JsonProperty("nickname") private String nickname = null; public V1MerchantLocationDetails nickname(String nickname) { this.nickname = nickname; return this; } /** * The nickname assigned to the single-location account by the parent business. This value appears in the parent business's multi-location dashboard. * @return nickname **/ @ApiModelProperty(value = "The nickname assigned to the single-location account by the parent business. This value appears in the parent business's multi-location dashboard.") public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1MerchantLocationDetails v1MerchantLocationDetails = (V1MerchantLocationDetails) o; return Objects.equals(this.nickname, v1MerchantLocationDetails.nickname); } @Override public int hashCode() { return Objects.hash(nickname); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1MerchantLocationDetails {\n"); sb.append(" nickname: ").append(toIndentedString(nickname)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,745
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/RetrieveInventoryPhysicalCountResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Error; import com.squareup.connect.models.InventoryPhysicalCount; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class RetrieveInventoryPhysicalCountResponse { @JsonProperty("errors") private List<Error> errors = new ArrayList<Error>(); @JsonProperty("count") private InventoryPhysicalCount count = null; public RetrieveInventoryPhysicalCountResponse errors(List<Error> errors) { this.errors = errors; return this; } public RetrieveInventoryPhysicalCountResponse addErrorsItem(Error errorsItem) { this.errors.add(errorsItem); return this; } /** * Any errors that occurred during the request. * @return errors **/ @ApiModelProperty(value = "Any errors that occurred during the request.") public List<Error> getErrors() { return errors; } public void setErrors(List<Error> errors) { this.errors = errors; } public RetrieveInventoryPhysicalCountResponse count(InventoryPhysicalCount count) { this.count = count; return this; } /** * The requested `InventoryPhysicalCount`. * @return count **/ @ApiModelProperty(value = "The requested `InventoryPhysicalCount`.") public InventoryPhysicalCount getCount() { return count; } public void setCount(InventoryPhysicalCount count) { this.count = count; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } RetrieveInventoryPhysicalCountResponse retrieveInventoryPhysicalCountResponse = (RetrieveInventoryPhysicalCountResponse) o; return Objects.equals(this.errors, retrieveInventoryPhysicalCountResponse.errors) && Objects.equals(this.count, retrieveInventoryPhysicalCountResponse.count); } @Override public int hashCode() { return Objects.hash(errors, count); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RetrieveInventoryPhysicalCountResponse {\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" count: ").append(toIndentedString(count)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,746
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/RefundPaymentRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Money; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Refunds a payment. */ @ApiModel(description = "Refunds a payment.") public class RefundPaymentRequest { @JsonProperty("idempotency_key") private String idempotencyKey = null; @JsonProperty("amount_money") private Money amountMoney = null; @JsonProperty("app_fee_money") private Money appFeeMoney = null; @JsonProperty("payment_id") private String paymentId = null; @JsonProperty("reason") private String reason = null; public RefundPaymentRequest idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; } /** * A unique string that identifies this RefundPayment request. Key can be any valid string but must be unique for every RefundPayment request. For more information, see [Idempotency keys](https://developer.squareup.com/docs/working-with-apis/idempotency). * @return idempotencyKey **/ @ApiModelProperty(required = true, value = " A unique string that identifies this RefundPayment request. Key can be any valid string but must be unique for every RefundPayment request. For more information, see [Idempotency keys](https://developer.squareup.com/docs/working-with-apis/idempotency).") public String getIdempotencyKey() { return idempotencyKey; } public void setIdempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; } public RefundPaymentRequest amountMoney(Money amountMoney) { this.amountMoney = amountMoney; return this; } /** * The amount of money to refund. Cannot be more than the `total_money` value of the payment minus the total amount of all previously completed refunds for this payment. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is charging the card. * @return amountMoney **/ @ApiModelProperty(required = true, value = "The amount of money to refund. Cannot be more than the `total_money` value of the payment minus the total amount of all previously completed refunds for this payment. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is charging the card.") public Money getAmountMoney() { return amountMoney; } public void setAmountMoney(Money amountMoney) { this.amountMoney = amountMoney; } public RefundPaymentRequest appFeeMoney(Money appFeeMoney) { this.appFeeMoney = appFeeMoney; return this; } /** * Amount of money the developer will contribute to help cover the refunded amount. Specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. Value cannot be more than the `amount_money`. You can specify this parameter in a refund request only if the same parameter was also included when taking the payment. This is part of the application fee scenario the API supports. For more information, see [Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees) * @return appFeeMoney **/ @ApiModelProperty(value = "Amount of money the developer will contribute to help cover the refunded amount. Specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. Value cannot be more than the `amount_money`. You can specify this parameter in a refund request only if the same parameter was also included when taking the payment. This is part of the application fee scenario the API supports. For more information, see [Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees)") public Money getAppFeeMoney() { return appFeeMoney; } public void setAppFeeMoney(Money appFeeMoney) { this.appFeeMoney = appFeeMoney; } public RefundPaymentRequest paymentId(String paymentId) { this.paymentId = paymentId; return this; } /** * Unique ID of the payment being refunded. * @return paymentId **/ @ApiModelProperty(value = "Unique ID of the payment being refunded.") public String getPaymentId() { return paymentId; } public void setPaymentId(String paymentId) { this.paymentId = paymentId; } public RefundPaymentRequest reason(String reason) { this.reason = reason; return this; } /** * A description of the reason for the refund. * @return reason **/ @ApiModelProperty(value = "A description of the reason for the refund.") public String getReason() { return reason; } public void setReason(String reason) { this.reason = reason; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } RefundPaymentRequest refundPaymentRequest = (RefundPaymentRequest) o; return Objects.equals(this.idempotencyKey, refundPaymentRequest.idempotencyKey) && Objects.equals(this.amountMoney, refundPaymentRequest.amountMoney) && Objects.equals(this.appFeeMoney, refundPaymentRequest.appFeeMoney) && Objects.equals(this.paymentId, refundPaymentRequest.paymentId) && Objects.equals(this.reason, refundPaymentRequest.reason); } @Override public int hashCode() { return Objects.hash(idempotencyKey, amountMoney, appFeeMoney, paymentId, reason); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RefundPaymentRequest {\n"); sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); sb.append(" amountMoney: ").append(toIndentedString(amountMoney)).append("\n"); sb.append(" appFeeMoney: ").append(toIndentedString(appFeeMoney)).append("\n"); sb.append(" paymentId: ").append(toIndentedString(paymentId)).append("\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,747
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/RetrieveInventoryAdjustmentResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Error; import com.squareup.connect.models.InventoryAdjustment; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class RetrieveInventoryAdjustmentResponse { @JsonProperty("errors") private List<Error> errors = new ArrayList<Error>(); @JsonProperty("adjustment") private InventoryAdjustment adjustment = null; public RetrieveInventoryAdjustmentResponse errors(List<Error> errors) { this.errors = errors; return this; } public RetrieveInventoryAdjustmentResponse addErrorsItem(Error errorsItem) { this.errors.add(errorsItem); return this; } /** * Any errors that occurred during the request. * @return errors **/ @ApiModelProperty(value = "Any errors that occurred during the request.") public List<Error> getErrors() { return errors; } public void setErrors(List<Error> errors) { this.errors = errors; } public RetrieveInventoryAdjustmentResponse adjustment(InventoryAdjustment adjustment) { this.adjustment = adjustment; return this; } /** * The requested `InventoryAdjustment`. * @return adjustment **/ @ApiModelProperty(value = "The requested `InventoryAdjustment`.") public InventoryAdjustment getAdjustment() { return adjustment; } public void setAdjustment(InventoryAdjustment adjustment) { this.adjustment = adjustment; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } RetrieveInventoryAdjustmentResponse retrieveInventoryAdjustmentResponse = (RetrieveInventoryAdjustmentResponse) o; return Objects.equals(this.errors, retrieveInventoryAdjustmentResponse.errors) && Objects.equals(this.adjustment, retrieveInventoryAdjustmentResponse.adjustment); } @Override public int hashCode() { return Objects.hash(errors, adjustment); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RetrieveInventoryAdjustmentResponse {\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" adjustment: ").append(toIndentedString(adjustment)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,748
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1ItemImage.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * V1ItemImage */ @ApiModel(description = "V1ItemImage") public class V1ItemImage { @JsonProperty("id") private String id = null; @JsonProperty("url") private String url = null; public V1ItemImage id(String id) { this.id = id; return this; } /** * The image's unique ID. * @return id **/ @ApiModelProperty(value = "The image's unique ID.") public String getId() { return id; } public void setId(String id) { this.id = id; } public V1ItemImage url(String url) { this.url = url; return this; } /** * The image's publicly accessible URL. * @return url **/ @ApiModelProperty(value = "The image's publicly accessible URL.") public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1ItemImage v1ItemImage = (V1ItemImage) o; return Objects.equals(this.id, v1ItemImage.id) && Objects.equals(this.url, v1ItemImage.url); } @Override public int hashCode() { return Objects.hash(id, url); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1ItemImage {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,749
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/OrderEntry.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * A lightweight description of an [Order](#type-order) that is returned when &#x60;returned_entries&#x60; is true on a [SearchOrderRequest](#type-searchorderrequest) */ @ApiModel(description = "A lightweight description of an [Order](#type-order) that is returned when `returned_entries` is true on a [SearchOrderRequest](#type-searchorderrequest)") public class OrderEntry { @JsonProperty("order_id") private String orderId = null; @JsonProperty("version") private Integer version = null; @JsonProperty("location_id") private String locationId = null; public OrderEntry orderId(String orderId) { this.orderId = orderId; return this; } /** * The id of the Order * @return orderId **/ @ApiModelProperty(value = "The id of the Order") public String getOrderId() { return orderId; } public void setOrderId(String orderId) { this.orderId = orderId; } public OrderEntry version(Integer version) { this.version = version; return this; } /** * Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders#update-orders). * Note: This model is in beta. * @return version **/ @ApiModelProperty(value = "Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders#update-orders).") public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } public OrderEntry locationId(String locationId) { this.locationId = locationId; return this; } /** * The location id the Order belongs to. * @return locationId **/ @ApiModelProperty(value = "The location id the Order belongs to.") public String getLocationId() { return locationId; } public void setLocationId(String locationId) { this.locationId = locationId; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrderEntry orderEntry = (OrderEntry) o; return Objects.equals(this.orderId, orderEntry.orderId) && Objects.equals(this.version, orderEntry.version) && Objects.equals(this.locationId, orderEntry.locationId); } @Override public int hashCode() { return Objects.hash(orderId, version, locationId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderEntry {\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" locationId: ").append(toIndentedString(locationId)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,750
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/BatchDeleteCatalogObjectsRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class BatchDeleteCatalogObjectsRequest { @JsonProperty("object_ids") private List<String> objectIds = new ArrayList<String>(); public BatchDeleteCatalogObjectsRequest objectIds(List<String> objectIds) { this.objectIds = objectIds; return this; } public BatchDeleteCatalogObjectsRequest addObjectIdsItem(String objectIdsItem) { this.objectIds.add(objectIdsItem); return this; } /** * The IDs of the CatalogObjects to be deleted. When an object is deleted, other objects in the graph that depend on that object will be deleted as well (for example, deleting a CatalogItem will delete its CatalogItemVariation. * @return objectIds **/ @ApiModelProperty(value = "The IDs of the CatalogObjects to be deleted. When an object is deleted, other objects in the graph that depend on that object will be deleted as well (for example, deleting a CatalogItem will delete its CatalogItemVariation.") public List<String> getObjectIds() { return objectIds; } public void setObjectIds(List<String> objectIds) { this.objectIds = objectIds; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BatchDeleteCatalogObjectsRequest batchDeleteCatalogObjectsRequest = (BatchDeleteCatalogObjectsRequest) o; return Objects.equals(this.objectIds, batchDeleteCatalogObjectsRequest.objectIds); } @Override public int hashCode() { return Objects.hash(objectIds); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BatchDeleteCatalogObjectsRequest {\n"); sb.append(" objectIds: ").append(toIndentedString(objectIds)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,751
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/SearchOrdersStateFilter.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * Filter by current Order &#x60;state&#x60;. */ @ApiModel(description = "Filter by current Order `state`.") public class SearchOrdersStateFilter { @JsonProperty("states") private List<String> states = new ArrayList<String>(); public SearchOrdersStateFilter states(List<String> states) { this.states = states; return this; } public SearchOrdersStateFilter addStatesItem(String statesItem) { this.states.add(statesItem); return this; } /** * States to filter for. See [OrderState](#type-orderstate) for possible values * @return states **/ @ApiModelProperty(required = true, value = "States to filter for. See [OrderState](#type-orderstate) for possible values") public List<String> getStates() { return states; } public void setStates(List<String> states) { this.states = states; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SearchOrdersStateFilter searchOrdersStateFilter = (SearchOrdersStateFilter) o; return Objects.equals(this.states, searchOrdersStateFilter.states); } @Override public int hashCode() { return Objects.hash(states); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SearchOrdersStateFilter {\n"); sb.append(" states: ").append(toIndentedString(states)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,752
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CatalogObject.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.CatalogCategory; import com.squareup.connect.models.CatalogDiscount; import com.squareup.connect.models.CatalogImage; import com.squareup.connect.models.CatalogItem; import com.squareup.connect.models.CatalogItemOption; import com.squareup.connect.models.CatalogItemOptionValue; import com.squareup.connect.models.CatalogItemVariation; import com.squareup.connect.models.CatalogMeasurementUnit; import com.squareup.connect.models.CatalogModifier; import com.squareup.connect.models.CatalogModifierList; import com.squareup.connect.models.CatalogPricingRule; import com.squareup.connect.models.CatalogProductSet; import com.squareup.connect.models.CatalogTax; import com.squareup.connect.models.CatalogTimePeriod; import com.squareup.connect.models.CatalogV1Id; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * The wrapper object for object types in the Catalog data model. The type of a particular &#x60;CatalogObject&#x60; is determined by the value of &#x60;type&#x60; and only the corresponding data field may be set. - if type &#x3D; &#x60;ITEM&#x60;, only &#x60;item_data&#x60; will be populated and it will contain a valid &#x60;CatalogItem&#x60; object. - if type &#x3D; &#x60;ITEM_VARIATION&#x60;, only &#x60;item_variation_data&#x60; will be populated and it will contain a valid &#x60;CatalogItemVariation&#x60; object. - if type &#x3D; &#x60;MODIFIER&#x60;, only &#x60;modifier_data&#x60; will be populated and it will contain a valid &#x60;CatalogModifier&#x60; object. - if type &#x3D; &#x60;MODIFIER_LIST&#x60;, only &#x60;modifier_list_data&#x60; will be populated and it will contain a valid &#x60;CatalogModifierList&#x60; object. - if type &#x3D; &#x60;CATEGORY&#x60;, only &#x60;category_data&#x60; will be populated and it will contain a valid &#x60;CatalogCategory&#x60; object. - if type &#x3D; &#x60;DISCOUNT&#x60;, only &#x60;discount_data&#x60; will be populated and it will contain a valid &#x60;CatalogDiscount&#x60; object. - if type &#x3D; &#x60;TAX&#x60;, only &#x60;tax_data&#x60; will be populated and it will contain a valid &#x60;CatalogTax&#x60; object. - if type &#x3D; &#x60;IMAGE&#x60;, only &#x60;image_data&#x60; will be populated and it will contain a valid &#x60;CatalogImage&#x60; object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide. */ @ApiModel(description = "The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid `CatalogItem` object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid `CatalogItemVariation` object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid `CatalogModifier` object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid `CatalogModifierList` object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid `CatalogCategory` object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid `CatalogDiscount` object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid `CatalogTax` object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid `CatalogImage` object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide.") public class CatalogObject { @JsonProperty("type") private String type = null; @JsonProperty("id") private String id = null; @JsonProperty("updated_at") private String updatedAt = null; @JsonProperty("version") private Long version = null; @JsonProperty("is_deleted") private Boolean isDeleted = null; @JsonProperty("catalog_v1_ids") private List<CatalogV1Id> catalogV1Ids = new ArrayList<CatalogV1Id>(); @JsonProperty("present_at_all_locations") private Boolean presentAtAllLocations = null; @JsonProperty("present_at_location_ids") private List<String> presentAtLocationIds = new ArrayList<String>(); @JsonProperty("absent_at_location_ids") private List<String> absentAtLocationIds = new ArrayList<String>(); @JsonProperty("image_id") private String imageId = null; @JsonProperty("item_data") private CatalogItem itemData = null; @JsonProperty("category_data") private CatalogCategory categoryData = null; @JsonProperty("item_variation_data") private CatalogItemVariation itemVariationData = null; @JsonProperty("tax_data") private CatalogTax taxData = null; @JsonProperty("discount_data") private CatalogDiscount discountData = null; @JsonProperty("modifier_list_data") private CatalogModifierList modifierListData = null; @JsonProperty("modifier_data") private CatalogModifier modifierData = null; @JsonProperty("time_period_data") private CatalogTimePeriod timePeriodData = null; @JsonProperty("product_set_data") private CatalogProductSet productSetData = null; @JsonProperty("pricing_rule_data") private CatalogPricingRule pricingRuleData = null; @JsonProperty("image_data") private CatalogImage imageData = null; @JsonProperty("measurement_unit_data") private CatalogMeasurementUnit measurementUnitData = null; @JsonProperty("item_option_data") private CatalogItemOption itemOptionData = null; @JsonProperty("item_option_value_data") private CatalogItemOptionValue itemOptionValueData = null; public CatalogObject type(String type) { this.type = type; return this; } /** * The type of this object. Each object type has expected properties expressed in a structured format within its corresponding `*_data` field below. See [CatalogObjectType](#type-catalogobjecttype) for possible values * @return type **/ @ApiModelProperty(required = true, value = "The type of this object. Each object type has expected properties expressed in a structured format within its corresponding `*_data` field below. See [CatalogObjectType](#type-catalogobjecttype) for possible values") public String getType() { return type; } public void setType(String type) { this.type = type; } public CatalogObject id(String id) { this.id = id; return this; } /** * An identifier to reference this object in the catalog. When a new `CatalogObject` is inserted, the client should set the id to a temporary identifier starting with a \"`#`\" character. Other objects being inserted or updated within the same request may use this identifier to refer to the new object. When the server receives the new object, it will supply a unique identifier that replaces the temporary identifier for all future references. * @return id **/ @ApiModelProperty(required = true, value = "An identifier to reference this object in the catalog. When a new `CatalogObject` is inserted, the client should set the id to a temporary identifier starting with a \"`#`\" character. Other objects being inserted or updated within the same request may use this identifier to refer to the new object. When the server receives the new object, it will supply a unique identifier that replaces the temporary identifier for all future references.") public String getId() { return id; } public void setId(String id) { this.id = id; } public CatalogObject updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; } /** * Last modification [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) in RFC 3339 format, e.g., `\"2016-08-15T23:59:33.123Z\"` would indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds. * @return updatedAt **/ @ApiModelProperty(value = "Last modification [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) in RFC 3339 format, e.g., `\"2016-08-15T23:59:33.123Z\"` would indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds.") public String getUpdatedAt() { return updatedAt; } public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } public CatalogObject version(Long version) { this.version = version; return this; } /** * The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting. * @return version **/ @ApiModelProperty(value = "The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting.") public Long getVersion() { return version; } public void setVersion(Long version) { this.version = version; } public CatalogObject isDeleted(Boolean isDeleted) { this.isDeleted = isDeleted; return this; } /** * If `true`, the object has been deleted from the database. Must be `false` for new objects being inserted. When deleted, the `updated_at` field will equal the deletion time. * @return isDeleted **/ @ApiModelProperty(value = "If `true`, the object has been deleted from the database. Must be `false` for new objects being inserted. When deleted, the `updated_at` field will equal the deletion time.") public Boolean getIsDeleted() { return isDeleted; } public void setIsDeleted(Boolean isDeleted) { this.isDeleted = isDeleted; } public CatalogObject catalogV1Ids(List<CatalogV1Id> catalogV1Ids) { this.catalogV1Ids = catalogV1Ids; return this; } public CatalogObject addCatalogV1IdsItem(CatalogV1Id catalogV1IdsItem) { this.catalogV1Ids.add(catalogV1IdsItem); return this; } /** * The Connect v1 IDs for this object at each location where it is present, where they differ from the object's Connect V2 ID. The field will only be present for objects that have been created or modified by legacy APIs. * @return catalogV1Ids **/ @ApiModelProperty(value = "The Connect v1 IDs for this object at each location where it is present, where they differ from the object's Connect V2 ID. The field will only be present for objects that have been created or modified by legacy APIs.") public List<CatalogV1Id> getCatalogV1Ids() { return catalogV1Ids; } public void setCatalogV1Ids(List<CatalogV1Id> catalogV1Ids) { this.catalogV1Ids = catalogV1Ids; } public CatalogObject presentAtAllLocations(Boolean presentAtAllLocations) { this.presentAtAllLocations = presentAtAllLocations; return this; } /** * If `true`, this object is present at all locations (including future locations), except where specified in the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations), except where specified in the `present_at_location_ids` field. If not specified, defaults to `true`. * @return presentAtAllLocations **/ @ApiModelProperty(value = "If `true`, this object is present at all locations (including future locations), except where specified in the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations), except where specified in the `present_at_location_ids` field. If not specified, defaults to `true`.") public Boolean getPresentAtAllLocations() { return presentAtAllLocations; } public void setPresentAtAllLocations(Boolean presentAtAllLocations) { this.presentAtAllLocations = presentAtAllLocations; } public CatalogObject presentAtLocationIds(List<String> presentAtLocationIds) { this.presentAtLocationIds = presentAtLocationIds; return this; } public CatalogObject addPresentAtLocationIdsItem(String presentAtLocationIdsItem) { this.presentAtLocationIds.add(presentAtLocationIdsItem); return this; } /** * A list of locations where the object is present, even if `present_at_all_locations` is `false`. * @return presentAtLocationIds **/ @ApiModelProperty(value = "A list of locations where the object is present, even if `present_at_all_locations` is `false`.") public List<String> getPresentAtLocationIds() { return presentAtLocationIds; } public void setPresentAtLocationIds(List<String> presentAtLocationIds) { this.presentAtLocationIds = presentAtLocationIds; } public CatalogObject absentAtLocationIds(List<String> absentAtLocationIds) { this.absentAtLocationIds = absentAtLocationIds; return this; } public CatalogObject addAbsentAtLocationIdsItem(String absentAtLocationIdsItem) { this.absentAtLocationIds.add(absentAtLocationIdsItem); return this; } /** * A list of locations where the object is not present, even if `present_at_all_locations` is `true`. * @return absentAtLocationIds **/ @ApiModelProperty(value = "A list of locations where the object is not present, even if `present_at_all_locations` is `true`.") public List<String> getAbsentAtLocationIds() { return absentAtLocationIds; } public void setAbsentAtLocationIds(List<String> absentAtLocationIds) { this.absentAtLocationIds = absentAtLocationIds; } public CatalogObject imageId(String imageId) { this.imageId = imageId; return this; } /** * Identifies the `CatalogImage` attached to this `CatalogObject`. * @return imageId **/ @ApiModelProperty(value = "Identifies the `CatalogImage` attached to this `CatalogObject`.") public String getImageId() { return imageId; } public void setImageId(String imageId) { this.imageId = imageId; } public CatalogObject itemData(CatalogItem itemData) { this.itemData = itemData; return this; } /** * Structured data for a `CatalogItem`, set for CatalogObjects of type `ITEM`. * @return itemData **/ @ApiModelProperty(value = "Structured data for a `CatalogItem`, set for CatalogObjects of type `ITEM`.") public CatalogItem getItemData() { return itemData; } public void setItemData(CatalogItem itemData) { this.itemData = itemData; } public CatalogObject categoryData(CatalogCategory categoryData) { this.categoryData = categoryData; return this; } /** * Structured data for a `CatalogCategory`, set for CatalogObjects of type `CATEGORY`. * @return categoryData **/ @ApiModelProperty(value = "Structured data for a `CatalogCategory`, set for CatalogObjects of type `CATEGORY`.") public CatalogCategory getCategoryData() { return categoryData; } public void setCategoryData(CatalogCategory categoryData) { this.categoryData = categoryData; } public CatalogObject itemVariationData(CatalogItemVariation itemVariationData) { this.itemVariationData = itemVariationData; return this; } /** * Structured data for a `CatalogItemVariation`, set for CatalogObjects of type `ITEM_VARIATION`. * @return itemVariationData **/ @ApiModelProperty(value = "Structured data for a `CatalogItemVariation`, set for CatalogObjects of type `ITEM_VARIATION`.") public CatalogItemVariation getItemVariationData() { return itemVariationData; } public void setItemVariationData(CatalogItemVariation itemVariationData) { this.itemVariationData = itemVariationData; } public CatalogObject taxData(CatalogTax taxData) { this.taxData = taxData; return this; } /** * Structured data for a `CatalogTax`, set for CatalogObjects of type `TAX`. * @return taxData **/ @ApiModelProperty(value = "Structured data for a `CatalogTax`, set for CatalogObjects of type `TAX`.") public CatalogTax getTaxData() { return taxData; } public void setTaxData(CatalogTax taxData) { this.taxData = taxData; } public CatalogObject discountData(CatalogDiscount discountData) { this.discountData = discountData; return this; } /** * Structured data for a `CatalogDiscount`, set for CatalogObjects of type `DISCOUNT`. * @return discountData **/ @ApiModelProperty(value = "Structured data for a `CatalogDiscount`, set for CatalogObjects of type `DISCOUNT`.") public CatalogDiscount getDiscountData() { return discountData; } public void setDiscountData(CatalogDiscount discountData) { this.discountData = discountData; } public CatalogObject modifierListData(CatalogModifierList modifierListData) { this.modifierListData = modifierListData; return this; } /** * Structured data for a `CatalogModifierList`, set for CatalogObjects of type `MODIFIER_LIST`. * @return modifierListData **/ @ApiModelProperty(value = "Structured data for a `CatalogModifierList`, set for CatalogObjects of type `MODIFIER_LIST`.") public CatalogModifierList getModifierListData() { return modifierListData; } public void setModifierListData(CatalogModifierList modifierListData) { this.modifierListData = modifierListData; } public CatalogObject modifierData(CatalogModifier modifierData) { this.modifierData = modifierData; return this; } /** * Structured data for a `CatalogModifier`, set for CatalogObjects of type `MODIFIER`. * @return modifierData **/ @ApiModelProperty(value = "Structured data for a `CatalogModifier`, set for CatalogObjects of type `MODIFIER`.") public CatalogModifier getModifierData() { return modifierData; } public void setModifierData(CatalogModifier modifierData) { this.modifierData = modifierData; } public CatalogObject timePeriodData(CatalogTimePeriod timePeriodData) { this.timePeriodData = timePeriodData; return this; } /** * Structured data for a `CatalogTimePeriod`, set for CatalogObjects of type `TIME_PERIOD`. * @return timePeriodData **/ @ApiModelProperty(value = "Structured data for a `CatalogTimePeriod`, set for CatalogObjects of type `TIME_PERIOD`.") public CatalogTimePeriod getTimePeriodData() { return timePeriodData; } public void setTimePeriodData(CatalogTimePeriod timePeriodData) { this.timePeriodData = timePeriodData; } public CatalogObject productSetData(CatalogProductSet productSetData) { this.productSetData = productSetData; return this; } /** * Structured data for a `CatalogProductSet`, set for CatalogObjects of type `PRODUCT_SET`. * @return productSetData **/ @ApiModelProperty(value = "Structured data for a `CatalogProductSet`, set for CatalogObjects of type `PRODUCT_SET`.") public CatalogProductSet getProductSetData() { return productSetData; } public void setProductSetData(CatalogProductSet productSetData) { this.productSetData = productSetData; } public CatalogObject pricingRuleData(CatalogPricingRule pricingRuleData) { this.pricingRuleData = pricingRuleData; return this; } /** * Structured data for a `CatalogPricingRule`, set for CatalogObjects of type `PRICING_RULE`. * @return pricingRuleData **/ @ApiModelProperty(value = "Structured data for a `CatalogPricingRule`, set for CatalogObjects of type `PRICING_RULE`.") public CatalogPricingRule getPricingRuleData() { return pricingRuleData; } public void setPricingRuleData(CatalogPricingRule pricingRuleData) { this.pricingRuleData = pricingRuleData; } public CatalogObject imageData(CatalogImage imageData) { this.imageData = imageData; return this; } /** * Structured data for a `CatalogImage`, set for CatalogObjects of type `IMAGE`. * @return imageData **/ @ApiModelProperty(value = "Structured data for a `CatalogImage`, set for CatalogObjects of type `IMAGE`.") public CatalogImage getImageData() { return imageData; } public void setImageData(CatalogImage imageData) { this.imageData = imageData; } public CatalogObject measurementUnitData(CatalogMeasurementUnit measurementUnitData) { this.measurementUnitData = measurementUnitData; return this; } /** * Structured data for a `CatalogMeasurementUnit`, set for CatalogObjects of type `MEASUREMENT_UNIT`. * @return measurementUnitData **/ @ApiModelProperty(value = "Structured data for a `CatalogMeasurementUnit`, set for CatalogObjects of type `MEASUREMENT_UNIT`.") public CatalogMeasurementUnit getMeasurementUnitData() { return measurementUnitData; } public void setMeasurementUnitData(CatalogMeasurementUnit measurementUnitData) { this.measurementUnitData = measurementUnitData; } public CatalogObject itemOptionData(CatalogItemOption itemOptionData) { this.itemOptionData = itemOptionData; return this; } /** * Structured data for a `CatalogItemOption`, set for CatalogObjects of type `ITEM_OPTION`. * @return itemOptionData **/ @ApiModelProperty(value = "Structured data for a `CatalogItemOption`, set for CatalogObjects of type `ITEM_OPTION`.") public CatalogItemOption getItemOptionData() { return itemOptionData; } public void setItemOptionData(CatalogItemOption itemOptionData) { this.itemOptionData = itemOptionData; } public CatalogObject itemOptionValueData(CatalogItemOptionValue itemOptionValueData) { this.itemOptionValueData = itemOptionValueData; return this; } /** * Structured data for a `CatalogItemOptionValue`, set for CatalogObjects of type `ITEM_OPTION_VAL`. * @return itemOptionValueData **/ @ApiModelProperty(value = "Structured data for a `CatalogItemOptionValue`, set for CatalogObjects of type `ITEM_OPTION_VAL`.") public CatalogItemOptionValue getItemOptionValueData() { return itemOptionValueData; } public void setItemOptionValueData(CatalogItemOptionValue itemOptionValueData) { this.itemOptionValueData = itemOptionValueData; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CatalogObject catalogObject = (CatalogObject) o; return Objects.equals(this.type, catalogObject.type) && Objects.equals(this.id, catalogObject.id) && Objects.equals(this.updatedAt, catalogObject.updatedAt) && Objects.equals(this.version, catalogObject.version) && Objects.equals(this.isDeleted, catalogObject.isDeleted) && Objects.equals(this.catalogV1Ids, catalogObject.catalogV1Ids) && Objects.equals(this.presentAtAllLocations, catalogObject.presentAtAllLocations) && Objects.equals(this.presentAtLocationIds, catalogObject.presentAtLocationIds) && Objects.equals(this.absentAtLocationIds, catalogObject.absentAtLocationIds) && Objects.equals(this.imageId, catalogObject.imageId) && Objects.equals(this.itemData, catalogObject.itemData) && Objects.equals(this.categoryData, catalogObject.categoryData) && Objects.equals(this.itemVariationData, catalogObject.itemVariationData) && Objects.equals(this.taxData, catalogObject.taxData) && Objects.equals(this.discountData, catalogObject.discountData) && Objects.equals(this.modifierListData, catalogObject.modifierListData) && Objects.equals(this.modifierData, catalogObject.modifierData) && Objects.equals(this.timePeriodData, catalogObject.timePeriodData) && Objects.equals(this.productSetData, catalogObject.productSetData) && Objects.equals(this.pricingRuleData, catalogObject.pricingRuleData) && Objects.equals(this.imageData, catalogObject.imageData) && Objects.equals(this.measurementUnitData, catalogObject.measurementUnitData) && Objects.equals(this.itemOptionData, catalogObject.itemOptionData) && Objects.equals(this.itemOptionValueData, catalogObject.itemOptionValueData); } @Override public int hashCode() { return Objects.hash(type, id, updatedAt, version, isDeleted, catalogV1Ids, presentAtAllLocations, presentAtLocationIds, absentAtLocationIds, imageId, itemData, categoryData, itemVariationData, taxData, discountData, modifierListData, modifierData, timePeriodData, productSetData, pricingRuleData, imageData, measurementUnitData, itemOptionData, itemOptionValueData); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatalogObject {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); sb.append(" catalogV1Ids: ").append(toIndentedString(catalogV1Ids)).append("\n"); sb.append(" presentAtAllLocations: ").append(toIndentedString(presentAtAllLocations)).append("\n"); sb.append(" presentAtLocationIds: ").append(toIndentedString(presentAtLocationIds)).append("\n"); sb.append(" absentAtLocationIds: ").append(toIndentedString(absentAtLocationIds)).append("\n"); sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); sb.append(" itemData: ").append(toIndentedString(itemData)).append("\n"); sb.append(" categoryData: ").append(toIndentedString(categoryData)).append("\n"); sb.append(" itemVariationData: ").append(toIndentedString(itemVariationData)).append("\n"); sb.append(" taxData: ").append(toIndentedString(taxData)).append("\n"); sb.append(" discountData: ").append(toIndentedString(discountData)).append("\n"); sb.append(" modifierListData: ").append(toIndentedString(modifierListData)).append("\n"); sb.append(" modifierData: ").append(toIndentedString(modifierData)).append("\n"); sb.append(" timePeriodData: ").append(toIndentedString(timePeriodData)).append("\n"); sb.append(" productSetData: ").append(toIndentedString(productSetData)).append("\n"); sb.append(" pricingRuleData: ").append(toIndentedString(pricingRuleData)).append("\n"); sb.append(" imageData: ").append(toIndentedString(imageData)).append("\n"); sb.append(" measurementUnitData: ").append(toIndentedString(measurementUnitData)).append("\n"); sb.append(" itemOptionData: ").append(toIndentedString(itemOptionData)).append("\n"); sb.append(" itemOptionValueData: ").append(toIndentedString(itemOptionValueData)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,753
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CatalogQueryFilteredItems.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.CatalogQueryFilteredItemsCustomAttributeFilter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class CatalogQueryFilteredItems { @JsonProperty("text_filter") private String textFilter = null; @JsonProperty("search_vendor_code") private Boolean searchVendorCode = null; @JsonProperty("category_ids") private List<String> categoryIds = new ArrayList<String>(); @JsonProperty("stock_levels") private List<String> stockLevels = new ArrayList<String>(); @JsonProperty("enabled_location_ids") private List<String> enabledLocationIds = new ArrayList<String>(); @JsonProperty("vendor_ids") private List<String> vendorIds = new ArrayList<String>(); @JsonProperty("product_types") private List<String> productTypes = new ArrayList<String>(); @JsonProperty("custom_attribute_filters") private List<CatalogQueryFilteredItemsCustomAttributeFilter> customAttributeFilters = new ArrayList<CatalogQueryFilteredItemsCustomAttributeFilter>(); @JsonProperty("does_not_exist") private List<String> doesNotExist = new ArrayList<String>(); @JsonProperty("sort_order") private String sortOrder = null; public CatalogQueryFilteredItems textFilter(String textFilter) { this.textFilter = textFilter; return this; } /** * * @return textFilter **/ @ApiModelProperty(value = "") public String getTextFilter() { return textFilter; } public void setTextFilter(String textFilter) { this.textFilter = textFilter; } public CatalogQueryFilteredItems searchVendorCode(Boolean searchVendorCode) { this.searchVendorCode = searchVendorCode; return this; } /** * * @return searchVendorCode **/ @ApiModelProperty(value = "") public Boolean getSearchVendorCode() { return searchVendorCode; } public void setSearchVendorCode(Boolean searchVendorCode) { this.searchVendorCode = searchVendorCode; } public CatalogQueryFilteredItems categoryIds(List<String> categoryIds) { this.categoryIds = categoryIds; return this; } public CatalogQueryFilteredItems addCategoryIdsItem(String categoryIdsItem) { this.categoryIds.add(categoryIdsItem); return this; } /** * * @return categoryIds **/ @ApiModelProperty(value = "") public List<String> getCategoryIds() { return categoryIds; } public void setCategoryIds(List<String> categoryIds) { this.categoryIds = categoryIds; } public CatalogQueryFilteredItems stockLevels(List<String> stockLevels) { this.stockLevels = stockLevels; return this; } public CatalogQueryFilteredItems addStockLevelsItem(String stockLevelsItem) { this.stockLevels.add(stockLevelsItem); return this; } /** * See [CatalogQueryFilteredItemsStockLevel](#type-catalogqueryfiltereditemsstocklevel) for possible values * @return stockLevels **/ @ApiModelProperty(value = " See [CatalogQueryFilteredItemsStockLevel](#type-catalogqueryfiltereditemsstocklevel) for possible values") public List<String> getStockLevels() { return stockLevels; } public void setStockLevels(List<String> stockLevels) { this.stockLevels = stockLevels; } public CatalogQueryFilteredItems enabledLocationIds(List<String> enabledLocationIds) { this.enabledLocationIds = enabledLocationIds; return this; } public CatalogQueryFilteredItems addEnabledLocationIdsItem(String enabledLocationIdsItem) { this.enabledLocationIds.add(enabledLocationIdsItem); return this; } /** * * @return enabledLocationIds **/ @ApiModelProperty(value = "") public List<String> getEnabledLocationIds() { return enabledLocationIds; } public void setEnabledLocationIds(List<String> enabledLocationIds) { this.enabledLocationIds = enabledLocationIds; } public CatalogQueryFilteredItems vendorIds(List<String> vendorIds) { this.vendorIds = vendorIds; return this; } public CatalogQueryFilteredItems addVendorIdsItem(String vendorIdsItem) { this.vendorIds.add(vendorIdsItem); return this; } /** * * @return vendorIds **/ @ApiModelProperty(value = "") public List<String> getVendorIds() { return vendorIds; } public void setVendorIds(List<String> vendorIds) { this.vendorIds = vendorIds; } public CatalogQueryFilteredItems productTypes(List<String> productTypes) { this.productTypes = productTypes; return this; } public CatalogQueryFilteredItems addProductTypesItem(String productTypesItem) { this.productTypes.add(productTypesItem); return this; } /** * See [CatalogItemProductType](#type-catalogitemproducttype) for possible values * @return productTypes **/ @ApiModelProperty(value = " See [CatalogItemProductType](#type-catalogitemproducttype) for possible values") public List<String> getProductTypes() { return productTypes; } public void setProductTypes(List<String> productTypes) { this.productTypes = productTypes; } public CatalogQueryFilteredItems customAttributeFilters(List<CatalogQueryFilteredItemsCustomAttributeFilter> customAttributeFilters) { this.customAttributeFilters = customAttributeFilters; return this; } public CatalogQueryFilteredItems addCustomAttributeFiltersItem(CatalogQueryFilteredItemsCustomAttributeFilter customAttributeFiltersItem) { this.customAttributeFilters.add(customAttributeFiltersItem); return this; } /** * * @return customAttributeFilters **/ @ApiModelProperty(value = "") public List<CatalogQueryFilteredItemsCustomAttributeFilter> getCustomAttributeFilters() { return customAttributeFilters; } public void setCustomAttributeFilters(List<CatalogQueryFilteredItemsCustomAttributeFilter> customAttributeFilters) { this.customAttributeFilters = customAttributeFilters; } public CatalogQueryFilteredItems doesNotExist(List<String> doesNotExist) { this.doesNotExist = doesNotExist; return this; } public CatalogQueryFilteredItems addDoesNotExistItem(String doesNotExistItem) { this.doesNotExist.add(doesNotExistItem); return this; } /** * See [CatalogQueryFilteredItemsNullableAttribute](#type-catalogqueryfiltereditemsnullableattribute) for possible values * @return doesNotExist **/ @ApiModelProperty(value = " See [CatalogQueryFilteredItemsNullableAttribute](#type-catalogqueryfiltereditemsnullableattribute) for possible values") public List<String> getDoesNotExist() { return doesNotExist; } public void setDoesNotExist(List<String> doesNotExist) { this.doesNotExist = doesNotExist; } public CatalogQueryFilteredItems sortOrder(String sortOrder) { this.sortOrder = sortOrder; return this; } /** * See [SortOrder](#type-sortorder) for possible values * @return sortOrder **/ @ApiModelProperty(value = " See [SortOrder](#type-sortorder) for possible values") public String getSortOrder() { return sortOrder; } public void setSortOrder(String sortOrder) { this.sortOrder = sortOrder; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CatalogQueryFilteredItems catalogQueryFilteredItems = (CatalogQueryFilteredItems) o; return Objects.equals(this.textFilter, catalogQueryFilteredItems.textFilter) && Objects.equals(this.searchVendorCode, catalogQueryFilteredItems.searchVendorCode) && Objects.equals(this.categoryIds, catalogQueryFilteredItems.categoryIds) && Objects.equals(this.stockLevels, catalogQueryFilteredItems.stockLevels) && Objects.equals(this.enabledLocationIds, catalogQueryFilteredItems.enabledLocationIds) && Objects.equals(this.vendorIds, catalogQueryFilteredItems.vendorIds) && Objects.equals(this.productTypes, catalogQueryFilteredItems.productTypes) && Objects.equals(this.customAttributeFilters, catalogQueryFilteredItems.customAttributeFilters) && Objects.equals(this.doesNotExist, catalogQueryFilteredItems.doesNotExist) && Objects.equals(this.sortOrder, catalogQueryFilteredItems.sortOrder); } @Override public int hashCode() { return Objects.hash(textFilter, searchVendorCode, categoryIds, stockLevels, enabledLocationIds, vendorIds, productTypes, customAttributeFilters, doesNotExist, sortOrder); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatalogQueryFilteredItems {\n"); sb.append(" textFilter: ").append(toIndentedString(textFilter)).append("\n"); sb.append(" searchVendorCode: ").append(toIndentedString(searchVendorCode)).append("\n"); sb.append(" categoryIds: ").append(toIndentedString(categoryIds)).append("\n"); sb.append(" stockLevels: ").append(toIndentedString(stockLevels)).append("\n"); sb.append(" enabledLocationIds: ").append(toIndentedString(enabledLocationIds)).append("\n"); sb.append(" vendorIds: ").append(toIndentedString(vendorIds)).append("\n"); sb.append(" productTypes: ").append(toIndentedString(productTypes)).append("\n"); sb.append(" customAttributeFilters: ").append(toIndentedString(customAttributeFilters)).append("\n"); sb.append(" doesNotExist: ").append(toIndentedString(doesNotExist)).append("\n"); sb.append(" sortOrder: ").append(toIndentedString(sortOrder)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,754
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/BalancePaymentDetails.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Reflects the current status of a balance payment. */ @ApiModel(description = "Reflects the current status of a balance payment.") public class BalancePaymentDetails { @JsonProperty("account_id") private String accountId = null; @JsonProperty("status") private String status = null; public BalancePaymentDetails accountId(String accountId) { this.accountId = accountId; return this; } /** * ID for the account used to fund the payment. * @return accountId **/ @ApiModelProperty(value = "ID for the account used to fund the payment.") public String getAccountId() { return accountId; } public void setAccountId(String accountId) { this.accountId = accountId; } public BalancePaymentDetails status(String status) { this.status = status; return this; } /** * The balance payment’s current state. Can be `COMPLETED` or `FAILED`. * @return status **/ @ApiModelProperty(value = "The balance payment’s current state. Can be `COMPLETED` or `FAILED`.") public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BalancePaymentDetails balancePaymentDetails = (BalancePaymentDetails) o; return Objects.equals(this.accountId, balancePaymentDetails.accountId) && Objects.equals(this.status, balancePaymentDetails.status); } @Override public int hashCode() { return Objects.hash(accountId, status); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BalancePaymentDetails {\n"); sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,755
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/OrderLineItem.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Money; import com.squareup.connect.models.OrderLineItemAppliedDiscount; import com.squareup.connect.models.OrderLineItemAppliedTax; import com.squareup.connect.models.OrderLineItemDiscount; import com.squareup.connect.models.OrderLineItemModifier; import com.squareup.connect.models.OrderLineItemTax; import com.squareup.connect.models.OrderQuantityUnit; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Represents a line item in an order. Each line item describes a different product to purchase, with its own quantity and price details. */ @ApiModel(description = "Represents a line item in an order. Each line item describes a different product to purchase, with its own quantity and price details.") public class OrderLineItem { @JsonProperty("uid") private String uid = null; @JsonProperty("name") private String name = null; @JsonProperty("quantity") private String quantity = null; @JsonProperty("quantity_unit") private OrderQuantityUnit quantityUnit = null; @JsonProperty("note") private String note = null; @JsonProperty("catalog_object_id") private String catalogObjectId = null; @JsonProperty("variation_name") private String variationName = null; @JsonProperty("metadata") private Map<String, String> metadata = new HashMap<String, String>(); @JsonProperty("modifiers") private List<OrderLineItemModifier> modifiers = new ArrayList<OrderLineItemModifier>(); @JsonProperty("taxes") private List<OrderLineItemTax> taxes = new ArrayList<OrderLineItemTax>(); @JsonProperty("discounts") private List<OrderLineItemDiscount> discounts = new ArrayList<OrderLineItemDiscount>(); @JsonProperty("applied_taxes") private List<OrderLineItemAppliedTax> appliedTaxes = new ArrayList<OrderLineItemAppliedTax>(); @JsonProperty("applied_discounts") private List<OrderLineItemAppliedDiscount> appliedDiscounts = new ArrayList<OrderLineItemAppliedDiscount>(); @JsonProperty("base_price_money") private Money basePriceMoney = null; @JsonProperty("variation_total_price_money") private Money variationTotalPriceMoney = null; @JsonProperty("gross_sales_money") private Money grossSalesMoney = null; @JsonProperty("total_tax_money") private Money totalTaxMoney = null; @JsonProperty("total_discount_money") private Money totalDiscountMoney = null; @JsonProperty("total_money") private Money totalMoney = null; public OrderLineItem uid(String uid) { this.uid = uid; return this; } /** * Unique ID that identifies the line item only within this order. * Note: This model is in beta. * @return uid **/ @ApiModelProperty(value = "Unique ID that identifies the line item only within this order.") public String getUid() { return uid; } public void setUid(String uid) { this.uid = uid; } public OrderLineItem name(String name) { this.name = name; return this; } /** * The name of the line item. * @return name **/ @ApiModelProperty(value = "The name of the line item.") public String getName() { return name; } public void setName(String name) { this.name = name; } public OrderLineItem quantity(String quantity) { this.quantity = quantity; return this; } /** * The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. * @return quantity **/ @ApiModelProperty(required = true, value = "The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.") public String getQuantity() { return quantity; } public void setQuantity(String quantity) { this.quantity = quantity; } public OrderLineItem quantityUnit(OrderQuantityUnit quantityUnit) { this.quantityUnit = quantityUnit; return this; } /** * The unit and precision that this line item's quantity is measured in. * @return quantityUnit **/ @ApiModelProperty(value = "The unit and precision that this line item's quantity is measured in.") public OrderQuantityUnit getQuantityUnit() { return quantityUnit; } public void setQuantityUnit(OrderQuantityUnit quantityUnit) { this.quantityUnit = quantityUnit; } public OrderLineItem note(String note) { this.note = note; return this; } /** * The note of the line item. * @return note **/ @ApiModelProperty(value = "The note of the line item.") public String getNote() { return note; } public void setNote(String note) { this.note = note; } public OrderLineItem catalogObjectId(String catalogObjectId) { this.catalogObjectId = catalogObjectId; return this; } /** * The `CatalogItemVariation` id applied to this line item. * @return catalogObjectId **/ @ApiModelProperty(value = "The `CatalogItemVariation` id applied to this line item.") public String getCatalogObjectId() { return catalogObjectId; } public void setCatalogObjectId(String catalogObjectId) { this.catalogObjectId = catalogObjectId; } public OrderLineItem variationName(String variationName) { this.variationName = variationName; return this; } /** * The name of the variation applied to this line item. * @return variationName **/ @ApiModelProperty(value = "The name of the variation applied to this line item.") public String getVariationName() { return variationName; } public void setVariationName(String variationName) { this.variationName = variationName; } public OrderLineItem metadata(Map<String, String> metadata) { this.metadata = metadata; return this; } public OrderLineItem putMetadataItem(String key, String metadataItem) { this.metadata.put(key, metadataItem); return this; } /** * Application-defined data attached to this line item. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. * Note: This model is in beta. * @return metadata **/ @ApiModelProperty(value = "Application-defined data attached to this line item. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information.") public Map<String, String> getMetadata() { return metadata; } public void setMetadata(Map<String, String> metadata) { this.metadata = metadata; } public OrderLineItem modifiers(List<OrderLineItemModifier> modifiers) { this.modifiers = modifiers; return this; } public OrderLineItem addModifiersItem(OrderLineItemModifier modifiersItem) { this.modifiers.add(modifiersItem); return this; } /** * The `CatalogModifier`s applied to this line item. * @return modifiers **/ @ApiModelProperty(value = "The `CatalogModifier`s applied to this line item.") public List<OrderLineItemModifier> getModifiers() { return modifiers; } public void setModifiers(List<OrderLineItemModifier> modifiers) { this.modifiers = modifiers; } public OrderLineItem taxes(List<OrderLineItemTax> taxes) { this.taxes = taxes; return this; } public OrderLineItem addTaxesItem(OrderLineItemTax taxesItem) { this.taxes.add(taxesItem); return this; } /** * A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. * @return taxes **/ @ApiModelProperty(value = "A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error.") @Deprecated public List<OrderLineItemTax> getTaxes() { return taxes; } public void setTaxes(List<OrderLineItemTax> taxes) { this.taxes = taxes; } public OrderLineItem discounts(List<OrderLineItemDiscount> discounts) { this.discounts = discounts; return this; } public OrderLineItem addDiscountsItem(OrderLineItemDiscount discountsItem) { this.discounts.add(discountsItem); return this; } /** * A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. This field has been deprecated in favour of `applied_discounts`. Usage of both this field and `applied_discounts` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. * @return discounts **/ @ApiModelProperty(value = "A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. This field has been deprecated in favour of `applied_discounts`. Usage of both this field and `applied_discounts` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error.") @Deprecated public List<OrderLineItemDiscount> getDiscounts() { return discounts; } public void setDiscounts(List<OrderLineItemDiscount> discounts) { this.discounts = discounts; } public OrderLineItem appliedTaxes(List<OrderLineItemAppliedTax> appliedTaxes) { this.appliedTaxes = appliedTaxes; return this; } public OrderLineItem addAppliedTaxesItem(OrderLineItemAppliedTax appliedTaxesItem) { this.appliedTaxes.add(appliedTaxesItem); return this; } /** * The list of references to taxes applied to this line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every line item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any line items. To change the amount of a tax, modify the referenced top-level tax. * Note: This model is in beta. * @return appliedTaxes **/ @ApiModelProperty(value = "The list of references to taxes applied to this line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every line item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any line items. To change the amount of a tax, modify the referenced top-level tax.") public List<OrderLineItemAppliedTax> getAppliedTaxes() { return appliedTaxes; } public void setAppliedTaxes(List<OrderLineItemAppliedTax> appliedTaxes) { this.appliedTaxes = appliedTaxes; } public OrderLineItem appliedDiscounts(List<OrderLineItemAppliedDiscount> appliedDiscounts) { this.appliedDiscounts = appliedDiscounts; return this; } public OrderLineItem addAppliedDiscountsItem(OrderLineItemAppliedDiscount appliedDiscountsItem) { this.appliedDiscounts.add(appliedDiscountsItem); return this; } /** * The list of references to discounts applied to this line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderLineItemDiscounts` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedDiscount` will be automatically created on every line item for all `ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any line items. To change the amount of a discount, modify the referenced top-level discount. * Note: This model is in beta. * @return appliedDiscounts **/ @ApiModelProperty(value = "The list of references to discounts applied to this line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderLineItemDiscounts` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedDiscount` will be automatically created on every line item for all `ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any line items. To change the amount of a discount, modify the referenced top-level discount.") public List<OrderLineItemAppliedDiscount> getAppliedDiscounts() { return appliedDiscounts; } public void setAppliedDiscounts(List<OrderLineItemAppliedDiscount> appliedDiscounts) { this.appliedDiscounts = appliedDiscounts; } public OrderLineItem basePriceMoney(Money basePriceMoney) { this.basePriceMoney = basePriceMoney; return this; } /** * The base price for a single unit of the line item. * @return basePriceMoney **/ @ApiModelProperty(value = "The base price for a single unit of the line item.") public Money getBasePriceMoney() { return basePriceMoney; } public void setBasePriceMoney(Money basePriceMoney) { this.basePriceMoney = basePriceMoney; } public OrderLineItem variationTotalPriceMoney(Money variationTotalPriceMoney) { this.variationTotalPriceMoney = variationTotalPriceMoney; return this; } /** * The total price of all item variations sold in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers. * @return variationTotalPriceMoney **/ @ApiModelProperty(value = "The total price of all item variations sold in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers.") public Money getVariationTotalPriceMoney() { return variationTotalPriceMoney; } public void setVariationTotalPriceMoney(Money variationTotalPriceMoney) { this.variationTotalPriceMoney = variationTotalPriceMoney; } public OrderLineItem grossSalesMoney(Money grossSalesMoney) { this.grossSalesMoney = grossSalesMoney; return this; } /** * The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. * @return grossSalesMoney **/ @ApiModelProperty(value = "The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price.") public Money getGrossSalesMoney() { return grossSalesMoney; } public void setGrossSalesMoney(Money grossSalesMoney) { this.grossSalesMoney = grossSalesMoney; } public OrderLineItem totalTaxMoney(Money totalTaxMoney) { this.totalTaxMoney = totalTaxMoney; return this; } /** * The total tax amount of money to collect for the line item. * @return totalTaxMoney **/ @ApiModelProperty(value = "The total tax amount of money to collect for the line item.") public Money getTotalTaxMoney() { return totalTaxMoney; } public void setTotalTaxMoney(Money totalTaxMoney) { this.totalTaxMoney = totalTaxMoney; } public OrderLineItem totalDiscountMoney(Money totalDiscountMoney) { this.totalDiscountMoney = totalDiscountMoney; return this; } /** * The total discount amount of money to collect for the line item. * @return totalDiscountMoney **/ @ApiModelProperty(value = "The total discount amount of money to collect for the line item.") public Money getTotalDiscountMoney() { return totalDiscountMoney; } public void setTotalDiscountMoney(Money totalDiscountMoney) { this.totalDiscountMoney = totalDiscountMoney; } public OrderLineItem totalMoney(Money totalMoney) { this.totalMoney = totalMoney; return this; } /** * The total amount of money to collect for this line item. * @return totalMoney **/ @ApiModelProperty(value = "The total amount of money to collect for this line item.") public Money getTotalMoney() { return totalMoney; } public void setTotalMoney(Money totalMoney) { this.totalMoney = totalMoney; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrderLineItem orderLineItem = (OrderLineItem) o; return Objects.equals(this.uid, orderLineItem.uid) && Objects.equals(this.name, orderLineItem.name) && Objects.equals(this.quantity, orderLineItem.quantity) && Objects.equals(this.quantityUnit, orderLineItem.quantityUnit) && Objects.equals(this.note, orderLineItem.note) && Objects.equals(this.catalogObjectId, orderLineItem.catalogObjectId) && Objects.equals(this.variationName, orderLineItem.variationName) && Objects.equals(this.metadata, orderLineItem.metadata) && Objects.equals(this.modifiers, orderLineItem.modifiers) && Objects.equals(this.taxes, orderLineItem.taxes) && Objects.equals(this.discounts, orderLineItem.discounts) && Objects.equals(this.appliedTaxes, orderLineItem.appliedTaxes) && Objects.equals(this.appliedDiscounts, orderLineItem.appliedDiscounts) && Objects.equals(this.basePriceMoney, orderLineItem.basePriceMoney) && Objects.equals(this.variationTotalPriceMoney, orderLineItem.variationTotalPriceMoney) && Objects.equals(this.grossSalesMoney, orderLineItem.grossSalesMoney) && Objects.equals(this.totalTaxMoney, orderLineItem.totalTaxMoney) && Objects.equals(this.totalDiscountMoney, orderLineItem.totalDiscountMoney) && Objects.equals(this.totalMoney, orderLineItem.totalMoney); } @Override public int hashCode() { return Objects.hash(uid, name, quantity, quantityUnit, note, catalogObjectId, variationName, metadata, modifiers, taxes, discounts, appliedTaxes, appliedDiscounts, basePriceMoney, variationTotalPriceMoney, grossSalesMoney, totalTaxMoney, totalDiscountMoney, totalMoney); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderLineItem {\n"); sb.append(" uid: ").append(toIndentedString(uid)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" quantityUnit: ").append(toIndentedString(quantityUnit)).append("\n"); sb.append(" note: ").append(toIndentedString(note)).append("\n"); sb.append(" catalogObjectId: ").append(toIndentedString(catalogObjectId)).append("\n"); sb.append(" variationName: ").append(toIndentedString(variationName)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" modifiers: ").append(toIndentedString(modifiers)).append("\n"); sb.append(" taxes: ").append(toIndentedString(taxes)).append("\n"); sb.append(" discounts: ").append(toIndentedString(discounts)).append("\n"); sb.append(" appliedTaxes: ").append(toIndentedString(appliedTaxes)).append("\n"); sb.append(" appliedDiscounts: ").append(toIndentedString(appliedDiscounts)).append("\n"); sb.append(" basePriceMoney: ").append(toIndentedString(basePriceMoney)).append("\n"); sb.append(" variationTotalPriceMoney: ").append(toIndentedString(variationTotalPriceMoney)).append("\n"); sb.append(" grossSalesMoney: ").append(toIndentedString(grossSalesMoney)).append("\n"); sb.append(" totalTaxMoney: ").append(toIndentedString(totalTaxMoney)).append("\n"); sb.append(" totalDiscountMoney: ").append(toIndentedString(totalDiscountMoney)).append("\n"); sb.append(" totalMoney: ").append(toIndentedString(totalMoney)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,756
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/BatchRetrieveOrdersRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * Defines the fields that are included in requests to the BatchRetrieveOrders endpoint. */ @ApiModel(description = "Defines the fields that are included in requests to the BatchRetrieveOrders endpoint.") public class BatchRetrieveOrdersRequest { @JsonProperty("order_ids") private List<String> orderIds = new ArrayList<String>(); public BatchRetrieveOrdersRequest orderIds(List<String> orderIds) { this.orderIds = orderIds; return this; } public BatchRetrieveOrdersRequest addOrderIdsItem(String orderIdsItem) { this.orderIds.add(orderIdsItem); return this; } /** * The IDs of the orders to retrieve. A maximum of 100 orders can be retrieved per request. * @return orderIds **/ @ApiModelProperty(required = true, value = "The IDs of the orders to retrieve. A maximum of 100 orders can be retrieved per request.") public List<String> getOrderIds() { return orderIds; } public void setOrderIds(List<String> orderIds) { this.orderIds = orderIds; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BatchRetrieveOrdersRequest batchRetrieveOrdersRequest = (BatchRetrieveOrdersRequest) o; return Objects.equals(this.orderIds, batchRetrieveOrdersRequest.orderIds); } @Override public int hashCode() { return Objects.hash(orderIds); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BatchRetrieveOrdersRequest {\n"); sb.append(" orderIds: ").append(toIndentedString(orderIds)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,757
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1Settlement.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.V1Money; import com.squareup.connect.models.V1SettlementEntry; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * V1Settlement */ @ApiModel(description = "V1Settlement") public class V1Settlement { @JsonProperty("id") private String id = null; @JsonProperty("status") private String status = null; @JsonProperty("total_money") private V1Money totalMoney = null; @JsonProperty("initiated_at") private String initiatedAt = null; @JsonProperty("bank_account_id") private String bankAccountId = null; @JsonProperty("entries") private List<V1SettlementEntry> entries = new ArrayList<V1SettlementEntry>(); public V1Settlement id(String id) { this.id = id; return this; } /** * The settlement's unique identifier. * @return id **/ @ApiModelProperty(value = "The settlement's unique identifier.") public String getId() { return id; } public void setId(String id) { this.id = id; } public V1Settlement status(String status) { this.status = status; return this; } /** * The settlement's current status. See [V1SettlementStatus](#type-v1settlementstatus) for possible values * @return status **/ @ApiModelProperty(value = "The settlement's current status. See [V1SettlementStatus](#type-v1settlementstatus) for possible values") public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public V1Settlement totalMoney(V1Money totalMoney) { this.totalMoney = totalMoney; return this; } /** * The amount of money involved in the settlement. A positive amount indicates a deposit, and a negative amount indicates a withdrawal. This amount is never zero. * @return totalMoney **/ @ApiModelProperty(value = "The amount of money involved in the settlement. A positive amount indicates a deposit, and a negative amount indicates a withdrawal. This amount is never zero.") public V1Money getTotalMoney() { return totalMoney; } public void setTotalMoney(V1Money totalMoney) { this.totalMoney = totalMoney; } public V1Settlement initiatedAt(String initiatedAt) { this.initiatedAt = initiatedAt; return this; } /** * The time when the settlement was submitted for deposit or withdrawal, in ISO 8601 format. * @return initiatedAt **/ @ApiModelProperty(value = "The time when the settlement was submitted for deposit or withdrawal, in ISO 8601 format.") public String getInitiatedAt() { return initiatedAt; } public void setInitiatedAt(String initiatedAt) { this.initiatedAt = initiatedAt; } public V1Settlement bankAccountId(String bankAccountId) { this.bankAccountId = bankAccountId; return this; } /** * The Square-issued unique identifier for the bank account associated with the settlement. * @return bankAccountId **/ @ApiModelProperty(value = "The Square-issued unique identifier for the bank account associated with the settlement.") public String getBankAccountId() { return bankAccountId; } public void setBankAccountId(String bankAccountId) { this.bankAccountId = bankAccountId; } public V1Settlement entries(List<V1SettlementEntry> entries) { this.entries = entries; return this; } public V1Settlement addEntriesItem(V1SettlementEntry entriesItem) { this.entries.add(entriesItem); return this; } /** * The entries included in this settlement. * @return entries **/ @ApiModelProperty(value = "The entries included in this settlement.") public List<V1SettlementEntry> getEntries() { return entries; } public void setEntries(List<V1SettlementEntry> entries) { this.entries = entries; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1Settlement v1Settlement = (V1Settlement) o; return Objects.equals(this.id, v1Settlement.id) && Objects.equals(this.status, v1Settlement.status) && Objects.equals(this.totalMoney, v1Settlement.totalMoney) && Objects.equals(this.initiatedAt, v1Settlement.initiatedAt) && Objects.equals(this.bankAccountId, v1Settlement.bankAccountId) && Objects.equals(this.entries, v1Settlement.entries); } @Override public int hashCode() { return Objects.hash(id, status, totalMoney, initiatedAt, bankAccountId, entries); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1Settlement {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" totalMoney: ").append(toIndentedString(totalMoney)).append("\n"); sb.append(" initiatedAt: ").append(toIndentedString(initiatedAt)).append("\n"); sb.append(" bankAccountId: ").append(toIndentedString(bankAccountId)).append("\n"); sb.append(" entries: ").append(toIndentedString(entries)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,758
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/Order.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Money; import com.squareup.connect.models.OrderFulfillment; import com.squareup.connect.models.OrderLineItem; import com.squareup.connect.models.OrderLineItemDiscount; import com.squareup.connect.models.OrderLineItemTax; import com.squareup.connect.models.OrderMoneyAmounts; import com.squareup.connect.models.OrderReturn; import com.squareup.connect.models.OrderRoundingAdjustment; import com.squareup.connect.models.OrderServiceCharge; import com.squareup.connect.models.OrderSource; import com.squareup.connect.models.Refund; import com.squareup.connect.models.Tender; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Contains all information related to a single order to process with Square, including line items that specify the products to purchase. Order objects also include information on any associated tenders, refunds, and returns. All Connect V2 Transactions have all been converted to Orders including all associated itemization data. */ @ApiModel(description = "Contains all information related to a single order to process with Square, including line items that specify the products to purchase. Order objects also include information on any associated tenders, refunds, and returns. All Connect V2 Transactions have all been converted to Orders including all associated itemization data.") public class Order { @JsonProperty("id") private String id = null; @JsonProperty("location_id") private String locationId = null; @JsonProperty("reference_id") private String referenceId = null; @JsonProperty("source") private OrderSource source = null; @JsonProperty("customer_id") private String customerId = null; @JsonProperty("line_items") private List<OrderLineItem> lineItems = new ArrayList<OrderLineItem>(); @JsonProperty("taxes") private List<OrderLineItemTax> taxes = new ArrayList<OrderLineItemTax>(); @JsonProperty("discounts") private List<OrderLineItemDiscount> discounts = new ArrayList<OrderLineItemDiscount>(); @JsonProperty("service_charges") private List<OrderServiceCharge> serviceCharges = new ArrayList<OrderServiceCharge>(); @JsonProperty("fulfillments") private List<OrderFulfillment> fulfillments = new ArrayList<OrderFulfillment>(); @JsonProperty("returns") private List<OrderReturn> returns = new ArrayList<OrderReturn>(); @JsonProperty("return_amounts") private OrderMoneyAmounts returnAmounts = null; @JsonProperty("net_amounts") private OrderMoneyAmounts netAmounts = null; @JsonProperty("rounding_adjustment") private OrderRoundingAdjustment roundingAdjustment = null; @JsonProperty("tenders") private List<Tender> tenders = new ArrayList<Tender>(); @JsonProperty("refunds") private List<Refund> refunds = new ArrayList<Refund>(); @JsonProperty("metadata") private Map<String, String> metadata = new HashMap<String, String>(); @JsonProperty("created_at") private String createdAt = null; @JsonProperty("updated_at") private String updatedAt = null; @JsonProperty("closed_at") private String closedAt = null; @JsonProperty("state") private String state = null; @JsonProperty("version") private Integer version = null; @JsonProperty("total_money") private Money totalMoney = null; @JsonProperty("total_tax_money") private Money totalTaxMoney = null; @JsonProperty("total_discount_money") private Money totalDiscountMoney = null; @JsonProperty("total_service_charge_money") private Money totalServiceChargeMoney = null; public Order id(String id) { this.id = id; return this; } /** * The order's unique ID. * @return id **/ @ApiModelProperty(value = "The order's unique ID.") public String getId() { return id; } public void setId(String id) { this.id = id; } public Order locationId(String locationId) { this.locationId = locationId; return this; } /** * The ID of the merchant location this order is associated with. * @return locationId **/ @ApiModelProperty(required = true, value = "The ID of the merchant location this order is associated with.") public String getLocationId() { return locationId; } public void setLocationId(String locationId) { this.locationId = locationId; } public Order referenceId(String referenceId) { this.referenceId = referenceId; return this; } /** * A client specified identifier to associate an entity in another system with this order. * @return referenceId **/ @ApiModelProperty(value = "A client specified identifier to associate an entity in another system with this order.") public String getReferenceId() { return referenceId; } public void setReferenceId(String referenceId) { this.referenceId = referenceId; } public Order source(OrderSource source) { this.source = source; return this; } /** * The origination details of the order. * @return source **/ @ApiModelProperty(value = "The origination details of the order.") public OrderSource getSource() { return source; } public void setSource(OrderSource source) { this.source = source; } public Order customerId(String customerId) { this.customerId = customerId; return this; } /** * The `Customer` ID of the customer associated with the order. * Note: This model is in beta. * @return customerId **/ @ApiModelProperty(value = "The `Customer` ID of the customer associated with the order.") public String getCustomerId() { return customerId; } public void setCustomerId(String customerId) { this.customerId = customerId; } public Order lineItems(List<OrderLineItem> lineItems) { this.lineItems = lineItems; return this; } public Order addLineItemsItem(OrderLineItem lineItemsItem) { this.lineItems.add(lineItemsItem); return this; } /** * The line items included in the order. * @return lineItems **/ @ApiModelProperty(value = "The line items included in the order.") public List<OrderLineItem> getLineItems() { return lineItems; } public void setLineItems(List<OrderLineItem> lineItems) { this.lineItems = lineItems; } public Order taxes(List<OrderLineItemTax> taxes) { this.taxes = taxes; return this; } public Order addTaxesItem(OrderLineItemTax taxesItem) { this.taxes.add(taxesItem); return this; } /** * The list of all taxes associated with the order. Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with `LINE_ITEM` scope, an `OrderLineItemAppliedTax` must be added to each line item that the tax applies to. For taxes with `ORDER` scope, the server will generate an `OrderLineItemAppliedTax` for every line item. On reads, each tax in the list will include the total amount of that tax applied to the order. __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, usage of the deprecated `line_items.taxes` field will result in an error. Please use `line_items.applied_taxes` instead. * @return taxes **/ @ApiModelProperty(value = "The list of all taxes associated with the order. Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with `LINE_ITEM` scope, an `OrderLineItemAppliedTax` must be added to each line item that the tax applies to. For taxes with `ORDER` scope, the server will generate an `OrderLineItemAppliedTax` for every line item. On reads, each tax in the list will include the total amount of that tax applied to the order. __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, usage of the deprecated `line_items.taxes` field will result in an error. Please use `line_items.applied_taxes` instead.") public List<OrderLineItemTax> getTaxes() { return taxes; } public void setTaxes(List<OrderLineItemTax> taxes) { this.taxes = taxes; } public Order discounts(List<OrderLineItemDiscount> discounts) { this.discounts = discounts; return this; } public Order addDiscountsItem(OrderLineItemDiscount discountsItem) { this.discounts.add(discountsItem); return this; } /** * The list of all discounts associated with the order. Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For discounts scoped to `LINE_ITEM`, an `OrderLineItemAppliedDiscount` must be added to each line item that the discount applies to. For discounts with `ORDER` scope, the server will generate an `OrderLineItemAppliedDiscount` for every line item. __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, usage of the deprecated `line_items.discounts` field will result in an error. Please use `line_items.applied_discounts` instead. * @return discounts **/ @ApiModelProperty(value = "The list of all discounts associated with the order. Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For discounts scoped to `LINE_ITEM`, an `OrderLineItemAppliedDiscount` must be added to each line item that the discount applies to. For discounts with `ORDER` scope, the server will generate an `OrderLineItemAppliedDiscount` for every line item. __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, usage of the deprecated `line_items.discounts` field will result in an error. Please use `line_items.applied_discounts` instead.") public List<OrderLineItemDiscount> getDiscounts() { return discounts; } public void setDiscounts(List<OrderLineItemDiscount> discounts) { this.discounts = discounts; } public Order serviceCharges(List<OrderServiceCharge> serviceCharges) { this.serviceCharges = serviceCharges; return this; } public Order addServiceChargesItem(OrderServiceCharge serviceChargesItem) { this.serviceCharges.add(serviceChargesItem); return this; } /** * A list of service charges applied to the order. * @return serviceCharges **/ @ApiModelProperty(value = "A list of service charges applied to the order.") public List<OrderServiceCharge> getServiceCharges() { return serviceCharges; } public void setServiceCharges(List<OrderServiceCharge> serviceCharges) { this.serviceCharges = serviceCharges; } public Order fulfillments(List<OrderFulfillment> fulfillments) { this.fulfillments = fulfillments; return this; } public Order addFulfillmentsItem(OrderFulfillment fulfillmentsItem) { this.fulfillments.add(fulfillmentsItem); return this; } /** * Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments. * @return fulfillments **/ @ApiModelProperty(value = "Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments.") public List<OrderFulfillment> getFulfillments() { return fulfillments; } public void setFulfillments(List<OrderFulfillment> fulfillments) { this.fulfillments = fulfillments; } public Order returns(List<OrderReturn> returns) { this.returns = returns; return this; } public Order addReturnsItem(OrderReturn returnsItem) { this.returns.add(returnsItem); return this; } /** * Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. * Note: This model is in beta. * @return returns **/ @ApiModelProperty(value = "Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced.") public List<OrderReturn> getReturns() { return returns; } public void setReturns(List<OrderReturn> returns) { this.returns = returns; } public Order returnAmounts(OrderMoneyAmounts returnAmounts) { this.returnAmounts = returnAmounts; return this; } /** * Rollup of returned money amounts. * @return returnAmounts **/ @ApiModelProperty(value = "Rollup of returned money amounts.") public OrderMoneyAmounts getReturnAmounts() { return returnAmounts; } public void setReturnAmounts(OrderMoneyAmounts returnAmounts) { this.returnAmounts = returnAmounts; } public Order netAmounts(OrderMoneyAmounts netAmounts) { this.netAmounts = netAmounts; return this; } /** * Net money amounts (sale money - return money). * @return netAmounts **/ @ApiModelProperty(value = "Net money amounts (sale money - return money).") public OrderMoneyAmounts getNetAmounts() { return netAmounts; } public void setNetAmounts(OrderMoneyAmounts netAmounts) { this.netAmounts = netAmounts; } public Order roundingAdjustment(OrderRoundingAdjustment roundingAdjustment) { this.roundingAdjustment = roundingAdjustment; return this; } /** * A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. * @return roundingAdjustment **/ @ApiModelProperty(value = "A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency.") public OrderRoundingAdjustment getRoundingAdjustment() { return roundingAdjustment; } public void setRoundingAdjustment(OrderRoundingAdjustment roundingAdjustment) { this.roundingAdjustment = roundingAdjustment; } public Order tenders(List<Tender> tenders) { this.tenders = tenders; return this; } public Order addTendersItem(Tender tendersItem) { this.tenders.add(tendersItem); return this; } /** * The Tenders which were used to pay for the Order. * Note: This model is in beta. * @return tenders **/ @ApiModelProperty(value = "The Tenders which were used to pay for the Order.") public List<Tender> getTenders() { return tenders; } public void setTenders(List<Tender> tenders) { this.tenders = tenders; } public Order refunds(List<Refund> refunds) { this.refunds = refunds; return this; } public Order addRefundsItem(Refund refundsItem) { this.refunds.add(refundsItem); return this; } /** * The Refunds that are part of this Order. * Note: This model is in beta. * @return refunds **/ @ApiModelProperty(value = "The Refunds that are part of this Order.") public List<Refund> getRefunds() { return refunds; } public void setRefunds(List<Refund> refunds) { this.refunds = refunds; } public Order metadata(Map<String, String> metadata) { this.metadata = metadata; return this; } public Order putMetadataItem(String key, String metadataItem) { this.metadata.put(key, metadataItem); return this; } /** * Application-defined data attached to this order. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information. * Note: This model is in beta. * @return metadata **/ @ApiModelProperty(value = "Application-defined data attached to this order. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information.") public Map<String, String> getMetadata() { return metadata; } public void setMetadata(Map<String, String> metadata) { this.metadata = metadata; } public Order createdAt(String createdAt) { this.createdAt = createdAt; return this; } /** * Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". * @return createdAt **/ @ApiModelProperty(value = "Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\".") public String getCreatedAt() { return createdAt; } public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } public Order updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; } /** * Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". * @return updatedAt **/ @ApiModelProperty(value = "Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\".") public String getUpdatedAt() { return updatedAt; } public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } public Order closedAt(String closedAt) { this.closedAt = closedAt; return this; } /** * Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". * @return closedAt **/ @ApiModelProperty(value = "Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\".") public String getClosedAt() { return closedAt; } public void setClosedAt(String closedAt) { this.closedAt = closedAt; } public Order state(String state) { this.state = state; return this; } /** * The current state of the order. `OPEN`,`COMPLETED`,`CANCELED` See [OrderState](#type-orderstate) for possible values * @return state **/ @ApiModelProperty(value = "The current state of the order. `OPEN`,`COMPLETED`,`CANCELED` See [OrderState](#type-orderstate) for possible values") public String getState() { return state; } public void setState(String state) { this.state = state; } public Order version(Integer version) { this.version = version; return this; } /** * Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders#update-orders). * Note: This model is in beta. * @return version **/ @ApiModelProperty(value = "Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders#update-orders).") public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } public Order totalMoney(Money totalMoney) { this.totalMoney = totalMoney; return this; } /** * The total amount of money to collect for the order. * @return totalMoney **/ @ApiModelProperty(value = "The total amount of money to collect for the order.") public Money getTotalMoney() { return totalMoney; } public void setTotalMoney(Money totalMoney) { this.totalMoney = totalMoney; } public Order totalTaxMoney(Money totalTaxMoney) { this.totalTaxMoney = totalTaxMoney; return this; } /** * The total tax amount of money to collect for the order. * @return totalTaxMoney **/ @ApiModelProperty(value = "The total tax amount of money to collect for the order.") public Money getTotalTaxMoney() { return totalTaxMoney; } public void setTotalTaxMoney(Money totalTaxMoney) { this.totalTaxMoney = totalTaxMoney; } public Order totalDiscountMoney(Money totalDiscountMoney) { this.totalDiscountMoney = totalDiscountMoney; return this; } /** * The total discount amount of money to collect for the order. * @return totalDiscountMoney **/ @ApiModelProperty(value = "The total discount amount of money to collect for the order.") public Money getTotalDiscountMoney() { return totalDiscountMoney; } public void setTotalDiscountMoney(Money totalDiscountMoney) { this.totalDiscountMoney = totalDiscountMoney; } public Order totalServiceChargeMoney(Money totalServiceChargeMoney) { this.totalServiceChargeMoney = totalServiceChargeMoney; return this; } /** * The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts. * @return totalServiceChargeMoney **/ @ApiModelProperty(value = "The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts.") public Money getTotalServiceChargeMoney() { return totalServiceChargeMoney; } public void setTotalServiceChargeMoney(Money totalServiceChargeMoney) { this.totalServiceChargeMoney = totalServiceChargeMoney; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Order order = (Order) o; return Objects.equals(this.id, order.id) && Objects.equals(this.locationId, order.locationId) && Objects.equals(this.referenceId, order.referenceId) && Objects.equals(this.source, order.source) && Objects.equals(this.customerId, order.customerId) && Objects.equals(this.lineItems, order.lineItems) && Objects.equals(this.taxes, order.taxes) && Objects.equals(this.discounts, order.discounts) && Objects.equals(this.serviceCharges, order.serviceCharges) && Objects.equals(this.fulfillments, order.fulfillments) && Objects.equals(this.returns, order.returns) && Objects.equals(this.returnAmounts, order.returnAmounts) && Objects.equals(this.netAmounts, order.netAmounts) && Objects.equals(this.roundingAdjustment, order.roundingAdjustment) && Objects.equals(this.tenders, order.tenders) && Objects.equals(this.refunds, order.refunds) && Objects.equals(this.metadata, order.metadata) && Objects.equals(this.createdAt, order.createdAt) && Objects.equals(this.updatedAt, order.updatedAt) && Objects.equals(this.closedAt, order.closedAt) && Objects.equals(this.state, order.state) && Objects.equals(this.version, order.version) && Objects.equals(this.totalMoney, order.totalMoney) && Objects.equals(this.totalTaxMoney, order.totalTaxMoney) && Objects.equals(this.totalDiscountMoney, order.totalDiscountMoney) && Objects.equals(this.totalServiceChargeMoney, order.totalServiceChargeMoney); } @Override public int hashCode() { return Objects.hash(id, locationId, referenceId, source, customerId, lineItems, taxes, discounts, serviceCharges, fulfillments, returns, returnAmounts, netAmounts, roundingAdjustment, tenders, refunds, metadata, createdAt, updatedAt, closedAt, state, version, totalMoney, totalTaxMoney, totalDiscountMoney, totalServiceChargeMoney); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" locationId: ").append(toIndentedString(locationId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" source: ").append(toIndentedString(source)).append("\n"); sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n"); sb.append(" taxes: ").append(toIndentedString(taxes)).append("\n"); sb.append(" discounts: ").append(toIndentedString(discounts)).append("\n"); sb.append(" serviceCharges: ").append(toIndentedString(serviceCharges)).append("\n"); sb.append(" fulfillments: ").append(toIndentedString(fulfillments)).append("\n"); sb.append(" returns: ").append(toIndentedString(returns)).append("\n"); sb.append(" returnAmounts: ").append(toIndentedString(returnAmounts)).append("\n"); sb.append(" netAmounts: ").append(toIndentedString(netAmounts)).append("\n"); sb.append(" roundingAdjustment: ").append(toIndentedString(roundingAdjustment)).append("\n"); sb.append(" tenders: ").append(toIndentedString(tenders)).append("\n"); sb.append(" refunds: ").append(toIndentedString(refunds)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" closedAt: ").append(toIndentedString(closedAt)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" totalMoney: ").append(toIndentedString(totalMoney)).append("\n"); sb.append(" totalTaxMoney: ").append(toIndentedString(totalTaxMoney)).append("\n"); sb.append(" totalDiscountMoney: ").append(toIndentedString(totalDiscountMoney)).append("\n"); sb.append(" totalServiceChargeMoney: ").append(toIndentedString(totalServiceChargeMoney)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,759
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/BatchRetrieveInventoryChangesRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class BatchRetrieveInventoryChangesRequest { @JsonProperty("catalog_object_ids") private List<String> catalogObjectIds = new ArrayList<String>(); @JsonProperty("location_ids") private List<String> locationIds = new ArrayList<String>(); @JsonProperty("types") private List<String> types = new ArrayList<String>(); @JsonProperty("states") private List<String> states = new ArrayList<String>(); @JsonProperty("updated_after") private String updatedAfter = null; @JsonProperty("updated_before") private String updatedBefore = null; @JsonProperty("cursor") private String cursor = null; public BatchRetrieveInventoryChangesRequest catalogObjectIds(List<String> catalogObjectIds) { this.catalogObjectIds = catalogObjectIds; return this; } public BatchRetrieveInventoryChangesRequest addCatalogObjectIdsItem(String catalogObjectIdsItem) { this.catalogObjectIds.add(catalogObjectIdsItem); return this; } /** * Filters results by `CatalogObject` ID. Only applied when set. Default: unset. * @return catalogObjectIds **/ @ApiModelProperty(value = "Filters results by `CatalogObject` ID. Only applied when set. Default: unset.") public List<String> getCatalogObjectIds() { return catalogObjectIds; } public void setCatalogObjectIds(List<String> catalogObjectIds) { this.catalogObjectIds = catalogObjectIds; } public BatchRetrieveInventoryChangesRequest locationIds(List<String> locationIds) { this.locationIds = locationIds; return this; } public BatchRetrieveInventoryChangesRequest addLocationIdsItem(String locationIdsItem) { this.locationIds.add(locationIdsItem); return this; } /** * Filters results by `Location` ID. Only applied when set. Default: unset. * @return locationIds **/ @ApiModelProperty(value = "Filters results by `Location` ID. Only applied when set. Default: unset.") public List<String> getLocationIds() { return locationIds; } public void setLocationIds(List<String> locationIds) { this.locationIds = locationIds; } public BatchRetrieveInventoryChangesRequest types(List<String> types) { this.types = types; return this; } public BatchRetrieveInventoryChangesRequest addTypesItem(String typesItem) { this.types.add(typesItem); return this; } /** * Filters results by `InventoryChangeType`. Default: [`PHYSICAL_COUNT`, `ADJUSTMENT`]. `TRANSFER` is not supported as a filter. See [InventoryChangeType](#type-inventorychangetype) for possible values * @return types **/ @ApiModelProperty(value = "Filters results by `InventoryChangeType`. Default: [`PHYSICAL_COUNT`, `ADJUSTMENT`]. `TRANSFER` is not supported as a filter. See [InventoryChangeType](#type-inventorychangetype) for possible values") public List<String> getTypes() { return types; } public void setTypes(List<String> types) { this.types = types; } public BatchRetrieveInventoryChangesRequest states(List<String> states) { this.states = states; return this; } public BatchRetrieveInventoryChangesRequest addStatesItem(String statesItem) { this.states.add(statesItem); return this; } /** * Filters `ADJUSTMENT` query results by `InventoryState`. Only applied when set. Default: unset. See [InventoryState](#type-inventorystate) for possible values * @return states **/ @ApiModelProperty(value = "Filters `ADJUSTMENT` query results by `InventoryState`. Only applied when set. Default: unset. See [InventoryState](#type-inventorystate) for possible values") public List<String> getStates() { return states; } public void setStates(List<String> states) { this.states = states; } public BatchRetrieveInventoryChangesRequest updatedAfter(String updatedAfter) { this.updatedAfter = updatedAfter; return this; } /** * Provided as an RFC 3339 timestamp. Returns results whose `created_at` or `calculated_at` value is after the given time. Default: UNIX epoch (`1970-01-01T00:00:00Z`). * @return updatedAfter **/ @ApiModelProperty(value = "Provided as an RFC 3339 timestamp. Returns results whose `created_at` or `calculated_at` value is after the given time. Default: UNIX epoch (`1970-01-01T00:00:00Z`).") public String getUpdatedAfter() { return updatedAfter; } public void setUpdatedAfter(String updatedAfter) { this.updatedAfter = updatedAfter; } public BatchRetrieveInventoryChangesRequest updatedBefore(String updatedBefore) { this.updatedBefore = updatedBefore; return this; } /** * Provided as an RFC 3339 timestamp. Returns results whose `created_at` or `calculated_at` value is strictly before the given time. Default: UNIX epoch (`1970-01-01T00:00:00Z`). * @return updatedBefore **/ @ApiModelProperty(value = "Provided as an RFC 3339 timestamp. Returns results whose `created_at` or `calculated_at` value is strictly before the given time. Default: UNIX epoch (`1970-01-01T00:00:00Z`).") public String getUpdatedBefore() { return updatedBefore; } public void setUpdatedBefore(String updatedBefore) { this.updatedBefore = updatedBefore; } public BatchRetrieveInventoryChangesRequest cursor(String cursor) { this.cursor = cursor; return this; } /** * A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. * @return cursor **/ @ApiModelProperty(value = "A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information.") public String getCursor() { return cursor; } public void setCursor(String cursor) { this.cursor = cursor; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BatchRetrieveInventoryChangesRequest batchRetrieveInventoryChangesRequest = (BatchRetrieveInventoryChangesRequest) o; return Objects.equals(this.catalogObjectIds, batchRetrieveInventoryChangesRequest.catalogObjectIds) && Objects.equals(this.locationIds, batchRetrieveInventoryChangesRequest.locationIds) && Objects.equals(this.types, batchRetrieveInventoryChangesRequest.types) && Objects.equals(this.states, batchRetrieveInventoryChangesRequest.states) && Objects.equals(this.updatedAfter, batchRetrieveInventoryChangesRequest.updatedAfter) && Objects.equals(this.updatedBefore, batchRetrieveInventoryChangesRequest.updatedBefore) && Objects.equals(this.cursor, batchRetrieveInventoryChangesRequest.cursor); } @Override public int hashCode() { return Objects.hash(catalogObjectIds, locationIds, types, states, updatedAfter, updatedBefore, cursor); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BatchRetrieveInventoryChangesRequest {\n"); sb.append(" catalogObjectIds: ").append(toIndentedString(catalogObjectIds)).append("\n"); sb.append(" locationIds: ").append(toIndentedString(locationIds)).append("\n"); sb.append(" types: ").append(toIndentedString(types)).append("\n"); sb.append(" states: ").append(toIndentedString(states)).append("\n"); sb.append(" updatedAfter: ").append(toIndentedString(updatedAfter)).append("\n"); sb.append(" updatedBefore: ").append(toIndentedString(updatedBefore)).append("\n"); sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,760
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/ListRefundsRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Defines the query parameters that can be included in a request to the [ListRefunds](#endpoint-listrefunds) endpoint. Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders) */ @ApiModel(description = "Defines the query parameters that can be included in a request to the [ListRefunds](#endpoint-listrefunds) endpoint. Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders)") public class ListRefundsRequest { @JsonProperty("begin_time") private String beginTime = null; @JsonProperty("end_time") private String endTime = null; @JsonProperty("sort_order") private String sortOrder = null; @JsonProperty("cursor") private String cursor = null; public ListRefundsRequest beginTime(String beginTime) { this.beginTime = beginTime; return this; } /** * The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year. * @return beginTime **/ @ApiModelProperty(value = "The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.") public String getBeginTime() { return beginTime; } public void setBeginTime(String beginTime) { this.beginTime = beginTime; } public ListRefundsRequest endTime(String endTime) { this.endTime = endTime; return this; } /** * The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time. * @return endTime **/ @ApiModelProperty(value = "The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.") public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public ListRefundsRequest sortOrder(String sortOrder) { this.sortOrder = sortOrder; return this; } /** * The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` See [SortOrder](#type-sortorder) for possible values * @return sortOrder **/ @ApiModelProperty(value = "The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` See [SortOrder](#type-sortorder) for possible values") public String getSortOrder() { return sortOrder; } public void setSortOrder(String sortOrder) { this.sortOrder = sortOrder; } public ListRefundsRequest cursor(String cursor) { this.cursor = cursor; return this; } /** * A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information. * @return cursor **/ @ApiModelProperty(value = "A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information.") public String getCursor() { return cursor; } public void setCursor(String cursor) { this.cursor = cursor; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ListRefundsRequest listRefundsRequest = (ListRefundsRequest) o; return Objects.equals(this.beginTime, listRefundsRequest.beginTime) && Objects.equals(this.endTime, listRefundsRequest.endTime) && Objects.equals(this.sortOrder, listRefundsRequest.sortOrder) && Objects.equals(this.cursor, listRefundsRequest.cursor); } @Override public int hashCode() { return Objects.hash(beginTime, endTime, sortOrder, cursor); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListRefundsRequest {\n"); sb.append(" beginTime: ").append(toIndentedString(beginTime)).append("\n"); sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); sb.append(" sortOrder: ").append(toIndentedString(sortOrder)).append("\n"); sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,761
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CustomerPreferences.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Represents communication preferences for the customer profile. */ @ApiModel(description = "Represents communication preferences for the customer profile.") public class CustomerPreferences { @JsonProperty("email_unsubscribed") private Boolean emailUnsubscribed = null; public CustomerPreferences emailUnsubscribed(Boolean emailUnsubscribed) { this.emailUnsubscribed = emailUnsubscribed; return this; } /** * The customer has unsubscribed from receiving marketing campaign emails. * @return emailUnsubscribed **/ @ApiModelProperty(value = "The customer has unsubscribed from receiving marketing campaign emails.") public Boolean getEmailUnsubscribed() { return emailUnsubscribed; } public void setEmailUnsubscribed(Boolean emailUnsubscribed) { this.emailUnsubscribed = emailUnsubscribed; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CustomerPreferences customerPreferences = (CustomerPreferences) o; return Objects.equals(this.emailUnsubscribed, customerPreferences.emailUnsubscribed); } @Override public int hashCode() { return Objects.hash(emailUnsubscribed); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CustomerPreferences {\n"); sb.append(" emailUnsubscribed: ").append(toIndentedString(emailUnsubscribed)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,762
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/GetBreakTypeRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import io.swagger.annotations.ApiModel; /** * A request to GET a &#x60;BreakType&#x60; by ID */ @ApiModel(description = "A request to GET a `BreakType` by ID") public class GetBreakTypeRequest { @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return true; } @Override public int hashCode() { return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GetBreakTypeRequest {\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,763
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1Refund.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.V1Money; import com.squareup.connect.models.V1PaymentSurcharge; import com.squareup.connect.models.V1PaymentTax; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * V1Refund */ @ApiModel(description = "V1Refund") public class V1Refund { @JsonProperty("type") private String type = null; @JsonProperty("reason") private String reason = null; @JsonProperty("refunded_money") private V1Money refundedMoney = null; @JsonProperty("refunded_processing_fee_money") private V1Money refundedProcessingFeeMoney = null; @JsonProperty("refunded_tax_money") private V1Money refundedTaxMoney = null; @JsonProperty("refunded_additive_tax_money") private V1Money refundedAdditiveTaxMoney = null; @JsonProperty("refunded_additive_tax") private List<V1PaymentTax> refundedAdditiveTax = new ArrayList<V1PaymentTax>(); @JsonProperty("refunded_inclusive_tax_money") private V1Money refundedInclusiveTaxMoney = null; @JsonProperty("refunded_inclusive_tax") private List<V1PaymentTax> refundedInclusiveTax = new ArrayList<V1PaymentTax>(); @JsonProperty("refunded_tip_money") private V1Money refundedTipMoney = null; @JsonProperty("refunded_discount_money") private V1Money refundedDiscountMoney = null; @JsonProperty("refunded_surcharge_money") private V1Money refundedSurchargeMoney = null; @JsonProperty("refunded_surcharges") private List<V1PaymentSurcharge> refundedSurcharges = new ArrayList<V1PaymentSurcharge>(); @JsonProperty("created_at") private String createdAt = null; @JsonProperty("processed_at") private String processedAt = null; @JsonProperty("payment_id") private String paymentId = null; @JsonProperty("merchant_id") private String merchantId = null; @JsonProperty("is_exchange") private Boolean isExchange = null; public V1Refund type(String type) { this.type = type; return this; } /** * The type of refund See [V1RefundType](#type-v1refundtype) for possible values * @return type **/ @ApiModelProperty(value = "The type of refund See [V1RefundType](#type-v1refundtype) for possible values") public String getType() { return type; } public void setType(String type) { this.type = type; } public V1Refund reason(String reason) { this.reason = reason; return this; } /** * The merchant-specified reason for the refund. * @return reason **/ @ApiModelProperty(value = "The merchant-specified reason for the refund.") public String getReason() { return reason; } public void setReason(String reason) { this.reason = reason; } public V1Refund refundedMoney(V1Money refundedMoney) { this.refundedMoney = refundedMoney; return this; } /** * The amount of money refunded. This amount is always negative. * @return refundedMoney **/ @ApiModelProperty(value = "The amount of money refunded. This amount is always negative.") public V1Money getRefundedMoney() { return refundedMoney; } public void setRefundedMoney(V1Money refundedMoney) { this.refundedMoney = refundedMoney; } public V1Refund refundedProcessingFeeMoney(V1Money refundedProcessingFeeMoney) { this.refundedProcessingFeeMoney = refundedProcessingFeeMoney; return this; } /** * The amount of processing fee money refunded. This amount is always positive. * @return refundedProcessingFeeMoney **/ @ApiModelProperty(value = "The amount of processing fee money refunded. This amount is always positive.") public V1Money getRefundedProcessingFeeMoney() { return refundedProcessingFeeMoney; } public void setRefundedProcessingFeeMoney(V1Money refundedProcessingFeeMoney) { this.refundedProcessingFeeMoney = refundedProcessingFeeMoney; } public V1Refund refundedTaxMoney(V1Money refundedTaxMoney) { this.refundedTaxMoney = refundedTaxMoney; return this; } /** * The total amount of tax money refunded. This amount is always negative. * @return refundedTaxMoney **/ @ApiModelProperty(value = "The total amount of tax money refunded. This amount is always negative.") public V1Money getRefundedTaxMoney() { return refundedTaxMoney; } public void setRefundedTaxMoney(V1Money refundedTaxMoney) { this.refundedTaxMoney = refundedTaxMoney; } public V1Refund refundedAdditiveTaxMoney(V1Money refundedAdditiveTaxMoney) { this.refundedAdditiveTaxMoney = refundedAdditiveTaxMoney; return this; } /** * The amount of additive tax money refunded. This amount is always negative. * @return refundedAdditiveTaxMoney **/ @ApiModelProperty(value = "The amount of additive tax money refunded. This amount is always negative.") public V1Money getRefundedAdditiveTaxMoney() { return refundedAdditiveTaxMoney; } public void setRefundedAdditiveTaxMoney(V1Money refundedAdditiveTaxMoney) { this.refundedAdditiveTaxMoney = refundedAdditiveTaxMoney; } public V1Refund refundedAdditiveTax(List<V1PaymentTax> refundedAdditiveTax) { this.refundedAdditiveTax = refundedAdditiveTax; return this; } public V1Refund addRefundedAdditiveTaxItem(V1PaymentTax refundedAdditiveTaxItem) { this.refundedAdditiveTax.add(refundedAdditiveTaxItem); return this; } /** * All of the additive taxes associated with the refund. * @return refundedAdditiveTax **/ @ApiModelProperty(value = "All of the additive taxes associated with the refund.") public List<V1PaymentTax> getRefundedAdditiveTax() { return refundedAdditiveTax; } public void setRefundedAdditiveTax(List<V1PaymentTax> refundedAdditiveTax) { this.refundedAdditiveTax = refundedAdditiveTax; } public V1Refund refundedInclusiveTaxMoney(V1Money refundedInclusiveTaxMoney) { this.refundedInclusiveTaxMoney = refundedInclusiveTaxMoney; return this; } /** * The amount of inclusive tax money refunded. This amount is always negative. * @return refundedInclusiveTaxMoney **/ @ApiModelProperty(value = "The amount of inclusive tax money refunded. This amount is always negative.") public V1Money getRefundedInclusiveTaxMoney() { return refundedInclusiveTaxMoney; } public void setRefundedInclusiveTaxMoney(V1Money refundedInclusiveTaxMoney) { this.refundedInclusiveTaxMoney = refundedInclusiveTaxMoney; } public V1Refund refundedInclusiveTax(List<V1PaymentTax> refundedInclusiveTax) { this.refundedInclusiveTax = refundedInclusiveTax; return this; } public V1Refund addRefundedInclusiveTaxItem(V1PaymentTax refundedInclusiveTaxItem) { this.refundedInclusiveTax.add(refundedInclusiveTaxItem); return this; } /** * All of the inclusive taxes associated with the refund. * @return refundedInclusiveTax **/ @ApiModelProperty(value = "All of the inclusive taxes associated with the refund.") public List<V1PaymentTax> getRefundedInclusiveTax() { return refundedInclusiveTax; } public void setRefundedInclusiveTax(List<V1PaymentTax> refundedInclusiveTax) { this.refundedInclusiveTax = refundedInclusiveTax; } public V1Refund refundedTipMoney(V1Money refundedTipMoney) { this.refundedTipMoney = refundedTipMoney; return this; } /** * The amount of tip money refunded. This amount is always negative. * @return refundedTipMoney **/ @ApiModelProperty(value = "The amount of tip money refunded. This amount is always negative.") public V1Money getRefundedTipMoney() { return refundedTipMoney; } public void setRefundedTipMoney(V1Money refundedTipMoney) { this.refundedTipMoney = refundedTipMoney; } public V1Refund refundedDiscountMoney(V1Money refundedDiscountMoney) { this.refundedDiscountMoney = refundedDiscountMoney; return this; } /** * The amount of discount money refunded. This amount is always positive. * @return refundedDiscountMoney **/ @ApiModelProperty(value = "The amount of discount money refunded. This amount is always positive.") public V1Money getRefundedDiscountMoney() { return refundedDiscountMoney; } public void setRefundedDiscountMoney(V1Money refundedDiscountMoney) { this.refundedDiscountMoney = refundedDiscountMoney; } public V1Refund refundedSurchargeMoney(V1Money refundedSurchargeMoney) { this.refundedSurchargeMoney = refundedSurchargeMoney; return this; } /** * The amount of surcharge money refunded. This amount is always negative. * @return refundedSurchargeMoney **/ @ApiModelProperty(value = "The amount of surcharge money refunded. This amount is always negative.") public V1Money getRefundedSurchargeMoney() { return refundedSurchargeMoney; } public void setRefundedSurchargeMoney(V1Money refundedSurchargeMoney) { this.refundedSurchargeMoney = refundedSurchargeMoney; } public V1Refund refundedSurcharges(List<V1PaymentSurcharge> refundedSurcharges) { this.refundedSurcharges = refundedSurcharges; return this; } public V1Refund addRefundedSurchargesItem(V1PaymentSurcharge refundedSurchargesItem) { this.refundedSurcharges.add(refundedSurchargesItem); return this; } /** * A list of all surcharges associated with the refund. * @return refundedSurcharges **/ @ApiModelProperty(value = "A list of all surcharges associated with the refund.") public List<V1PaymentSurcharge> getRefundedSurcharges() { return refundedSurcharges; } public void setRefundedSurcharges(List<V1PaymentSurcharge> refundedSurcharges) { this.refundedSurcharges = refundedSurcharges; } public V1Refund createdAt(String createdAt) { this.createdAt = createdAt; return this; } /** * The time when the merchant initiated the refund for Square to process, in ISO 8601 format. * @return createdAt **/ @ApiModelProperty(value = "The time when the merchant initiated the refund for Square to process, in ISO 8601 format.") public String getCreatedAt() { return createdAt; } public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } public V1Refund processedAt(String processedAt) { this.processedAt = processedAt; return this; } /** * The time when Square processed the refund on behalf of the merchant, in ISO 8601 format. * @return processedAt **/ @ApiModelProperty(value = "The time when Square processed the refund on behalf of the merchant, in ISO 8601 format.") public String getProcessedAt() { return processedAt; } public void setProcessedAt(String processedAt) { this.processedAt = processedAt; } public V1Refund paymentId(String paymentId) { this.paymentId = paymentId; return this; } /** * A Square-issued ID associated with the refund. For single-tender refunds, payment_id is the ID of the original payment ID. For split-tender refunds, payment_id is the ID of the original tender. For exchange-based refunds (is_exchange == true), payment_id is the ID of the original payment ID even if the payment includes other tenders. * @return paymentId **/ @ApiModelProperty(value = "A Square-issued ID associated with the refund. For single-tender refunds, payment_id is the ID of the original payment ID. For split-tender refunds, payment_id is the ID of the original tender. For exchange-based refunds (is_exchange == true), payment_id is the ID of the original payment ID even if the payment includes other tenders.") public String getPaymentId() { return paymentId; } public void setPaymentId(String paymentId) { this.paymentId = paymentId; } public V1Refund merchantId(String merchantId) { this.merchantId = merchantId; return this; } /** * * @return merchantId **/ @ApiModelProperty(value = "") public String getMerchantId() { return merchantId; } public void setMerchantId(String merchantId) { this.merchantId = merchantId; } public V1Refund isExchange(Boolean isExchange) { this.isExchange = isExchange; return this; } /** * Indicates whether or not the refund is associated with an exchange. If is_exchange is true, the refund reflects the value of goods returned in the exchange not the total money refunded. * @return isExchange **/ @ApiModelProperty(value = "Indicates whether or not the refund is associated with an exchange. If is_exchange is true, the refund reflects the value of goods returned in the exchange not the total money refunded.") public Boolean getIsExchange() { return isExchange; } public void setIsExchange(Boolean isExchange) { this.isExchange = isExchange; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1Refund v1Refund = (V1Refund) o; return Objects.equals(this.type, v1Refund.type) && Objects.equals(this.reason, v1Refund.reason) && Objects.equals(this.refundedMoney, v1Refund.refundedMoney) && Objects.equals(this.refundedProcessingFeeMoney, v1Refund.refundedProcessingFeeMoney) && Objects.equals(this.refundedTaxMoney, v1Refund.refundedTaxMoney) && Objects.equals(this.refundedAdditiveTaxMoney, v1Refund.refundedAdditiveTaxMoney) && Objects.equals(this.refundedAdditiveTax, v1Refund.refundedAdditiveTax) && Objects.equals(this.refundedInclusiveTaxMoney, v1Refund.refundedInclusiveTaxMoney) && Objects.equals(this.refundedInclusiveTax, v1Refund.refundedInclusiveTax) && Objects.equals(this.refundedTipMoney, v1Refund.refundedTipMoney) && Objects.equals(this.refundedDiscountMoney, v1Refund.refundedDiscountMoney) && Objects.equals(this.refundedSurchargeMoney, v1Refund.refundedSurchargeMoney) && Objects.equals(this.refundedSurcharges, v1Refund.refundedSurcharges) && Objects.equals(this.createdAt, v1Refund.createdAt) && Objects.equals(this.processedAt, v1Refund.processedAt) && Objects.equals(this.paymentId, v1Refund.paymentId) && Objects.equals(this.merchantId, v1Refund.merchantId) && Objects.equals(this.isExchange, v1Refund.isExchange); } @Override public int hashCode() { return Objects.hash(type, reason, refundedMoney, refundedProcessingFeeMoney, refundedTaxMoney, refundedAdditiveTaxMoney, refundedAdditiveTax, refundedInclusiveTaxMoney, refundedInclusiveTax, refundedTipMoney, refundedDiscountMoney, refundedSurchargeMoney, refundedSurcharges, createdAt, processedAt, paymentId, merchantId, isExchange); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1Refund {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append(" refundedMoney: ").append(toIndentedString(refundedMoney)).append("\n"); sb.append(" refundedProcessingFeeMoney: ").append(toIndentedString(refundedProcessingFeeMoney)).append("\n"); sb.append(" refundedTaxMoney: ").append(toIndentedString(refundedTaxMoney)).append("\n"); sb.append(" refundedAdditiveTaxMoney: ").append(toIndentedString(refundedAdditiveTaxMoney)).append("\n"); sb.append(" refundedAdditiveTax: ").append(toIndentedString(refundedAdditiveTax)).append("\n"); sb.append(" refundedInclusiveTaxMoney: ").append(toIndentedString(refundedInclusiveTaxMoney)).append("\n"); sb.append(" refundedInclusiveTax: ").append(toIndentedString(refundedInclusiveTax)).append("\n"); sb.append(" refundedTipMoney: ").append(toIndentedString(refundedTipMoney)).append("\n"); sb.append(" refundedDiscountMoney: ").append(toIndentedString(refundedDiscountMoney)).append("\n"); sb.append(" refundedSurchargeMoney: ").append(toIndentedString(refundedSurchargeMoney)).append("\n"); sb.append(" refundedSurcharges: ").append(toIndentedString(refundedSurcharges)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" processedAt: ").append(toIndentedString(processedAt)).append("\n"); sb.append(" paymentId: ").append(toIndentedString(paymentId)).append("\n"); sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n"); sb.append(" isExchange: ").append(toIndentedString(isExchange)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,764
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1ListTimecardEventsRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import io.swagger.annotations.ApiModel; /** * */ @ApiModel(description = "") public class V1ListTimecardEventsRequest { @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return true; } @Override public int hashCode() { return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1ListTimecardEventsRequest {\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,765
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1PaymentTax.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Error; import com.squareup.connect.models.V1Money; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * V1PaymentTax */ @ApiModel(description = "V1PaymentTax") public class V1PaymentTax { @JsonProperty("errors") private List<Error> errors = new ArrayList<Error>(); @JsonProperty("name") private String name = null; @JsonProperty("applied_money") private V1Money appliedMoney = null; @JsonProperty("rate") private String rate = null; @JsonProperty("inclusion_type") private String inclusionType = null; @JsonProperty("fee_id") private String feeId = null; public V1PaymentTax errors(List<Error> errors) { this.errors = errors; return this; } public V1PaymentTax addErrorsItem(Error errorsItem) { this.errors.add(errorsItem); return this; } /** * Any errors that occurred during the request. * @return errors **/ @ApiModelProperty(value = "Any errors that occurred during the request.") public List<Error> getErrors() { return errors; } public void setErrors(List<Error> errors) { this.errors = errors; } public V1PaymentTax name(String name) { this.name = name; return this; } /** * The merchant-defined name of the tax. * @return name **/ @ApiModelProperty(value = "The merchant-defined name of the tax.") public String getName() { return name; } public void setName(String name) { this.name = name; } public V1PaymentTax appliedMoney(V1Money appliedMoney) { this.appliedMoney = appliedMoney; return this; } /** * The amount of money that this tax adds to the payment. * @return appliedMoney **/ @ApiModelProperty(value = "The amount of money that this tax adds to the payment.") public V1Money getAppliedMoney() { return appliedMoney; } public void setAppliedMoney(V1Money appliedMoney) { this.appliedMoney = appliedMoney; } public V1PaymentTax rate(String rate) { this.rate = rate; return this; } /** * The rate of the tax, as a string representation of a decimal number. A value of 0.07 corresponds to a rate of 7%. * @return rate **/ @ApiModelProperty(value = "The rate of the tax, as a string representation of a decimal number. A value of 0.07 corresponds to a rate of 7%.") public String getRate() { return rate; } public void setRate(String rate) { this.rate = rate; } public V1PaymentTax inclusionType(String inclusionType) { this.inclusionType = inclusionType; return this; } /** * Whether the tax is an ADDITIVE tax or an INCLUSIVE tax. See [V1PaymentTaxInclusionType](#type-v1paymenttaxinclusiontype) for possible values * @return inclusionType **/ @ApiModelProperty(value = "Whether the tax is an ADDITIVE tax or an INCLUSIVE tax. See [V1PaymentTaxInclusionType](#type-v1paymenttaxinclusiontype) for possible values") public String getInclusionType() { return inclusionType; } public void setInclusionType(String inclusionType) { this.inclusionType = inclusionType; } public V1PaymentTax feeId(String feeId) { this.feeId = feeId; return this; } /** * The ID of the tax, if available. Taxes applied in older versions of Square Register might not have an ID. * @return feeId **/ @ApiModelProperty(value = "The ID of the tax, if available. Taxes applied in older versions of Square Register might not have an ID.") public String getFeeId() { return feeId; } public void setFeeId(String feeId) { this.feeId = feeId; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1PaymentTax v1PaymentTax = (V1PaymentTax) o; return Objects.equals(this.errors, v1PaymentTax.errors) && Objects.equals(this.name, v1PaymentTax.name) && Objects.equals(this.appliedMoney, v1PaymentTax.appliedMoney) && Objects.equals(this.rate, v1PaymentTax.rate) && Objects.equals(this.inclusionType, v1PaymentTax.inclusionType) && Objects.equals(this.feeId, v1PaymentTax.feeId); } @Override public int hashCode() { return Objects.hash(errors, name, appliedMoney, rate, inclusionType, feeId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1PaymentTax {\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" appliedMoney: ").append(toIndentedString(appliedMoney)).append("\n"); sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); sb.append(" inclusionType: ").append(toIndentedString(inclusionType)).append("\n"); sb.append(" feeId: ").append(toIndentedString(feeId)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,766
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1Fee.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * V1Fee */ @ApiModel(description = "V1Fee") public class V1Fee { @JsonProperty("id") private String id = null; @JsonProperty("name") private String name = null; @JsonProperty("rate") private String rate = null; @JsonProperty("calculation_phase") private String calculationPhase = null; @JsonProperty("adjustment_type") private String adjustmentType = null; @JsonProperty("applies_to_custom_amounts") private Boolean appliesToCustomAmounts = null; @JsonProperty("enabled") private Boolean enabled = null; @JsonProperty("inclusion_type") private String inclusionType = null; @JsonProperty("type") private String type = null; @JsonProperty("v2_id") private String v2Id = null; public V1Fee id(String id) { this.id = id; return this; } /** * The fee's unique ID. * @return id **/ @ApiModelProperty(value = "The fee's unique ID.") public String getId() { return id; } public void setId(String id) { this.id = id; } public V1Fee name(String name) { this.name = name; return this; } /** * The fee's name. * @return name **/ @ApiModelProperty(value = "The fee's name.") public String getName() { return name; } public void setName(String name) { this.name = name; } public V1Fee rate(String rate) { this.rate = rate; return this; } /** * The rate of the fee, as a string representation of a decimal number. A value of 0.07 corresponds to a rate of 7%. * @return rate **/ @ApiModelProperty(value = "The rate of the fee, as a string representation of a decimal number. A value of 0.07 corresponds to a rate of 7%.") public String getRate() { return rate; } public void setRate(String rate) { this.rate = rate; } public V1Fee calculationPhase(String calculationPhase) { this.calculationPhase = calculationPhase; return this; } /** * Forthcoming See [V1FeeCalculationPhase](#type-v1feecalculationphase) for possible values * @return calculationPhase **/ @ApiModelProperty(value = "Forthcoming See [V1FeeCalculationPhase](#type-v1feecalculationphase) for possible values") public String getCalculationPhase() { return calculationPhase; } public void setCalculationPhase(String calculationPhase) { this.calculationPhase = calculationPhase; } public V1Fee adjustmentType(String adjustmentType) { this.adjustmentType = adjustmentType; return this; } /** * The type of adjustment the fee applies to a payment. Currently, this value is TAX for all fees. See [V1FeeAdjustmentType](#type-v1feeadjustmenttype) for possible values * @return adjustmentType **/ @ApiModelProperty(value = "The type of adjustment the fee applies to a payment. Currently, this value is TAX for all fees. See [V1FeeAdjustmentType](#type-v1feeadjustmenttype) for possible values") public String getAdjustmentType() { return adjustmentType; } public void setAdjustmentType(String adjustmentType) { this.adjustmentType = adjustmentType; } public V1Fee appliesToCustomAmounts(Boolean appliesToCustomAmounts) { this.appliesToCustomAmounts = appliesToCustomAmounts; return this; } /** * If true, the fee applies to custom amounts entered into Square Point of Sale that are not associated with a particular item. * @return appliesToCustomAmounts **/ @ApiModelProperty(value = "If true, the fee applies to custom amounts entered into Square Point of Sale that are not associated with a particular item.") public Boolean getAppliesToCustomAmounts() { return appliesToCustomAmounts; } public void setAppliesToCustomAmounts(Boolean appliesToCustomAmounts) { this.appliesToCustomAmounts = appliesToCustomAmounts; } public V1Fee enabled(Boolean enabled) { this.enabled = enabled; return this; } /** * If true, the fee is applied to all appropriate items. If false, the fee is not applied at all. * @return enabled **/ @ApiModelProperty(value = "If true, the fee is applied to all appropriate items. If false, the fee is not applied at all.") public Boolean getEnabled() { return enabled; } public void setEnabled(Boolean enabled) { this.enabled = enabled; } public V1Fee inclusionType(String inclusionType) { this.inclusionType = inclusionType; return this; } /** * Whether the fee is ADDITIVE or INCLUSIVE. See [V1FeeInclusionType](#type-v1feeinclusiontype) for possible values * @return inclusionType **/ @ApiModelProperty(value = "Whether the fee is ADDITIVE or INCLUSIVE. See [V1FeeInclusionType](#type-v1feeinclusiontype) for possible values") public String getInclusionType() { return inclusionType; } public void setInclusionType(String inclusionType) { this.inclusionType = inclusionType; } public V1Fee type(String type) { this.type = type; return this; } /** * In countries with multiple classifications for sales taxes, indicates which classification the fee falls under. Currently relevant only to Canadian merchants. See [V1FeeType](#type-v1feetype) for possible values * @return type **/ @ApiModelProperty(value = "In countries with multiple classifications for sales taxes, indicates which classification the fee falls under. Currently relevant only to Canadian merchants. See [V1FeeType](#type-v1feetype) for possible values") public String getType() { return type; } public void setType(String type) { this.type = type; } public V1Fee v2Id(String v2Id) { this.v2Id = v2Id; return this; } /** * The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID. * @return v2Id **/ @ApiModelProperty(value = "The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.") public String getV2Id() { return v2Id; } public void setV2Id(String v2Id) { this.v2Id = v2Id; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1Fee v1Fee = (V1Fee) o; return Objects.equals(this.id, v1Fee.id) && Objects.equals(this.name, v1Fee.name) && Objects.equals(this.rate, v1Fee.rate) && Objects.equals(this.calculationPhase, v1Fee.calculationPhase) && Objects.equals(this.adjustmentType, v1Fee.adjustmentType) && Objects.equals(this.appliesToCustomAmounts, v1Fee.appliesToCustomAmounts) && Objects.equals(this.enabled, v1Fee.enabled) && Objects.equals(this.inclusionType, v1Fee.inclusionType) && Objects.equals(this.type, v1Fee.type) && Objects.equals(this.v2Id, v1Fee.v2Id); } @Override public int hashCode() { return Objects.hash(id, name, rate, calculationPhase, adjustmentType, appliesToCustomAmounts, enabled, inclusionType, type, v2Id); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1Fee {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); sb.append(" calculationPhase: ").append(toIndentedString(calculationPhase)).append("\n"); sb.append(" adjustmentType: ").append(toIndentedString(adjustmentType)).append("\n"); sb.append(" appliesToCustomAmounts: ").append(toIndentedString(appliesToCustomAmounts)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" inclusionType: ").append(toIndentedString(inclusionType)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" v2Id: ").append(toIndentedString(v2Id)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,767
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/UpdateItemTaxesRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class UpdateItemTaxesRequest { @JsonProperty("item_ids") private List<String> itemIds = new ArrayList<String>(); @JsonProperty("taxes_to_enable") private List<String> taxesToEnable = new ArrayList<String>(); @JsonProperty("taxes_to_disable") private List<String> taxesToDisable = new ArrayList<String>(); public UpdateItemTaxesRequest itemIds(List<String> itemIds) { this.itemIds = itemIds; return this; } public UpdateItemTaxesRequest addItemIdsItem(String itemIdsItem) { this.itemIds.add(itemIdsItem); return this; } /** * IDs for the CatalogItems associated with the CatalogTax objects being updated. * @return itemIds **/ @ApiModelProperty(required = true, value = "IDs for the CatalogItems associated with the CatalogTax objects being updated.") public List<String> getItemIds() { return itemIds; } public void setItemIds(List<String> itemIds) { this.itemIds = itemIds; } public UpdateItemTaxesRequest taxesToEnable(List<String> taxesToEnable) { this.taxesToEnable = taxesToEnable; return this; } public UpdateItemTaxesRequest addTaxesToEnableItem(String taxesToEnableItem) { this.taxesToEnable.add(taxesToEnableItem); return this; } /** * IDs of the CatalogTax objects to enable. * @return taxesToEnable **/ @ApiModelProperty(value = "IDs of the CatalogTax objects to enable.") public List<String> getTaxesToEnable() { return taxesToEnable; } public void setTaxesToEnable(List<String> taxesToEnable) { this.taxesToEnable = taxesToEnable; } public UpdateItemTaxesRequest taxesToDisable(List<String> taxesToDisable) { this.taxesToDisable = taxesToDisable; return this; } public UpdateItemTaxesRequest addTaxesToDisableItem(String taxesToDisableItem) { this.taxesToDisable.add(taxesToDisableItem); return this; } /** * IDs of the CatalogTax objects to disable. * @return taxesToDisable **/ @ApiModelProperty(value = "IDs of the CatalogTax objects to disable.") public List<String> getTaxesToDisable() { return taxesToDisable; } public void setTaxesToDisable(List<String> taxesToDisable) { this.taxesToDisable = taxesToDisable; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UpdateItemTaxesRequest updateItemTaxesRequest = (UpdateItemTaxesRequest) o; return Objects.equals(this.itemIds, updateItemTaxesRequest.itemIds) && Objects.equals(this.taxesToEnable, updateItemTaxesRequest.taxesToEnable) && Objects.equals(this.taxesToDisable, updateItemTaxesRequest.taxesToDisable); } @Override public int hashCode() { return Objects.hash(itemIds, taxesToEnable, taxesToDisable); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateItemTaxesRequest {\n"); sb.append(" itemIds: ").append(toIndentedString(itemIds)).append("\n"); sb.append(" taxesToEnable: ").append(toIndentedString(taxesToEnable)).append("\n"); sb.append(" taxesToDisable: ").append(toIndentedString(taxesToDisable)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,768
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/RetrieveLocationRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import io.swagger.annotations.ApiModel; /** * Defines the fields that are included in the request body for the __RetrieveLocation__ endpoint. */ @ApiModel(description = "Defines the fields that are included in the request body for the __RetrieveLocation__ endpoint.") public class RetrieveLocationRequest { @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return true; } @Override public int hashCode() { return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RetrieveLocationRequest {\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,769
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CatalogObjectBatch.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.CatalogObject; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * A batch of catalog objects. */ @ApiModel(description = "A batch of catalog objects.") public class CatalogObjectBatch { @JsonProperty("objects") private List<CatalogObject> objects = new ArrayList<CatalogObject>(); public CatalogObjectBatch objects(List<CatalogObject> objects) { this.objects = objects; return this; } public CatalogObjectBatch addObjectsItem(CatalogObject objectsItem) { this.objects.add(objectsItem); return this; } /** * A list of CatalogObjects belonging to this batch. * @return objects **/ @ApiModelProperty(value = "A list of CatalogObjects belonging to this batch.") public List<CatalogObject> getObjects() { return objects; } public void setObjects(List<CatalogObject> objects) { this.objects = objects; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CatalogObjectBatch catalogObjectBatch = (CatalogObjectBatch) o; return Objects.equals(this.objects, catalogObjectBatch.objects); } @Override public int hashCode() { return Objects.hash(objects); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatalogObjectBatch {\n"); sb.append(" objects: ").append(toIndentedString(objects)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,770
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/ListEmployeeWagesResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.EmployeeWage; import com.squareup.connect.models.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * The response to a request for a set of &#x60;EmployeeWage&#x60; objects. Contains a set of &#x60;EmployeeWage&#x60;. */ @ApiModel(description = "The response to a request for a set of `EmployeeWage` objects. Contains a set of `EmployeeWage`.") public class ListEmployeeWagesResponse { @JsonProperty("employee_wages") private List<EmployeeWage> employeeWages = new ArrayList<EmployeeWage>(); @JsonProperty("cursor") private String cursor = null; @JsonProperty("errors") private List<Error> errors = new ArrayList<Error>(); public ListEmployeeWagesResponse employeeWages(List<EmployeeWage> employeeWages) { this.employeeWages = employeeWages; return this; } public ListEmployeeWagesResponse addEmployeeWagesItem(EmployeeWage employeeWagesItem) { this.employeeWages.add(employeeWagesItem); return this; } /** * A page of Employee Wage results. * @return employeeWages **/ @ApiModelProperty(value = "A page of Employee Wage results.") public List<EmployeeWage> getEmployeeWages() { return employeeWages; } public void setEmployeeWages(List<EmployeeWage> employeeWages) { this.employeeWages = employeeWages; } public ListEmployeeWagesResponse cursor(String cursor) { this.cursor = cursor; return this; } /** * Value supplied in the subsequent request to fetch the next next page of Employee Wage results. * @return cursor **/ @ApiModelProperty(value = "Value supplied in the subsequent request to fetch the next next page of Employee Wage results.") public String getCursor() { return cursor; } public void setCursor(String cursor) { this.cursor = cursor; } public ListEmployeeWagesResponse errors(List<Error> errors) { this.errors = errors; return this; } public ListEmployeeWagesResponse addErrorsItem(Error errorsItem) { this.errors.add(errorsItem); return this; } /** * Any errors that occurred during the request. * @return errors **/ @ApiModelProperty(value = "Any errors that occurred during the request.") public List<Error> getErrors() { return errors; } public void setErrors(List<Error> errors) { this.errors = errors; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ListEmployeeWagesResponse listEmployeeWagesResponse = (ListEmployeeWagesResponse) o; return Objects.equals(this.employeeWages, listEmployeeWagesResponse.employeeWages) && Objects.equals(this.cursor, listEmployeeWagesResponse.cursor) && Objects.equals(this.errors, listEmployeeWagesResponse.errors); } @Override public int hashCode() { return Objects.hash(employeeWages, cursor, errors); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListEmployeeWagesResponse {\n"); sb.append(" employeeWages: ").append(toIndentedString(employeeWages)).append("\n"); sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,771
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1DeletePageRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import io.swagger.annotations.ApiModel; /** * */ @ApiModel(description = "") public class V1DeletePageRequest { @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return true; } @Override public int hashCode() { return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1DeletePageRequest {\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,772
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/InventoryChange.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.InventoryAdjustment; import com.squareup.connect.models.InventoryPhysicalCount; import com.squareup.connect.models.InventoryTransfer; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Represents a single physical count, inventory, adjustment, or transfer that is part of the history of inventory changes for a particular &#x60;CatalogObject&#x60;. */ @ApiModel(description = "Represents a single physical count, inventory, adjustment, or transfer that is part of the history of inventory changes for a particular `CatalogObject`.") public class InventoryChange { @JsonProperty("type") private String type = null; @JsonProperty("physical_count") private InventoryPhysicalCount physicalCount = null; @JsonProperty("adjustment") private InventoryAdjustment adjustment = null; @JsonProperty("transfer") private InventoryTransfer transfer = null; public InventoryChange type(String type) { this.type = type; return this; } /** * Indicates how the inventory change was applied. See `InventoryChangeType` for all possible values. See [InventoryChangeType](#type-inventorychangetype) for possible values * @return type **/ @ApiModelProperty(value = "Indicates how the inventory change was applied. See `InventoryChangeType` for all possible values. See [InventoryChangeType](#type-inventorychangetype) for possible values") public String getType() { return type; } public void setType(String type) { this.type = type; } public InventoryChange physicalCount(InventoryPhysicalCount physicalCount) { this.physicalCount = physicalCount; return this; } /** * Contains details about the physical count when `type` is `PHYSICAL_COUNT` and unset for all other types. * @return physicalCount **/ @ApiModelProperty(value = "Contains details about the physical count when `type` is `PHYSICAL_COUNT` and unset for all other types.") public InventoryPhysicalCount getPhysicalCount() { return physicalCount; } public void setPhysicalCount(InventoryPhysicalCount physicalCount) { this.physicalCount = physicalCount; } public InventoryChange adjustment(InventoryAdjustment adjustment) { this.adjustment = adjustment; return this; } /** * Contains details about the inventory adjustment when `type` is `ADJUSTMENT` and unset for all other types. * @return adjustment **/ @ApiModelProperty(value = "Contains details about the inventory adjustment when `type` is `ADJUSTMENT` and unset for all other types.") public InventoryAdjustment getAdjustment() { return adjustment; } public void setAdjustment(InventoryAdjustment adjustment) { this.adjustment = adjustment; } public InventoryChange transfer(InventoryTransfer transfer) { this.transfer = transfer; return this; } /** * Contains details about the inventory transfer when `type` is `TRANSFER` and unset for all other types. * @return transfer **/ @ApiModelProperty(value = "Contains details about the inventory transfer when `type` is `TRANSFER` and unset for all other types.") public InventoryTransfer getTransfer() { return transfer; } public void setTransfer(InventoryTransfer transfer) { this.transfer = transfer; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } InventoryChange inventoryChange = (InventoryChange) o; return Objects.equals(this.type, inventoryChange.type) && Objects.equals(this.physicalCount, inventoryChange.physicalCount) && Objects.equals(this.adjustment, inventoryChange.adjustment) && Objects.equals(this.transfer, inventoryChange.transfer); } @Override public int hashCode() { return Objects.hash(type, physicalCount, adjustment, transfer); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InventoryChange {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" physicalCount: ").append(toIndentedString(physicalCount)).append("\n"); sb.append(" adjustment: ").append(toIndentedString(adjustment)).append("\n"); sb.append(" transfer: ").append(toIndentedString(transfer)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,773
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1PaymentItemization.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.V1Money; import com.squareup.connect.models.V1PaymentDiscount; import com.squareup.connect.models.V1PaymentItemDetail; import com.squareup.connect.models.V1PaymentModifier; import com.squareup.connect.models.V1PaymentTax; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; /** * Payment include an&#x60; itemizations&#x60; field that lists the items purchased, along with associated fees, modifiers, and discounts. Each itemization has an &#x60;itemization_type&#x60; field that indicates which of the following the itemization represents: &lt;ul&gt; &lt;li&gt;An item variation from the merchant&#39;s item library&lt;/li&gt; &lt;li&gt;A custom monetary amount&lt;/li&gt; &lt;li&gt; An action performed on a Square gift card, such as activating or reloading it. &lt;/li&gt; &lt;/ul&gt; *Note**: itemization information included in a &#x60;Payment&#x60; object reflects details collected **at the time of the payment**. Details such as the name or price of items might have changed since the payment was processed. */ @ApiModel(description = "Payment include an` itemizations` field that lists the items purchased, along with associated fees, modifiers, and discounts. Each itemization has an `itemization_type` field that indicates which of the following the itemization represents: <ul> <li>An item variation from the merchant's item library</li> <li>A custom monetary amount</li> <li> An action performed on a Square gift card, such as activating or reloading it. </li> </ul> *Note**: itemization information included in a `Payment` object reflects details collected **at the time of the payment**. Details such as the name or price of items might have changed since the payment was processed.") public class V1PaymentItemization { @JsonProperty("name") private String name = null; @JsonProperty("quantity") private BigDecimal quantity = null; @JsonProperty("itemization_type") private String itemizationType = null; @JsonProperty("item_detail") private V1PaymentItemDetail itemDetail = null; @JsonProperty("notes") private String notes = null; @JsonProperty("item_variation_name") private String itemVariationName = null; @JsonProperty("total_money") private V1Money totalMoney = null; @JsonProperty("single_quantity_money") private V1Money singleQuantityMoney = null; @JsonProperty("gross_sales_money") private V1Money grossSalesMoney = null; @JsonProperty("discount_money") private V1Money discountMoney = null; @JsonProperty("net_sales_money") private V1Money netSalesMoney = null; @JsonProperty("taxes") private List<V1PaymentTax> taxes = new ArrayList<V1PaymentTax>(); @JsonProperty("discounts") private List<V1PaymentDiscount> discounts = new ArrayList<V1PaymentDiscount>(); @JsonProperty("modifiers") private List<V1PaymentModifier> modifiers = new ArrayList<V1PaymentModifier>(); public V1PaymentItemization name(String name) { this.name = name; return this; } /** * The item's name. * @return name **/ @ApiModelProperty(value = "The item's name.") public String getName() { return name; } public void setName(String name) { this.name = name; } public V1PaymentItemization quantity(BigDecimal quantity) { this.quantity = quantity; return this; } /** * The quantity of the item purchased. This can be a decimal value. * @return quantity **/ @ApiModelProperty(value = "The quantity of the item purchased. This can be a decimal value.") public BigDecimal getQuantity() { return quantity; } public void setQuantity(BigDecimal quantity) { this.quantity = quantity; } public V1PaymentItemization itemizationType(String itemizationType) { this.itemizationType = itemizationType; return this; } /** * The type of purchase that the itemization represents, such as an ITEM or CUSTOM_AMOUNT See [V1PaymentItemizationItemizationType](#type-v1paymentitemizationitemizationtype) for possible values * @return itemizationType **/ @ApiModelProperty(value = "The type of purchase that the itemization represents, such as an ITEM or CUSTOM_AMOUNT See [V1PaymentItemizationItemizationType](#type-v1paymentitemizationitemizationtype) for possible values") public String getItemizationType() { return itemizationType; } public void setItemizationType(String itemizationType) { this.itemizationType = itemizationType; } public V1PaymentItemization itemDetail(V1PaymentItemDetail itemDetail) { this.itemDetail = itemDetail; return this; } /** * Details of the item, including its unique identifier and the identifier of the item variation purchased. * @return itemDetail **/ @ApiModelProperty(value = "Details of the item, including its unique identifier and the identifier of the item variation purchased.") public V1PaymentItemDetail getItemDetail() { return itemDetail; } public void setItemDetail(V1PaymentItemDetail itemDetail) { this.itemDetail = itemDetail; } public V1PaymentItemization notes(String notes) { this.notes = notes; return this; } /** * Notes entered by the merchant about the item at the time of payment, if any. * @return notes **/ @ApiModelProperty(value = "Notes entered by the merchant about the item at the time of payment, if any.") public String getNotes() { return notes; } public void setNotes(String notes) { this.notes = notes; } public V1PaymentItemization itemVariationName(String itemVariationName) { this.itemVariationName = itemVariationName; return this; } /** * The name of the item variation purchased, if any. * @return itemVariationName **/ @ApiModelProperty(value = "The name of the item variation purchased, if any.") public String getItemVariationName() { return itemVariationName; } public void setItemVariationName(String itemVariationName) { this.itemVariationName = itemVariationName; } public V1PaymentItemization totalMoney(V1Money totalMoney) { this.totalMoney = totalMoney; return this; } /** * The total cost of the item, including all taxes and discounts. * @return totalMoney **/ @ApiModelProperty(value = "The total cost of the item, including all taxes and discounts.") public V1Money getTotalMoney() { return totalMoney; } public void setTotalMoney(V1Money totalMoney) { this.totalMoney = totalMoney; } public V1PaymentItemization singleQuantityMoney(V1Money singleQuantityMoney) { this.singleQuantityMoney = singleQuantityMoney; return this; } /** * The cost of a single unit of this item. * @return singleQuantityMoney **/ @ApiModelProperty(value = "The cost of a single unit of this item.") public V1Money getSingleQuantityMoney() { return singleQuantityMoney; } public void setSingleQuantityMoney(V1Money singleQuantityMoney) { this.singleQuantityMoney = singleQuantityMoney; } public V1PaymentItemization grossSalesMoney(V1Money grossSalesMoney) { this.grossSalesMoney = grossSalesMoney; return this; } /** * The total cost of the itemization and its modifiers, not including taxes or discounts. * @return grossSalesMoney **/ @ApiModelProperty(value = "The total cost of the itemization and its modifiers, not including taxes or discounts.") public V1Money getGrossSalesMoney() { return grossSalesMoney; } public void setGrossSalesMoney(V1Money grossSalesMoney) { this.grossSalesMoney = grossSalesMoney; } public V1PaymentItemization discountMoney(V1Money discountMoney) { this.discountMoney = discountMoney; return this; } /** * The total of all discounts applied to the itemization. This value is always negative or zero. * @return discountMoney **/ @ApiModelProperty(value = "The total of all discounts applied to the itemization. This value is always negative or zero.") public V1Money getDiscountMoney() { return discountMoney; } public void setDiscountMoney(V1Money discountMoney) { this.discountMoney = discountMoney; } public V1PaymentItemization netSalesMoney(V1Money netSalesMoney) { this.netSalesMoney = netSalesMoney; return this; } /** * The sum of gross_sales_money and discount_money. * @return netSalesMoney **/ @ApiModelProperty(value = "The sum of gross_sales_money and discount_money.") public V1Money getNetSalesMoney() { return netSalesMoney; } public void setNetSalesMoney(V1Money netSalesMoney) { this.netSalesMoney = netSalesMoney; } public V1PaymentItemization taxes(List<V1PaymentTax> taxes) { this.taxes = taxes; return this; } public V1PaymentItemization addTaxesItem(V1PaymentTax taxesItem) { this.taxes.add(taxesItem); return this; } /** * All taxes applied to this itemization. * @return taxes **/ @ApiModelProperty(value = "All taxes applied to this itemization.") public List<V1PaymentTax> getTaxes() { return taxes; } public void setTaxes(List<V1PaymentTax> taxes) { this.taxes = taxes; } public V1PaymentItemization discounts(List<V1PaymentDiscount> discounts) { this.discounts = discounts; return this; } public V1PaymentItemization addDiscountsItem(V1PaymentDiscount discountsItem) { this.discounts.add(discountsItem); return this; } /** * All discounts applied to this itemization. * @return discounts **/ @ApiModelProperty(value = "All discounts applied to this itemization.") public List<V1PaymentDiscount> getDiscounts() { return discounts; } public void setDiscounts(List<V1PaymentDiscount> discounts) { this.discounts = discounts; } public V1PaymentItemization modifiers(List<V1PaymentModifier> modifiers) { this.modifiers = modifiers; return this; } public V1PaymentItemization addModifiersItem(V1PaymentModifier modifiersItem) { this.modifiers.add(modifiersItem); return this; } /** * All modifier options applied to this itemization. * @return modifiers **/ @ApiModelProperty(value = "All modifier options applied to this itemization.") public List<V1PaymentModifier> getModifiers() { return modifiers; } public void setModifiers(List<V1PaymentModifier> modifiers) { this.modifiers = modifiers; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1PaymentItemization v1PaymentItemization = (V1PaymentItemization) o; return Objects.equals(this.name, v1PaymentItemization.name) && Objects.equals(this.quantity, v1PaymentItemization.quantity) && Objects.equals(this.itemizationType, v1PaymentItemization.itemizationType) && Objects.equals(this.itemDetail, v1PaymentItemization.itemDetail) && Objects.equals(this.notes, v1PaymentItemization.notes) && Objects.equals(this.itemVariationName, v1PaymentItemization.itemVariationName) && Objects.equals(this.totalMoney, v1PaymentItemization.totalMoney) && Objects.equals(this.singleQuantityMoney, v1PaymentItemization.singleQuantityMoney) && Objects.equals(this.grossSalesMoney, v1PaymentItemization.grossSalesMoney) && Objects.equals(this.discountMoney, v1PaymentItemization.discountMoney) && Objects.equals(this.netSalesMoney, v1PaymentItemization.netSalesMoney) && Objects.equals(this.taxes, v1PaymentItemization.taxes) && Objects.equals(this.discounts, v1PaymentItemization.discounts) && Objects.equals(this.modifiers, v1PaymentItemization.modifiers); } @Override public int hashCode() { return Objects.hash(name, quantity, itemizationType, itemDetail, notes, itemVariationName, totalMoney, singleQuantityMoney, grossSalesMoney, discountMoney, netSalesMoney, taxes, discounts, modifiers); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1PaymentItemization {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" itemizationType: ").append(toIndentedString(itemizationType)).append("\n"); sb.append(" itemDetail: ").append(toIndentedString(itemDetail)).append("\n"); sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); sb.append(" itemVariationName: ").append(toIndentedString(itemVariationName)).append("\n"); sb.append(" totalMoney: ").append(toIndentedString(totalMoney)).append("\n"); sb.append(" singleQuantityMoney: ").append(toIndentedString(singleQuantityMoney)).append("\n"); sb.append(" grossSalesMoney: ").append(toIndentedString(grossSalesMoney)).append("\n"); sb.append(" discountMoney: ").append(toIndentedString(discountMoney)).append("\n"); sb.append(" netSalesMoney: ").append(toIndentedString(netSalesMoney)).append("\n"); sb.append(" taxes: ").append(toIndentedString(taxes)).append("\n"); sb.append(" discounts: ").append(toIndentedString(discounts)).append("\n"); sb.append(" modifiers: ").append(toIndentedString(modifiers)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,774
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1UpdateTimecardRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.V1Timecard; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * */ @ApiModel(description = "") public class V1UpdateTimecardRequest { @JsonProperty("body") private V1Timecard body = null; public V1UpdateTimecardRequest body(V1Timecard body) { this.body = body; return this; } /** * An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return body **/ @ApiModelProperty(required = true, value = "An object containing the fields to POST for the request. See the corresponding object definition for field details.") public V1Timecard getBody() { return body; } public void setBody(V1Timecard body) { this.body = body; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1UpdateTimecardRequest v1UpdateTimecardRequest = (V1UpdateTimecardRequest) o; return Objects.equals(this.body, v1UpdateTimecardRequest.body); } @Override public int hashCode() { return Objects.hash(body); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1UpdateTimecardRequest {\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,775
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1ListEmployeeRolesRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * */ @ApiModel(description = "") public class V1ListEmployeeRolesRequest { @JsonProperty("order") private String order = null; @JsonProperty("limit") private Integer limit = null; @JsonProperty("batch_token") private String batchToken = null; public V1ListEmployeeRolesRequest order(String order) { this.order = order; return this; } /** * The order in which employees are listed in the response, based on their created_at field.Default value: ASC See [SortOrder](#type-sortorder) for possible values * @return order **/ @ApiModelProperty(value = "The order in which employees are listed in the response, based on their created_at field.Default value: ASC See [SortOrder](#type-sortorder) for possible values") public String getOrder() { return order; } public void setOrder(String order) { this.order = order; } public V1ListEmployeeRolesRequest limit(Integer limit) { this.limit = limit; return this; } /** * The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. * @return limit **/ @ApiModelProperty(value = "The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.") public Integer getLimit() { return limit; } public void setLimit(Integer limit) { this.limit = limit; } public V1ListEmployeeRolesRequest batchToken(String batchToken) { this.batchToken = batchToken; return this; } /** * A pagination cursor to retrieve the next set of results for your original query to the endpoint. * @return batchToken **/ @ApiModelProperty(value = "A pagination cursor to retrieve the next set of results for your original query to the endpoint.") public String getBatchToken() { return batchToken; } public void setBatchToken(String batchToken) { this.batchToken = batchToken; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1ListEmployeeRolesRequest v1ListEmployeeRolesRequest = (V1ListEmployeeRolesRequest) o; return Objects.equals(this.order, v1ListEmployeeRolesRequest.order) && Objects.equals(this.limit, v1ListEmployeeRolesRequest.limit) && Objects.equals(this.batchToken, v1ListEmployeeRolesRequest.batchToken); } @Override public int hashCode() { return Objects.hash(order, limit, batchToken); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1ListEmployeeRolesRequest {\n"); sb.append(" order: ").append(toIndentedString(order)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" batchToken: ").append(toIndentedString(batchToken)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,776
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/DateRange.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * A range defined by two dates. Used for filtering a query for Connect v2 objects that have date properties. */ @ApiModel(description = "A range defined by two dates. Used for filtering a query for Connect v2 objects that have date properties.") public class DateRange { @JsonProperty("start_date") private String startDate = null; @JsonProperty("end_date") private String endDate = null; public DateRange startDate(String startDate) { this.startDate = startDate; return this; } /** * String in `YYYY-MM-DD` format, e.g. `2017-10-31` per the ISO 8601 extended format for calendar dates. The beginning of a date range (inclusive) * @return startDate **/ @ApiModelProperty(value = "String in `YYYY-MM-DD` format, e.g. `2017-10-31` per the ISO 8601 extended format for calendar dates. The beginning of a date range (inclusive)") public String getStartDate() { return startDate; } public void setStartDate(String startDate) { this.startDate = startDate; } public DateRange endDate(String endDate) { this.endDate = endDate; return this; } /** * String in `YYYY-MM-DD` format, e.g. `2017-10-31` per the ISO 8601 extended format for calendar dates. The end of a date range (inclusive) * @return endDate **/ @ApiModelProperty(value = "String in `YYYY-MM-DD` format, e.g. `2017-10-31` per the ISO 8601 extended format for calendar dates. The end of a date range (inclusive)") public String getEndDate() { return endDate; } public void setEndDate(String endDate) { this.endDate = endDate; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DateRange dateRange = (DateRange) o; return Objects.equals(this.startDate, dateRange.startDate) && Objects.equals(this.endDate, dateRange.endDate); } @Override public int hashCode() { return Objects.hash(startDate, endDate); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DateRange {\n"); sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,777
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/SearchShiftsRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.ShiftQuery; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * A request for a filtered and sorted set of &#x60;Shift&#x60; objects. */ @ApiModel(description = "A request for a filtered and sorted set of `Shift` objects.") public class SearchShiftsRequest { @JsonProperty("query") private ShiftQuery query = null; @JsonProperty("limit") private Integer limit = null; @JsonProperty("cursor") private String cursor = null; public SearchShiftsRequest query(ShiftQuery query) { this.query = query; return this; } /** * Query filters. * @return query **/ @ApiModelProperty(value = "Query filters.") public ShiftQuery getQuery() { return query; } public void setQuery(ShiftQuery query) { this.query = query; } public SearchShiftsRequest limit(Integer limit) { this.limit = limit; return this; } /** * number of resources in a page (200 by default). * minimum: 1 * maximum: 200 * @return limit **/ @ApiModelProperty(value = "number of resources in a page (200 by default).") public Integer getLimit() { return limit; } public void setLimit(Integer limit) { this.limit = limit; } public SearchShiftsRequest cursor(String cursor) { this.cursor = cursor; return this; } /** * opaque cursor for fetching the next page. * @return cursor **/ @ApiModelProperty(value = "opaque cursor for fetching the next page.") public String getCursor() { return cursor; } public void setCursor(String cursor) { this.cursor = cursor; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SearchShiftsRequest searchShiftsRequest = (SearchShiftsRequest) o; return Objects.equals(this.query, searchShiftsRequest.query) && Objects.equals(this.limit, searchShiftsRequest.limit) && Objects.equals(this.cursor, searchShiftsRequest.cursor); } @Override public int hashCode() { return Objects.hash(query, limit, cursor); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SearchShiftsRequest {\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,778
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CatalogQuery.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.CatalogQueryExact; import com.squareup.connect.models.CatalogQueryItemVariationsForItemOptionValues; import com.squareup.connect.models.CatalogQueryItemsForItemOptions; import com.squareup.connect.models.CatalogQueryItemsForModifierList; import com.squareup.connect.models.CatalogQueryItemsForTax; import com.squareup.connect.models.CatalogQueryPrefix; import com.squareup.connect.models.CatalogQueryRange; import com.squareup.connect.models.CatalogQuerySortedAttribute; import com.squareup.connect.models.CatalogQueryText; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * A query to be applied to a &#x60;SearchCatalogObjectsRequest&#x60;. Only one query field may be present. Where an attribute name is required, it should be specified as the name of any field marked \&quot;searchable\&quot; from the structured data types for the desired result object type(s) (&#x60;CatalogItem&#x60;, &#x60;CatalogItemVariation&#x60;, &#x60;CatalogCategory&#x60;, &#x60;CatalogTax&#x60;, &#x60;CatalogDiscount&#x60;, &#x60;CatalogModifierList&#x60;, &#x60;CatalogModifier&#x60;). For example, a query that should return Items may specify attribute names from any of the searchable fields of the &#x60;CatalogItem&#x60; data type, namely &#x60;\&quot;name\&quot;&#x60;, &#x60;\&quot;description\&quot;&#x60;, and &#x60;\&quot;abbreviation\&quot;&#x60;. */ @ApiModel(description = "A query to be applied to a `SearchCatalogObjectsRequest`. Only one query field may be present. Where an attribute name is required, it should be specified as the name of any field marked \"searchable\" from the structured data types for the desired result object type(s) (`CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, `CatalogTax`, `CatalogDiscount`, `CatalogModifierList`, `CatalogModifier`). For example, a query that should return Items may specify attribute names from any of the searchable fields of the `CatalogItem` data type, namely `\"name\"`, `\"description\"`, and `\"abbreviation\"`.") public class CatalogQuery { @JsonProperty("sorted_attribute_query") private CatalogQuerySortedAttribute sortedAttributeQuery = null; @JsonProperty("exact_query") private CatalogQueryExact exactQuery = null; @JsonProperty("prefix_query") private CatalogQueryPrefix prefixQuery = null; @JsonProperty("range_query") private CatalogQueryRange rangeQuery = null; @JsonProperty("text_query") private CatalogQueryText textQuery = null; @JsonProperty("items_for_tax_query") private CatalogQueryItemsForTax itemsForTaxQuery = null; @JsonProperty("items_for_modifier_list_query") private CatalogQueryItemsForModifierList itemsForModifierListQuery = null; @JsonProperty("items_for_item_options_query") private CatalogQueryItemsForItemOptions itemsForItemOptionsQuery = null; @JsonProperty("item_variations_for_item_option_values_query") private CatalogQueryItemVariationsForItemOptionValues itemVariationsForItemOptionValuesQuery = null; public CatalogQuery sortedAttributeQuery(CatalogQuerySortedAttribute sortedAttributeQuery) { this.sortedAttributeQuery = sortedAttributeQuery; return this; } /** * A query that returns all objects, sorted by the given attribute. * @return sortedAttributeQuery **/ @ApiModelProperty(value = "A query that returns all objects, sorted by the given attribute.") public CatalogQuerySortedAttribute getSortedAttributeQuery() { return sortedAttributeQuery; } public void setSortedAttributeQuery(CatalogQuerySortedAttribute sortedAttributeQuery) { this.sortedAttributeQuery = sortedAttributeQuery; } public CatalogQuery exactQuery(CatalogQueryExact exactQuery) { this.exactQuery = exactQuery; return this; } /** * A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive value. * @return exactQuery **/ @ApiModelProperty(value = "A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive value.") public CatalogQueryExact getExactQuery() { return exactQuery; } public void setExactQuery(CatalogQueryExact exactQuery) { this.exactQuery = exactQuery; } public CatalogQuery prefixQuery(CatalogQueryPrefix prefixQuery) { this.prefixQuery = prefixQuery; return this; } /** * A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive prefix. * @return prefixQuery **/ @ApiModelProperty(value = "A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive prefix.") public CatalogQueryPrefix getPrefixQuery() { return prefixQuery; } public void setPrefixQuery(CatalogQueryPrefix prefixQuery) { this.prefixQuery = prefixQuery; } public CatalogQuery rangeQuery(CatalogQueryRange rangeQuery) { this.rangeQuery = rangeQuery; return this; } /** * A query that returns only objects for which the given (integer-valued) attribute lies in the given range. * @return rangeQuery **/ @ApiModelProperty(value = "A query that returns only objects for which the given (integer-valued) attribute lies in the given range.") public CatalogQueryRange getRangeQuery() { return rangeQuery; } public void setRangeQuery(CatalogQueryRange rangeQuery) { this.rangeQuery = rangeQuery; } public CatalogQuery textQuery(CatalogQueryText textQuery) { this.textQuery = textQuery; return this; } /** * A query that returns only objects whose searchable attributes contain all of the given keywords as prefixes. For example, if a `CatalogItem` contains attributes `{\"name\": \"t-shirt\"}` and `{\"description\": \"Small, Purple\"}`, it will be matched by the query `{\"keywords\": [\"shirt\", \"sma\", \"purp\"]}`. * @return textQuery **/ @ApiModelProperty(value = "A query that returns only objects whose searchable attributes contain all of the given keywords as prefixes. For example, if a `CatalogItem` contains attributes `{\"name\": \"t-shirt\"}` and `{\"description\": \"Small, Purple\"}`, it will be matched by the query `{\"keywords\": [\"shirt\", \"sma\", \"purp\"]}`.") public CatalogQueryText getTextQuery() { return textQuery; } public void setTextQuery(CatalogQueryText textQuery) { this.textQuery = textQuery; } public CatalogQuery itemsForTaxQuery(CatalogQueryItemsForTax itemsForTaxQuery) { this.itemsForTaxQuery = itemsForTaxQuery; return this; } /** * A query that returns all `CatalogItem`s that have any of the given `CatalogTax`es enabled. * @return itemsForTaxQuery **/ @ApiModelProperty(value = "A query that returns all `CatalogItem`s that have any of the given `CatalogTax`es enabled.") public CatalogQueryItemsForTax getItemsForTaxQuery() { return itemsForTaxQuery; } public void setItemsForTaxQuery(CatalogQueryItemsForTax itemsForTaxQuery) { this.itemsForTaxQuery = itemsForTaxQuery; } public CatalogQuery itemsForModifierListQuery(CatalogQueryItemsForModifierList itemsForModifierListQuery) { this.itemsForModifierListQuery = itemsForModifierListQuery; return this; } /** * A query that returns all `CatalogItem`s that have any of the given `CatalogModifierList`s enabled. * @return itemsForModifierListQuery **/ @ApiModelProperty(value = "A query that returns all `CatalogItem`s that have any of the given `CatalogModifierList`s enabled.") public CatalogQueryItemsForModifierList getItemsForModifierListQuery() { return itemsForModifierListQuery; } public void setItemsForModifierListQuery(CatalogQueryItemsForModifierList itemsForModifierListQuery) { this.itemsForModifierListQuery = itemsForModifierListQuery; } public CatalogQuery itemsForItemOptionsQuery(CatalogQueryItemsForItemOptions itemsForItemOptionsQuery) { this.itemsForItemOptionsQuery = itemsForItemOptionsQuery; return this; } /** * A query that returns all `CatalogItem`s that have all of the given `CatalogItemOption`s. * @return itemsForItemOptionsQuery **/ @ApiModelProperty(value = "A query that returns all `CatalogItem`s that have all of the given `CatalogItemOption`s.") public CatalogQueryItemsForItemOptions getItemsForItemOptionsQuery() { return itemsForItemOptionsQuery; } public void setItemsForItemOptionsQuery(CatalogQueryItemsForItemOptions itemsForItemOptionsQuery) { this.itemsForItemOptionsQuery = itemsForItemOptionsQuery; } public CatalogQuery itemVariationsForItemOptionValuesQuery(CatalogQueryItemVariationsForItemOptionValues itemVariationsForItemOptionValuesQuery) { this.itemVariationsForItemOptionValuesQuery = itemVariationsForItemOptionValuesQuery; return this; } /** * A query that returns all `CatalogItemVariation`s that have all of the given `CatalogItemOption` values. * @return itemVariationsForItemOptionValuesQuery **/ @ApiModelProperty(value = "A query that returns all `CatalogItemVariation`s that have all of the given `CatalogItemOption` values.") public CatalogQueryItemVariationsForItemOptionValues getItemVariationsForItemOptionValuesQuery() { return itemVariationsForItemOptionValuesQuery; } public void setItemVariationsForItemOptionValuesQuery(CatalogQueryItemVariationsForItemOptionValues itemVariationsForItemOptionValuesQuery) { this.itemVariationsForItemOptionValuesQuery = itemVariationsForItemOptionValuesQuery; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CatalogQuery catalogQuery = (CatalogQuery) o; return Objects.equals(this.sortedAttributeQuery, catalogQuery.sortedAttributeQuery) && Objects.equals(this.exactQuery, catalogQuery.exactQuery) && Objects.equals(this.prefixQuery, catalogQuery.prefixQuery) && Objects.equals(this.rangeQuery, catalogQuery.rangeQuery) && Objects.equals(this.textQuery, catalogQuery.textQuery) && Objects.equals(this.itemsForTaxQuery, catalogQuery.itemsForTaxQuery) && Objects.equals(this.itemsForModifierListQuery, catalogQuery.itemsForModifierListQuery) && Objects.equals(this.itemsForItemOptionsQuery, catalogQuery.itemsForItemOptionsQuery) && Objects.equals(this.itemVariationsForItemOptionValuesQuery, catalogQuery.itemVariationsForItemOptionValuesQuery); } @Override public int hashCode() { return Objects.hash(sortedAttributeQuery, exactQuery, prefixQuery, rangeQuery, textQuery, itemsForTaxQuery, itemsForModifierListQuery, itemsForItemOptionsQuery, itemVariationsForItemOptionValuesQuery); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatalogQuery {\n"); sb.append(" sortedAttributeQuery: ").append(toIndentedString(sortedAttributeQuery)).append("\n"); sb.append(" exactQuery: ").append(toIndentedString(exactQuery)).append("\n"); sb.append(" prefixQuery: ").append(toIndentedString(prefixQuery)).append("\n"); sb.append(" rangeQuery: ").append(toIndentedString(rangeQuery)).append("\n"); sb.append(" textQuery: ").append(toIndentedString(textQuery)).append("\n"); sb.append(" itemsForTaxQuery: ").append(toIndentedString(itemsForTaxQuery)).append("\n"); sb.append(" itemsForModifierListQuery: ").append(toIndentedString(itemsForModifierListQuery)).append("\n"); sb.append(" itemsForItemOptionsQuery: ").append(toIndentedString(itemsForItemOptionsQuery)).append("\n"); sb.append(" itemVariationsForItemOptionValuesQuery: ").append(toIndentedString(itemVariationsForItemOptionValuesQuery)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,779
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CreatePaymentResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Error; import com.squareup.connect.models.Payment; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * Defines the fields that are included in the response body of a request to the [CreatePayment](#endpoint-payments-createpayment) endpoint. Note: if there are errors processing the request, the payment field may not be present, or it may be present with a status of &#x60;FAILED&#x60;. */ @ApiModel(description = "Defines the fields that are included in the response body of a request to the [CreatePayment](#endpoint-payments-createpayment) endpoint. Note: if there are errors processing the request, the payment field may not be present, or it may be present with a status of `FAILED`.") public class CreatePaymentResponse { @JsonProperty("errors") private List<Error> errors = new ArrayList<Error>(); @JsonProperty("payment") private Payment payment = null; public CreatePaymentResponse errors(List<Error> errors) { this.errors = errors; return this; } public CreatePaymentResponse addErrorsItem(Error errorsItem) { this.errors.add(errorsItem); return this; } /** * Information on errors encountered during the request. * @return errors **/ @ApiModelProperty(value = "Information on errors encountered during the request.") public List<Error> getErrors() { return errors; } public void setErrors(List<Error> errors) { this.errors = errors; } public CreatePaymentResponse payment(Payment payment) { this.payment = payment; return this; } /** * The newly created payment. * @return payment **/ @ApiModelProperty(value = "The newly created payment.") public Payment getPayment() { return payment; } public void setPayment(Payment payment) { this.payment = payment; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CreatePaymentResponse createPaymentResponse = (CreatePaymentResponse) o; return Objects.equals(this.errors, createPaymentResponse.errors) && Objects.equals(this.payment, createPaymentResponse.payment); } @Override public int hashCode() { return Objects.hash(errors, payment); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreatePaymentResponse {\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" payment: ").append(toIndentedString(payment)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,780
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1CreatePageRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.V1Page; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * */ @ApiModel(description = "") public class V1CreatePageRequest { @JsonProperty("body") private V1Page body = null; public V1CreatePageRequest body(V1Page body) { this.body = body; return this; } /** * An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return body **/ @ApiModelProperty(value = "An object containing the fields to POST for the request. See the corresponding object definition for field details.") public V1Page getBody() { return body; } public void setBody(V1Page body) { this.body = body; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1CreatePageRequest v1CreatePageRequest = (V1CreatePageRequest) o; return Objects.equals(this.body, v1CreatePageRequest.body); } @Override public int hashCode() { return Objects.hash(body); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1CreatePageRequest {\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,781
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/ShiftFilter.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.ShiftWorkday; import com.squareup.connect.models.TimeRange; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * Defines a filter used in a search for &#x60;Shift&#x60; records. &#x60;AND&#x60; logic is used by Square&#39;s servers to apply each filter property specified. */ @ApiModel(description = "Defines a filter used in a search for `Shift` records. `AND` logic is used by Square's servers to apply each filter property specified.") public class ShiftFilter { @JsonProperty("location_ids") private List<String> locationIds = new ArrayList<String>(); @JsonProperty("employee_ids") private List<String> employeeIds = new ArrayList<String>(); @JsonProperty("status") private String status = null; @JsonProperty("start") private TimeRange start = null; @JsonProperty("end") private TimeRange end = null; @JsonProperty("workday") private ShiftWorkday workday = null; public ShiftFilter locationIds(List<String> locationIds) { this.locationIds = locationIds; return this; } public ShiftFilter addLocationIdsItem(String locationIdsItem) { this.locationIds.add(locationIdsItem); return this; } /** * Fetch shifts for the specified location. * @return locationIds **/ @ApiModelProperty(value = "Fetch shifts for the specified location.") public List<String> getLocationIds() { return locationIds; } public void setLocationIds(List<String> locationIds) { this.locationIds = locationIds; } public ShiftFilter employeeIds(List<String> employeeIds) { this.employeeIds = employeeIds; return this; } public ShiftFilter addEmployeeIdsItem(String employeeIdsItem) { this.employeeIds.add(employeeIdsItem); return this; } /** * Fetch shifts for the specified employee. * @return employeeIds **/ @ApiModelProperty(value = "Fetch shifts for the specified employee.") public List<String> getEmployeeIds() { return employeeIds; } public void setEmployeeIds(List<String> employeeIds) { this.employeeIds = employeeIds; } public ShiftFilter status(String status) { this.status = status; return this; } /** * Fetch a `Shift` instance by `Shift.status`. See [ShiftFilterStatus](#type-shiftfilterstatus) for possible values * @return status **/ @ApiModelProperty(value = "Fetch a `Shift` instance by `Shift.status`. See [ShiftFilterStatus](#type-shiftfilterstatus) for possible values") public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public ShiftFilter start(TimeRange start) { this.start = start; return this; } /** * Fetch `Shift`s that start in the time range - Inclusive. * @return start **/ @ApiModelProperty(value = "Fetch `Shift`s that start in the time range - Inclusive.") public TimeRange getStart() { return start; } public void setStart(TimeRange start) { this.start = start; } public ShiftFilter end(TimeRange end) { this.end = end; return this; } /** * Fetch the `Shift`s that end in the time range - Inclusive. * @return end **/ @ApiModelProperty(value = "Fetch the `Shift`s that end in the time range - Inclusive.") public TimeRange getEnd() { return end; } public void setEnd(TimeRange end) { this.end = end; } public ShiftFilter workday(ShiftWorkday workday) { this.workday = workday; return this; } /** * Fetch the `Shift`s based on workday date range. * @return workday **/ @ApiModelProperty(value = "Fetch the `Shift`s based on workday date range.") public ShiftWorkday getWorkday() { return workday; } public void setWorkday(ShiftWorkday workday) { this.workday = workday; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ShiftFilter shiftFilter = (ShiftFilter) o; return Objects.equals(this.locationIds, shiftFilter.locationIds) && Objects.equals(this.employeeIds, shiftFilter.employeeIds) && Objects.equals(this.status, shiftFilter.status) && Objects.equals(this.start, shiftFilter.start) && Objects.equals(this.end, shiftFilter.end) && Objects.equals(this.workday, shiftFilter.workday); } @Override public int hashCode() { return Objects.hash(locationIds, employeeIds, status, start, end, workday); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ShiftFilter {\n"); sb.append(" locationIds: ").append(toIndentedString(locationIds)).append("\n"); sb.append(" employeeIds: ").append(toIndentedString(employeeIds)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" start: ").append(toIndentedString(start)).append("\n"); sb.append(" end: ").append(toIndentedString(end)).append("\n"); sb.append(" workday: ").append(toIndentedString(workday)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,782
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/ListAdditionalRecipientReceivablesRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Defines the query parameters that can be included in a request to the [ListAdditionalRecipientReceivables](#endpoint-listadditionalrecipientreceivables) endpoint. */ @ApiModel(description = "Defines the query parameters that can be included in a request to the [ListAdditionalRecipientReceivables](#endpoint-listadditionalrecipientreceivables) endpoint.") public class ListAdditionalRecipientReceivablesRequest { @JsonProperty("begin_time") private String beginTime = null; @JsonProperty("end_time") private String endTime = null; @JsonProperty("sort_order") private String sortOrder = null; @JsonProperty("cursor") private String cursor = null; public ListAdditionalRecipientReceivablesRequest beginTime(String beginTime) { this.beginTime = beginTime; return this; } /** * The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year. * @return beginTime **/ @ApiModelProperty(value = "The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.") public String getBeginTime() { return beginTime; } public void setBeginTime(String beginTime) { this.beginTime = beginTime; } public ListAdditionalRecipientReceivablesRequest endTime(String endTime) { this.endTime = endTime; return this; } /** * The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time. * @return endTime **/ @ApiModelProperty(value = "The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.") public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public ListAdditionalRecipientReceivablesRequest sortOrder(String sortOrder) { this.sortOrder = sortOrder; return this; } /** * The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` See [SortOrder](#type-sortorder) for possible values * @return sortOrder **/ @ApiModelProperty(value = "The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` See [SortOrder](#type-sortorder) for possible values") public String getSortOrder() { return sortOrder; } public void setSortOrder(String sortOrder) { this.sortOrder = sortOrder; } public ListAdditionalRecipientReceivablesRequest cursor(String cursor) { this.cursor = cursor; return this; } /** * A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information. * @return cursor **/ @ApiModelProperty(value = "A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information.") public String getCursor() { return cursor; } public void setCursor(String cursor) { this.cursor = cursor; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ListAdditionalRecipientReceivablesRequest listAdditionalRecipientReceivablesRequest = (ListAdditionalRecipientReceivablesRequest) o; return Objects.equals(this.beginTime, listAdditionalRecipientReceivablesRequest.beginTime) && Objects.equals(this.endTime, listAdditionalRecipientReceivablesRequest.endTime) && Objects.equals(this.sortOrder, listAdditionalRecipientReceivablesRequest.sortOrder) && Objects.equals(this.cursor, listAdditionalRecipientReceivablesRequest.cursor); } @Override public int hashCode() { return Objects.hash(beginTime, endTime, sortOrder, cursor); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListAdditionalRecipientReceivablesRequest {\n"); sb.append(" beginTime: ").append(toIndentedString(beginTime)).append("\n"); sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); sb.append(" sortOrder: ").append(toIndentedString(sortOrder)).append("\n"); sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,783
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/OrderReturnLineItemModifier.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Money; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * A line item modifier being returned. */ @ApiModel(description = "A line item modifier being returned.") public class OrderReturnLineItemModifier { @JsonProperty("uid") private String uid = null; @JsonProperty("source_modifier_uid") private String sourceModifierUid = null; @JsonProperty("catalog_object_id") private String catalogObjectId = null; @JsonProperty("name") private String name = null; @JsonProperty("base_price_money") private Money basePriceMoney = null; @JsonProperty("total_price_money") private Money totalPriceMoney = null; public OrderReturnLineItemModifier uid(String uid) { this.uid = uid; return this; } /** * Unique ID that identifies the return modifier only within this order. * @return uid **/ @ApiModelProperty(value = "Unique ID that identifies the return modifier only within this order.") public String getUid() { return uid; } public void setUid(String uid) { this.uid = uid; } public OrderReturnLineItemModifier sourceModifierUid(String sourceModifierUid) { this.sourceModifierUid = sourceModifierUid; return this; } /** * `uid` of the Modifier from the LineItem from the Order which contains the original sale of this line item modifier. * @return sourceModifierUid **/ @ApiModelProperty(value = "`uid` of the Modifier from the LineItem from the Order which contains the original sale of this line item modifier.") public String getSourceModifierUid() { return sourceModifierUid; } public void setSourceModifierUid(String sourceModifierUid) { this.sourceModifierUid = sourceModifierUid; } public OrderReturnLineItemModifier catalogObjectId(String catalogObjectId) { this.catalogObjectId = catalogObjectId; return this; } /** * The catalog object id referencing `CatalogModifier`. * @return catalogObjectId **/ @ApiModelProperty(value = "The catalog object id referencing `CatalogModifier`.") public String getCatalogObjectId() { return catalogObjectId; } public void setCatalogObjectId(String catalogObjectId) { this.catalogObjectId = catalogObjectId; } public OrderReturnLineItemModifier name(String name) { this.name = name; return this; } /** * The name of the item modifier. * @return name **/ @ApiModelProperty(value = "The name of the item modifier.") public String getName() { return name; } public void setName(String name) { this.name = name; } public OrderReturnLineItemModifier basePriceMoney(Money basePriceMoney) { this.basePriceMoney = basePriceMoney; return this; } /** * The base price for the modifier. `base_price_money` is required for ad hoc modifiers. If both `catalog_object_id` and `base_price_money` are set, `base_price_money` will override the predefined `CatalogModifier` price. * @return basePriceMoney **/ @ApiModelProperty(value = "The base price for the modifier. `base_price_money` is required for ad hoc modifiers. If both `catalog_object_id` and `base_price_money` are set, `base_price_money` will override the predefined `CatalogModifier` price.") public Money getBasePriceMoney() { return basePriceMoney; } public void setBasePriceMoney(Money basePriceMoney) { this.basePriceMoney = basePriceMoney; } public OrderReturnLineItemModifier totalPriceMoney(Money totalPriceMoney) { this.totalPriceMoney = totalPriceMoney; return this; } /** * The total price of the item modifier for its line item. This is the modifier's `base_price_money` multiplied by the line item's quantity. * @return totalPriceMoney **/ @ApiModelProperty(value = "The total price of the item modifier for its line item. This is the modifier's `base_price_money` multiplied by the line item's quantity.") public Money getTotalPriceMoney() { return totalPriceMoney; } public void setTotalPriceMoney(Money totalPriceMoney) { this.totalPriceMoney = totalPriceMoney; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrderReturnLineItemModifier orderReturnLineItemModifier = (OrderReturnLineItemModifier) o; return Objects.equals(this.uid, orderReturnLineItemModifier.uid) && Objects.equals(this.sourceModifierUid, orderReturnLineItemModifier.sourceModifierUid) && Objects.equals(this.catalogObjectId, orderReturnLineItemModifier.catalogObjectId) && Objects.equals(this.name, orderReturnLineItemModifier.name) && Objects.equals(this.basePriceMoney, orderReturnLineItemModifier.basePriceMoney) && Objects.equals(this.totalPriceMoney, orderReturnLineItemModifier.totalPriceMoney); } @Override public int hashCode() { return Objects.hash(uid, sourceModifierUid, catalogObjectId, name, basePriceMoney, totalPriceMoney); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderReturnLineItemModifier {\n"); sb.append(" uid: ").append(toIndentedString(uid)).append("\n"); sb.append(" sourceModifierUid: ").append(toIndentedString(sourceModifierUid)).append("\n"); sb.append(" catalogObjectId: ").append(toIndentedString(catalogObjectId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" basePriceMoney: ").append(toIndentedString(basePriceMoney)).append("\n"); sb.append(" totalPriceMoney: ").append(toIndentedString(totalPriceMoney)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,784
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CreateOrderRequestTax.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * __Deprecated__: Please use the [OrderLineItemTax](#type-orderlineitemtax) type in the order field of [CreateOrderRequest](#type-createorderrequest) instead. Represents a tax that can apply to either a single line item or an entire order. */ @ApiModel(description = "__Deprecated__: Please use the [OrderLineItemTax](#type-orderlineitemtax) type in the order field of [CreateOrderRequest](#type-createorderrequest) instead. Represents a tax that can apply to either a single line item or an entire order.") public class CreateOrderRequestTax { @JsonProperty("catalog_object_id") private String catalogObjectId = null; @JsonProperty("name") private String name = null; @JsonProperty("type") private String type = null; @JsonProperty("percentage") private String percentage = null; public CreateOrderRequestTax catalogObjectId(String catalogObjectId) { this.catalogObjectId = catalogObjectId; return this; } /** * Only used for catalog taxes. The catalog object ID of an existing `CatalogTax`. Do not provide a value for this field if you provide values in other fields for an ad hoc tax. * @return catalogObjectId **/ @ApiModelProperty(value = "Only used for catalog taxes. The catalog object ID of an existing `CatalogTax`. Do not provide a value for this field if you provide values in other fields for an ad hoc tax.") public String getCatalogObjectId() { return catalogObjectId; } public void setCatalogObjectId(String catalogObjectId) { this.catalogObjectId = catalogObjectId; } public CreateOrderRequestTax name(String name) { this.name = name; return this; } /** * Only used for ad hoc taxes. The tax's name. Do not provide a value for this field if you set `catalog_object_id`. * @return name **/ @ApiModelProperty(value = "Only used for ad hoc taxes. The tax's name. Do not provide a value for this field if you set `catalog_object_id`.") public String getName() { return name; } public void setName(String name) { this.name = name; } public CreateOrderRequestTax type(String type) { this.type = type; return this; } /** * Only used for ad hoc taxes. Indicates the calculation method used to apply the line item tax. Default: `ADDITIVE`; See `OrderLineItemTaxType` for possible values. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values * @return type **/ @ApiModelProperty(value = "Only used for ad hoc taxes. Indicates the calculation method used to apply the line item tax. Default: `ADDITIVE`; See `OrderLineItemTaxType` for possible values. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values") public String getType() { return type; } public void setType(String type) { this.type = type; } public CreateOrderRequestTax percentage(String percentage) { this.percentage = percentage; return this; } /** * Only used for ad hoc taxes. The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. This value range between 0.0 up to 100.0 * @return percentage **/ @ApiModelProperty(value = "Only used for ad hoc taxes. The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. This value range between 0.0 up to 100.0") public String getPercentage() { return percentage; } public void setPercentage(String percentage) { this.percentage = percentage; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CreateOrderRequestTax createOrderRequestTax = (CreateOrderRequestTax) o; return Objects.equals(this.catalogObjectId, createOrderRequestTax.catalogObjectId) && Objects.equals(this.name, createOrderRequestTax.name) && Objects.equals(this.type, createOrderRequestTax.type) && Objects.equals(this.percentage, createOrderRequestTax.percentage); } @Override public int hashCode() { return Objects.hash(catalogObjectId, name, type, percentage); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateOrderRequestTax {\n"); sb.append(" catalogObjectId: ").append(toIndentedString(catalogObjectId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,785
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1ListItemsResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.V1Item; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class V1ListItemsResponse { @JsonProperty("items") private List<V1Item> items = new ArrayList<V1Item>(); public V1ListItemsResponse items(List<V1Item> items) { this.items = items; return this; } public V1ListItemsResponse addItemsItem(V1Item itemsItem) { this.items.add(itemsItem); return this; } /** * * @return items **/ @ApiModelProperty(value = "") public List<V1Item> getItems() { return items; } public void setItems(List<V1Item> items) { this.items = items; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1ListItemsResponse v1ListItemsResponse = (V1ListItemsResponse) o; return Objects.equals(this.items, v1ListItemsResponse.items); } @Override public int hashCode() { return Objects.hash(items); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1ListItemsResponse {\n"); sb.append(" items: ").append(toIndentedString(items)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,786
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1ListModifierListsResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.V1ModifierList; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class V1ListModifierListsResponse { @JsonProperty("items") private List<V1ModifierList> items = new ArrayList<V1ModifierList>(); public V1ListModifierListsResponse items(List<V1ModifierList> items) { this.items = items; return this; } public V1ListModifierListsResponse addItemsItem(V1ModifierList itemsItem) { this.items.add(itemsItem); return this; } /** * * @return items **/ @ApiModelProperty(value = "") public List<V1ModifierList> getItems() { return items; } public void setItems(List<V1ModifierList> items) { this.items = items; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1ListModifierListsResponse v1ListModifierListsResponse = (V1ListModifierListsResponse) o; return Objects.equals(this.items, v1ListModifierListsResponse.items); } @Override public int hashCode() { return Objects.hash(items); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1ListModifierListsResponse {\n"); sb.append(" items: ").append(toIndentedString(items)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,787
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/ListBreakTypesRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * A request for a filtered set of &#x60;BreakType&#x60; objects */ @ApiModel(description = "A request for a filtered set of `BreakType` objects") public class ListBreakTypesRequest { @JsonProperty("location_id") private String locationId = null; @JsonProperty("limit") private Integer limit = null; @JsonProperty("cursor") private String cursor = null; public ListBreakTypesRequest locationId(String locationId) { this.locationId = locationId; return this; } /** * Filter Break Types returned to only those that are associated with the specified location. * @return locationId **/ @ApiModelProperty(value = "Filter Break Types returned to only those that are associated with the specified location.") public String getLocationId() { return locationId; } public void setLocationId(String locationId) { this.locationId = locationId; } public ListBreakTypesRequest limit(Integer limit) { this.limit = limit; return this; } /** * Maximum number of Break Types to return per page. Can range between 1 and 200. The default is the maximum at 200. * minimum: 1 * maximum: 200 * @return limit **/ @ApiModelProperty(value = "Maximum number of Break Types to return per page. Can range between 1 and 200. The default is the maximum at 200.") public Integer getLimit() { return limit; } public void setLimit(Integer limit) { this.limit = limit; } public ListBreakTypesRequest cursor(String cursor) { this.cursor = cursor; return this; } /** * Pointer to the next page of Break Type results to fetch. * @return cursor **/ @ApiModelProperty(value = "Pointer to the next page of Break Type results to fetch.") public String getCursor() { return cursor; } public void setCursor(String cursor) { this.cursor = cursor; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ListBreakTypesRequest listBreakTypesRequest = (ListBreakTypesRequest) o; return Objects.equals(this.locationId, listBreakTypesRequest.locationId) && Objects.equals(this.limit, listBreakTypesRequest.limit) && Objects.equals(this.cursor, listBreakTypesRequest.cursor); } @Override public int hashCode() { return Objects.hash(locationId, limit, cursor); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListBreakTypesRequest {\n"); sb.append(" locationId: ").append(toIndentedString(locationId)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,788
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CatalogInfoResponseLimits.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * */ @ApiModel(description = "") public class CatalogInfoResponseLimits { @JsonProperty("batch_upsert_max_objects_per_batch") private Integer batchUpsertMaxObjectsPerBatch = null; @JsonProperty("batch_upsert_max_total_objects") private Integer batchUpsertMaxTotalObjects = null; @JsonProperty("batch_retrieve_max_object_ids") private Integer batchRetrieveMaxObjectIds = null; @JsonProperty("search_max_page_limit") private Integer searchMaxPageLimit = null; @JsonProperty("batch_delete_max_object_ids") private Integer batchDeleteMaxObjectIds = null; @JsonProperty("update_item_taxes_max_item_ids") private Integer updateItemTaxesMaxItemIds = null; @JsonProperty("update_item_taxes_max_taxes_to_enable") private Integer updateItemTaxesMaxTaxesToEnable = null; @JsonProperty("update_item_taxes_max_taxes_to_disable") private Integer updateItemTaxesMaxTaxesToDisable = null; @JsonProperty("update_item_modifier_lists_max_item_ids") private Integer updateItemModifierListsMaxItemIds = null; @JsonProperty("update_item_modifier_lists_max_modifier_lists_to_enable") private Integer updateItemModifierListsMaxModifierListsToEnable = null; @JsonProperty("update_item_modifier_lists_max_modifier_lists_to_disable") private Integer updateItemModifierListsMaxModifierListsToDisable = null; public CatalogInfoResponseLimits batchUpsertMaxObjectsPerBatch(Integer batchUpsertMaxObjectsPerBatch) { this.batchUpsertMaxObjectsPerBatch = batchUpsertMaxObjectsPerBatch; return this; } /** * The maximum number of objects that may appear within a single batch in a `/v2/catalog/batch-upsert` request. * @return batchUpsertMaxObjectsPerBatch **/ @ApiModelProperty(value = "The maximum number of objects that may appear within a single batch in a `/v2/catalog/batch-upsert` request.") public Integer getBatchUpsertMaxObjectsPerBatch() { return batchUpsertMaxObjectsPerBatch; } public void setBatchUpsertMaxObjectsPerBatch(Integer batchUpsertMaxObjectsPerBatch) { this.batchUpsertMaxObjectsPerBatch = batchUpsertMaxObjectsPerBatch; } public CatalogInfoResponseLimits batchUpsertMaxTotalObjects(Integer batchUpsertMaxTotalObjects) { this.batchUpsertMaxTotalObjects = batchUpsertMaxTotalObjects; return this; } /** * The maximum number of objects that may appear across all batches in a `/v2/catalog/batch-upsert` request. * @return batchUpsertMaxTotalObjects **/ @ApiModelProperty(value = "The maximum number of objects that may appear across all batches in a `/v2/catalog/batch-upsert` request.") public Integer getBatchUpsertMaxTotalObjects() { return batchUpsertMaxTotalObjects; } public void setBatchUpsertMaxTotalObjects(Integer batchUpsertMaxTotalObjects) { this.batchUpsertMaxTotalObjects = batchUpsertMaxTotalObjects; } public CatalogInfoResponseLimits batchRetrieveMaxObjectIds(Integer batchRetrieveMaxObjectIds) { this.batchRetrieveMaxObjectIds = batchRetrieveMaxObjectIds; return this; } /** * The maximum number of object IDs that may appear in a `/v2/catalog/batch-retrieve` request. * @return batchRetrieveMaxObjectIds **/ @ApiModelProperty(value = "The maximum number of object IDs that may appear in a `/v2/catalog/batch-retrieve` request.") public Integer getBatchRetrieveMaxObjectIds() { return batchRetrieveMaxObjectIds; } public void setBatchRetrieveMaxObjectIds(Integer batchRetrieveMaxObjectIds) { this.batchRetrieveMaxObjectIds = batchRetrieveMaxObjectIds; } public CatalogInfoResponseLimits searchMaxPageLimit(Integer searchMaxPageLimit) { this.searchMaxPageLimit = searchMaxPageLimit; return this; } /** * The maximum number of results that may be returned in a page of a `/v2/catalog/search` response. * @return searchMaxPageLimit **/ @ApiModelProperty(value = "The maximum number of results that may be returned in a page of a `/v2/catalog/search` response.") public Integer getSearchMaxPageLimit() { return searchMaxPageLimit; } public void setSearchMaxPageLimit(Integer searchMaxPageLimit) { this.searchMaxPageLimit = searchMaxPageLimit; } public CatalogInfoResponseLimits batchDeleteMaxObjectIds(Integer batchDeleteMaxObjectIds) { this.batchDeleteMaxObjectIds = batchDeleteMaxObjectIds; return this; } /** * The maximum number of object IDs that may be included in a single `/v2/catalog/batch-delete` request. * @return batchDeleteMaxObjectIds **/ @ApiModelProperty(value = "The maximum number of object IDs that may be included in a single `/v2/catalog/batch-delete` request.") public Integer getBatchDeleteMaxObjectIds() { return batchDeleteMaxObjectIds; } public void setBatchDeleteMaxObjectIds(Integer batchDeleteMaxObjectIds) { this.batchDeleteMaxObjectIds = batchDeleteMaxObjectIds; } public CatalogInfoResponseLimits updateItemTaxesMaxItemIds(Integer updateItemTaxesMaxItemIds) { this.updateItemTaxesMaxItemIds = updateItemTaxesMaxItemIds; return this; } /** * The maximum number of item IDs that may be included in a single `/v2/catalog/update-item-taxes` request. * @return updateItemTaxesMaxItemIds **/ @ApiModelProperty(value = "The maximum number of item IDs that may be included in a single `/v2/catalog/update-item-taxes` request.") public Integer getUpdateItemTaxesMaxItemIds() { return updateItemTaxesMaxItemIds; } public void setUpdateItemTaxesMaxItemIds(Integer updateItemTaxesMaxItemIds) { this.updateItemTaxesMaxItemIds = updateItemTaxesMaxItemIds; } public CatalogInfoResponseLimits updateItemTaxesMaxTaxesToEnable(Integer updateItemTaxesMaxTaxesToEnable) { this.updateItemTaxesMaxTaxesToEnable = updateItemTaxesMaxTaxesToEnable; return this; } /** * The maximum number of tax IDs to be enabled that may be included in a single `/v2/catalog/update-item-taxes` request. * @return updateItemTaxesMaxTaxesToEnable **/ @ApiModelProperty(value = "The maximum number of tax IDs to be enabled that may be included in a single `/v2/catalog/update-item-taxes` request.") public Integer getUpdateItemTaxesMaxTaxesToEnable() { return updateItemTaxesMaxTaxesToEnable; } public void setUpdateItemTaxesMaxTaxesToEnable(Integer updateItemTaxesMaxTaxesToEnable) { this.updateItemTaxesMaxTaxesToEnable = updateItemTaxesMaxTaxesToEnable; } public CatalogInfoResponseLimits updateItemTaxesMaxTaxesToDisable(Integer updateItemTaxesMaxTaxesToDisable) { this.updateItemTaxesMaxTaxesToDisable = updateItemTaxesMaxTaxesToDisable; return this; } /** * The maximum number of tax IDs to be disabled that may be included in a single `/v2/catalog/update-item-taxes` request. * @return updateItemTaxesMaxTaxesToDisable **/ @ApiModelProperty(value = "The maximum number of tax IDs to be disabled that may be included in a single `/v2/catalog/update-item-taxes` request.") public Integer getUpdateItemTaxesMaxTaxesToDisable() { return updateItemTaxesMaxTaxesToDisable; } public void setUpdateItemTaxesMaxTaxesToDisable(Integer updateItemTaxesMaxTaxesToDisable) { this.updateItemTaxesMaxTaxesToDisable = updateItemTaxesMaxTaxesToDisable; } public CatalogInfoResponseLimits updateItemModifierListsMaxItemIds(Integer updateItemModifierListsMaxItemIds) { this.updateItemModifierListsMaxItemIds = updateItemModifierListsMaxItemIds; return this; } /** * The maximum number of item IDs that may be included in a single `/v2/catalog/update-item-modifier-lists` request. * @return updateItemModifierListsMaxItemIds **/ @ApiModelProperty(value = "The maximum number of item IDs that may be included in a single `/v2/catalog/update-item-modifier-lists` request.") public Integer getUpdateItemModifierListsMaxItemIds() { return updateItemModifierListsMaxItemIds; } public void setUpdateItemModifierListsMaxItemIds(Integer updateItemModifierListsMaxItemIds) { this.updateItemModifierListsMaxItemIds = updateItemModifierListsMaxItemIds; } public CatalogInfoResponseLimits updateItemModifierListsMaxModifierListsToEnable(Integer updateItemModifierListsMaxModifierListsToEnable) { this.updateItemModifierListsMaxModifierListsToEnable = updateItemModifierListsMaxModifierListsToEnable; return this; } /** * The maximum number of modifier list IDs to be enabled that may be included in a single `/v2/catalog/update-item-modifier-lists` request. * @return updateItemModifierListsMaxModifierListsToEnable **/ @ApiModelProperty(value = "The maximum number of modifier list IDs to be enabled that may be included in a single `/v2/catalog/update-item-modifier-lists` request.") public Integer getUpdateItemModifierListsMaxModifierListsToEnable() { return updateItemModifierListsMaxModifierListsToEnable; } public void setUpdateItemModifierListsMaxModifierListsToEnable(Integer updateItemModifierListsMaxModifierListsToEnable) { this.updateItemModifierListsMaxModifierListsToEnable = updateItemModifierListsMaxModifierListsToEnable; } public CatalogInfoResponseLimits updateItemModifierListsMaxModifierListsToDisable(Integer updateItemModifierListsMaxModifierListsToDisable) { this.updateItemModifierListsMaxModifierListsToDisable = updateItemModifierListsMaxModifierListsToDisable; return this; } /** * The maximum number of modifier list IDs to be disabled that may be included in a single `/v2/catalog/update-item-modifier-lists` request. * @return updateItemModifierListsMaxModifierListsToDisable **/ @ApiModelProperty(value = "The maximum number of modifier list IDs to be disabled that may be included in a single `/v2/catalog/update-item-modifier-lists` request.") public Integer getUpdateItemModifierListsMaxModifierListsToDisable() { return updateItemModifierListsMaxModifierListsToDisable; } public void setUpdateItemModifierListsMaxModifierListsToDisable(Integer updateItemModifierListsMaxModifierListsToDisable) { this.updateItemModifierListsMaxModifierListsToDisable = updateItemModifierListsMaxModifierListsToDisable; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CatalogInfoResponseLimits catalogInfoResponseLimits = (CatalogInfoResponseLimits) o; return Objects.equals(this.batchUpsertMaxObjectsPerBatch, catalogInfoResponseLimits.batchUpsertMaxObjectsPerBatch) && Objects.equals(this.batchUpsertMaxTotalObjects, catalogInfoResponseLimits.batchUpsertMaxTotalObjects) && Objects.equals(this.batchRetrieveMaxObjectIds, catalogInfoResponseLimits.batchRetrieveMaxObjectIds) && Objects.equals(this.searchMaxPageLimit, catalogInfoResponseLimits.searchMaxPageLimit) && Objects.equals(this.batchDeleteMaxObjectIds, catalogInfoResponseLimits.batchDeleteMaxObjectIds) && Objects.equals(this.updateItemTaxesMaxItemIds, catalogInfoResponseLimits.updateItemTaxesMaxItemIds) && Objects.equals(this.updateItemTaxesMaxTaxesToEnable, catalogInfoResponseLimits.updateItemTaxesMaxTaxesToEnable) && Objects.equals(this.updateItemTaxesMaxTaxesToDisable, catalogInfoResponseLimits.updateItemTaxesMaxTaxesToDisable) && Objects.equals(this.updateItemModifierListsMaxItemIds, catalogInfoResponseLimits.updateItemModifierListsMaxItemIds) && Objects.equals(this.updateItemModifierListsMaxModifierListsToEnable, catalogInfoResponseLimits.updateItemModifierListsMaxModifierListsToEnable) && Objects.equals(this.updateItemModifierListsMaxModifierListsToDisable, catalogInfoResponseLimits.updateItemModifierListsMaxModifierListsToDisable); } @Override public int hashCode() { return Objects.hash(batchUpsertMaxObjectsPerBatch, batchUpsertMaxTotalObjects, batchRetrieveMaxObjectIds, searchMaxPageLimit, batchDeleteMaxObjectIds, updateItemTaxesMaxItemIds, updateItemTaxesMaxTaxesToEnable, updateItemTaxesMaxTaxesToDisable, updateItemModifierListsMaxItemIds, updateItemModifierListsMaxModifierListsToEnable, updateItemModifierListsMaxModifierListsToDisable); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatalogInfoResponseLimits {\n"); sb.append(" batchUpsertMaxObjectsPerBatch: ").append(toIndentedString(batchUpsertMaxObjectsPerBatch)).append("\n"); sb.append(" batchUpsertMaxTotalObjects: ").append(toIndentedString(batchUpsertMaxTotalObjects)).append("\n"); sb.append(" batchRetrieveMaxObjectIds: ").append(toIndentedString(batchRetrieveMaxObjectIds)).append("\n"); sb.append(" searchMaxPageLimit: ").append(toIndentedString(searchMaxPageLimit)).append("\n"); sb.append(" batchDeleteMaxObjectIds: ").append(toIndentedString(batchDeleteMaxObjectIds)).append("\n"); sb.append(" updateItemTaxesMaxItemIds: ").append(toIndentedString(updateItemTaxesMaxItemIds)).append("\n"); sb.append(" updateItemTaxesMaxTaxesToEnable: ").append(toIndentedString(updateItemTaxesMaxTaxesToEnable)).append("\n"); sb.append(" updateItemTaxesMaxTaxesToDisable: ").append(toIndentedString(updateItemTaxesMaxTaxesToDisable)).append("\n"); sb.append(" updateItemModifierListsMaxItemIds: ").append(toIndentedString(updateItemModifierListsMaxItemIds)).append("\n"); sb.append(" updateItemModifierListsMaxModifierListsToEnable: ").append(toIndentedString(updateItemModifierListsMaxModifierListsToEnable)).append("\n"); sb.append(" updateItemModifierListsMaxModifierListsToDisable: ").append(toIndentedString(updateItemModifierListsMaxModifierListsToDisable)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,789
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/UpsertCatalogObjectResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.CatalogIdMapping; import com.squareup.connect.models.CatalogObject; import com.squareup.connect.models.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class UpsertCatalogObjectResponse { @JsonProperty("errors") private List<Error> errors = new ArrayList<Error>(); @JsonProperty("catalog_object") private CatalogObject catalogObject = null; @JsonProperty("id_mappings") private List<CatalogIdMapping> idMappings = new ArrayList<CatalogIdMapping>(); public UpsertCatalogObjectResponse errors(List<Error> errors) { this.errors = errors; return this; } public UpsertCatalogObjectResponse addErrorsItem(Error errorsItem) { this.errors.add(errorsItem); return this; } /** * Information on any errors encountered. * @return errors **/ @ApiModelProperty(value = "Information on any errors encountered.") public List<Error> getErrors() { return errors; } public void setErrors(List<Error> errors) { this.errors = errors; } public UpsertCatalogObjectResponse catalogObject(CatalogObject catalogObject) { this.catalogObject = catalogObject; return this; } /** * The successfully created or updated CatalogObject. * @return catalogObject **/ @ApiModelProperty(value = "The successfully created or updated CatalogObject.") public CatalogObject getCatalogObject() { return catalogObject; } public void setCatalogObject(CatalogObject catalogObject) { this.catalogObject = catalogObject; } public UpsertCatalogObjectResponse idMappings(List<CatalogIdMapping> idMappings) { this.idMappings = idMappings; return this; } public UpsertCatalogObjectResponse addIdMappingsItem(CatalogIdMapping idMappingsItem) { this.idMappings.add(idMappingsItem); return this; } /** * The mapping between client and server IDs for this upsert. * @return idMappings **/ @ApiModelProperty(value = "The mapping between client and server IDs for this upsert.") public List<CatalogIdMapping> getIdMappings() { return idMappings; } public void setIdMappings(List<CatalogIdMapping> idMappings) { this.idMappings = idMappings; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UpsertCatalogObjectResponse upsertCatalogObjectResponse = (UpsertCatalogObjectResponse) o; return Objects.equals(this.errors, upsertCatalogObjectResponse.errors) && Objects.equals(this.catalogObject, upsertCatalogObjectResponse.catalogObject) && Objects.equals(this.idMappings, upsertCatalogObjectResponse.idMappings); } @Override public int hashCode() { return Objects.hash(errors, catalogObject, idMappings); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpsertCatalogObjectResponse {\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" catalogObject: ").append(toIndentedString(catalogObject)).append("\n"); sb.append(" idMappings: ").append(toIndentedString(idMappings)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,790
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CatalogQueryCustomAttributeUsage.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class CatalogQueryCustomAttributeUsage { @JsonProperty("custom_attribute_definition_ids") private List<String> customAttributeDefinitionIds = new ArrayList<String>(); @JsonProperty("has_value") private Boolean hasValue = null; public CatalogQueryCustomAttributeUsage customAttributeDefinitionIds(List<String> customAttributeDefinitionIds) { this.customAttributeDefinitionIds = customAttributeDefinitionIds; return this; } public CatalogQueryCustomAttributeUsage addCustomAttributeDefinitionIdsItem(String customAttributeDefinitionIdsItem) { this.customAttributeDefinitionIds.add(customAttributeDefinitionIdsItem); return this; } /** * * @return customAttributeDefinitionIds **/ @ApiModelProperty(value = "") public List<String> getCustomAttributeDefinitionIds() { return customAttributeDefinitionIds; } public void setCustomAttributeDefinitionIds(List<String> customAttributeDefinitionIds) { this.customAttributeDefinitionIds = customAttributeDefinitionIds; } public CatalogQueryCustomAttributeUsage hasValue(Boolean hasValue) { this.hasValue = hasValue; return this; } /** * * @return hasValue **/ @ApiModelProperty(value = "") public Boolean getHasValue() { return hasValue; } public void setHasValue(Boolean hasValue) { this.hasValue = hasValue; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CatalogQueryCustomAttributeUsage catalogQueryCustomAttributeUsage = (CatalogQueryCustomAttributeUsage) o; return Objects.equals(this.customAttributeDefinitionIds, catalogQueryCustomAttributeUsage.customAttributeDefinitionIds) && Objects.equals(this.hasValue, catalogQueryCustomAttributeUsage.hasValue); } @Override public int hashCode() { return Objects.hash(customAttributeDefinitionIds, hasValue); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatalogQueryCustomAttributeUsage {\n"); sb.append(" customAttributeDefinitionIds: ").append(toIndentedString(customAttributeDefinitionIds)).append("\n"); sb.append(" hasValue: ").append(toIndentedString(hasValue)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,791
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/SearchOrdersSort.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Sorting criteria for a SearchOrders request. Results can only be sorted by a timestamp field. */ @ApiModel(description = "Sorting criteria for a SearchOrders request. Results can only be sorted by a timestamp field.") public class SearchOrdersSort { @JsonProperty("sort_field") private String sortField = null; @JsonProperty("sort_order") private String sortOrder = null; public SearchOrdersSort sortField(String sortField) { this.sortField = sortField; return this; } /** * The field to sort by. __Important:__ When using a `DateTimeFilter`, `sort_field` must match the timestamp field that the DateTimeFilter uses to filter. For example, If you set your `sort_field` to `CLOSED_AT` and you use a DateTimeFilter, your DateTimeFilter must filter for orders by their `CLOSED_AT` date. If this field does not match the timestamp field in `DateTimeFilter`, SearchOrders will return an error. Default: `CREATED_AT`. See [SearchOrdersSortField](#type-searchorderssortfield) for possible values * @return sortField **/ @ApiModelProperty(required = true, value = "The field to sort by. __Important:__ When using a `DateTimeFilter`, `sort_field` must match the timestamp field that the DateTimeFilter uses to filter. For example, If you set your `sort_field` to `CLOSED_AT` and you use a DateTimeFilter, your DateTimeFilter must filter for orders by their `CLOSED_AT` date. If this field does not match the timestamp field in `DateTimeFilter`, SearchOrders will return an error. Default: `CREATED_AT`. See [SearchOrdersSortField](#type-searchorderssortfield) for possible values") public String getSortField() { return sortField; } public void setSortField(String sortField) { this.sortField = sortField; } public SearchOrdersSort sortOrder(String sortOrder) { this.sortOrder = sortOrder; return this; } /** * The chronological order in which results are returned. Defaults to `DESC`. See [SortOrder](#type-sortorder) for possible values * @return sortOrder **/ @ApiModelProperty(value = "The chronological order in which results are returned. Defaults to `DESC`. See [SortOrder](#type-sortorder) for possible values") public String getSortOrder() { return sortOrder; } public void setSortOrder(String sortOrder) { this.sortOrder = sortOrder; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SearchOrdersSort searchOrdersSort = (SearchOrdersSort) o; return Objects.equals(this.sortField, searchOrdersSort.sortField) && Objects.equals(this.sortOrder, searchOrdersSort.sortOrder); } @Override public int hashCode() { return Objects.hash(sortField, sortOrder); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SearchOrdersSort {\n"); sb.append(" sortField: ").append(toIndentedString(sortField)).append("\n"); sb.append(" sortOrder: ").append(toIndentedString(sortOrder)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,792
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/CatalogCategory.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * A category to which a &#x60;CatalogItem&#x60; belongs in the &#x60;Catalog&#x60; object model. */ @ApiModel(description = "A category to which a `CatalogItem` belongs in the `Catalog` object model.") public class CatalogCategory { @JsonProperty("name") private String name = null; public CatalogCategory name(String name) { this.name = name; return this; } /** * The category name. Searchable. This field has max length of 255 Unicode code points. * @return name **/ @ApiModelProperty(value = "The category name. Searchable. This field has max length of 255 Unicode code points.") public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CatalogCategory catalogCategory = (CatalogCategory) o; return Objects.equals(this.name, catalogCategory.name); } @Override public int hashCode() { return Objects.hash(name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatalogCategory {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,793
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/UpdateBreakTypeResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.BreakType; import com.squareup.connect.models.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * A response to a request to update a &#x60;BreakType&#x60;. Contains the requested &#x60;BreakType&#x60; objects. May contain a set of &#x60;Error&#x60; objects if the request resulted in errors. */ @ApiModel(description = "A response to a request to update a `BreakType`. Contains the requested `BreakType` objects. May contain a set of `Error` objects if the request resulted in errors.") public class UpdateBreakTypeResponse { @JsonProperty("break_type") private BreakType breakType = null; @JsonProperty("errors") private List<Error> errors = new ArrayList<Error>(); public UpdateBreakTypeResponse breakType(BreakType breakType) { this.breakType = breakType; return this; } /** * The response object. * @return breakType **/ @ApiModelProperty(value = "The response object.") public BreakType getBreakType() { return breakType; } public void setBreakType(BreakType breakType) { this.breakType = breakType; } public UpdateBreakTypeResponse errors(List<Error> errors) { this.errors = errors; return this; } public UpdateBreakTypeResponse addErrorsItem(Error errorsItem) { this.errors.add(errorsItem); return this; } /** * Any errors that occurred during the request. * @return errors **/ @ApiModelProperty(value = "Any errors that occurred during the request.") public List<Error> getErrors() { return errors; } public void setErrors(List<Error> errors) { this.errors = errors; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UpdateBreakTypeResponse updateBreakTypeResponse = (UpdateBreakTypeResponse) o; return Objects.equals(this.breakType, updateBreakTypeResponse.breakType) && Objects.equals(this.errors, updateBreakTypeResponse.errors); } @Override public int hashCode() { return Objects.hash(breakType, errors); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateBreakTypeResponse {\n"); sb.append(" breakType: ").append(toIndentedString(breakType)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,794
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/BatchUpsertCatalogObjectsRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.CatalogObjectBatch; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class BatchUpsertCatalogObjectsRequest { @JsonProperty("idempotency_key") private String idempotencyKey = null; @JsonProperty("batches") private List<CatalogObjectBatch> batches = new ArrayList<CatalogObjectBatch>(); public BatchUpsertCatalogObjectsRequest idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; } /** * A value you specify that uniquely identifies this request among all your requests. A common way to create a valid idempotency key is to use a Universally unique identifier (UUID). If you're unsure whether a particular request was successful, you can reattempt it with the same idempotency key without worrying about creating duplicate objects. See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. * @return idempotencyKey **/ @ApiModelProperty(required = true, value = "A value you specify that uniquely identifies this request among all your requests. A common way to create a valid idempotency key is to use a Universally unique identifier (UUID). If you're unsure whether a particular request was successful, you can reattempt it with the same idempotency key without worrying about creating duplicate objects. See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) for more information.") public String getIdempotencyKey() { return idempotencyKey; } public void setIdempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; } public BatchUpsertCatalogObjectsRequest batches(List<CatalogObjectBatch> batches) { this.batches = batches; return this; } public BatchUpsertCatalogObjectsRequest addBatchesItem(CatalogObjectBatch batchesItem) { this.batches.add(batchesItem); return this; } /** * A batch of CatalogObjects to be inserted/updated atomically. The objects within a batch will be inserted in an all-or-nothing fashion, i.e., if an error occurs attempting to insert or update an object within a batch, the entire batch will be rejected. However, an error in one batch will not affect other batches within the same request. For each object, its `updated_at` field is ignored and replaced with a current [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates), and its `is_deleted` field must not be set to `true`. To modify an existing object, supply its ID. To create a new object, use an ID starting with `#`. These IDs may be used to create relationships between an object and attributes of other objects that reference it. For example, you can create a CatalogItem with ID `#ABC` and a CatalogItemVariation with its `item_id` attribute set to `#ABC` in order to associate the CatalogItemVariation with its parent CatalogItem. Any `#`-prefixed IDs are valid only within a single atomic batch, and will be replaced by server-generated IDs. Each batch may contain up to 1,000 objects. The total number of objects across all batches for a single request may not exceed 10,000. If either of these limits is violated, an error will be returned and no objects will be inserted or updated. * @return batches **/ @ApiModelProperty(value = "A batch of CatalogObjects to be inserted/updated atomically. The objects within a batch will be inserted in an all-or-nothing fashion, i.e., if an error occurs attempting to insert or update an object within a batch, the entire batch will be rejected. However, an error in one batch will not affect other batches within the same request. For each object, its `updated_at` field is ignored and replaced with a current [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates), and its `is_deleted` field must not be set to `true`. To modify an existing object, supply its ID. To create a new object, use an ID starting with `#`. These IDs may be used to create relationships between an object and attributes of other objects that reference it. For example, you can create a CatalogItem with ID `#ABC` and a CatalogItemVariation with its `item_id` attribute set to `#ABC` in order to associate the CatalogItemVariation with its parent CatalogItem. Any `#`-prefixed IDs are valid only within a single atomic batch, and will be replaced by server-generated IDs. Each batch may contain up to 1,000 objects. The total number of objects across all batches for a single request may not exceed 10,000. If either of these limits is violated, an error will be returned and no objects will be inserted or updated.") public List<CatalogObjectBatch> getBatches() { return batches; } public void setBatches(List<CatalogObjectBatch> batches) { this.batches = batches; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BatchUpsertCatalogObjectsRequest batchUpsertCatalogObjectsRequest = (BatchUpsertCatalogObjectsRequest) o; return Objects.equals(this.idempotencyKey, batchUpsertCatalogObjectsRequest.idempotencyKey) && Objects.equals(this.batches, batchUpsertCatalogObjectsRequest.batches); } @Override public int hashCode() { return Objects.hash(idempotencyKey, batches); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BatchUpsertCatalogObjectsRequest {\n"); sb.append(" idempotencyKey: ").append(toIndentedString(idempotencyKey)).append("\n"); sb.append(" batches: ").append(toIndentedString(batches)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,795
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/UpdateItemTaxesResponse.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** * */ @ApiModel(description = "") public class UpdateItemTaxesResponse { @JsonProperty("errors") private List<Error> errors = new ArrayList<Error>(); @JsonProperty("updated_at") private String updatedAt = null; public UpdateItemTaxesResponse errors(List<Error> errors) { this.errors = errors; return this; } public UpdateItemTaxesResponse addErrorsItem(Error errorsItem) { this.errors.add(errorsItem); return this; } /** * Information on any errors encountered. * @return errors **/ @ApiModelProperty(value = "Information on any errors encountered.") public List<Error> getErrors() { return errors; } public void setErrors(List<Error> errors) { this.errors = errors; } public UpdateItemTaxesResponse updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; } /** * The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-date) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. * @return updatedAt **/ @ApiModelProperty(value = "The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-date) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`.") public String getUpdatedAt() { return updatedAt; } public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UpdateItemTaxesResponse updateItemTaxesResponse = (UpdateItemTaxesResponse) o; return Objects.equals(this.errors, updateItemTaxesResponse.errors) && Objects.equals(this.updatedAt, updateItemTaxesResponse.updatedAt); } @Override public int hashCode() { return Objects.hash(errors, updatedAt); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateItemTaxesResponse {\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,796
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/ShiftWorkday.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.DateRange; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * A &#x60;Shift&#x60; search query filter parameter that sets a range of days that a &#x60;Shift&#x60; must start or end in before passing the filter condition. */ @ApiModel(description = "A `Shift` search query filter parameter that sets a range of days that a `Shift` must start or end in before passing the filter condition.") public class ShiftWorkday { @JsonProperty("date_range") private DateRange dateRange = null; @JsonProperty("match_shifts_by") private String matchShiftsBy = null; @JsonProperty("default_timezone") private String defaultTimezone = null; public ShiftWorkday dateRange(DateRange dateRange) { this.dateRange = dateRange; return this; } /** * Dates for fetching the shifts * @return dateRange **/ @ApiModelProperty(value = "Dates for fetching the shifts") public DateRange getDateRange() { return dateRange; } public void setDateRange(DateRange dateRange) { this.dateRange = dateRange; } public ShiftWorkday matchShiftsBy(String matchShiftsBy) { this.matchShiftsBy = matchShiftsBy; return this; } /** * The strategy on which the dates are applied. See [ShiftWorkdayMatcher](#type-shiftworkdaymatcher) for possible values * @return matchShiftsBy **/ @ApiModelProperty(value = "The strategy on which the dates are applied. See [ShiftWorkdayMatcher](#type-shiftworkdaymatcher) for possible values") public String getMatchShiftsBy() { return matchShiftsBy; } public void setMatchShiftsBy(String matchShiftsBy) { this.matchShiftsBy = matchShiftsBy; } public ShiftWorkday defaultTimezone(String defaultTimezone) { this.defaultTimezone = defaultTimezone; return this; } /** * Location-specific timezones convert workdays to datetime filters. Every location included in the query must have a timezone, or this field must be provided as a fallback. Format: the IANA timezone database identifier for the relevant timezone. * @return defaultTimezone **/ @ApiModelProperty(value = "Location-specific timezones convert workdays to datetime filters. Every location included in the query must have a timezone, or this field must be provided as a fallback. Format: the IANA timezone database identifier for the relevant timezone.") public String getDefaultTimezone() { return defaultTimezone; } public void setDefaultTimezone(String defaultTimezone) { this.defaultTimezone = defaultTimezone; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ShiftWorkday shiftWorkday = (ShiftWorkday) o; return Objects.equals(this.dateRange, shiftWorkday.dateRange) && Objects.equals(this.matchShiftsBy, shiftWorkday.matchShiftsBy) && Objects.equals(this.defaultTimezone, shiftWorkday.defaultTimezone); } @Override public int hashCode() { return Objects.hash(dateRange, matchShiftsBy, defaultTimezone); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ShiftWorkday {\n"); sb.append(" dateRange: ").append(toIndentedString(dateRange)).append("\n"); sb.append(" matchShiftsBy: ").append(toIndentedString(matchShiftsBy)).append("\n"); sb.append(" defaultTimezone: ").append(toIndentedString(defaultTimezone)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,797
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/V1ListRefundsRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * */ @ApiModel(description = "") public class V1ListRefundsRequest { @JsonProperty("order") private String order = null; @JsonProperty("begin_time") private String beginTime = null; @JsonProperty("end_time") private String endTime = null; @JsonProperty("limit") private Integer limit = null; @JsonProperty("batch_token") private String batchToken = null; public V1ListRefundsRequest order(String order) { this.order = order; return this; } /** * TThe order in which payments are listed in the response. See [SortOrder](#type-sortorder) for possible values * @return order **/ @ApiModelProperty(value = "TThe order in which payments are listed in the response. See [SortOrder](#type-sortorder) for possible values") public String getOrder() { return order; } public void setOrder(String order) { this.order = order; } public V1ListRefundsRequest beginTime(String beginTime) { this.beginTime = beginTime; return this; } /** * The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. * @return beginTime **/ @ApiModelProperty(value = "The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.") public String getBeginTime() { return beginTime; } public void setBeginTime(String beginTime) { this.beginTime = beginTime; } public V1ListRefundsRequest endTime(String endTime) { this.endTime = endTime; return this; } /** * The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. * @return endTime **/ @ApiModelProperty(value = "The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.") public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public V1ListRefundsRequest limit(Integer limit) { this.limit = limit; return this; } /** * The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods. * @return limit **/ @ApiModelProperty(value = "The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods.") public Integer getLimit() { return limit; } public void setLimit(Integer limit) { this.limit = limit; } public V1ListRefundsRequest batchToken(String batchToken) { this.batchToken = batchToken; return this; } /** * A pagination cursor to retrieve the next set of results for your original query to the endpoint. * @return batchToken **/ @ApiModelProperty(value = "A pagination cursor to retrieve the next set of results for your original query to the endpoint.") public String getBatchToken() { return batchToken; } public void setBatchToken(String batchToken) { this.batchToken = batchToken; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1ListRefundsRequest v1ListRefundsRequest = (V1ListRefundsRequest) o; return Objects.equals(this.order, v1ListRefundsRequest.order) && Objects.equals(this.beginTime, v1ListRefundsRequest.beginTime) && Objects.equals(this.endTime, v1ListRefundsRequest.endTime) && Objects.equals(this.limit, v1ListRefundsRequest.limit) && Objects.equals(this.batchToken, v1ListRefundsRequest.batchToken); } @Override public int hashCode() { return Objects.hash(order, beginTime, endTime, limit, batchToken); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1ListRefundsRequest {\n"); sb.append(" order: ").append(toIndentedString(order)).append("\n"); sb.append(" beginTime: ").append(toIndentedString(beginTime)).append("\n"); sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" batchToken: ").append(toIndentedString(batchToken)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,798
0
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect
Create_ds/connect-java-sdk/src/main/java/com/squareup/connect/models/RetrieveCustomerRequest.java
/* * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.squareup.connect.models; import java.util.Objects; import io.swagger.annotations.ApiModel; /** * Defines the fields that are included in requests to the RetrieveCustomer endpoint. */ @ApiModel(description = "Defines the fields that are included in requests to the RetrieveCustomer endpoint.") public class RetrieveCustomerRequest { @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return true; } @Override public int hashCode() { return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RetrieveCustomerRequest {\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
4,799