From 82d07e104f3a420da0f6caef07f8dbf11231ac76 Mon Sep 17 00:00:00 2001 From: SidneyAllen Date: Fri, 21 Feb 2020 09:52:39 -0800 Subject: [PATCH 1/2] Add support for Attachements on quotes Following methods added and functionally tests getQuoteAttachments getQuoteAttachmentById getQuoteAttachmentByFileName createQuoteAttachmentbyFilename updateQuoteAttachmentbyFilename --- .../com/xero/api/client/AccountingApi.java | 357 ++++++++++++++++++ 1 file changed, 357 insertions(+) diff --git a/src/main/java/com/xero/api/client/AccountingApi.java b/src/main/java/com/xero/api/client/AccountingApi.java index 1bad2e08..35e349c7 100644 --- a/src/main/java/com/xero/api/client/AccountingApi.java +++ b/src/main/java/com/xero/api/client/AccountingApi.java @@ -2947,6 +2947,77 @@ public HttpResponse createPurchaseOrdersForHttpResponse(String accessToken, Str .setReadTimeout(apiClient.getReadTimeout()).execute(); } + /** + * Allows you to create Attachment on Quote + *

200 - Success - return response of type Attachments array of Attachment + *

400 - A failed request due to validation error + * @param xeroTenantId Xero identifier for Tenant + * @param quoteID Unique identifier for Quote object + * @param fileName Name of the attachment + * @param body Byte array of file in body of request + * @param accessToken Authorization token for user set in header of each request + * @return Attachments + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public Attachments createQuoteAttachmentByFileName(String accessToken, String xeroTenantId, UUID quoteID, String fileName, File body) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = createQuoteAttachmentByFileNameForHttpResponse(accessToken, xeroTenantId, quoteID, fileName, body); + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse createQuoteAttachmentByFileNameForHttpResponse(String accessToken, String xeroTenantId, UUID quoteID, String fileName, File body) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling createQuoteAttachmentByFileName"); + }// verify the required parameter 'quoteID' is set + if (quoteID == null) { + throw new IllegalArgumentException("Missing the required parameter 'quoteID' when calling createQuoteAttachmentByFileName"); + }// verify the required parameter 'fileName' is set + if (fileName == null) { + throw new IllegalArgumentException("Missing the required parameter 'fileName' when calling createQuoteAttachmentByFileName"); + }// verify the required parameter 'body' is set + if (body == null) { + throw new IllegalArgumentException("Missing the required parameter 'body' when calling createQuoteAttachmentByFileName"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling createQuoteAttachmentByFileName"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("xero-tenant-id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/Quotes/{QuoteID}/Attachments/{FileName}"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("QuoteID", quoteID); + uriVariables.put("FileName", fileName); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + + java.nio.file.Path bodyPath = body.toPath(); + String mimeType = Files.probeContentType(bodyPath); + HttpContent content = null; + content = new FileContent(mimeType, body); + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + return requestFactory.buildRequest(HttpMethods.PUT, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + /** * Allows you to retrieve a history records of an quote *

200 - Success - return response of type HistoryRecords array of HistoryRecord objects @@ -9855,6 +9926,221 @@ public HttpResponse getQuoteForHttpResponse(String accessToken, String xeroTena GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + return requestFactory.buildRequest(HttpMethods.GET, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * Allows you to retrieve Attachment on Quote by Filename + *

200 - Success - return response of attachment for Quote as binary data + * @param xeroTenantId Xero identifier for Tenant + * @param quoteID Unique identifier for Quote object + * @param fileName Name of the attachment + * @param contentType The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf + * @param accessToken Authorization token for user set in header of each request + * @return File + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public ByteArrayInputStream getQuoteAttachmentByFileName(String accessToken, String xeroTenantId, UUID quoteID, String fileName, String contentType) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = getQuoteAttachmentByFileNameForHttpResponse(accessToken, xeroTenantId, quoteID, fileName, contentType); + InputStream is = response.getContent(); + return convertInputToByteArray(is); + + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse getQuoteAttachmentByFileNameForHttpResponse(String accessToken, String xeroTenantId, UUID quoteID, String fileName, String contentType) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling getQuoteAttachmentByFileName"); + }// verify the required parameter 'quoteID' is set + if (quoteID == null) { + throw new IllegalArgumentException("Missing the required parameter 'quoteID' when calling getQuoteAttachmentByFileName"); + }// verify the required parameter 'fileName' is set + if (fileName == null) { + throw new IllegalArgumentException("Missing the required parameter 'fileName' when calling getQuoteAttachmentByFileName"); + }// verify the required parameter 'contentType' is set + if (contentType == null) { + throw new IllegalArgumentException("Missing the required parameter 'contentType' when calling getQuoteAttachmentByFileName"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling getQuoteAttachmentByFileName"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("xero-tenant-id", xeroTenantId); + headers.set("contentType", contentType); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/Quotes/{QuoteID}/Attachments/{FileName}"; + + // Hacky path manipulation to support different return types from same endpoint + String path = "/Quotes/{QuoteID}/Attachments/{FileName}"; + String type = "/pdf"; + if(path.toLowerCase().contains(type.toLowerCase())) { + correctPath = path.replace("/pdf",""); + headers.setAccept("application/pdf"); + } + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("QuoteID", quoteID); + uriVariables.put("FileName", fileName); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + + + HttpContent content = null; + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + return requestFactory.buildRequest(HttpMethods.GET, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * Allows you to retrieve specific Attachment on Quote + *

200 - Success - return response of attachment for Quote as binary data + * @param xeroTenantId Xero identifier for Tenant + * @param quoteID Unique identifier for Quote object + * @param attachmentID Unique identifier for Attachment object + * @param contentType The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf + * @param accessToken Authorization token for user set in header of each request + * @return File + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public ByteArrayInputStream getQuoteAttachmentById(String accessToken, String xeroTenantId, UUID quoteID, UUID attachmentID, String contentType) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = getQuoteAttachmentByIdForHttpResponse(accessToken, xeroTenantId, quoteID, attachmentID, contentType); + InputStream is = response.getContent(); + return convertInputToByteArray(is); + + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse getQuoteAttachmentByIdForHttpResponse(String accessToken, String xeroTenantId, UUID quoteID, UUID attachmentID, String contentType) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling getQuoteAttachmentById"); + }// verify the required parameter 'quoteID' is set + if (quoteID == null) { + throw new IllegalArgumentException("Missing the required parameter 'quoteID' when calling getQuoteAttachmentById"); + }// verify the required parameter 'attachmentID' is set + if (attachmentID == null) { + throw new IllegalArgumentException("Missing the required parameter 'attachmentID' when calling getQuoteAttachmentById"); + }// verify the required parameter 'contentType' is set + if (contentType == null) { + throw new IllegalArgumentException("Missing the required parameter 'contentType' when calling getQuoteAttachmentById"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling getQuoteAttachmentById"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("xero-tenant-id", xeroTenantId); + headers.set("contentType", contentType); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/Quotes/{QuotesID}/Attachments/{AttachmentID}"; + + // Hacky path manipulation to support different return types from same endpoint + String path = "/Quotes/{QuotesID}/Attachments/{AttachmentID}"; + String type = "/pdf"; + if(path.toLowerCase().contains(type.toLowerCase())) { + correctPath = path.replace("/pdf",""); + headers.setAccept("application/pdf"); + } + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("QuoteID", quoteID); + uriVariables.put("AttachmentID", attachmentID); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + + + HttpContent content = null; + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + return requestFactory.buildRequest(HttpMethods.GET, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * Allows you to retrieve Attachments for Quotes + *

200 - Success - return response of type Attachments array of Attachment + * @param xeroTenantId Xero identifier for Tenant + * @param quoteID Unique identifier for Quote object + * @param accessToken Authorization token for user set in header of each request + * @return Attachments + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public Attachments getQuoteAttachments(String accessToken, String xeroTenantId, UUID quoteID) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = getQuoteAttachmentsForHttpResponse(accessToken, xeroTenantId, quoteID); + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse getQuoteAttachmentsForHttpResponse(String accessToken, String xeroTenantId, UUID quoteID) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling getQuoteAttachments"); + }// verify the required parameter 'quoteID' is set + if (quoteID == null) { + throw new IllegalArgumentException("Missing the required parameter 'quoteID' when calling getQuoteAttachments"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling getQuoteAttachments"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("xero-tenant-id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/Quotes/{QuoteID}/Attachments"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("QuoteID", quoteID); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = null; Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); HttpTransport transport = apiClient.getHttpTransport(); @@ -14281,6 +14567,77 @@ public HttpResponse updateQuoteForHttpResponse(String accessToken, String xeroT .setReadTimeout(apiClient.getReadTimeout()).execute(); } + /** + * Allows you to update Attachment on Quote by Filename + *

200 - Success - return response of type Attachments array of Attachment + *

400 - Validation Error - some data was incorrect returns response of type Error + * @param xeroTenantId Xero identifier for Tenant + * @param quoteID Unique identifier for Quote object + * @param fileName Name of the attachment + * @param body Byte array of file in body of request + * @param accessToken Authorization token for user set in header of each request + * @return Attachments + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public Attachments updateQuoteAttachmentByFileName(String accessToken, String xeroTenantId, UUID quoteID, String fileName, File body) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = updateQuoteAttachmentByFileNameForHttpResponse(accessToken, xeroTenantId, quoteID, fileName, body); + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse updateQuoteAttachmentByFileNameForHttpResponse(String accessToken, String xeroTenantId, UUID quoteID, String fileName, File body) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling updateQuoteAttachmentByFileName"); + }// verify the required parameter 'quoteID' is set + if (quoteID == null) { + throw new IllegalArgumentException("Missing the required parameter 'quoteID' when calling updateQuoteAttachmentByFileName"); + }// verify the required parameter 'fileName' is set + if (fileName == null) { + throw new IllegalArgumentException("Missing the required parameter 'fileName' when calling updateQuoteAttachmentByFileName"); + }// verify the required parameter 'body' is set + if (body == null) { + throw new IllegalArgumentException("Missing the required parameter 'body' when calling updateQuoteAttachmentByFileName"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling updateQuoteAttachmentByFileName"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("xero-tenant-id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/Quotes/{QuoteID}/Attachments/{FileName}"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("QuoteID", quoteID); + uriVariables.put("FileName", fileName); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + + java.nio.file.Path bodyPath = body.toPath(); + String mimeType = Files.probeContentType(bodyPath); + HttpContent content = null; + content = new FileContent(mimeType, body); + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + return requestFactory.buildRequest(HttpMethods.POST, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + /** * Allows you to retrieve a specified draft expense claim receipts *

200 - Success - return response of type Receipts array for updated Receipt From c16cdd2e56442fe3c83552db7e4f9e121aa3737a Mon Sep 17 00:00:00 2001 From: SidneyAllen Date: Fri, 28 Feb 2020 17:50:46 -0800 Subject: [PATCH 2/2] Add Projects models and methods --- pom.xml | 2 +- .../com/xero/api/client/AccountingApi.java | 18 +- .../java/com/xero/api/client/AssetApi.java | 2 +- .../com/xero/api/client/BankFeedsApi.java | 2 +- .../java/com/xero/api/client/IdentityApi.java | 2 +- .../java/com/xero/api/client/ProjectsApi.java | 1033 +++++++++++++++++ .../com/xero/models/accounting/Account.java | 2 +- .../xero/models/accounting/AccountType.java | 2 +- .../com/xero/models/accounting/Accounts.java | 2 +- .../models/accounting/AccountsPayable.java | 2 +- .../models/accounting/AccountsReceivable.java | 2 +- .../com/xero/models/accounting/Address.java | 2 +- .../xero/models/accounting/Allocation.java | 2 +- .../xero/models/accounting/Allocations.java | 2 +- .../xero/models/accounting/Attachment.java | 2 +- .../xero/models/accounting/Attachments.java | 2 +- .../com/xero/models/accounting/Balances.java | 2 +- .../models/accounting/BankTransaction.java | 2 +- .../models/accounting/BankTransactions.java | 2 +- .../xero/models/accounting/BankTransfer.java | 2 +- .../xero/models/accounting/BankTransfers.java | 2 +- .../xero/models/accounting/BatchPayment.java | 2 +- .../accounting/BatchPaymentDetails.java | 2 +- .../xero/models/accounting/BatchPayments.java | 2 +- .../java/com/xero/models/accounting/Bill.java | 2 +- .../xero/models/accounting/BrandingTheme.java | 2 +- .../models/accounting/BrandingThemes.java | 2 +- .../xero/models/accounting/CISOrgSetting.java | 2 +- .../xero/models/accounting/CISSetting.java | 2 +- .../xero/models/accounting/CISSettings.java | 2 +- .../com/xero/models/accounting/Contact.java | 2 +- .../xero/models/accounting/ContactGroup.java | 2 +- .../xero/models/accounting/ContactGroups.java | 2 +- .../xero/models/accounting/ContactPerson.java | 2 +- .../com/xero/models/accounting/Contacts.java | 2 +- .../xero/models/accounting/CountryCode.java | 2 +- .../xero/models/accounting/CreditNote.java | 2 +- .../xero/models/accounting/CreditNotes.java | 2 +- .../xero/models/accounting/Currencies.java | 2 +- .../com/xero/models/accounting/Currency.java | 2 +- .../xero/models/accounting/CurrencyCode.java | 2 +- .../com/xero/models/accounting/Element.java | 2 +- .../com/xero/models/accounting/Employee.java | 2 +- .../com/xero/models/accounting/Employees.java | 2 +- .../com/xero/models/accounting/Error.java | 2 +- .../xero/models/accounting/ExpenseClaim.java | 2 +- .../xero/models/accounting/ExpenseClaims.java | 2 +- .../xero/models/accounting/ExternalLink.java | 2 +- .../xero/models/accounting/HistoryRecord.java | 2 +- .../models/accounting/HistoryRecords.java | 2 +- .../com/xero/models/accounting/Invoice.java | 2 +- .../models/accounting/InvoiceReminder.java | 2 +- .../models/accounting/InvoiceReminders.java | 2 +- .../com/xero/models/accounting/Invoices.java | 2 +- .../java/com/xero/models/accounting/Item.java | 2 +- .../com/xero/models/accounting/Items.java | 2 +- .../com/xero/models/accounting/Journal.java | 2 +- .../xero/models/accounting/JournalLine.java | 2 +- .../com/xero/models/accounting/Journals.java | 2 +- .../models/accounting/LineAmountTypes.java | 2 +- .../com/xero/models/accounting/LineItem.java | 2 +- .../models/accounting/LineItemTracking.java | 2 +- .../models/accounting/LinkedTransaction.java | 2 +- .../models/accounting/LinkedTransactions.java | 2 +- .../xero/models/accounting/ManualJournal.java | 2 +- .../models/accounting/ManualJournalLine.java | 2 +- .../models/accounting/ManualJournals.java | 2 +- .../xero/models/accounting/OnlineInvoice.java | 2 +- .../models/accounting/OnlineInvoices.java | 2 +- .../xero/models/accounting/Organisation.java | 2 +- .../xero/models/accounting/Organisations.java | 2 +- .../xero/models/accounting/Overpayment.java | 2 +- .../xero/models/accounting/Overpayments.java | 2 +- .../com/xero/models/accounting/Payment.java | 2 +- .../models/accounting/PaymentService.java | 2 +- .../models/accounting/PaymentServices.java | 2 +- .../xero/models/accounting/PaymentTerm.java | 2 +- .../models/accounting/PaymentTermType.java | 2 +- .../com/xero/models/accounting/Payments.java | 2 +- .../com/xero/models/accounting/Phone.java | 2 +- .../xero/models/accounting/Prepayment.java | 2 +- .../xero/models/accounting/Prepayments.java | 2 +- .../com/xero/models/accounting/Purchase.java | 2 +- .../xero/models/accounting/PurchaseOrder.java | 2 +- .../models/accounting/PurchaseOrders.java | 2 +- .../com/xero/models/accounting/Quote.java | 2 +- .../accounting/QuoteLineAmountTypes.java | 2 +- .../models/accounting/QuoteStatusCodes.java | 2 +- .../com/xero/models/accounting/Quotes.java | 2 +- .../com/xero/models/accounting/Receipt.java | 2 +- .../com/xero/models/accounting/Receipts.java | 2 +- .../models/accounting/RepeatingInvoice.java | 2 +- .../models/accounting/RepeatingInvoices.java | 2 +- .../com/xero/models/accounting/Report.java | 2 +- .../models/accounting/ReportAttribute.java | 2 +- .../xero/models/accounting/ReportCell.java | 2 +- .../xero/models/accounting/ReportFields.java | 2 +- .../com/xero/models/accounting/ReportRow.java | 2 +- .../xero/models/accounting/ReportRows.java | 2 +- .../xero/models/accounting/ReportWithRow.java | 2 +- .../models/accounting/ReportWithRows.java | 2 +- .../com/xero/models/accounting/Reports.java | 2 +- .../xero/models/accounting/RequestEmpty.java | 2 +- .../com/xero/models/accounting/RowType.java | 2 +- .../accounting/SalesTrackingCategory.java | 2 +- .../com/xero/models/accounting/Schedule.java | 2 +- .../xero/models/accounting/TaxComponent.java | 2 +- .../com/xero/models/accounting/TaxRate.java | 2 +- .../com/xero/models/accounting/TaxRates.java | 2 +- .../com/xero/models/accounting/TaxType.java | 2 +- .../accounting/TenNinteyNineContact.java | 2 +- .../com/xero/models/accounting/TimeZone.java | 2 +- .../models/accounting/TrackingCategories.java | 2 +- .../models/accounting/TrackingCategory.java | 2 +- .../models/accounting/TrackingOption.java | 2 +- .../models/accounting/TrackingOptions.java | 2 +- .../java/com/xero/models/accounting/User.java | 2 +- .../com/xero/models/accounting/Users.java | 2 +- .../models/accounting/ValidationError.java | 2 +- .../java/com/xero/models/assets/Asset.java | 2 +- .../com/xero/models/assets/AssetType.java | 2 +- .../java/com/xero/models/assets/Assets.java | 2 +- .../models/assets/BookDepreciationDetail.java | 2 +- .../assets/BookDepreciationSetting.java | 2 +- .../com/xero/models/assets/Pagination.java | 2 +- .../java/com/xero/models/assets/Setting.java | 2 +- .../xero/models/bankfeeds/CountryCode.java | 2 +- .../bankfeeds/CreditDebitIndicator.java | 2 +- .../xero/models/bankfeeds/CurrencyCode.java | 2 +- .../com/xero/models/bankfeeds/EndBalance.java | 2 +- .../java/com/xero/models/bankfeeds/Error.java | 2 +- .../xero/models/bankfeeds/FeedConnection.java | 2 +- .../models/bankfeeds/FeedConnections.java | 2 +- .../com/xero/models/bankfeeds/Pagination.java | 2 +- .../xero/models/bankfeeds/StartBalance.java | 2 +- .../com/xero/models/bankfeeds/Statement.java | 2 +- .../xero/models/bankfeeds/StatementLine.java | 2 +- .../com/xero/models/bankfeeds/Statements.java | 2 +- .../com/xero/models/identity/AccessToken.java | 2 +- .../com/xero/models/identity/Connection.java | 2 +- .../xero/models/identity/RefreshToken.java | 2 +- .../java/com/xero/models/projects/Amount.java | 116 ++ .../com/xero/models/projects/ChargeType.java | 60 + .../xero/models/projects/CurrencyCode.java | 378 ++++++ .../java/com/xero/models/projects/Error.java | 115 ++ .../com/xero/models/projects/Pagination.java | 161 +++ .../com/xero/models/projects/Project.java | 580 +++++++++ .../projects/ProjectCreateOrUpdate.java | 163 +++ .../xero/models/projects/ProjectPatch.java | 93 ++ .../xero/models/projects/ProjectStatus.java | 58 + .../com/xero/models/projects/ProjectUser.java | 139 +++ .../xero/models/projects/ProjectUsers.java | 127 ++ .../com/xero/models/projects/Projects.java | 127 ++ .../java/com/xero/models/projects/Task.java | 454 ++++++++ .../models/projects/TaskCreateOrUpdate.java | 163 +++ .../java/com/xero/models/projects/Tasks.java | 127 ++ .../com/xero/models/projects/TimeEntries.java | 127 ++ .../com/xero/models/projects/TimeEntry.java | 290 +++++ .../projects/TimeEntryCreateOrUpdate.java | 186 +++ 159 files changed, 4645 insertions(+), 148 deletions(-) create mode 100644 src/main/java/com/xero/api/client/ProjectsApi.java create mode 100644 src/main/java/com/xero/models/projects/Amount.java create mode 100644 src/main/java/com/xero/models/projects/ChargeType.java create mode 100644 src/main/java/com/xero/models/projects/CurrencyCode.java create mode 100644 src/main/java/com/xero/models/projects/Error.java create mode 100644 src/main/java/com/xero/models/projects/Pagination.java create mode 100644 src/main/java/com/xero/models/projects/Project.java create mode 100644 src/main/java/com/xero/models/projects/ProjectCreateOrUpdate.java create mode 100644 src/main/java/com/xero/models/projects/ProjectPatch.java create mode 100644 src/main/java/com/xero/models/projects/ProjectStatus.java create mode 100644 src/main/java/com/xero/models/projects/ProjectUser.java create mode 100644 src/main/java/com/xero/models/projects/ProjectUsers.java create mode 100644 src/main/java/com/xero/models/projects/Projects.java create mode 100644 src/main/java/com/xero/models/projects/Task.java create mode 100644 src/main/java/com/xero/models/projects/TaskCreateOrUpdate.java create mode 100644 src/main/java/com/xero/models/projects/Tasks.java create mode 100644 src/main/java/com/xero/models/projects/TimeEntries.java create mode 100644 src/main/java/com/xero/models/projects/TimeEntry.java create mode 100644 src/main/java/com/xero/models/projects/TimeEntryCreateOrUpdate.java diff --git a/pom.xml b/pom.xml index 2e647aef..3943e9df 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ xero-java jar xero-java - 3.3.1 + 3.3.2 https://github.com/XeroAPI/Xero-Java This is the official Java SDK for Xero API diff --git a/src/main/java/com/xero/api/client/AccountingApi.java b/src/main/java/com/xero/api/client/AccountingApi.java index 35e349c7..a2da3091 100644 --- a/src/main/java/com/xero/api/client/AccountingApi.java +++ b/src/main/java/com/xero/api/client/AccountingApi.java @@ -90,7 +90,7 @@ public class AccountingApi { private ApiClient apiClient; private static AccountingApi instance = null; private String userAgent = "Default"; - private String version = "3.3.1"; + private String version = "3.3.2"; public AccountingApi() { this(new ApiClient()); @@ -989,7 +989,7 @@ public HttpResponse createContactGroupForHttpResponse(String accessToken, Strin } /** - * Allows you to add Contacts to a Contract Group + * Allows you to add Contacts to a Contact Group *

200 - Success - return response of type Contacts array of added Contacts *

400 - A failed request due to validation error * @param xeroTenantId Xero identifier for Tenant @@ -3737,7 +3737,7 @@ public HttpResponse deleteAccountForHttpResponse(String accessToken, String xer } /** - * Allows you to delete a specific Contact from a Contract Group + * Allows you to delete a specific Contact from a Contact Group *

204 - Success - return response 204 no content *

400 - A failed request due to validation error * @param xeroTenantId Xero identifier for Tenant @@ -3799,8 +3799,8 @@ public HttpResponse deleteContactGroupContactForHttpResponse(String accessToken, } /** - * Allows you to delete all Contacts from a Contract Group - *

200 - Success - return response 204 no content + * Allows you to delete all Contacts from a Contact Group + *

204 - Success - return response 204 no content * @param xeroTenantId Xero identifier for Tenant * @param contactGroupID Unique identifier for a Contact Group * @param accessToken Authorization token for user set in header of each request @@ -6065,7 +6065,7 @@ public HttpResponse getContactCISSettingsForHttpResponse(String accessToken, St } /** - * Allows you to retrieve a unique Contract Group by ID + * Allows you to retrieve a unique Contact Group by ID *

200 - Success - return response of type Contact Groups array with a specific Contact Group * @param xeroTenantId Xero identifier for Tenant * @param contactGroupID Unique identifier for a Contact Group @@ -10063,10 +10063,10 @@ public HttpResponse getQuoteAttachmentByIdForHttpResponse(String accessToken, S headers.setAccept("application/json"); headers.setUserAgent(this.getUserAgent()); - String correctPath = "/Quotes/{QuotesID}/Attachments/{AttachmentID}"; + String correctPath = "/Quotes/{QuoteID}/Attachments/{AttachmentID}"; // Hacky path manipulation to support different return types from same endpoint - String path = "/Quotes/{QuotesID}/Attachments/{AttachmentID}"; + String path = "/Quotes/{QuoteID}/Attachments/{AttachmentID}"; String type = "/pdf"; if(path.toLowerCase().contains(type.toLowerCase())) { correctPath = path.replace("/pdf",""); @@ -12994,7 +12994,7 @@ public HttpResponse updateContactAttachmentByFileNameForHttpResponse(String acce } /** - * Allows you to update a Contract Group + * Allows you to update a Contact Group *

200 - Success - return response of type Contact Groups array of updated Contact Group *

400 - A failed request due to validation error * @param xeroTenantId Xero identifier for Tenant diff --git a/src/main/java/com/xero/api/client/AssetApi.java b/src/main/java/com/xero/api/client/AssetApi.java index 09119cfe..e38f68eb 100644 --- a/src/main/java/com/xero/api/client/AssetApi.java +++ b/src/main/java/com/xero/api/client/AssetApi.java @@ -44,7 +44,7 @@ public class AssetApi { private ApiClient apiClient; private static AssetApi instance = null; private String userAgent = "Default"; - private String version = "3.3.1"; + private String version = "3.3.2"; public AssetApi() { this(new ApiClient()); diff --git a/src/main/java/com/xero/api/client/BankFeedsApi.java b/src/main/java/com/xero/api/client/BankFeedsApi.java index cf70d165..8e2d19c4 100644 --- a/src/main/java/com/xero/api/client/BankFeedsApi.java +++ b/src/main/java/com/xero/api/client/BankFeedsApi.java @@ -45,7 +45,7 @@ public class BankFeedsApi { private ApiClient apiClient; private static BankFeedsApi instance = null; private String userAgent = "Default"; - private String version = "3.3.1"; + private String version = "3.3.2"; public BankFeedsApi() { this(new ApiClient()); diff --git a/src/main/java/com/xero/api/client/IdentityApi.java b/src/main/java/com/xero/api/client/IdentityApi.java index 8bb0866e..4a71f955 100644 --- a/src/main/java/com/xero/api/client/IdentityApi.java +++ b/src/main/java/com/xero/api/client/IdentityApi.java @@ -41,7 +41,7 @@ public class IdentityApi { private ApiClient apiClient; private static IdentityApi instance = null; private String userAgent = "Default"; - private String version = "3.3.1"; + private String version = "3.3.2"; public IdentityApi() { this(new ApiClient()); diff --git a/src/main/java/com/xero/api/client/ProjectsApi.java b/src/main/java/com/xero/api/client/ProjectsApi.java new file mode 100644 index 00000000..d5e555cd --- /dev/null +++ b/src/main/java/com/xero/api/client/ProjectsApi.java @@ -0,0 +1,1033 @@ +package com.xero.api.client; +import com.xero.api.ApiClient; + +import com.xero.models.projects.Error; +import org.threeten.bp.OffsetDateTime; +import com.xero.models.projects.Project; +import com.xero.models.projects.ProjectCreateOrUpdate; +import com.xero.models.projects.ProjectPatch; +import com.xero.models.projects.ProjectUsers; +import com.xero.models.projects.Projects; +import com.xero.models.projects.Tasks; +import com.xero.models.projects.TimeEntries; +import com.xero.models.projects.TimeEntry; +import com.xero.models.projects.TimeEntryCreateOrUpdate; +import java.util.UUID; + +import com.xero.api.XeroApiException; +import com.xero.api.XeroApiExceptionHandler; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpRequestFactory; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpResponseException; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.FileContent; +import com.google.api.client.http.javanet.NetHttpTransport; +import com.google.api.client.auth.oauth2.BearerToken; +import com.google.api.client.auth.oauth2.Credential; + +import javax.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.io.ByteArrayInputStream; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.List; + +import org.apache.commons.io.IOUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + + +public class ProjectsApi { + private ApiClient apiClient; + private static ProjectsApi instance = null; + private String userAgent = "Default"; + private String version = "3.3.2"; + + public ProjectsApi() { + this(new ApiClient()); + } + + public static ProjectsApi getInstance(ApiClient apiClient) { + if (instance == null) { + instance = new ProjectsApi(apiClient); + } + return instance; + } + + public ProjectsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public void setUserAgent(String userAgent) { + this.userAgent = userAgent; + } + + public String getUserAgent() { + return this.userAgent + "[Xero-Java-" + this.version + "]"; + } + + /** + * create one or more new projects + *

201 - OK/success, returns the new project object + *

400 - A failed request due to validation error + * @param xeroTenantId Xero identifier for Tenant + * @param projectCreateOrUpdate Create a new project with ProjectCreateOrUpdate object + * @param accessToken Authorization token for user set in header of each request + * @return Project + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public Project createProject(String accessToken, String xeroTenantId, ProjectCreateOrUpdate projectCreateOrUpdate) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = createProjectForHttpResponse(accessToken, xeroTenantId, projectCreateOrUpdate); + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse createProjectForHttpResponse(String accessToken, String xeroTenantId, ProjectCreateOrUpdate projectCreateOrUpdate) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling createProject"); + }// verify the required parameter 'projectCreateOrUpdate' is set + if (projectCreateOrUpdate == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectCreateOrUpdate' when calling createProject"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling createProject"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projects"; + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + content = apiClient.new JacksonJsonHttpContent(projectCreateOrUpdate); + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.POST, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * Allows you to create a task + * Allows you to create a specific task + *

200 - OK/success, returns the newly created time entry + * @param xeroTenantId Xero identifier for Tenant + * @param projectId You can specify an individual project by appending the projectId to the endpoint + * @param timeEntryCreateOrUpdate The time entry object you are creating + * @param accessToken Authorization token for user set in header of each request + * @return TimeEntry + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public TimeEntry createTimeEntry(String accessToken, String xeroTenantId, UUID projectId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = createTimeEntryForHttpResponse(accessToken, xeroTenantId, projectId, timeEntryCreateOrUpdate); + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse createTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling createTimeEntry"); + }// verify the required parameter 'projectId' is set + if (projectId == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectId' when calling createTimeEntry"); + }// verify the required parameter 'timeEntryCreateOrUpdate' is set + if (timeEntryCreateOrUpdate == null) { + throw new IllegalArgumentException("Missing the required parameter 'timeEntryCreateOrUpdate' when calling createTimeEntry"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling createTimeEntry"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projects/{projectId}/time"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("projectId", projectId); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + content = apiClient.new JacksonJsonHttpContent(timeEntryCreateOrUpdate); + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.POST, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * Allows you to delete a time entry + * Allows you to delete a specific time entry + *

204 - Success - return response 204 no content + * @param xeroTenantId Xero identifier for Tenant + * @param projectId You can specify an individual project by appending the projectId to the endpoint + * @param timeEntryId You can specify an individual task by appending the id to the endpoint + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public void deleteTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException { + try { + deleteTimeEntryForHttpResponse(accessToken, xeroTenantId, projectId, timeEntryId); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + + } + + public HttpResponse deleteTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling deleteTimeEntry"); + }// verify the required parameter 'projectId' is set + if (projectId == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectId' when calling deleteTimeEntry"); + }// verify the required parameter 'timeEntryId' is set + if (timeEntryId == null) { + throw new IllegalArgumentException("Missing the required parameter 'timeEntryId' when calling deleteTimeEntry"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling deleteTimeEntry"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projects/{projectId}/time/{timeEntryId}"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("projectId", projectId); + uriVariables.put("timeEntryId", timeEntryId); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.DELETE, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * Allows you to retrieve a single project + * Allows you to retrieve a specific project + *

200 - OK/success, returns a list of project objects + *

400 - A failed request due to validation error + * @param xeroTenantId Xero identifier for Tenant + * @param projectId You can specify an individual project by appending the projectId to the endpoint + * @param accessToken Authorization token for user set in header of each request + * @return Project + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public Project getProject(String accessToken, String xeroTenantId, UUID projectId) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = getProjectForHttpResponse(accessToken, xeroTenantId, projectId); + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse getProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling getProject"); + }// verify the required parameter 'projectId' is set + if (projectId == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectId' when calling getProject"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling getProject"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projects/{projectId}"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("projectId", projectId); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.GET, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * list all project users + * Allows you to retrieve the users on a projects. + *

200 - OK/success, returns a list of project objects + *

400 - A failed request due to validation error + * @param xeroTenantId Xero identifier for Tenant + * @param page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + * @param pageSize Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. + * @param accessToken Authorization token for user set in header of each request + * @return ProjectUsers + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public ProjectUsers getProjectUsers(String accessToken, String xeroTenantId, Integer page, Integer pageSize) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = getProjectUsersForHttpResponse(accessToken, xeroTenantId, page, pageSize); + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse getProjectUsersForHttpResponse(String accessToken, String xeroTenantId, Integer page, Integer pageSize) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling getProjectUsers"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling getProjectUsers"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projectsusers"; + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + if (page != null) { + String key = "page"; + Object value = page; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (pageSize != null) { + String key = "pageSize"; + Object value = pageSize; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.GET, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * list all projects + * Allows you to retrieve, create and update projects. + *

200 - OK/success, returns a list of project objects + *

400 - A failed request due to validation error + * @param xeroTenantId Xero identifier for Tenant + * @param projectIds Search for all projects that match a comma separated list of projectIds + * @param contactID Filter for projects for a specific contact + * @param states Filter for projects in a particular state (INPROGRESS or CLOSED) + * @param page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + * @param pageSize Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. + * @param accessToken Authorization token for user set in header of each request + * @return Projects + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public Projects getProjects(String accessToken, String xeroTenantId, List projectIds, UUID contactID, Projects states, Integer page, Integer pageSize) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = getProjectsForHttpResponse(accessToken, xeroTenantId, projectIds, contactID, states, page, pageSize); + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse getProjectsForHttpResponse(String accessToken, String xeroTenantId, List projectIds, UUID contactID, Projects states, Integer page, Integer pageSize) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling getProjects"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling getProjects"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projects"; + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + if (projectIds != null) { + String key = "projectIds"; + Object value = projectIds; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (contactID != null) { + String key = "contactID"; + Object value = contactID; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (states != null) { + String key = "states"; + Object value = states; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (page != null) { + String key = "page"; + Object value = page; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (pageSize != null) { + String key = "pageSize"; + Object value = pageSize; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.GET, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * Allows you to retrieve a single project + * Allows you to retrieve a specific project + *

200 - OK/success, returns a list of task objects + * @param xeroTenantId Xero identifier for Tenant + * @param projectId You can specify an individual project by appending the projectId to the endpoint + * @param page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + * @param pageSize Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. + * @param taskIds taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskId},{taskId} + * @param accessToken Authorization token for user set in header of each request + * @return Tasks + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public Tasks getTasks(String accessToken, String xeroTenantId, UUID projectId, Integer page, Integer pageSize, String taskIds) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = getTasksForHttpResponse(accessToken, xeroTenantId, projectId, page, pageSize, taskIds); + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse getTasksForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, Integer page, Integer pageSize, String taskIds) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling getTasks"); + }// verify the required parameter 'projectId' is set + if (projectId == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectId' when calling getTasks"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling getTasks"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projects/{projectId}/tasks"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("projectId", projectId); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + if (page != null) { + String key = "page"; + Object value = page; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (pageSize != null) { + String key = "pageSize"; + Object value = pageSize; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (taskIds != null) { + String key = "taskIds"; + Object value = taskIds; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.GET, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * Allows you to retrieve the time entries associated with a specific project + * Allows you to retrieve the time entries associated with a specific project + *

200 - OK/success, returns a list of time entry objects + * @param xeroTenantId Xero identifier for Tenant + * @param projectId Identifier of the project, that the task (which the time entry is logged against) belongs to. + * @param userId The xero user identifier of the person who logged time. + * @param taskId Identifier of the task that time entry is logged against. + * @param invoiceId Finds all time entries for this invoice. + * @param contactId Finds all time entries for this contact identifier. + * @param page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + * @param pageSize Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. + * @param states Comma-separated list of states to find. Will find all time entries that are in the status of whatever’s specified. + * @param isChargeable Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`. + * @param dateAfterUtc ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field. + * @param dateBeforeUtc ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field. + * @param accessToken Authorization token for user set in header of each request + * @return TimeEntries + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public TimeEntries getTimeEntries(String accessToken, String xeroTenantId, UUID projectId, UUID userId, UUID taskId, UUID invoiceId, UUID contactId, Integer page, Integer pageSize, String states, Boolean isChargeable, OffsetDateTime dateAfterUtc, OffsetDateTime dateBeforeUtc) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = getTimeEntriesForHttpResponse(accessToken, xeroTenantId, projectId, userId, taskId, invoiceId, contactId, page, pageSize, states, isChargeable, dateAfterUtc, dateBeforeUtc); + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse getTimeEntriesForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID userId, UUID taskId, UUID invoiceId, UUID contactId, Integer page, Integer pageSize, String states, Boolean isChargeable, OffsetDateTime dateAfterUtc, OffsetDateTime dateBeforeUtc) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling getTimeEntries"); + }// verify the required parameter 'projectId' is set + if (projectId == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectId' when calling getTimeEntries"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling getTimeEntries"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projects/{projectId}/time"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("projectId", projectId); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + if (userId != null) { + String key = "userId"; + Object value = userId; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (taskId != null) { + String key = "taskId"; + Object value = taskId; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (invoiceId != null) { + String key = "invoiceId"; + Object value = invoiceId; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (contactId != null) { + String key = "contactId"; + Object value = contactId; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (page != null) { + String key = "page"; + Object value = page; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (pageSize != null) { + String key = "pageSize"; + Object value = pageSize; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (states != null) { + String key = "states"; + Object value = states; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (isChargeable != null) { + String key = "isChargeable"; + Object value = isChargeable; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (dateAfterUtc != null) { + String key = "dateAfterUtc"; + Object value = dateAfterUtc; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (dateBeforeUtc != null) { + String key = "dateBeforeUtc"; + Object value = dateBeforeUtc; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.GET, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * Allows you to get a single time entry in a project + * Allows you to upget a single time entry in a project + *

200 - OK/success, returns a single time entry + * @param xeroTenantId Xero identifier for Tenant + * @param projectId You can specify an individual project by appending the projectId to the endpoint + * @param timeEntryId You can specify an individual time entry by appending the id to the endpoint + * @param accessToken Authorization token for user set in header of each request + * @return TimeEntry + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public TimeEntry getTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException { + try { + TypeReference typeRef = new TypeReference() {}; + HttpResponse response = getTimeEntryForHttpResponse(accessToken, xeroTenantId, projectId, timeEntryId); + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + return null; + } + + public HttpResponse getTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling getTimeEntry"); + }// verify the required parameter 'projectId' is set + if (projectId == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectId' when calling getTimeEntry"); + }// verify the required parameter 'timeEntryId' is set + if (timeEntryId == null) { + throw new IllegalArgumentException("Missing the required parameter 'timeEntryId' when calling getTimeEntry"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling getTimeEntry"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projects/{projectId}/time/{timeEntryId}"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("projectId", projectId); + uriVariables.put("timeEntryId", timeEntryId); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.GET, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * creates a project for the specified contact + * Allows you to update a specific projects. + *

204 - Success - return response 204 no content + *

400 - A failed request due to validation error + * @param xeroTenantId Xero identifier for Tenant + * @param projectId You can specify an individual project by appending the projectId to the endpoint + * @param projectPatch Update the status of an existing Project + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public void patchProject(String accessToken, String xeroTenantId, UUID projectId, ProjectPatch projectPatch) throws IOException { + try { + patchProjectForHttpResponse(accessToken, xeroTenantId, projectId, projectPatch); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + + } + + public HttpResponse patchProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, ProjectPatch projectPatch) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling patchProject"); + }// verify the required parameter 'projectId' is set + if (projectId == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectId' when calling patchProject"); + }// verify the required parameter 'projectPatch' is set + if (projectPatch == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectPatch' when calling patchProject"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling patchProject"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projects/{projectId}"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("projectId", projectId); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + content = apiClient.new JacksonJsonHttpContent(projectPatch); + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.PATCH, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * update a specific project + * Allows you to update a specific projects. + *

204 - Success - return response 204 no content + *

400 - A failed request due to validation error + * @param xeroTenantId Xero identifier for Tenant + * @param projectId You can specify an individual project by appending the projectId to the endpoint + * @param projectCreateOrUpdate Request of type ProjectCreateOrUpdate + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public void updateProject(String accessToken, String xeroTenantId, UUID projectId, ProjectCreateOrUpdate projectCreateOrUpdate) throws IOException { + try { + updateProjectForHttpResponse(accessToken, xeroTenantId, projectId, projectCreateOrUpdate); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + + } + + public HttpResponse updateProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, ProjectCreateOrUpdate projectCreateOrUpdate) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling updateProject"); + }// verify the required parameter 'projectId' is set + if (projectId == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectId' when calling updateProject"); + }// verify the required parameter 'projectCreateOrUpdate' is set + if (projectCreateOrUpdate == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectCreateOrUpdate' when calling updateProject"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling updateProject"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projects/{projectId}"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("projectId", projectId); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + content = apiClient.new JacksonJsonHttpContent(projectCreateOrUpdate); + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.PUT, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + /** + * Allows you to update time entry in a project + * Allows you to update time entry in a project + *

204 - Success - return response 204 no content + * @param xeroTenantId Xero identifier for Tenant + * @param projectId You can specify an individual project by appending the projectId to the endpoint + * @param timeEntryId You can specify an individual time entry by appending the id to the endpoint + * @param timeEntryCreateOrUpdate The time entry object you are updating + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public void updateTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate) throws IOException { + try { + updateTimeEntryForHttpResponse(accessToken, xeroTenantId, projectId, timeEntryId, timeEntryCreateOrUpdate); + } catch (HttpResponseException e) { + XeroApiExceptionHandler handler = new XeroApiExceptionHandler(); + handler.execute(e,apiClient); + } catch (IOException ioe) { + throw ioe; + } + + } + + public HttpResponse updateTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate) throws IOException { + // verify the required parameter 'xeroTenantId' is set + if (xeroTenantId == null) { + throw new IllegalArgumentException("Missing the required parameter 'xeroTenantId' when calling updateTimeEntry"); + }// verify the required parameter 'projectId' is set + if (projectId == null) { + throw new IllegalArgumentException("Missing the required parameter 'projectId' when calling updateTimeEntry"); + }// verify the required parameter 'timeEntryId' is set + if (timeEntryId == null) { + throw new IllegalArgumentException("Missing the required parameter 'timeEntryId' when calling updateTimeEntry"); + }// verify the required parameter 'timeEntryCreateOrUpdate' is set + if (timeEntryCreateOrUpdate == null) { + throw new IllegalArgumentException("Missing the required parameter 'timeEntryCreateOrUpdate' when calling updateTimeEntry"); + } + if (accessToken == null) { + throw new IllegalArgumentException("Missing the required parameter 'accessToken' when calling updateTimeEntry"); + } + HttpHeaders headers = new HttpHeaders(); + headers.set("Xero-Tenant-Id", xeroTenantId); + headers.setAccept("application/json"); + headers.setUserAgent(this.getUserAgent()); + + String correctPath = "/projects/{projectId}/time/{timeEntryId}"; + + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("projectId", projectId); + uriVariables.put("timeEntryId", timeEntryId); + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath); + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + HttpContent content = null; + content = apiClient.new JacksonJsonHttpContent(timeEntryCreateOrUpdate); + Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken); + HttpTransport transport = apiClient.getHttpTransport(); + HttpRequestFactory requestFactory = transport.createRequestFactory(credential); + + return requestFactory.buildRequest(HttpMethods.PUT, genericUrl, content).setHeaders(headers) + .setConnectTimeout(apiClient.getConnectionTimeout()) + .setReadTimeout(apiClient.getReadTimeout()).execute(); + } + + + public ByteArrayInputStream convertInputToByteArray(InputStream is) throws IOException { + byte[] bytes = IOUtils.toByteArray(is); + try { + // Process the input stream.. + ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes); + return byteArrayInputStream; + } finally { + is.close(); + } + + } +} diff --git a/src/main/java/com/xero/models/accounting/Account.java b/src/main/java/com/xero/models/accounting/Account.java index f971aa62..de2cbab5 100644 --- a/src/main/java/com/xero/models/accounting/Account.java +++ b/src/main/java/com/xero/models/accounting/Account.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/AccountType.java b/src/main/java/com/xero/models/accounting/AccountType.java index 218d1e6b..4aa1859e 100644 --- a/src/main/java/com/xero/models/accounting/AccountType.java +++ b/src/main/java/com/xero/models/accounting/AccountType.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Accounts.java b/src/main/java/com/xero/models/accounting/Accounts.java index 55f5c54f..c9d590f9 100644 --- a/src/main/java/com/xero/models/accounting/Accounts.java +++ b/src/main/java/com/xero/models/accounting/Accounts.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/AccountsPayable.java b/src/main/java/com/xero/models/accounting/AccountsPayable.java index 2c879486..7ce13e98 100644 --- a/src/main/java/com/xero/models/accounting/AccountsPayable.java +++ b/src/main/java/com/xero/models/accounting/AccountsPayable.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/AccountsReceivable.java b/src/main/java/com/xero/models/accounting/AccountsReceivable.java index e344fa30..b4a841f9 100644 --- a/src/main/java/com/xero/models/accounting/AccountsReceivable.java +++ b/src/main/java/com/xero/models/accounting/AccountsReceivable.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Address.java b/src/main/java/com/xero/models/accounting/Address.java index 083b4b25..c4fdaa32 100644 --- a/src/main/java/com/xero/models/accounting/Address.java +++ b/src/main/java/com/xero/models/accounting/Address.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Allocation.java b/src/main/java/com/xero/models/accounting/Allocation.java index 70921b95..25bb3d1f 100644 --- a/src/main/java/com/xero/models/accounting/Allocation.java +++ b/src/main/java/com/xero/models/accounting/Allocation.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Allocations.java b/src/main/java/com/xero/models/accounting/Allocations.java index 29d494e1..acea1450 100644 --- a/src/main/java/com/xero/models/accounting/Allocations.java +++ b/src/main/java/com/xero/models/accounting/Allocations.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Attachment.java b/src/main/java/com/xero/models/accounting/Attachment.java index 3f8b6a17..2497a228 100644 --- a/src/main/java/com/xero/models/accounting/Attachment.java +++ b/src/main/java/com/xero/models/accounting/Attachment.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Attachments.java b/src/main/java/com/xero/models/accounting/Attachments.java index ed3d19aa..c4c73eff 100644 --- a/src/main/java/com/xero/models/accounting/Attachments.java +++ b/src/main/java/com/xero/models/accounting/Attachments.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Balances.java b/src/main/java/com/xero/models/accounting/Balances.java index 13d6c015..8d15a193 100644 --- a/src/main/java/com/xero/models/accounting/Balances.java +++ b/src/main/java/com/xero/models/accounting/Balances.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/BankTransaction.java b/src/main/java/com/xero/models/accounting/BankTransaction.java index 6b30fa38..449225c2 100644 --- a/src/main/java/com/xero/models/accounting/BankTransaction.java +++ b/src/main/java/com/xero/models/accounting/BankTransaction.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/BankTransactions.java b/src/main/java/com/xero/models/accounting/BankTransactions.java index 7c5ddcc4..76931201 100644 --- a/src/main/java/com/xero/models/accounting/BankTransactions.java +++ b/src/main/java/com/xero/models/accounting/BankTransactions.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/BankTransfer.java b/src/main/java/com/xero/models/accounting/BankTransfer.java index 5089a800..7589d464 100644 --- a/src/main/java/com/xero/models/accounting/BankTransfer.java +++ b/src/main/java/com/xero/models/accounting/BankTransfer.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/BankTransfers.java b/src/main/java/com/xero/models/accounting/BankTransfers.java index 2ab0ab10..107d6336 100644 --- a/src/main/java/com/xero/models/accounting/BankTransfers.java +++ b/src/main/java/com/xero/models/accounting/BankTransfers.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/BatchPayment.java b/src/main/java/com/xero/models/accounting/BatchPayment.java index c4492542..3525d5b5 100644 --- a/src/main/java/com/xero/models/accounting/BatchPayment.java +++ b/src/main/java/com/xero/models/accounting/BatchPayment.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/BatchPaymentDetails.java b/src/main/java/com/xero/models/accounting/BatchPaymentDetails.java index 112ee432..24a2f1c6 100644 --- a/src/main/java/com/xero/models/accounting/BatchPaymentDetails.java +++ b/src/main/java/com/xero/models/accounting/BatchPaymentDetails.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/BatchPayments.java b/src/main/java/com/xero/models/accounting/BatchPayments.java index 6c89261e..fd73cb24 100644 --- a/src/main/java/com/xero/models/accounting/BatchPayments.java +++ b/src/main/java/com/xero/models/accounting/BatchPayments.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Bill.java b/src/main/java/com/xero/models/accounting/Bill.java index 0bce61f6..4d4b3599 100644 --- a/src/main/java/com/xero/models/accounting/Bill.java +++ b/src/main/java/com/xero/models/accounting/Bill.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/BrandingTheme.java b/src/main/java/com/xero/models/accounting/BrandingTheme.java index b0ef57db..2abf548c 100644 --- a/src/main/java/com/xero/models/accounting/BrandingTheme.java +++ b/src/main/java/com/xero/models/accounting/BrandingTheme.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/BrandingThemes.java b/src/main/java/com/xero/models/accounting/BrandingThemes.java index c0cdc456..8d012a48 100644 --- a/src/main/java/com/xero/models/accounting/BrandingThemes.java +++ b/src/main/java/com/xero/models/accounting/BrandingThemes.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/CISOrgSetting.java b/src/main/java/com/xero/models/accounting/CISOrgSetting.java index 5cd582d6..d8e2a0bc 100644 --- a/src/main/java/com/xero/models/accounting/CISOrgSetting.java +++ b/src/main/java/com/xero/models/accounting/CISOrgSetting.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/CISSetting.java b/src/main/java/com/xero/models/accounting/CISSetting.java index c270953e..a2ea5174 100644 --- a/src/main/java/com/xero/models/accounting/CISSetting.java +++ b/src/main/java/com/xero/models/accounting/CISSetting.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/CISSettings.java b/src/main/java/com/xero/models/accounting/CISSettings.java index 895726e5..cc816d4a 100644 --- a/src/main/java/com/xero/models/accounting/CISSettings.java +++ b/src/main/java/com/xero/models/accounting/CISSettings.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Contact.java b/src/main/java/com/xero/models/accounting/Contact.java index 6257a049..8fc51830 100644 --- a/src/main/java/com/xero/models/accounting/Contact.java +++ b/src/main/java/com/xero/models/accounting/Contact.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ContactGroup.java b/src/main/java/com/xero/models/accounting/ContactGroup.java index a22dfd8e..2ef747e6 100644 --- a/src/main/java/com/xero/models/accounting/ContactGroup.java +++ b/src/main/java/com/xero/models/accounting/ContactGroup.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ContactGroups.java b/src/main/java/com/xero/models/accounting/ContactGroups.java index 74d65f6c..993778db 100644 --- a/src/main/java/com/xero/models/accounting/ContactGroups.java +++ b/src/main/java/com/xero/models/accounting/ContactGroups.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ContactPerson.java b/src/main/java/com/xero/models/accounting/ContactPerson.java index 138c58d2..b6216bf2 100644 --- a/src/main/java/com/xero/models/accounting/ContactPerson.java +++ b/src/main/java/com/xero/models/accounting/ContactPerson.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Contacts.java b/src/main/java/com/xero/models/accounting/Contacts.java index ffcfa885..45879fbb 100644 --- a/src/main/java/com/xero/models/accounting/Contacts.java +++ b/src/main/java/com/xero/models/accounting/Contacts.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/CountryCode.java b/src/main/java/com/xero/models/accounting/CountryCode.java index ef3e0142..18e54a00 100644 --- a/src/main/java/com/xero/models/accounting/CountryCode.java +++ b/src/main/java/com/xero/models/accounting/CountryCode.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/CreditNote.java b/src/main/java/com/xero/models/accounting/CreditNote.java index 774edc1b..d2f9f4b9 100644 --- a/src/main/java/com/xero/models/accounting/CreditNote.java +++ b/src/main/java/com/xero/models/accounting/CreditNote.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/CreditNotes.java b/src/main/java/com/xero/models/accounting/CreditNotes.java index cbc49ca5..28b15c81 100644 --- a/src/main/java/com/xero/models/accounting/CreditNotes.java +++ b/src/main/java/com/xero/models/accounting/CreditNotes.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Currencies.java b/src/main/java/com/xero/models/accounting/Currencies.java index e775ac8b..bcc874b6 100644 --- a/src/main/java/com/xero/models/accounting/Currencies.java +++ b/src/main/java/com/xero/models/accounting/Currencies.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Currency.java b/src/main/java/com/xero/models/accounting/Currency.java index 0e5a5aaa..24e97ef6 100644 --- a/src/main/java/com/xero/models/accounting/Currency.java +++ b/src/main/java/com/xero/models/accounting/Currency.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/CurrencyCode.java b/src/main/java/com/xero/models/accounting/CurrencyCode.java index be7c10f1..c989cfbd 100644 --- a/src/main/java/com/xero/models/accounting/CurrencyCode.java +++ b/src/main/java/com/xero/models/accounting/CurrencyCode.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Element.java b/src/main/java/com/xero/models/accounting/Element.java index 6b635704..b82337d3 100644 --- a/src/main/java/com/xero/models/accounting/Element.java +++ b/src/main/java/com/xero/models/accounting/Element.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Employee.java b/src/main/java/com/xero/models/accounting/Employee.java index b0281c41..599b4598 100644 --- a/src/main/java/com/xero/models/accounting/Employee.java +++ b/src/main/java/com/xero/models/accounting/Employee.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Employees.java b/src/main/java/com/xero/models/accounting/Employees.java index 81bc8e33..0c53eb82 100644 --- a/src/main/java/com/xero/models/accounting/Employees.java +++ b/src/main/java/com/xero/models/accounting/Employees.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Error.java b/src/main/java/com/xero/models/accounting/Error.java index ede788e4..dd1a1435 100644 --- a/src/main/java/com/xero/models/accounting/Error.java +++ b/src/main/java/com/xero/models/accounting/Error.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ExpenseClaim.java b/src/main/java/com/xero/models/accounting/ExpenseClaim.java index d6ca70b4..343970d5 100644 --- a/src/main/java/com/xero/models/accounting/ExpenseClaim.java +++ b/src/main/java/com/xero/models/accounting/ExpenseClaim.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ExpenseClaims.java b/src/main/java/com/xero/models/accounting/ExpenseClaims.java index 947ac38a..d827566e 100644 --- a/src/main/java/com/xero/models/accounting/ExpenseClaims.java +++ b/src/main/java/com/xero/models/accounting/ExpenseClaims.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ExternalLink.java b/src/main/java/com/xero/models/accounting/ExternalLink.java index 5f8dd45b..5f714c5d 100644 --- a/src/main/java/com/xero/models/accounting/ExternalLink.java +++ b/src/main/java/com/xero/models/accounting/ExternalLink.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/HistoryRecord.java b/src/main/java/com/xero/models/accounting/HistoryRecord.java index 65079db4..bafedafe 100644 --- a/src/main/java/com/xero/models/accounting/HistoryRecord.java +++ b/src/main/java/com/xero/models/accounting/HistoryRecord.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/HistoryRecords.java b/src/main/java/com/xero/models/accounting/HistoryRecords.java index be7104c8..49f5f18a 100644 --- a/src/main/java/com/xero/models/accounting/HistoryRecords.java +++ b/src/main/java/com/xero/models/accounting/HistoryRecords.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Invoice.java b/src/main/java/com/xero/models/accounting/Invoice.java index 2ad7f670..f162c978 100644 --- a/src/main/java/com/xero/models/accounting/Invoice.java +++ b/src/main/java/com/xero/models/accounting/Invoice.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/InvoiceReminder.java b/src/main/java/com/xero/models/accounting/InvoiceReminder.java index 13637890..dbd7681c 100644 --- a/src/main/java/com/xero/models/accounting/InvoiceReminder.java +++ b/src/main/java/com/xero/models/accounting/InvoiceReminder.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/InvoiceReminders.java b/src/main/java/com/xero/models/accounting/InvoiceReminders.java index f80c8e61..b4972aa1 100644 --- a/src/main/java/com/xero/models/accounting/InvoiceReminders.java +++ b/src/main/java/com/xero/models/accounting/InvoiceReminders.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Invoices.java b/src/main/java/com/xero/models/accounting/Invoices.java index 282a670f..fb445f5c 100644 --- a/src/main/java/com/xero/models/accounting/Invoices.java +++ b/src/main/java/com/xero/models/accounting/Invoices.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Item.java b/src/main/java/com/xero/models/accounting/Item.java index c5502337..76b1cc05 100644 --- a/src/main/java/com/xero/models/accounting/Item.java +++ b/src/main/java/com/xero/models/accounting/Item.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Items.java b/src/main/java/com/xero/models/accounting/Items.java index 43f3aa7c..f9d5779b 100644 --- a/src/main/java/com/xero/models/accounting/Items.java +++ b/src/main/java/com/xero/models/accounting/Items.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Journal.java b/src/main/java/com/xero/models/accounting/Journal.java index b18ee37d..86d7fdf9 100644 --- a/src/main/java/com/xero/models/accounting/Journal.java +++ b/src/main/java/com/xero/models/accounting/Journal.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/JournalLine.java b/src/main/java/com/xero/models/accounting/JournalLine.java index 20195d75..43bb7c9e 100644 --- a/src/main/java/com/xero/models/accounting/JournalLine.java +++ b/src/main/java/com/xero/models/accounting/JournalLine.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Journals.java b/src/main/java/com/xero/models/accounting/Journals.java index 44d78e99..f99f2d83 100644 --- a/src/main/java/com/xero/models/accounting/Journals.java +++ b/src/main/java/com/xero/models/accounting/Journals.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/LineAmountTypes.java b/src/main/java/com/xero/models/accounting/LineAmountTypes.java index 5513dca5..a5c0992b 100644 --- a/src/main/java/com/xero/models/accounting/LineAmountTypes.java +++ b/src/main/java/com/xero/models/accounting/LineAmountTypes.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/LineItem.java b/src/main/java/com/xero/models/accounting/LineItem.java index b47e16be..1cfc324e 100644 --- a/src/main/java/com/xero/models/accounting/LineItem.java +++ b/src/main/java/com/xero/models/accounting/LineItem.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/LineItemTracking.java b/src/main/java/com/xero/models/accounting/LineItemTracking.java index 4cd4b716..ad09413e 100644 --- a/src/main/java/com/xero/models/accounting/LineItemTracking.java +++ b/src/main/java/com/xero/models/accounting/LineItemTracking.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/LinkedTransaction.java b/src/main/java/com/xero/models/accounting/LinkedTransaction.java index 065ceb3a..fbaec772 100644 --- a/src/main/java/com/xero/models/accounting/LinkedTransaction.java +++ b/src/main/java/com/xero/models/accounting/LinkedTransaction.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/LinkedTransactions.java b/src/main/java/com/xero/models/accounting/LinkedTransactions.java index 6bde086f..e560cb68 100644 --- a/src/main/java/com/xero/models/accounting/LinkedTransactions.java +++ b/src/main/java/com/xero/models/accounting/LinkedTransactions.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ManualJournal.java b/src/main/java/com/xero/models/accounting/ManualJournal.java index 85918d68..9faac4db 100644 --- a/src/main/java/com/xero/models/accounting/ManualJournal.java +++ b/src/main/java/com/xero/models/accounting/ManualJournal.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ManualJournalLine.java b/src/main/java/com/xero/models/accounting/ManualJournalLine.java index 09135b7e..d15a15b2 100644 --- a/src/main/java/com/xero/models/accounting/ManualJournalLine.java +++ b/src/main/java/com/xero/models/accounting/ManualJournalLine.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ManualJournals.java b/src/main/java/com/xero/models/accounting/ManualJournals.java index d2a7da73..6992c60f 100644 --- a/src/main/java/com/xero/models/accounting/ManualJournals.java +++ b/src/main/java/com/xero/models/accounting/ManualJournals.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/OnlineInvoice.java b/src/main/java/com/xero/models/accounting/OnlineInvoice.java index c23012a1..b89b8d07 100644 --- a/src/main/java/com/xero/models/accounting/OnlineInvoice.java +++ b/src/main/java/com/xero/models/accounting/OnlineInvoice.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/OnlineInvoices.java b/src/main/java/com/xero/models/accounting/OnlineInvoices.java index 89865d4d..97a09e6a 100644 --- a/src/main/java/com/xero/models/accounting/OnlineInvoices.java +++ b/src/main/java/com/xero/models/accounting/OnlineInvoices.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Organisation.java b/src/main/java/com/xero/models/accounting/Organisation.java index 99a01529..d17ee414 100644 --- a/src/main/java/com/xero/models/accounting/Organisation.java +++ b/src/main/java/com/xero/models/accounting/Organisation.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Organisations.java b/src/main/java/com/xero/models/accounting/Organisations.java index 10c662af..cfb2ca93 100644 --- a/src/main/java/com/xero/models/accounting/Organisations.java +++ b/src/main/java/com/xero/models/accounting/Organisations.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Overpayment.java b/src/main/java/com/xero/models/accounting/Overpayment.java index 891411e8..600fb7bb 100644 --- a/src/main/java/com/xero/models/accounting/Overpayment.java +++ b/src/main/java/com/xero/models/accounting/Overpayment.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Overpayments.java b/src/main/java/com/xero/models/accounting/Overpayments.java index ab4427ff..471cc72c 100644 --- a/src/main/java/com/xero/models/accounting/Overpayments.java +++ b/src/main/java/com/xero/models/accounting/Overpayments.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Payment.java b/src/main/java/com/xero/models/accounting/Payment.java index f8e49b80..a47b6fc1 100644 --- a/src/main/java/com/xero/models/accounting/Payment.java +++ b/src/main/java/com/xero/models/accounting/Payment.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/PaymentService.java b/src/main/java/com/xero/models/accounting/PaymentService.java index 16af1c44..76d20a8f 100644 --- a/src/main/java/com/xero/models/accounting/PaymentService.java +++ b/src/main/java/com/xero/models/accounting/PaymentService.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/PaymentServices.java b/src/main/java/com/xero/models/accounting/PaymentServices.java index aad52ffb..1cad0be6 100644 --- a/src/main/java/com/xero/models/accounting/PaymentServices.java +++ b/src/main/java/com/xero/models/accounting/PaymentServices.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/PaymentTerm.java b/src/main/java/com/xero/models/accounting/PaymentTerm.java index 7b10af96..1834f236 100644 --- a/src/main/java/com/xero/models/accounting/PaymentTerm.java +++ b/src/main/java/com/xero/models/accounting/PaymentTerm.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/PaymentTermType.java b/src/main/java/com/xero/models/accounting/PaymentTermType.java index 5ab5f28c..62ed6a86 100644 --- a/src/main/java/com/xero/models/accounting/PaymentTermType.java +++ b/src/main/java/com/xero/models/accounting/PaymentTermType.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Payments.java b/src/main/java/com/xero/models/accounting/Payments.java index 19c6b2e0..95537ceb 100644 --- a/src/main/java/com/xero/models/accounting/Payments.java +++ b/src/main/java/com/xero/models/accounting/Payments.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Phone.java b/src/main/java/com/xero/models/accounting/Phone.java index 925b9820..02c89c64 100644 --- a/src/main/java/com/xero/models/accounting/Phone.java +++ b/src/main/java/com/xero/models/accounting/Phone.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Prepayment.java b/src/main/java/com/xero/models/accounting/Prepayment.java index fb020820..214e334e 100644 --- a/src/main/java/com/xero/models/accounting/Prepayment.java +++ b/src/main/java/com/xero/models/accounting/Prepayment.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Prepayments.java b/src/main/java/com/xero/models/accounting/Prepayments.java index 1e8024c7..cbb9432f 100644 --- a/src/main/java/com/xero/models/accounting/Prepayments.java +++ b/src/main/java/com/xero/models/accounting/Prepayments.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Purchase.java b/src/main/java/com/xero/models/accounting/Purchase.java index 15314ef6..9e0317d5 100644 --- a/src/main/java/com/xero/models/accounting/Purchase.java +++ b/src/main/java/com/xero/models/accounting/Purchase.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/PurchaseOrder.java b/src/main/java/com/xero/models/accounting/PurchaseOrder.java index 80457ab0..bbe3430d 100644 --- a/src/main/java/com/xero/models/accounting/PurchaseOrder.java +++ b/src/main/java/com/xero/models/accounting/PurchaseOrder.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/PurchaseOrders.java b/src/main/java/com/xero/models/accounting/PurchaseOrders.java index d750aea1..108e974d 100644 --- a/src/main/java/com/xero/models/accounting/PurchaseOrders.java +++ b/src/main/java/com/xero/models/accounting/PurchaseOrders.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Quote.java b/src/main/java/com/xero/models/accounting/Quote.java index 5826ce54..f3205447 100644 --- a/src/main/java/com/xero/models/accounting/Quote.java +++ b/src/main/java/com/xero/models/accounting/Quote.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/QuoteLineAmountTypes.java b/src/main/java/com/xero/models/accounting/QuoteLineAmountTypes.java index cd6ee8ba..424b8c8d 100644 --- a/src/main/java/com/xero/models/accounting/QuoteLineAmountTypes.java +++ b/src/main/java/com/xero/models/accounting/QuoteLineAmountTypes.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/QuoteStatusCodes.java b/src/main/java/com/xero/models/accounting/QuoteStatusCodes.java index a9fccdc8..cd8a02b6 100644 --- a/src/main/java/com/xero/models/accounting/QuoteStatusCodes.java +++ b/src/main/java/com/xero/models/accounting/QuoteStatusCodes.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Quotes.java b/src/main/java/com/xero/models/accounting/Quotes.java index 008aee8e..3a474078 100644 --- a/src/main/java/com/xero/models/accounting/Quotes.java +++ b/src/main/java/com/xero/models/accounting/Quotes.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Receipt.java b/src/main/java/com/xero/models/accounting/Receipt.java index 7479ebb8..12b4d599 100644 --- a/src/main/java/com/xero/models/accounting/Receipt.java +++ b/src/main/java/com/xero/models/accounting/Receipt.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Receipts.java b/src/main/java/com/xero/models/accounting/Receipts.java index 1ca39c64..2abb1610 100644 --- a/src/main/java/com/xero/models/accounting/Receipts.java +++ b/src/main/java/com/xero/models/accounting/Receipts.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/RepeatingInvoice.java b/src/main/java/com/xero/models/accounting/RepeatingInvoice.java index 63545931..a977066d 100644 --- a/src/main/java/com/xero/models/accounting/RepeatingInvoice.java +++ b/src/main/java/com/xero/models/accounting/RepeatingInvoice.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/RepeatingInvoices.java b/src/main/java/com/xero/models/accounting/RepeatingInvoices.java index 606fed76..f2c7a486 100644 --- a/src/main/java/com/xero/models/accounting/RepeatingInvoices.java +++ b/src/main/java/com/xero/models/accounting/RepeatingInvoices.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Report.java b/src/main/java/com/xero/models/accounting/Report.java index 306e59d0..cf06788d 100644 --- a/src/main/java/com/xero/models/accounting/Report.java +++ b/src/main/java/com/xero/models/accounting/Report.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ReportAttribute.java b/src/main/java/com/xero/models/accounting/ReportAttribute.java index 8aea14f0..233ed4c8 100644 --- a/src/main/java/com/xero/models/accounting/ReportAttribute.java +++ b/src/main/java/com/xero/models/accounting/ReportAttribute.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ReportCell.java b/src/main/java/com/xero/models/accounting/ReportCell.java index 4e9cd986..46802284 100644 --- a/src/main/java/com/xero/models/accounting/ReportCell.java +++ b/src/main/java/com/xero/models/accounting/ReportCell.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ReportFields.java b/src/main/java/com/xero/models/accounting/ReportFields.java index 51a7e714..3d565846 100644 --- a/src/main/java/com/xero/models/accounting/ReportFields.java +++ b/src/main/java/com/xero/models/accounting/ReportFields.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ReportRow.java b/src/main/java/com/xero/models/accounting/ReportRow.java index c6fa2cf6..1dadc6d6 100644 --- a/src/main/java/com/xero/models/accounting/ReportRow.java +++ b/src/main/java/com/xero/models/accounting/ReportRow.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ReportRows.java b/src/main/java/com/xero/models/accounting/ReportRows.java index f8c5ffd4..cb430cff 100644 --- a/src/main/java/com/xero/models/accounting/ReportRows.java +++ b/src/main/java/com/xero/models/accounting/ReportRows.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ReportWithRow.java b/src/main/java/com/xero/models/accounting/ReportWithRow.java index e0979161..1c0372ba 100644 --- a/src/main/java/com/xero/models/accounting/ReportWithRow.java +++ b/src/main/java/com/xero/models/accounting/ReportWithRow.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ReportWithRows.java b/src/main/java/com/xero/models/accounting/ReportWithRows.java index f369b366..5fb26f95 100644 --- a/src/main/java/com/xero/models/accounting/ReportWithRows.java +++ b/src/main/java/com/xero/models/accounting/ReportWithRows.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Reports.java b/src/main/java/com/xero/models/accounting/Reports.java index 9b7fd809..28bdb1b2 100644 --- a/src/main/java/com/xero/models/accounting/Reports.java +++ b/src/main/java/com/xero/models/accounting/Reports.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/RequestEmpty.java b/src/main/java/com/xero/models/accounting/RequestEmpty.java index 62bf9d3f..827d5324 100644 --- a/src/main/java/com/xero/models/accounting/RequestEmpty.java +++ b/src/main/java/com/xero/models/accounting/RequestEmpty.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/RowType.java b/src/main/java/com/xero/models/accounting/RowType.java index bc65d9f8..72b271b1 100644 --- a/src/main/java/com/xero/models/accounting/RowType.java +++ b/src/main/java/com/xero/models/accounting/RowType.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/SalesTrackingCategory.java b/src/main/java/com/xero/models/accounting/SalesTrackingCategory.java index 1571b058..9d336e85 100644 --- a/src/main/java/com/xero/models/accounting/SalesTrackingCategory.java +++ b/src/main/java/com/xero/models/accounting/SalesTrackingCategory.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Schedule.java b/src/main/java/com/xero/models/accounting/Schedule.java index 82d9b68c..1ca819ae 100644 --- a/src/main/java/com/xero/models/accounting/Schedule.java +++ b/src/main/java/com/xero/models/accounting/Schedule.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/TaxComponent.java b/src/main/java/com/xero/models/accounting/TaxComponent.java index a9dcbbdf..19021936 100644 --- a/src/main/java/com/xero/models/accounting/TaxComponent.java +++ b/src/main/java/com/xero/models/accounting/TaxComponent.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/TaxRate.java b/src/main/java/com/xero/models/accounting/TaxRate.java index 23871d27..a65bced9 100644 --- a/src/main/java/com/xero/models/accounting/TaxRate.java +++ b/src/main/java/com/xero/models/accounting/TaxRate.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/TaxRates.java b/src/main/java/com/xero/models/accounting/TaxRates.java index 2efa0ad3..1991fd94 100644 --- a/src/main/java/com/xero/models/accounting/TaxRates.java +++ b/src/main/java/com/xero/models/accounting/TaxRates.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/TaxType.java b/src/main/java/com/xero/models/accounting/TaxType.java index 282ccf6f..21b40431 100644 --- a/src/main/java/com/xero/models/accounting/TaxType.java +++ b/src/main/java/com/xero/models/accounting/TaxType.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/TenNinteyNineContact.java b/src/main/java/com/xero/models/accounting/TenNinteyNineContact.java index 0ac0d773..d7d0ae05 100644 --- a/src/main/java/com/xero/models/accounting/TenNinteyNineContact.java +++ b/src/main/java/com/xero/models/accounting/TenNinteyNineContact.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/TimeZone.java b/src/main/java/com/xero/models/accounting/TimeZone.java index 510b34d7..b6e95b10 100644 --- a/src/main/java/com/xero/models/accounting/TimeZone.java +++ b/src/main/java/com/xero/models/accounting/TimeZone.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/TrackingCategories.java b/src/main/java/com/xero/models/accounting/TrackingCategories.java index 3ea2da8d..9b4b4c66 100644 --- a/src/main/java/com/xero/models/accounting/TrackingCategories.java +++ b/src/main/java/com/xero/models/accounting/TrackingCategories.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/TrackingCategory.java b/src/main/java/com/xero/models/accounting/TrackingCategory.java index d4f8afe3..c4e653c7 100644 --- a/src/main/java/com/xero/models/accounting/TrackingCategory.java +++ b/src/main/java/com/xero/models/accounting/TrackingCategory.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/TrackingOption.java b/src/main/java/com/xero/models/accounting/TrackingOption.java index c0e892f3..b1e2554c 100644 --- a/src/main/java/com/xero/models/accounting/TrackingOption.java +++ b/src/main/java/com/xero/models/accounting/TrackingOption.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/TrackingOptions.java b/src/main/java/com/xero/models/accounting/TrackingOptions.java index 7589c3cc..c92f4d8c 100644 --- a/src/main/java/com/xero/models/accounting/TrackingOptions.java +++ b/src/main/java/com/xero/models/accounting/TrackingOptions.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/User.java b/src/main/java/com/xero/models/accounting/User.java index 91656dde..a5a732db 100644 --- a/src/main/java/com/xero/models/accounting/User.java +++ b/src/main/java/com/xero/models/accounting/User.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/Users.java b/src/main/java/com/xero/models/accounting/Users.java index 3260c377..8f9d0ad7 100644 --- a/src/main/java/com/xero/models/accounting/Users.java +++ b/src/main/java/com/xero/models/accounting/Users.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/accounting/ValidationError.java b/src/main/java/com/xero/models/accounting/ValidationError.java index 3f8f7499..df24bb90 100644 --- a/src/main/java/com/xero/models/accounting/ValidationError.java +++ b/src/main/java/com/xero/models/accounting/ValidationError.java @@ -2,7 +2,7 @@ * Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/assets/Asset.java b/src/main/java/com/xero/models/assets/Asset.java index cadb342f..287a7ab5 100644 --- a/src/main/java/com/xero/models/assets/Asset.java +++ b/src/main/java/com/xero/models/assets/Asset.java @@ -2,7 +2,7 @@ * Xero Assets API * This is the Xero Assets API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/assets/AssetType.java b/src/main/java/com/xero/models/assets/AssetType.java index a0003f2a..61c2b644 100644 --- a/src/main/java/com/xero/models/assets/AssetType.java +++ b/src/main/java/com/xero/models/assets/AssetType.java @@ -2,7 +2,7 @@ * Xero Assets API * This is the Xero Assets API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/assets/Assets.java b/src/main/java/com/xero/models/assets/Assets.java index 27a6bea4..57e00f5b 100644 --- a/src/main/java/com/xero/models/assets/Assets.java +++ b/src/main/java/com/xero/models/assets/Assets.java @@ -2,7 +2,7 @@ * Xero Assets API * This is the Xero Assets API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/assets/BookDepreciationDetail.java b/src/main/java/com/xero/models/assets/BookDepreciationDetail.java index a8baba10..652f8359 100644 --- a/src/main/java/com/xero/models/assets/BookDepreciationDetail.java +++ b/src/main/java/com/xero/models/assets/BookDepreciationDetail.java @@ -2,7 +2,7 @@ * Xero Assets API * This is the Xero Assets API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/assets/BookDepreciationSetting.java b/src/main/java/com/xero/models/assets/BookDepreciationSetting.java index c0e8332f..822e8788 100644 --- a/src/main/java/com/xero/models/assets/BookDepreciationSetting.java +++ b/src/main/java/com/xero/models/assets/BookDepreciationSetting.java @@ -2,7 +2,7 @@ * Xero Assets API * This is the Xero Assets API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/assets/Pagination.java b/src/main/java/com/xero/models/assets/Pagination.java index e6f30f93..9de7d2ff 100644 --- a/src/main/java/com/xero/models/assets/Pagination.java +++ b/src/main/java/com/xero/models/assets/Pagination.java @@ -2,7 +2,7 @@ * Xero Assets API * This is the Xero Assets API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/assets/Setting.java b/src/main/java/com/xero/models/assets/Setting.java index 97bfdf1a..0b67ecd3 100644 --- a/src/main/java/com/xero/models/assets/Setting.java +++ b/src/main/java/com/xero/models/assets/Setting.java @@ -2,7 +2,7 @@ * Xero Assets API * This is the Xero Assets API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/CountryCode.java b/src/main/java/com/xero/models/bankfeeds/CountryCode.java index a737d211..6a4df21c 100644 --- a/src/main/java/com/xero/models/bankfeeds/CountryCode.java +++ b/src/main/java/com/xero/models/bankfeeds/CountryCode.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/CreditDebitIndicator.java b/src/main/java/com/xero/models/bankfeeds/CreditDebitIndicator.java index d8244965..37e69c89 100644 --- a/src/main/java/com/xero/models/bankfeeds/CreditDebitIndicator.java +++ b/src/main/java/com/xero/models/bankfeeds/CreditDebitIndicator.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/CurrencyCode.java b/src/main/java/com/xero/models/bankfeeds/CurrencyCode.java index fb0c7f97..39a30587 100644 --- a/src/main/java/com/xero/models/bankfeeds/CurrencyCode.java +++ b/src/main/java/com/xero/models/bankfeeds/CurrencyCode.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/EndBalance.java b/src/main/java/com/xero/models/bankfeeds/EndBalance.java index 2497b58f..897f3853 100644 --- a/src/main/java/com/xero/models/bankfeeds/EndBalance.java +++ b/src/main/java/com/xero/models/bankfeeds/EndBalance.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/Error.java b/src/main/java/com/xero/models/bankfeeds/Error.java index 34318b12..cddb9b59 100644 --- a/src/main/java/com/xero/models/bankfeeds/Error.java +++ b/src/main/java/com/xero/models/bankfeeds/Error.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/FeedConnection.java b/src/main/java/com/xero/models/bankfeeds/FeedConnection.java index 4c62f867..6d9c6c75 100644 --- a/src/main/java/com/xero/models/bankfeeds/FeedConnection.java +++ b/src/main/java/com/xero/models/bankfeeds/FeedConnection.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/FeedConnections.java b/src/main/java/com/xero/models/bankfeeds/FeedConnections.java index 2b70ae35..b02be7b5 100644 --- a/src/main/java/com/xero/models/bankfeeds/FeedConnections.java +++ b/src/main/java/com/xero/models/bankfeeds/FeedConnections.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/Pagination.java b/src/main/java/com/xero/models/bankfeeds/Pagination.java index 24bb189c..2bc76d33 100644 --- a/src/main/java/com/xero/models/bankfeeds/Pagination.java +++ b/src/main/java/com/xero/models/bankfeeds/Pagination.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/StartBalance.java b/src/main/java/com/xero/models/bankfeeds/StartBalance.java index 361a6563..4b37f5c8 100644 --- a/src/main/java/com/xero/models/bankfeeds/StartBalance.java +++ b/src/main/java/com/xero/models/bankfeeds/StartBalance.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/Statement.java b/src/main/java/com/xero/models/bankfeeds/Statement.java index 64ddcc9f..ba5abce3 100644 --- a/src/main/java/com/xero/models/bankfeeds/Statement.java +++ b/src/main/java/com/xero/models/bankfeeds/Statement.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/StatementLine.java b/src/main/java/com/xero/models/bankfeeds/StatementLine.java index 4cb09ea5..49489d6f 100644 --- a/src/main/java/com/xero/models/bankfeeds/StatementLine.java +++ b/src/main/java/com/xero/models/bankfeeds/StatementLine.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/bankfeeds/Statements.java b/src/main/java/com/xero/models/bankfeeds/Statements.java index ee8f4e37..b9a7b959 100644 --- a/src/main/java/com/xero/models/bankfeeds/Statements.java +++ b/src/main/java/com/xero/models/bankfeeds/Statements.java @@ -2,7 +2,7 @@ * Bank Feeds API * This specifing endpoints Xero Bank feeds API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/identity/AccessToken.java b/src/main/java/com/xero/models/identity/AccessToken.java index e78845b9..7bc5ee42 100644 --- a/src/main/java/com/xero/models/identity/AccessToken.java +++ b/src/main/java/com/xero/models/identity/AccessToken.java @@ -2,7 +2,7 @@ * Xero oAuth 2 identity service * This specifing endpoints related to managing authentication tokens and identity for Xero API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/identity/Connection.java b/src/main/java/com/xero/models/identity/Connection.java index b71b93b2..8157fc9e 100644 --- a/src/main/java/com/xero/models/identity/Connection.java +++ b/src/main/java/com/xero/models/identity/Connection.java @@ -2,7 +2,7 @@ * Xero oAuth 2 identity service * This specifing endpoints related to managing authentication tokens and identity for Xero API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/identity/RefreshToken.java b/src/main/java/com/xero/models/identity/RefreshToken.java index 97ff4b5e..92be5f58 100644 --- a/src/main/java/com/xero/models/identity/RefreshToken.java +++ b/src/main/java/com/xero/models/identity/RefreshToken.java @@ -2,7 +2,7 @@ * Xero oAuth 2 identity service * This specifing endpoints related to managing authentication tokens and identity for Xero API * - * The version of the OpenAPI document: 2.0.1 + * The version of the OpenAPI document: 2.0.2 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/models/projects/Amount.java b/src/main/java/com/xero/models/projects/Amount.java new file mode 100644 index 00000000..2adae22a --- /dev/null +++ b/src/main/java/com/xero/models/projects/Amount.java @@ -0,0 +1,116 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.xero.models.projects.CurrencyCode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * Amount + */ + +public class Amount { + @JsonProperty("currency") + private CurrencyCode currency; + + @JsonProperty("value") + private Double value; + + public Amount currency(CurrencyCode currency) { + this.currency = currency; + return this; + } + + /** + * Get currency + * @return currency + **/ + @ApiModelProperty(value = "") + public CurrencyCode getCurrency() { + return currency; + } + + public void setCurrency(CurrencyCode currency) { + this.currency = currency; + } + + public Amount value(Double value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @ApiModelProperty(example = "1.0", value = "") + public Double getValue() { + return value; + } + + public void setValue(Double value) { + this.value = value; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Amount amount = (Amount) o; + return Objects.equals(this.currency, amount.currency) && + Objects.equals(this.value, amount.value); + } + + @Override + public int hashCode() { + return Objects.hash(currency, value); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Amount {\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/ChargeType.java b/src/main/java/com/xero/models/projects/ChargeType.java new file mode 100644 index 00000000..6578e996 --- /dev/null +++ b/src/main/java/com/xero/models/projects/ChargeType.java @@ -0,0 +1,60 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Can be `TIME`, `FIXED` or `NON_CHARGEABLE`, defines how the task will be charged. Use `TIME` when you want to charge per hour and `FIXED` to charge as a fixed amount. If the task will not be charged use `NON_CHARGEABLE`. + */ +public enum ChargeType { + + TIME("TIME"), + + FIXED("FIXED"), + + NON_CHARGEABLE("NON_CHARGEABLE"); + + private String value; + + ChargeType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ChargeType fromValue(String value) { + for (ChargeType b : ChargeType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/xero/models/projects/CurrencyCode.java b/src/main/java/com/xero/models/projects/CurrencyCode.java new file mode 100644 index 00000000..74c7ca40 --- /dev/null +++ b/src/main/java/com/xero/models/projects/CurrencyCode.java @@ -0,0 +1,378 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * 3 letter alpha code for the ISO-4217 currency code, e.g. USD, AUD. + */ +public enum CurrencyCode { + + AED("AED"), + + AFN("AFN"), + + ALL("ALL"), + + AMD("AMD"), + + ANG("ANG"), + + AOA("AOA"), + + ARS("ARS"), + + AUD("AUD"), + + AWG("AWG"), + + AZN("AZN"), + + BAM("BAM"), + + BBD("BBD"), + + BDT("BDT"), + + BGN("BGN"), + + BHD("BHD"), + + BIF("BIF"), + + BMD("BMD"), + + BND("BND"), + + BOB("BOB"), + + BRL("BRL"), + + BSD("BSD"), + + BTN("BTN"), + + BWP("BWP"), + + BYN("BYN"), + + BZD("BZD"), + + CAD("CAD"), + + CDF("CDF"), + + CHF("CHF"), + + CLP("CLP"), + + CNY("CNY"), + + COP("COP"), + + CRC("CRC"), + + CUC("CUC"), + + CUP("CUP"), + + CVE("CVE"), + + CZK("CZK"), + + DJF("DJF"), + + DKK("DKK"), + + DOP("DOP"), + + DZD("DZD"), + + EGP("EGP"), + + ERN("ERN"), + + ETB("ETB"), + + EUR("EUR"), + + FJD("FJD"), + + FKP("FKP"), + + GBP("GBP"), + + GEL("GEL"), + + GGP("GGP"), + + GHS("GHS"), + + GIP("GIP"), + + GMD("GMD"), + + GNF("GNF"), + + GTQ("GTQ"), + + GYD("GYD"), + + HKD("HKD"), + + HNL("HNL"), + + HRK("HRK"), + + HTG("HTG"), + + HUF("HUF"), + + IDR("IDR"), + + ILS("ILS"), + + IMP("IMP"), + + INR("INR"), + + IQD("IQD"), + + IRR("IRR"), + + ISK("ISK"), + + JEP("JEP"), + + JMD("JMD"), + + JOD("JOD"), + + JPY("JPY"), + + KES("KES"), + + KGS("KGS"), + + KHR("KHR"), + + KMF("KMF"), + + KPW("KPW"), + + KRW("KRW"), + + KWD("KWD"), + + KYD("KYD"), + + KZT("KZT"), + + LAK("LAK"), + + LBP("LBP"), + + LKR("LKR"), + + LRD("LRD"), + + LSL("LSL"), + + LYD("LYD"), + + MAD("MAD"), + + MDL("MDL"), + + MGA("MGA"), + + MKD("MKD"), + + MMK("MMK"), + + MNT("MNT"), + + MOP("MOP"), + + MRU("MRU"), + + MUR("MUR"), + + MVR("MVR"), + + MWK("MWK"), + + MXN("MXN"), + + MYR("MYR"), + + MZN("MZN"), + + NAD("NAD"), + + NGN("NGN"), + + NIO("NIO"), + + NOK("NOK"), + + NPR("NPR"), + + NZD("NZD"), + + OMR("OMR"), + + PAB("PAB"), + + PEN("PEN"), + + PGK("PGK"), + + PHP("PHP"), + + PKR("PKR"), + + PLN("PLN"), + + PYG("PYG"), + + QAR("QAR"), + + RON("RON"), + + RSD("RSD"), + + RUB("RUB"), + + RWF("RWF"), + + SAR("SAR"), + + SBD("SBD"), + + SCR("SCR"), + + SDG("SDG"), + + SEK("SEK"), + + SGD("SGD"), + + SHP("SHP"), + + SLL("SLL"), + + SOS("SOS"), + + SPL("SPL"), + + SRD("SRD"), + + STN("STN"), + + SVC("SVC"), + + SYP("SYP"), + + SZL("SZL"), + + THB("THB"), + + TJS("TJS"), + + TMT("TMT"), + + TND("TND"), + + TOP("TOP"), + + TRY("TRY"), + + TTD("TTD"), + + TVD("TVD"), + + TWD("TWD"), + + TZS("TZS"), + + UAH("UAH"), + + UGX("UGX"), + + USD("USD"), + + UYU("UYU"), + + UZS("UZS"), + + VEF("VEF"), + + VND("VND"), + + VUV("VUV"), + + WST("WST"), + + XAF("XAF"), + + XCD("XCD"), + + XDR("XDR"), + + XOF("XOF"), + + XPF("XPF"), + + YER("YER"), + + ZAR("ZAR"), + + ZMW("ZMW"), + + ZWD("ZWD"); + + private String value; + + CurrencyCode(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CurrencyCode fromValue(String value) { + for (CurrencyCode b : CurrencyCode.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/xero/models/projects/Error.java b/src/main/java/com/xero/models/projects/Error.java new file mode 100644 index 00000000..8da571eb --- /dev/null +++ b/src/main/java/com/xero/models/projects/Error.java @@ -0,0 +1,115 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +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 com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * Error + */ + +public class Error { + @JsonProperty("message") + private String message; + + @JsonProperty("modelState") + private Object modelState = null; + + public Error message(String message) { + this.message = message; + return this; + } + + /** + * Exception message + * @return message + **/ + @ApiModelProperty(value = "Exception message") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public Error modelState(Object modelState) { + this.modelState = modelState; + return this; + } + + /** + * Array of Elements of validation Errors + * @return modelState + **/ + @ApiModelProperty(value = "Array of Elements of validation Errors") + public Object getModelState() { + return modelState; + } + + public void setModelState(Object modelState) { + this.modelState = modelState; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.message, error.message) && + Objects.equals(this.modelState, error.modelState); + } + + @Override + public int hashCode() { + return Objects.hash(message, modelState); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" modelState: ").append(toIndentedString(modelState)).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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/Pagination.java b/src/main/java/com/xero/models/projects/Pagination.java new file mode 100644 index 00000000..c7619340 --- /dev/null +++ b/src/main/java/com/xero/models/projects/Pagination.java @@ -0,0 +1,161 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +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 com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * Pagination + */ + +public class Pagination { + @JsonProperty("page") + private Integer page; + + @JsonProperty("pageSize") + private Integer pageSize; + + @JsonProperty("pageCount") + private Integer pageCount; + + @JsonProperty("itemCount") + private Integer itemCount; + + public Pagination page(Integer page) { + this.page = page; + return this; + } + + /** + * Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + * @return page + **/ + @ApiModelProperty(example = "1", value = "Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.") + public Integer getPage() { + return page; + } + + public void setPage(Integer page) { + this.page = page; + } + + public Pagination pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. + * @return pageSize + **/ + @ApiModelProperty(example = "10", value = "Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.") + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + public Pagination pageCount(Integer pageCount) { + this.pageCount = pageCount; + return this; + } + + /** + * Number of pages available + * @return pageCount + **/ + @ApiModelProperty(example = "1", value = "Number of pages available") + public Integer getPageCount() { + return pageCount; + } + + public void setPageCount(Integer pageCount) { + this.pageCount = pageCount; + } + + public Pagination itemCount(Integer itemCount) { + this.itemCount = itemCount; + return this; + } + + /** + * Number of items returned + * @return itemCount + **/ + @ApiModelProperty(example = "2", value = "Number of items returned") + public Integer getItemCount() { + return itemCount; + } + + public void setItemCount(Integer 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; + } + Pagination pagination = (Pagination) o; + return Objects.equals(this.page, pagination.page) && + Objects.equals(this.pageSize, pagination.pageSize) && + Objects.equals(this.pageCount, pagination.pageCount) && + Objects.equals(this.itemCount, pagination.itemCount); + } + + @Override + public int hashCode() { + return Objects.hash(page, pageSize, pageCount, itemCount); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pagination {\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" pageCount: ").append(toIndentedString(pageCount)).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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/Project.java b/src/main/java/com/xero/models/projects/Project.java new file mode 100644 index 00000000..b759ad47 --- /dev/null +++ b/src/main/java/com/xero/models/projects/Project.java @@ -0,0 +1,580 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.xero.models.projects.Amount; +import com.xero.models.projects.CurrencyCode; +import com.xero.models.projects.ProjectStatus; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * Project + */ + +public class Project { + @JsonProperty("projectId") + private UUID projectId; + + @JsonProperty("contactId") + private UUID contactId; + + @JsonProperty("name") + private String name; + + @JsonProperty("currencyCode") + private CurrencyCode currencyCode; + + @JsonProperty("minutesLogged") + private Integer minutesLogged; + + @JsonProperty("totalTaskAmount") + private Amount totalTaskAmount = null; + + @JsonProperty("totalExpenseAmount") + private Amount totalExpenseAmount = null; + + @JsonProperty("estimateAmount") + private Amount estimateAmount = null; + + @JsonProperty("minutesToBeInvoiced") + private Integer minutesToBeInvoiced; + + @JsonProperty("taskAmountToBeInvoiced") + private Amount taskAmountToBeInvoiced = null; + + @JsonProperty("taskAmountInvoiced") + private Amount taskAmountInvoiced = null; + + @JsonProperty("expenseAmountToBeInvoiced") + private Amount expenseAmountToBeInvoiced = null; + + @JsonProperty("expenseAmountInvoiced") + private Amount expenseAmountInvoiced = null; + + @JsonProperty("projectAmountInvoiced") + private Amount projectAmountInvoiced = null; + + @JsonProperty("deposit") + private Amount deposit = null; + + @JsonProperty("depositApplied") + private Amount depositApplied = null; + + @JsonProperty("creditNoteAmount") + private Amount creditNoteAmount = null; + + @JsonProperty("deadlineUtc") + private OffsetDateTime deadlineUtc; + + @JsonProperty("totalInvoiced") + private Amount totalInvoiced = null; + + @JsonProperty("totalToBeInvoiced") + private Amount totalToBeInvoiced = null; + + @JsonProperty("estimate") + private Amount estimate = null; + + @JsonProperty("status") + private ProjectStatus status; + + public Project projectId(UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Identifier of the project. + * @return projectId + **/ + @ApiModelProperty(example = "254553fa-2be8-4991-bd5e-70a97ea12ef8", value = "Identifier of the project.") + public UUID getProjectId() { + return projectId; + } + + public void setProjectId(UUID projectId) { + this.projectId = projectId; + } + + public Project contactId(UUID contactId) { + this.contactId = contactId; + return this; + } + + /** + * Identifier of the contact this project was created for. + * @return contactId + **/ + @ApiModelProperty(example = "01234567-89ab-cdef-0123-456789abcdef", value = "Identifier of the contact this project was created for.") + public UUID getContactId() { + return contactId; + } + + public void setContactId(UUID contactId) { + this.contactId = contactId; + } + + public Project name(String name) { + this.name = name; + return this; + } + + /** + * Name of the project. + * @return name + **/ + @ApiModelProperty(example = "New Kitchen", required = true, value = "Name of the project.") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Project currencyCode(CurrencyCode currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * Get currencyCode + * @return currencyCode + **/ + @ApiModelProperty(value = "") + public CurrencyCode getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(CurrencyCode currencyCode) { + this.currencyCode = currencyCode; + } + + public Project minutesLogged(Integer minutesLogged) { + this.minutesLogged = minutesLogged; + return this; + } + + /** + * A total of minutes logged against all tasks on the Project. + * @return minutesLogged + **/ + @ApiModelProperty(example = "0", value = "A total of minutes logged against all tasks on the Project.") + public Integer getMinutesLogged() { + return minutesLogged; + } + + public void setMinutesLogged(Integer minutesLogged) { + this.minutesLogged = minutesLogged; + } + + public Project totalTaskAmount(Amount totalTaskAmount) { + this.totalTaskAmount = totalTaskAmount; + return this; + } + + /** + * Get totalTaskAmount + * @return totalTaskAmount + **/ + @ApiModelProperty(value = "") + public Amount getTotalTaskAmount() { + return totalTaskAmount; + } + + public void setTotalTaskAmount(Amount totalTaskAmount) { + this.totalTaskAmount = totalTaskAmount; + } + + public Project totalExpenseAmount(Amount totalExpenseAmount) { + this.totalExpenseAmount = totalExpenseAmount; + return this; + } + + /** + * Get totalExpenseAmount + * @return totalExpenseAmount + **/ + @ApiModelProperty(value = "") + public Amount getTotalExpenseAmount() { + return totalExpenseAmount; + } + + public void setTotalExpenseAmount(Amount totalExpenseAmount) { + this.totalExpenseAmount = totalExpenseAmount; + } + + public Project estimateAmount(Amount estimateAmount) { + this.estimateAmount = estimateAmount; + return this; + } + + /** + * Get estimateAmount + * @return estimateAmount + **/ + @ApiModelProperty(value = "") + public Amount getEstimateAmount() { + return estimateAmount; + } + + public void setEstimateAmount(Amount estimateAmount) { + this.estimateAmount = estimateAmount; + } + + public Project minutesToBeInvoiced(Integer minutesToBeInvoiced) { + this.minutesToBeInvoiced = minutesToBeInvoiced; + return this; + } + + /** + * Minutes which have not been invoiced across all chargeable tasks in the project. + * @return minutesToBeInvoiced + **/ + @ApiModelProperty(example = "0", value = "Minutes which have not been invoiced across all chargeable tasks in the project.") + public Integer getMinutesToBeInvoiced() { + return minutesToBeInvoiced; + } + + public void setMinutesToBeInvoiced(Integer minutesToBeInvoiced) { + this.minutesToBeInvoiced = minutesToBeInvoiced; + } + + public Project taskAmountToBeInvoiced(Amount taskAmountToBeInvoiced) { + this.taskAmountToBeInvoiced = taskAmountToBeInvoiced; + return this; + } + + /** + * Get taskAmountToBeInvoiced + * @return taskAmountToBeInvoiced + **/ + @ApiModelProperty(value = "") + public Amount getTaskAmountToBeInvoiced() { + return taskAmountToBeInvoiced; + } + + public void setTaskAmountToBeInvoiced(Amount taskAmountToBeInvoiced) { + this.taskAmountToBeInvoiced = taskAmountToBeInvoiced; + } + + public Project taskAmountInvoiced(Amount taskAmountInvoiced) { + this.taskAmountInvoiced = taskAmountInvoiced; + return this; + } + + /** + * Get taskAmountInvoiced + * @return taskAmountInvoiced + **/ + @ApiModelProperty(value = "") + public Amount getTaskAmountInvoiced() { + return taskAmountInvoiced; + } + + public void setTaskAmountInvoiced(Amount taskAmountInvoiced) { + this.taskAmountInvoiced = taskAmountInvoiced; + } + + public Project expenseAmountToBeInvoiced(Amount expenseAmountToBeInvoiced) { + this.expenseAmountToBeInvoiced = expenseAmountToBeInvoiced; + return this; + } + + /** + * Get expenseAmountToBeInvoiced + * @return expenseAmountToBeInvoiced + **/ + @ApiModelProperty(value = "") + public Amount getExpenseAmountToBeInvoiced() { + return expenseAmountToBeInvoiced; + } + + public void setExpenseAmountToBeInvoiced(Amount expenseAmountToBeInvoiced) { + this.expenseAmountToBeInvoiced = expenseAmountToBeInvoiced; + } + + public Project expenseAmountInvoiced(Amount expenseAmountInvoiced) { + this.expenseAmountInvoiced = expenseAmountInvoiced; + return this; + } + + /** + * Get expenseAmountInvoiced + * @return expenseAmountInvoiced + **/ + @ApiModelProperty(value = "") + public Amount getExpenseAmountInvoiced() { + return expenseAmountInvoiced; + } + + public void setExpenseAmountInvoiced(Amount expenseAmountInvoiced) { + this.expenseAmountInvoiced = expenseAmountInvoiced; + } + + public Project projectAmountInvoiced(Amount projectAmountInvoiced) { + this.projectAmountInvoiced = projectAmountInvoiced; + return this; + } + + /** + * Get projectAmountInvoiced + * @return projectAmountInvoiced + **/ + @ApiModelProperty(value = "") + public Amount getProjectAmountInvoiced() { + return projectAmountInvoiced; + } + + public void setProjectAmountInvoiced(Amount projectAmountInvoiced) { + this.projectAmountInvoiced = projectAmountInvoiced; + } + + public Project deposit(Amount deposit) { + this.deposit = deposit; + return this; + } + + /** + * Get deposit + * @return deposit + **/ + @ApiModelProperty(value = "") + public Amount getDeposit() { + return deposit; + } + + public void setDeposit(Amount deposit) { + this.deposit = deposit; + } + + public Project depositApplied(Amount depositApplied) { + this.depositApplied = depositApplied; + return this; + } + + /** + * Get depositApplied + * @return depositApplied + **/ + @ApiModelProperty(value = "") + public Amount getDepositApplied() { + return depositApplied; + } + + public void setDepositApplied(Amount depositApplied) { + this.depositApplied = depositApplied; + } + + public Project creditNoteAmount(Amount creditNoteAmount) { + this.creditNoteAmount = creditNoteAmount; + return this; + } + + /** + * Get creditNoteAmount + * @return creditNoteAmount + **/ + @ApiModelProperty(value = "") + public Amount getCreditNoteAmount() { + return creditNoteAmount; + } + + public void setCreditNoteAmount(Amount creditNoteAmount) { + this.creditNoteAmount = creditNoteAmount; + } + + public Project deadlineUtc(OffsetDateTime deadlineUtc) { + this.deadlineUtc = deadlineUtc; + return this; + } + + /** + * Deadline for the project. UTC Date Time in ISO-8601 format. + * @return deadlineUtc + **/ + @ApiModelProperty(value = "Deadline for the project. UTC Date Time in ISO-8601 format.") + public OffsetDateTime getDeadlineUtc() { + return deadlineUtc; + } + + public void setDeadlineUtc(OffsetDateTime deadlineUtc) { + this.deadlineUtc = deadlineUtc; + } + + public Project totalInvoiced(Amount totalInvoiced) { + this.totalInvoiced = totalInvoiced; + return this; + } + + /** + * Get totalInvoiced + * @return totalInvoiced + **/ + @ApiModelProperty(value = "") + public Amount getTotalInvoiced() { + return totalInvoiced; + } + + public void setTotalInvoiced(Amount totalInvoiced) { + this.totalInvoiced = totalInvoiced; + } + + public Project totalToBeInvoiced(Amount totalToBeInvoiced) { + this.totalToBeInvoiced = totalToBeInvoiced; + return this; + } + + /** + * Get totalToBeInvoiced + * @return totalToBeInvoiced + **/ + @ApiModelProperty(value = "") + public Amount getTotalToBeInvoiced() { + return totalToBeInvoiced; + } + + public void setTotalToBeInvoiced(Amount totalToBeInvoiced) { + this.totalToBeInvoiced = totalToBeInvoiced; + } + + public Project estimate(Amount estimate) { + this.estimate = estimate; + return this; + } + + /** + * Get estimate + * @return estimate + **/ + @ApiModelProperty(value = "") + public Amount getEstimate() { + return estimate; + } + + public void setEstimate(Amount estimate) { + this.estimate = estimate; + } + + public Project status(ProjectStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @ApiModelProperty(value = "") + public ProjectStatus getStatus() { + return status; + } + + public void setStatus(ProjectStatus 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; + } + Project project = (Project) o; + return Objects.equals(this.projectId, project.projectId) && + Objects.equals(this.contactId, project.contactId) && + Objects.equals(this.name, project.name) && + Objects.equals(this.currencyCode, project.currencyCode) && + Objects.equals(this.minutesLogged, project.minutesLogged) && + Objects.equals(this.totalTaskAmount, project.totalTaskAmount) && + Objects.equals(this.totalExpenseAmount, project.totalExpenseAmount) && + Objects.equals(this.estimateAmount, project.estimateAmount) && + Objects.equals(this.minutesToBeInvoiced, project.minutesToBeInvoiced) && + Objects.equals(this.taskAmountToBeInvoiced, project.taskAmountToBeInvoiced) && + Objects.equals(this.taskAmountInvoiced, project.taskAmountInvoiced) && + Objects.equals(this.expenseAmountToBeInvoiced, project.expenseAmountToBeInvoiced) && + Objects.equals(this.expenseAmountInvoiced, project.expenseAmountInvoiced) && + Objects.equals(this.projectAmountInvoiced, project.projectAmountInvoiced) && + Objects.equals(this.deposit, project.deposit) && + Objects.equals(this.depositApplied, project.depositApplied) && + Objects.equals(this.creditNoteAmount, project.creditNoteAmount) && + Objects.equals(this.deadlineUtc, project.deadlineUtc) && + Objects.equals(this.totalInvoiced, project.totalInvoiced) && + Objects.equals(this.totalToBeInvoiced, project.totalToBeInvoiced) && + Objects.equals(this.estimate, project.estimate) && + Objects.equals(this.status, project.status); + } + + @Override + public int hashCode() { + return Objects.hash(projectId, contactId, name, currencyCode, minutesLogged, totalTaskAmount, totalExpenseAmount, estimateAmount, minutesToBeInvoiced, taskAmountToBeInvoiced, taskAmountInvoiced, expenseAmountToBeInvoiced, expenseAmountInvoiced, projectAmountInvoiced, deposit, depositApplied, creditNoteAmount, deadlineUtc, totalInvoiced, totalToBeInvoiced, estimate, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Project {\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" contactId: ").append(toIndentedString(contactId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" minutesLogged: ").append(toIndentedString(minutesLogged)).append("\n"); + sb.append(" totalTaskAmount: ").append(toIndentedString(totalTaskAmount)).append("\n"); + sb.append(" totalExpenseAmount: ").append(toIndentedString(totalExpenseAmount)).append("\n"); + sb.append(" estimateAmount: ").append(toIndentedString(estimateAmount)).append("\n"); + sb.append(" minutesToBeInvoiced: ").append(toIndentedString(minutesToBeInvoiced)).append("\n"); + sb.append(" taskAmountToBeInvoiced: ").append(toIndentedString(taskAmountToBeInvoiced)).append("\n"); + sb.append(" taskAmountInvoiced: ").append(toIndentedString(taskAmountInvoiced)).append("\n"); + sb.append(" expenseAmountToBeInvoiced: ").append(toIndentedString(expenseAmountToBeInvoiced)).append("\n"); + sb.append(" expenseAmountInvoiced: ").append(toIndentedString(expenseAmountInvoiced)).append("\n"); + sb.append(" projectAmountInvoiced: ").append(toIndentedString(projectAmountInvoiced)).append("\n"); + sb.append(" deposit: ").append(toIndentedString(deposit)).append("\n"); + sb.append(" depositApplied: ").append(toIndentedString(depositApplied)).append("\n"); + sb.append(" creditNoteAmount: ").append(toIndentedString(creditNoteAmount)).append("\n"); + sb.append(" deadlineUtc: ").append(toIndentedString(deadlineUtc)).append("\n"); + sb.append(" totalInvoiced: ").append(toIndentedString(totalInvoiced)).append("\n"); + sb.append(" totalToBeInvoiced: ").append(toIndentedString(totalToBeInvoiced)).append("\n"); + sb.append(" estimate: ").append(toIndentedString(estimate)).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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/ProjectCreateOrUpdate.java b/src/main/java/com/xero/models/projects/ProjectCreateOrUpdate.java new file mode 100644 index 00000000..1340be86 --- /dev/null +++ b/src/main/java/com/xero/models/projects/ProjectCreateOrUpdate.java @@ -0,0 +1,163 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +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.UUID; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * ProjectCreateOrUpdate + */ + +public class ProjectCreateOrUpdate { + @JsonProperty("contactId") + private UUID contactId; + + @JsonProperty("name") + private String name; + + @JsonProperty("estimateAmount") + private Double estimateAmount; + + @JsonProperty("deadlineUtc") + private OffsetDateTime deadlineUtc; + + public ProjectCreateOrUpdate contactId(UUID contactId) { + this.contactId = contactId; + return this; + } + + /** + * Identifier of the contact this project was created for. + * @return contactId + **/ + @ApiModelProperty(example = "01234567-89ab-cdef-0123-456789abcdef", value = "Identifier of the contact this project was created for.") + public UUID getContactId() { + return contactId; + } + + public void setContactId(UUID contactId) { + this.contactId = contactId; + } + + public ProjectCreateOrUpdate name(String name) { + this.name = name; + return this; + } + + /** + * Name of the project. + * @return name + **/ + @ApiModelProperty(example = "New Kitchen", required = true, value = "Name of the project.") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ProjectCreateOrUpdate estimateAmount(Double estimateAmount) { + this.estimateAmount = estimateAmount; + return this; + } + + /** + * Get estimateAmount + * @return estimateAmount + **/ + @ApiModelProperty(example = "1.0", value = "") + public Double getEstimateAmount() { + return estimateAmount; + } + + public void setEstimateAmount(Double estimateAmount) { + this.estimateAmount = estimateAmount; + } + + public ProjectCreateOrUpdate deadlineUtc(OffsetDateTime deadlineUtc) { + this.deadlineUtc = deadlineUtc; + return this; + } + + /** + * Deadline for the project. UTC Date Time in ISO-8601 format. + * @return deadlineUtc + **/ + @ApiModelProperty(value = "Deadline for the project. UTC Date Time in ISO-8601 format.") + public OffsetDateTime getDeadlineUtc() { + return deadlineUtc; + } + + public void setDeadlineUtc(OffsetDateTime deadlineUtc) { + this.deadlineUtc = deadlineUtc; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProjectCreateOrUpdate projectCreateOrUpdate = (ProjectCreateOrUpdate) o; + return Objects.equals(this.contactId, projectCreateOrUpdate.contactId) && + Objects.equals(this.name, projectCreateOrUpdate.name) && + Objects.equals(this.estimateAmount, projectCreateOrUpdate.estimateAmount) && + Objects.equals(this.deadlineUtc, projectCreateOrUpdate.deadlineUtc); + } + + @Override + public int hashCode() { + return Objects.hash(contactId, name, estimateAmount, deadlineUtc); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProjectCreateOrUpdate {\n"); + sb.append(" contactId: ").append(toIndentedString(contactId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" estimateAmount: ").append(toIndentedString(estimateAmount)).append("\n"); + sb.append(" deadlineUtc: ").append(toIndentedString(deadlineUtc)).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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/ProjectPatch.java b/src/main/java/com/xero/models/projects/ProjectPatch.java new file mode 100644 index 00000000..e1955038 --- /dev/null +++ b/src/main/java/com/xero/models/projects/ProjectPatch.java @@ -0,0 +1,93 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.xero.models.projects.ProjectStatus; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * ProjectPatch + */ + +public class ProjectPatch { + @JsonProperty("status") + private ProjectStatus status; + + public ProjectPatch status(ProjectStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @ApiModelProperty(required = true, value = "") + public ProjectStatus getStatus() { + return status; + } + + public void setStatus(ProjectStatus 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; + } + ProjectPatch projectPatch = (ProjectPatch) o; + return Objects.equals(this.status, projectPatch.status); + } + + @Override + public int hashCode() { + return Objects.hash(status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProjectPatch {\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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/ProjectStatus.java b/src/main/java/com/xero/models/projects/ProjectStatus.java new file mode 100644 index 00000000..b9f1c93c --- /dev/null +++ b/src/main/java/com/xero/models/projects/ProjectStatus.java @@ -0,0 +1,58 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Status for project + */ +public enum ProjectStatus { + + INPROGRESS("INPROGRESS"), + + CLOSED("CLOSED"); + + private String value; + + ProjectStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProjectStatus fromValue(String value) { + for (ProjectStatus b : ProjectStatus.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/xero/models/projects/ProjectUser.java b/src/main/java/com/xero/models/projects/ProjectUser.java new file mode 100644 index 00000000..a15f50af --- /dev/null +++ b/src/main/java/com/xero/models/projects/ProjectUser.java @@ -0,0 +1,139 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +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.UUID; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * ProjectUser + */ + +public class ProjectUser { + @JsonProperty("userId") + private UUID userId; + + @JsonProperty("name") + private String name; + + @JsonProperty("email") + private String email; + + public ProjectUser userId(UUID userId) { + this.userId = userId; + return this; + } + + /** + * Identifier of the user of the project. + * @return userId + **/ + @ApiModelProperty(example = "254553fa-2be8-4991-bd5e-70a97ea12ef8", value = "Identifier of the user of the project.") + public UUID getUserId() { + return userId; + } + + public void setUserId(UUID userId) { + this.userId = userId; + } + + public ProjectUser name(String name) { + this.name = name; + return this; + } + + /** + * Full name of the user. + * @return name + **/ + @ApiModelProperty(example = "Sidney Allen", value = "Full name of the user.") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ProjectUser email(String email) { + this.email = email; + return this; + } + + /** + * Email address of the user. + * @return email + **/ + @ApiModelProperty(example = "sidneyallen@xero.com", value = "Email address of the user.") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProjectUser projectUser = (ProjectUser) o; + return Objects.equals(this.userId, projectUser.userId) && + Objects.equals(this.name, projectUser.name) && + Objects.equals(this.email, projectUser.email); + } + + @Override + public int hashCode() { + return Objects.hash(userId, name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProjectUser {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/ProjectUsers.java b/src/main/java/com/xero/models/projects/ProjectUsers.java new file mode 100644 index 00000000..e48de8ba --- /dev/null +++ b/src/main/java/com/xero/models/projects/ProjectUsers.java @@ -0,0 +1,127 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.xero.models.projects.Pagination; +import com.xero.models.projects.ProjectUser; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * ProjectUsers + */ + +public class ProjectUsers { + @JsonProperty("pagination") + private Pagination pagination = null; + + @JsonProperty("items") + private List items = new ArrayList(); + + public ProjectUsers pagination(Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + **/ + @ApiModelProperty(value = "") + public Pagination getPagination() { + return pagination; + } + + public void setPagination(Pagination pagination) { + this.pagination = pagination; + } + + public ProjectUsers items(List items) { + this.items = items; + return this; + } + + public ProjectUsers addItemsItem(ProjectUser itemsItem) { + if (this.items == null) { + this.items = new ArrayList(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + **/ + @ApiModelProperty(value = "") + public List getItems() { + return items; + } + + public void setItems(List 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; + } + ProjectUsers projectUsers = (ProjectUsers) o; + return Objects.equals(this.pagination, projectUsers.pagination) && + Objects.equals(this.items, projectUsers.items); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, items); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProjectUsers {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/Projects.java b/src/main/java/com/xero/models/projects/Projects.java new file mode 100644 index 00000000..4e6512ef --- /dev/null +++ b/src/main/java/com/xero/models/projects/Projects.java @@ -0,0 +1,127 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.xero.models.projects.Pagination; +import com.xero.models.projects.Project; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * Projects + */ + +public class Projects { + @JsonProperty("pagination") + private Pagination pagination = null; + + @JsonProperty("items") + private List items = new ArrayList(); + + public Projects pagination(Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + **/ + @ApiModelProperty(value = "") + public Pagination getPagination() { + return pagination; + } + + public void setPagination(Pagination pagination) { + this.pagination = pagination; + } + + public Projects items(List items) { + this.items = items; + return this; + } + + public Projects addItemsItem(Project itemsItem) { + if (this.items == null) { + this.items = new ArrayList(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + **/ + @ApiModelProperty(value = "") + public List getItems() { + return items; + } + + public void setItems(List 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; + } + Projects projects = (Projects) o; + return Objects.equals(this.pagination, projects.pagination) && + Objects.equals(this.items, projects.items); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, items); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Projects {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/Task.java b/src/main/java/com/xero/models/projects/Task.java new file mode 100644 index 00000000..a6ef0b99 --- /dev/null +++ b/src/main/java/com/xero/models/projects/Task.java @@ -0,0 +1,454 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.xero.models.projects.Amount; +import com.xero.models.projects.ChargeType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.UUID; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * Task + */ + +public class Task { + @JsonProperty("taskId") + private UUID taskId; + + @JsonProperty("name") + private String name; + + @JsonProperty("rate") + private Amount rate = null; + + @JsonProperty("chargeType") + private ChargeType chargeType; + + @JsonProperty("estimateMinutes") + private Double estimateMinutes; + + @JsonProperty("projectId") + private UUID projectId; + + @JsonProperty("totalMinutes") + private Double totalMinutes; + + @JsonProperty("totalAmount") + private Amount totalAmount = null; + + @JsonProperty("minutesInvoiced") + private Double minutesInvoiced; + + @JsonProperty("minutesToBeInvoiced") + private Double minutesToBeInvoiced; + + @JsonProperty("fixedMinutes") + private Double fixedMinutes; + + @JsonProperty("nonChargeableMinutes") + private Double nonChargeableMinutes; + + @JsonProperty("amountToBeInvoiced") + private Amount amountToBeInvoiced = null; + + @JsonProperty("amountInvoiced") + private Amount amountInvoiced = null; + + /** + * Status of the task. When a task of ChargeType is `FIXED` and the rate amount is invoiced the status will be set to `INVOICED` and can't be modified. A task with ChargeType of `TIME` or `NON_CHARGEABLE` cannot have a status of `INVOICED`. A `LOCKED` state indicates that the task is currently changing state (for example being invoiced) and can't be modified. + */ + public enum StatusEnum { + ACTIVE("ACTIVE"), + + INVOICED("INVOICED"), + + LOCKED("LOCKED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Task taskId(UUID taskId) { + this.taskId = taskId; + return this; + } + + /** + * Identifier of the task. + * @return taskId + **/ + @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Identifier of the task.") + public UUID getTaskId() { + return taskId; + } + + public void setTaskId(UUID taskId) { + this.taskId = taskId; + } + + public Task name(String name) { + this.name = name; + return this; + } + + /** + * Name of the task. + * @return name + **/ + @ApiModelProperty(value = "Name of the task.") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Task rate(Amount rate) { + this.rate = rate; + return this; + } + + /** + * Get rate + * @return rate + **/ + @ApiModelProperty(value = "") + public Amount getRate() { + return rate; + } + + public void setRate(Amount rate) { + this.rate = rate; + } + + public Task chargeType(ChargeType chargeType) { + this.chargeType = chargeType; + return this; + } + + /** + * Get chargeType + * @return chargeType + **/ + @ApiModelProperty(value = "") + public ChargeType getChargeType() { + return chargeType; + } + + public void setChargeType(ChargeType chargeType) { + this.chargeType = chargeType; + } + + public Task estimateMinutes(Double estimateMinutes) { + this.estimateMinutes = estimateMinutes; + return this; + } + + /** + * An estimated time to perform the task + * @return estimateMinutes + **/ + @ApiModelProperty(value = "An estimated time to perform the task") + public Double getEstimateMinutes() { + return estimateMinutes; + } + + public void setEstimateMinutes(Double estimateMinutes) { + this.estimateMinutes = estimateMinutes; + } + + public Task projectId(UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Identifier of the project task belongs to. + * @return projectId + **/ + @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Identifier of the project task belongs to.") + public UUID getProjectId() { + return projectId; + } + + public void setProjectId(UUID projectId) { + this.projectId = projectId; + } + + public Task totalMinutes(Double totalMinutes) { + this.totalMinutes = totalMinutes; + return this; + } + + /** + * Total minutes which have been logged against the task. Logged by assigning a time entry to a task + * @return totalMinutes + **/ + @ApiModelProperty(value = "Total minutes which have been logged against the task. Logged by assigning a time entry to a task") + public Double getTotalMinutes() { + return totalMinutes; + } + + public void setTotalMinutes(Double totalMinutes) { + this.totalMinutes = totalMinutes; + } + + public Task totalAmount(Amount totalAmount) { + this.totalAmount = totalAmount; + return this; + } + + /** + * Get totalAmount + * @return totalAmount + **/ + @ApiModelProperty(value = "") + public Amount getTotalAmount() { + return totalAmount; + } + + public void setTotalAmount(Amount totalAmount) { + this.totalAmount = totalAmount; + } + + public Task minutesInvoiced(Double minutesInvoiced) { + this.minutesInvoiced = minutesInvoiced; + return this; + } + + /** + * Minutes on this task which have been invoiced. + * @return minutesInvoiced + **/ + @ApiModelProperty(value = "Minutes on this task which have been invoiced.") + public Double getMinutesInvoiced() { + return minutesInvoiced; + } + + public void setMinutesInvoiced(Double minutesInvoiced) { + this.minutesInvoiced = minutesInvoiced; + } + + public Task minutesToBeInvoiced(Double minutesToBeInvoiced) { + this.minutesToBeInvoiced = minutesToBeInvoiced; + return this; + } + + /** + * Minutes on this task which have not been invoiced. + * @return minutesToBeInvoiced + **/ + @ApiModelProperty(value = "Minutes on this task which have not been invoiced.") + public Double getMinutesToBeInvoiced() { + return minutesToBeInvoiced; + } + + public void setMinutesToBeInvoiced(Double minutesToBeInvoiced) { + this.minutesToBeInvoiced = minutesToBeInvoiced; + } + + public Task fixedMinutes(Double fixedMinutes) { + this.fixedMinutes = fixedMinutes; + return this; + } + + /** + * Minutes logged against this task if its charge type is `FIXED`. + * @return fixedMinutes + **/ + @ApiModelProperty(value = "Minutes logged against this task if its charge type is `FIXED`.") + public Double getFixedMinutes() { + return fixedMinutes; + } + + public void setFixedMinutes(Double fixedMinutes) { + this.fixedMinutes = fixedMinutes; + } + + public Task nonChargeableMinutes(Double nonChargeableMinutes) { + this.nonChargeableMinutes = nonChargeableMinutes; + return this; + } + + /** + * Minutes logged against this task if its charge type is `NON_CHARGEABLE`. + * @return nonChargeableMinutes + **/ + @ApiModelProperty(value = "Minutes logged against this task if its charge type is `NON_CHARGEABLE`.") + public Double getNonChargeableMinutes() { + return nonChargeableMinutes; + } + + public void setNonChargeableMinutes(Double nonChargeableMinutes) { + this.nonChargeableMinutes = nonChargeableMinutes; + } + + public Task amountToBeInvoiced(Amount amountToBeInvoiced) { + this.amountToBeInvoiced = amountToBeInvoiced; + return this; + } + + /** + * Get amountToBeInvoiced + * @return amountToBeInvoiced + **/ + @ApiModelProperty(value = "") + public Amount getAmountToBeInvoiced() { + return amountToBeInvoiced; + } + + public void setAmountToBeInvoiced(Amount amountToBeInvoiced) { + this.amountToBeInvoiced = amountToBeInvoiced; + } + + public Task amountInvoiced(Amount amountInvoiced) { + this.amountInvoiced = amountInvoiced; + return this; + } + + /** + * Get amountInvoiced + * @return amountInvoiced + **/ + @ApiModelProperty(value = "") + public Amount getAmountInvoiced() { + return amountInvoiced; + } + + public void setAmountInvoiced(Amount amountInvoiced) { + this.amountInvoiced = amountInvoiced; + } + + public Task status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the task. When a task of ChargeType is `FIXED` and the rate amount is invoiced the status will be set to `INVOICED` and can't be modified. A task with ChargeType of `TIME` or `NON_CHARGEABLE` cannot have a status of `INVOICED`. A `LOCKED` state indicates that the task is currently changing state (for example being invoiced) and can't be modified. + * @return status + **/ + @ApiModelProperty(value = "Status of the task. When a task of ChargeType is `FIXED` and the rate amount is invoiced the status will be set to `INVOICED` and can't be modified. A task with ChargeType of `TIME` or `NON_CHARGEABLE` cannot have a status of `INVOICED`. A `LOCKED` state indicates that the task is currently changing state (for example being invoiced) and can't be modified.") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum 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; + } + Task task = (Task) o; + return Objects.equals(this.taskId, task.taskId) && + Objects.equals(this.name, task.name) && + Objects.equals(this.rate, task.rate) && + Objects.equals(this.chargeType, task.chargeType) && + Objects.equals(this.estimateMinutes, task.estimateMinutes) && + Objects.equals(this.projectId, task.projectId) && + Objects.equals(this.totalMinutes, task.totalMinutes) && + Objects.equals(this.totalAmount, task.totalAmount) && + Objects.equals(this.minutesInvoiced, task.minutesInvoiced) && + Objects.equals(this.minutesToBeInvoiced, task.minutesToBeInvoiced) && + Objects.equals(this.fixedMinutes, task.fixedMinutes) && + Objects.equals(this.nonChargeableMinutes, task.nonChargeableMinutes) && + Objects.equals(this.amountToBeInvoiced, task.amountToBeInvoiced) && + Objects.equals(this.amountInvoiced, task.amountInvoiced) && + Objects.equals(this.status, task.status); + } + + @Override + public int hashCode() { + return Objects.hash(taskId, name, rate, chargeType, estimateMinutes, projectId, totalMinutes, totalAmount, minutesInvoiced, minutesToBeInvoiced, fixedMinutes, nonChargeableMinutes, amountToBeInvoiced, amountInvoiced, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Task {\n"); + sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); + sb.append(" chargeType: ").append(toIndentedString(chargeType)).append("\n"); + sb.append(" estimateMinutes: ").append(toIndentedString(estimateMinutes)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" totalMinutes: ").append(toIndentedString(totalMinutes)).append("\n"); + sb.append(" totalAmount: ").append(toIndentedString(totalAmount)).append("\n"); + sb.append(" minutesInvoiced: ").append(toIndentedString(minutesInvoiced)).append("\n"); + sb.append(" minutesToBeInvoiced: ").append(toIndentedString(minutesToBeInvoiced)).append("\n"); + sb.append(" fixedMinutes: ").append(toIndentedString(fixedMinutes)).append("\n"); + sb.append(" nonChargeableMinutes: ").append(toIndentedString(nonChargeableMinutes)).append("\n"); + sb.append(" amountToBeInvoiced: ").append(toIndentedString(amountToBeInvoiced)).append("\n"); + sb.append(" amountInvoiced: ").append(toIndentedString(amountInvoiced)).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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/TaskCreateOrUpdate.java b/src/main/java/com/xero/models/projects/TaskCreateOrUpdate.java new file mode 100644 index 00000000..b7b4a6fb --- /dev/null +++ b/src/main/java/com/xero/models/projects/TaskCreateOrUpdate.java @@ -0,0 +1,163 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.xero.models.projects.Amount; +import com.xero.models.projects.ChargeType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * TaskCreateOrUpdate + */ + +public class TaskCreateOrUpdate { + @JsonProperty("name") + private String name; + + @JsonProperty("rate") + private Amount rate = null; + + @JsonProperty("chargeType") + private ChargeType chargeType; + + @JsonProperty("estimateMinutes") + private Integer estimateMinutes; + + public TaskCreateOrUpdate name(String name) { + this.name = name; + return this; + } + + /** + * Name of the task. Max length 100 characters. + * @return name + **/ + @ApiModelProperty(required = true, value = "Name of the task. Max length 100 characters.") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public TaskCreateOrUpdate rate(Amount rate) { + this.rate = rate; + return this; + } + + /** + * Get rate + * @return rate + **/ + @ApiModelProperty(required = true, value = "") + public Amount getRate() { + return rate; + } + + public void setRate(Amount rate) { + this.rate = rate; + } + + public TaskCreateOrUpdate chargeType(ChargeType chargeType) { + this.chargeType = chargeType; + return this; + } + + /** + * Get chargeType + * @return chargeType + **/ + @ApiModelProperty(required = true, value = "") + public ChargeType getChargeType() { + return chargeType; + } + + public void setChargeType(ChargeType chargeType) { + this.chargeType = chargeType; + } + + public TaskCreateOrUpdate estimateMinutes(Integer estimateMinutes) { + this.estimateMinutes = estimateMinutes; + return this; + } + + /** + * Estimated time to perform the task. EstimateMinutes has to be greater than 0 if provided. + * @return estimateMinutes + **/ + @ApiModelProperty(value = "Estimated time to perform the task. EstimateMinutes has to be greater than 0 if provided.") + public Integer getEstimateMinutes() { + return estimateMinutes; + } + + public void setEstimateMinutes(Integer estimateMinutes) { + this.estimateMinutes = estimateMinutes; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TaskCreateOrUpdate taskCreateOrUpdate = (TaskCreateOrUpdate) o; + return Objects.equals(this.name, taskCreateOrUpdate.name) && + Objects.equals(this.rate, taskCreateOrUpdate.rate) && + Objects.equals(this.chargeType, taskCreateOrUpdate.chargeType) && + Objects.equals(this.estimateMinutes, taskCreateOrUpdate.estimateMinutes); + } + + @Override + public int hashCode() { + return Objects.hash(name, rate, chargeType, estimateMinutes); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TaskCreateOrUpdate {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); + sb.append(" chargeType: ").append(toIndentedString(chargeType)).append("\n"); + sb.append(" estimateMinutes: ").append(toIndentedString(estimateMinutes)).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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/Tasks.java b/src/main/java/com/xero/models/projects/Tasks.java new file mode 100644 index 00000000..dcb92c57 --- /dev/null +++ b/src/main/java/com/xero/models/projects/Tasks.java @@ -0,0 +1,127 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.xero.models.projects.Pagination; +import com.xero.models.projects.Task; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * Tasks + */ + +public class Tasks { + @JsonProperty("pagination") + private Pagination pagination = null; + + @JsonProperty("items") + private List items = new ArrayList(); + + public Tasks pagination(Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + **/ + @ApiModelProperty(value = "") + public Pagination getPagination() { + return pagination; + } + + public void setPagination(Pagination pagination) { + this.pagination = pagination; + } + + public Tasks items(List items) { + this.items = items; + return this; + } + + public Tasks addItemsItem(Task itemsItem) { + if (this.items == null) { + this.items = new ArrayList(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + **/ + @ApiModelProperty(value = "") + public List getItems() { + return items; + } + + public void setItems(List 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; + } + Tasks tasks = (Tasks) o; + return Objects.equals(this.pagination, tasks.pagination) && + Objects.equals(this.items, tasks.items); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, items); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tasks {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/TimeEntries.java b/src/main/java/com/xero/models/projects/TimeEntries.java new file mode 100644 index 00000000..ef984e11 --- /dev/null +++ b/src/main/java/com/xero/models/projects/TimeEntries.java @@ -0,0 +1,127 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.xero.models.projects.Pagination; +import com.xero.models.projects.TimeEntry; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * TimeEntries + */ + +public class TimeEntries { + @JsonProperty("pagination") + private Pagination pagination = null; + + @JsonProperty("items") + private List items = new ArrayList(); + + public TimeEntries pagination(Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + **/ + @ApiModelProperty(value = "") + public Pagination getPagination() { + return pagination; + } + + public void setPagination(Pagination pagination) { + this.pagination = pagination; + } + + public TimeEntries items(List items) { + this.items = items; + return this; + } + + public TimeEntries addItemsItem(TimeEntry itemsItem) { + if (this.items == null) { + this.items = new ArrayList(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + **/ + @ApiModelProperty(value = "") + public List getItems() { + return items; + } + + public void setItems(List 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; + } + TimeEntries timeEntries = (TimeEntries) o; + return Objects.equals(this.pagination, timeEntries.pagination) && + Objects.equals(this.items, timeEntries.items); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, items); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TimeEntries {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/TimeEntry.java b/src/main/java/com/xero/models/projects/TimeEntry.java new file mode 100644 index 00000000..5085700d --- /dev/null +++ b/src/main/java/com/xero/models/projects/TimeEntry.java @@ -0,0 +1,290 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +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.UUID; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * TimeEntry + */ + +public class TimeEntry { + @JsonProperty("timeEntryId") + private UUID timeEntryId; + + @JsonProperty("userId") + private UUID userId; + + @JsonProperty("projectId") + private UUID projectId; + + @JsonProperty("taskId") + private UUID taskId; + + @JsonProperty("dateUtc") + private OffsetDateTime dateUtc; + + @JsonProperty("dateEnteredUtc") + private OffsetDateTime dateEnteredUtc; + + @JsonProperty("duration") + private Integer duration; + + /** + * Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced. + */ + public enum StatusEnum { + ACTIVE("ACTIVE"), + + LOCKED("LOCKED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public TimeEntry timeEntryId(UUID timeEntryId) { + this.timeEntryId = timeEntryId; + return this; + } + + /** + * Identifier of the time entry. + * @return timeEntryId + **/ + @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Identifier of the time entry.") + public UUID getTimeEntryId() { + return timeEntryId; + } + + public void setTimeEntryId(UUID timeEntryId) { + this.timeEntryId = timeEntryId; + } + + public TimeEntry userId(UUID userId) { + this.userId = userId; + return this; + } + + /** + * The xero user identifier of the person who logged time. + * @return userId + **/ + @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "The xero user identifier of the person who logged time.") + public UUID getUserId() { + return userId; + } + + public void setUserId(UUID userId) { + this.userId = userId; + } + + public TimeEntry projectId(UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Identifier of the project, that the task (which the time entry is logged against) belongs to. + * @return projectId + **/ + @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Identifier of the project, that the task (which the time entry is logged against) belongs to.") + public UUID getProjectId() { + return projectId; + } + + public void setProjectId(UUID projectId) { + this.projectId = projectId; + } + + public TimeEntry taskId(UUID taskId) { + this.taskId = taskId; + return this; + } + + /** + * Identifier of the task that time entry is logged against. + * @return taskId + **/ + @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "Identifier of the task that time entry is logged against.") + public UUID getTaskId() { + return taskId; + } + + public void setTaskId(UUID taskId) { + this.taskId = taskId; + } + + public TimeEntry dateUtc(OffsetDateTime dateUtc) { + this.dateUtc = dateUtc; + return this; + } + + /** + * The date time that time entry is logged on. UTC Date Time in ISO-8601 format. + * @return dateUtc + **/ + @ApiModelProperty(value = "The date time that time entry is logged on. UTC Date Time in ISO-8601 format.") + public OffsetDateTime getDateUtc() { + return dateUtc; + } + + public void setDateUtc(OffsetDateTime dateUtc) { + this.dateUtc = dateUtc; + } + + public TimeEntry dateEnteredUtc(OffsetDateTime dateEnteredUtc) { + this.dateEnteredUtc = dateEnteredUtc; + return this; + } + + /** + * The date time that time entry is created. UTC Date Time in ISO-8601 format. By default it is set to server time. + * @return dateEnteredUtc + **/ + @ApiModelProperty(value = "The date time that time entry is created. UTC Date Time in ISO-8601 format. By default it is set to server time.") + public OffsetDateTime getDateEnteredUtc() { + return dateEnteredUtc; + } + + public void setDateEnteredUtc(OffsetDateTime dateEnteredUtc) { + this.dateEnteredUtc = dateEnteredUtc; + } + + public TimeEntry duration(Integer duration) { + this.duration = duration; + return this; + } + + /** + * The duration of logged minutes.descriptionA description of the time entry. + * @return duration + **/ + @ApiModelProperty(value = "The duration of logged minutes.descriptionA description of the time entry.") + public Integer getDuration() { + return duration; + } + + public void setDuration(Integer duration) { + this.duration = duration; + } + + public TimeEntry status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced. + * @return status + **/ + @ApiModelProperty(value = "Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced.") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum 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; + } + TimeEntry timeEntry = (TimeEntry) o; + return Objects.equals(this.timeEntryId, timeEntry.timeEntryId) && + Objects.equals(this.userId, timeEntry.userId) && + Objects.equals(this.projectId, timeEntry.projectId) && + Objects.equals(this.taskId, timeEntry.taskId) && + Objects.equals(this.dateUtc, timeEntry.dateUtc) && + Objects.equals(this.dateEnteredUtc, timeEntry.dateEnteredUtc) && + Objects.equals(this.duration, timeEntry.duration) && + Objects.equals(this.status, timeEntry.status); + } + + @Override + public int hashCode() { + return Objects.hash(timeEntryId, userId, projectId, taskId, dateUtc, dateEnteredUtc, duration, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TimeEntry {\n"); + sb.append(" timeEntryId: ").append(toIndentedString(timeEntryId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); + sb.append(" dateUtc: ").append(toIndentedString(dateUtc)).append("\n"); + sb.append(" dateEnteredUtc: ").append(toIndentedString(dateEnteredUtc)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).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 "); + } + +} + diff --git a/src/main/java/com/xero/models/projects/TimeEntryCreateOrUpdate.java b/src/main/java/com/xero/models/projects/TimeEntryCreateOrUpdate.java new file mode 100644 index 00000000..816b5889 --- /dev/null +++ b/src/main/java/com/xero/models/projects/TimeEntryCreateOrUpdate.java @@ -0,0 +1,186 @@ +/* + * Xero Projects API + * This is the Xero Projects API + * + * The version of the OpenAPI document: 2.0.2 + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.xero.models.projects; + +import java.util.Objects; +import java.util.Arrays; +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.UUID; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * TimeEntryCreateOrUpdate + */ + +public class TimeEntryCreateOrUpdate { + @JsonProperty("userId") + private UUID userId; + + @JsonProperty("taskId") + private UUID taskId; + + @JsonProperty("dateUtc") + private OffsetDateTime dateUtc; + + @JsonProperty("duration") + private Integer duration; + + @JsonProperty("description") + private String description; + + public TimeEntryCreateOrUpdate userId(UUID userId) { + this.userId = userId; + return this; + } + + /** + * The xero user identifier of the person logging the time. + * @return userId + **/ + @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", required = true, value = "The xero user identifier of the person logging the time.") + public UUID getUserId() { + return userId; + } + + public void setUserId(UUID userId) { + this.userId = userId; + } + + public TimeEntryCreateOrUpdate taskId(UUID taskId) { + this.taskId = taskId; + return this; + } + + /** + * Identifier of the task that time entry is logged against. + * @return taskId + **/ + @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", required = true, value = "Identifier of the task that time entry is logged against.") + public UUID getTaskId() { + return taskId; + } + + public void setTaskId(UUID taskId) { + this.taskId = taskId; + } + + public TimeEntryCreateOrUpdate dateUtc(OffsetDateTime dateUtc) { + this.dateUtc = dateUtc; + return this; + } + + /** + * Date time entry is logged on. UTC Date Time in ISO-8601 format. + * @return dateUtc + **/ + @ApiModelProperty(required = true, value = "Date time entry is logged on. UTC Date Time in ISO-8601 format.") + public OffsetDateTime getDateUtc() { + return dateUtc; + } + + public void setDateUtc(OffsetDateTime dateUtc) { + this.dateUtc = dateUtc; + } + + public TimeEntryCreateOrUpdate duration(Integer duration) { + this.duration = duration; + return this; + } + + /** + * Number of minutes to be logged. Duration is between 1 and 59940 inclusively. + * @return duration + **/ + @ApiModelProperty(required = true, value = "Number of minutes to be logged. Duration is between 1 and 59940 inclusively.") + public Integer getDuration() { + return duration; + } + + public void setDuration(Integer duration) { + this.duration = duration; + } + + public TimeEntryCreateOrUpdate description(String description) { + this.description = description; + return this; + } + + /** + * An optional description of the time entry, will be set to null if not provided during update. + * @return description + **/ + @ApiModelProperty(value = "An optional description of the time entry, will be set to null if not provided during update.") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TimeEntryCreateOrUpdate timeEntryCreateOrUpdate = (TimeEntryCreateOrUpdate) o; + return Objects.equals(this.userId, timeEntryCreateOrUpdate.userId) && + Objects.equals(this.taskId, timeEntryCreateOrUpdate.taskId) && + Objects.equals(this.dateUtc, timeEntryCreateOrUpdate.dateUtc) && + Objects.equals(this.duration, timeEntryCreateOrUpdate.duration) && + Objects.equals(this.description, timeEntryCreateOrUpdate.description); + } + + @Override + public int hashCode() { + return Objects.hash(userId, taskId, dateUtc, duration, description); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TimeEntryCreateOrUpdate {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); + sb.append(" dateUtc: ").append(toIndentedString(dateUtc)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} +