diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8673aa797..fb0d312da 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 38254260-287a-40b6-9ac5-c2fcb654c9cc management: - docChecksum: b4697d92757c75022391a9d638278c4c + docChecksum: 57b4bbe6a7692f54a6b642d0741788e2 docVersion: 10.21.11 - speakeasyVersion: 1.645.2 - generationVersion: 2.735.1 - releaseVersion: 0.24.0 - configChecksum: f063c337210fd9de06df9ff4f9161c76 + speakeasyVersion: 1.650.0 + generationVersion: 2.743.2 + releaseVersion: 0.25.0 + configChecksum: 7be488eacb323108aa6306b268fa9155 repoURL: https://github.com/apideck-libraries/sdk-java.git published: true features: @@ -15,7 +15,7 @@ features: additionalDependencies: 0.1.0 additionalProperties: 0.0.1 constsAndDefaults: 0.1.1 - core: 3.53.1 + core: 3.55.1 deprecations: 2.81.1 downloadStreams: 0.1.1 errors: 1.0.0 @@ -121,7 +121,6 @@ generatedFiles: - docs/models/components/BillInput.md - docs/models/components/BillLineItem.md - docs/models/components/BillLineItemInput.md - - docs/models/components/BillLineItemType.md - docs/models/components/BillPayment.md - docs/models/components/BillPaymentAllocationType.md - docs/models/components/BillPaymentAllocations.md @@ -406,17 +405,6 @@ generatedFiles: - docs/models/components/EvenWeeks.md - docs/models/components/EventSource.md - docs/models/components/Expense.md - - docs/models/components/Expense1.md - - docs/models/components/Expense1Input.md - - docs/models/components/Expense2.md - - docs/models/components/Expense2Input.md - - docs/models/components/Expense2PaymentType.md - - docs/models/components/Expense2Status.md - - docs/models/components/Expense3.md - - docs/models/components/Expense3ExpenseType.md - - docs/models/components/Expense3PaymentType.md - - docs/models/components/Expense3Status.md - - docs/models/components/ExpenseExpenseType.md - docs/models/components/ExpenseInput.md - docs/models/components/ExpenseLineItem.md - docs/models/components/ExpenseLineItemInput.md @@ -642,6 +630,7 @@ generatedFiles: - docs/models/components/LedgerAccountsFilter.md - docs/models/components/LedgerAccountsSort.md - docs/models/components/LedgerAccountsSortBy.md + - docs/models/components/LineItemType.md - docs/models/components/LinkedAttachment.md - docs/models/components/LinkedBankAccount.md - docs/models/components/LinkedConnectorResource.md @@ -652,7 +641,6 @@ generatedFiles: - docs/models/components/LinkedFolder.md - docs/models/components/LinkedInvoiceItem.md - docs/models/components/LinkedLedgerAccount.md - - docs/models/components/LinkedLedgerAccountInput.md - docs/models/components/LinkedParentCustomer.md - docs/models/components/LinkedPurchaseOrder.md - docs/models/components/LinkedResources.md @@ -816,7 +804,6 @@ generatedFiles: - docs/models/components/Team.md - docs/models/components/TheStartMonthOfFiscalYear.md - docs/models/components/Theme.md - - docs/models/components/Three.md - docs/models/components/Ticket.md - docs/models/components/TicketInput.md - docs/models/components/TicketPriority.md @@ -1924,7 +1911,6 @@ generatedFiles: - src/main/java/com/apideck/unify/models/components/BillInput.java - src/main/java/com/apideck/unify/models/components/BillLineItem.java - src/main/java/com/apideck/unify/models/components/BillLineItemInput.java - - src/main/java/com/apideck/unify/models/components/BillLineItemType.java - src/main/java/com/apideck/unify/models/components/BillPayment.java - src/main/java/com/apideck/unify/models/components/BillPaymentAllocationType.java - src/main/java/com/apideck/unify/models/components/BillPaymentAllocations.java @@ -2209,17 +2195,6 @@ generatedFiles: - src/main/java/com/apideck/unify/models/components/EvenWeeks.java - src/main/java/com/apideck/unify/models/components/EventSource.java - src/main/java/com/apideck/unify/models/components/Expense.java - - src/main/java/com/apideck/unify/models/components/Expense1.java - - src/main/java/com/apideck/unify/models/components/Expense1Input.java - - src/main/java/com/apideck/unify/models/components/Expense2.java - - src/main/java/com/apideck/unify/models/components/Expense2Input.java - - src/main/java/com/apideck/unify/models/components/Expense2PaymentType.java - - src/main/java/com/apideck/unify/models/components/Expense2Status.java - - src/main/java/com/apideck/unify/models/components/Expense3.java - - src/main/java/com/apideck/unify/models/components/Expense3ExpenseType.java - - src/main/java/com/apideck/unify/models/components/Expense3PaymentType.java - - src/main/java/com/apideck/unify/models/components/Expense3Status.java - - src/main/java/com/apideck/unify/models/components/ExpenseExpenseType.java - src/main/java/com/apideck/unify/models/components/ExpenseInput.java - src/main/java/com/apideck/unify/models/components/ExpenseLineItem.java - src/main/java/com/apideck/unify/models/components/ExpenseLineItemInput.java @@ -2445,6 +2420,7 @@ generatedFiles: - src/main/java/com/apideck/unify/models/components/LedgerAccountsFilter.java - src/main/java/com/apideck/unify/models/components/LedgerAccountsSort.java - src/main/java/com/apideck/unify/models/components/LedgerAccountsSortBy.java + - src/main/java/com/apideck/unify/models/components/LineItemType.java - src/main/java/com/apideck/unify/models/components/LinkedAttachment.java - src/main/java/com/apideck/unify/models/components/LinkedBankAccount.java - src/main/java/com/apideck/unify/models/components/LinkedConnectorResource.java @@ -2455,7 +2431,6 @@ generatedFiles: - src/main/java/com/apideck/unify/models/components/LinkedFolder.java - src/main/java/com/apideck/unify/models/components/LinkedInvoiceItem.java - src/main/java/com/apideck/unify/models/components/LinkedLedgerAccount.java - - src/main/java/com/apideck/unify/models/components/LinkedLedgerAccountInput.java - src/main/java/com/apideck/unify/models/components/LinkedParentCustomer.java - src/main/java/com/apideck/unify/models/components/LinkedPurchaseOrder.java - src/main/java/com/apideck/unify/models/components/LinkedResources.java @@ -2619,7 +2594,6 @@ generatedFiles: - src/main/java/com/apideck/unify/models/components/Team.java - src/main/java/com/apideck/unify/models/components/TheStartMonthOfFiscalYear.java - src/main/java/com/apideck/unify/models/components/Theme.java - - src/main/java/com/apideck/unify/models/components/Three.java - src/main/java/com/apideck/unify/models/components/Ticket.java - src/main/java/com/apideck/unify/models/components/TicketInput.java - src/main/java/com/apideck/unify/models/components/TicketPriority.java @@ -4999,7 +4973,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "123456", "bill_number": "10001", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "department_id": "12345", "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "bill_date": "2020-09-30", "due_date": "2020-10-30", "paid_date": "2020-10-30", "po_number": "90000117", "reference": "INV-2024-001", "line_items": [{"row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "expense_account", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "row_version": "1-12345"}], "terms": "Net 30 days", "balance": 27500, "deposit": 0, "sub_total": 27500, "total_tax": 2500, "total": 27500, "tax_code": "1234", "notes": "Some notes about this bill.", "status": "draft", "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "payment_method": "cash", "channel": "email", "language": "EN", "accounting_by_row": false, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "discount_percentage": 5.5, "template_id": "123456", "approved_by": "John Doe", "tax_method": "Due to supplier", "document_received": true, "source_document_url": "https://www.invoicesolution.com/bill/123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "row_version": "1-12345", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}], "accounting_period": "01-24", "attachments": [{"name": "sample.jpg", "mime_type": "image/jpeg", "is_compressed": false, "encoding": "base64", "content": "data:image/jpeg;base64,...", "notes": "A sample image"}]} + application/json: {"display_id": "123456", "bill_number": "10001", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "department_id": "12345", "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "bill_date": "2020-09-30", "due_date": "2020-10-30", "paid_date": "2020-10-30", "po_number": "90000117", "reference": "INV-2024-001", "line_items": [{"row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "expense_account", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "row_version": "1-12345"}], "terms": "Net 30 days", "balance": 27500, "deposit": 0, "sub_total": 250, "total_tax": 25, "total": 27500, "tax_code": "1234", "notes": "Some notes about this bill.", "status": "draft", "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "payment_method": "cash", "channel": "email", "language": "EN", "accounting_by_row": false, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "discount_percentage": 5.5, "template_id": "123456", "approved_by": "John Doe", "tax_method": "Due to supplier", "document_received": true, "source_document_url": "https://www.invoicesolution.com/bill/123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "row_version": "1-12345", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}], "accounting_period": "01-24", "attachments": [{"name": "sample.jpg", "mime_type": "image/jpeg", "is_compressed": false, "encoding": "base64", "content": "data:image/jpeg;base64,...", "notes": "A sample image"}]} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "bills", "operation": "add", "data": {"id": "12345"}} @@ -5055,7 +5029,7 @@ examples: x-apideck-service-id: "salesforce" responses: "200": - application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "bills", "operation": "one", "data": {"id": "12345", "downstream_id": "12345", "display_id": "123456", "bill_number": "10001", "supplier": {"id": "12345", "display_id": "SUPP00101", "display_name": "Windsurf Shop", "company_name": "The boring company", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "department_id": "12345", "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "bill_date": "2020-09-30", "due_date": "2020-10-30", "paid_date": "2020-10-30", "po_number": "90000117", "reference": "INV-2024-001", "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "expense_account", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "code": "N-T", "name": "GST on Purchases", "rate": 10}, "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "row_version": "1-12345", "updated_by": "12345", "created_by": "12345", "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z"}], "terms": "Net 30 days", "balance": 27500, "deposit": 0, "sub_total": 27500, "total_tax": 2500, "total": 27500, "tax_code": "1234", "notes": "Some notes about this bill.", "status": "draft", "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "payment_method": "cash", "channel": "email", "language": "EN", "accounting_by_row": false, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "discount_percentage": 5.5, "template_id": "123456", "approved_by": "John Doe", "tax_method": "Due to supplier", "document_received": true, "source_document_url": "https://www.invoicesolution.com/bill/123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "updated_by": "12345", "created_by": "12345", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "row_version": "1-12345", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}], "accounting_period": "01-24", "attachments": [{"name": "sample.jpg", "mime_type": "image/jpeg", "is_compressed": false, "encoding": "base64", "content": "data:image/jpeg;base64,...", "notes": "A sample image"}]}} + application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "bills", "operation": "one", "data": {"id": "12345", "downstream_id": "12345", "display_id": "123456", "bill_number": "10001", "supplier": {"id": "12345", "display_id": "SUPP00101", "display_name": "Windsurf Shop", "company_name": "The boring company", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "department_id": "12345", "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "bill_date": "2020-09-30", "due_date": "2020-10-30", "paid_date": "2020-10-30", "po_number": "90000117", "reference": "INV-2024-001", "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "expense_account", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "code": "N-T", "name": "GST on Purchases", "rate": 10}, "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "row_version": "1-12345", "updated_by": "12345", "created_by": "12345", "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z"}], "terms": "Net 30 days", "balance": 27500, "deposit": 0, "sub_total": 250, "total_tax": 25, "total": 27500, "tax_code": "1234", "notes": "Some notes about this bill.", "status": "draft", "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "payment_method": "cash", "channel": "email", "language": "EN", "accounting_by_row": false, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "discount_percentage": 5.5, "template_id": "123456", "approved_by": "John Doe", "tax_method": "Due to supplier", "document_received": true, "source_document_url": "https://www.invoicesolution.com/bill/123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "updated_by": "12345", "created_by": "12345", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "row_version": "1-12345", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}], "accounting_period": "01-24", "attachments": [{"name": "sample.jpg", "mime_type": "image/jpeg", "is_compressed": false, "encoding": "base64", "content": "data:image/jpeg;base64,...", "notes": "A sample image"}]}} "400": application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror"} "401": @@ -5107,7 +5081,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "123456", "bill_number": "10001", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "department_id": "12345", "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "bill_date": "2020-09-30", "due_date": "2020-10-30", "paid_date": "2020-10-30", "po_number": "90000117", "reference": "INV-2024-001", "line_items": [{"row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "expense_account", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "row_version": "1-12345"}], "terms": "Net 30 days", "balance": 27500, "deposit": 0, "sub_total": 27500, "total_tax": 2500, "total": 27500, "tax_code": "1234", "notes": "Some notes about this bill.", "status": "draft", "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "payment_method": "cash", "channel": "email", "language": "EN", "accounting_by_row": false, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "discount_percentage": 5.5, "template_id": "123456", "approved_by": "John Doe", "tax_method": "Due to supplier", "document_received": true, "source_document_url": "https://www.invoicesolution.com/bill/123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "row_version": "1-12345", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}], "accounting_period": "01-24", "attachments": [{"name": "sample.jpg", "mime_type": "image/jpeg", "is_compressed": false, "encoding": "base64", "content": "data:image/jpeg;base64,...", "notes": "A sample image"}]} + application/json: {"display_id": "123456", "bill_number": "10001", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "department_id": "12345", "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "bill_date": "2020-09-30", "due_date": "2020-10-30", "paid_date": "2020-10-30", "po_number": "90000117", "reference": "INV-2024-001", "line_items": [{"row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "expense_account", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "row_version": "1-12345"}], "terms": "Net 30 days", "balance": 27500, "deposit": 0, "sub_total": 250, "total_tax": 25, "total": 27500, "tax_code": "1234", "notes": "Some notes about this bill.", "status": "draft", "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "payment_method": "cash", "channel": "email", "language": "EN", "accounting_by_row": false, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "discount_percentage": 5.5, "template_id": "123456", "approved_by": "John Doe", "tax_method": "Due to supplier", "document_received": true, "source_document_url": "https://www.invoicesolution.com/bill/123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "row_version": "1-12345", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}], "accounting_period": "01-24", "attachments": [{"name": "sample.jpg", "mime_type": "image/jpeg", "is_compressed": false, "encoding": "base64", "content": "data:image/jpeg;base64,...", "notes": "A sample image"}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "bills", "operation": "update", "data": {"id": "12345"}} @@ -5374,7 +5348,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "123456", "type": "service", "number": "OIT00546", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "company_id": "12345", "department_id": "12345", "invoice_date": "2020-09-30", "due_date": "2020-09-30", "terms": "Net 30 days", "po_number": "90000117", "reference": "INV-2024-001", "status": "draft", "invoice_sent": true, "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "sub_total": 27500, "total_tax": 2500, "tax_code": "1234", "discount_percentage": 5.5, "discount_amount": 25, "total": 27500, "balance": 27500, "deposit": 0, "customer_memo": "Thank you for your business and have a great day!", "tracking_categories": [{"id": "123456", "name": "New York"}], "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": null, "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"}], "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "template_id": "123456", "source_document_url": "https://www.invoicesolution.com/invoice/123456", "payment_allocations": [{"id": "123456", "allocated_amount": 1000, "date": "2020-09-30T07:43:32.000Z"}], "payment_method": "cash", "channel": "email", "language": "EN", "accounting_by_row": false, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"display_id": "123456", "type": "service", "number": "OIT00546", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "company_id": "12345", "department_id": "12345", "invoice_date": "2020-09-30", "due_date": "2020-09-30", "terms": "Net 30 days", "po_number": "90000117", "reference": "INV-2024-001", "status": "draft", "invoice_sent": true, "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "sub_total": 27500, "total_tax": 2500, "tax_code": "1234", "discount_percentage": 5.5, "discount_amount": 25, "total": 27500, "balance": 27500, "deposit": 0, "customer_memo": "Thank you for your business and have a great day!", "tracking_categories": [{"id": "123456", "name": "New York"}], "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": null, "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"}], "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "template_id": "123456", "source_document_url": "https://www.invoicesolution.com/invoice/123456", "payment_allocations": [{"id": "123456", "allocated_amount": 1000, "date": "2020-09-30T07:43:32.000Z"}], "payment_method": "cash", "channel": "email", "language": "EN", "accounting_by_row": false, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "invoices", "operation": "update", "data": {"id": "12345", "downstream_id": "12345"}} @@ -5533,7 +5507,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "1-12345", "code": "453", "classification": "asset", "type": "bank", "sub_type": "CHECKING_ACCOUNT", "name": "Bank account", "fully_qualified_name": "Asset.Bank.Checking_Account", "description": "Main checking account", "opening_balance": 75000, "current_balance": 20000, "currency": "USD", "tax_type": "NONE", "tax_rate": {"id": "123456", "rate": 10}, "level": 1, "active": true, "status": "active", "header": true, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "parent_account": {"id": "12345", "name": "Bank Accounts", "display_id": "1-1100"}, "sub_account": false, "last_reconciliation_date": "2020-09-30", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"display_id": "1-12345", "code": "453", "classification": "asset", "type": "bank", "sub_type": "CHECKING_ACCOUNT", "name": "Bank account", "fully_qualified_name": "Asset.Bank.Checking_Account", "description": "Main checking account", "opening_balance": 75000, "current_balance": 20000, "currency": "USD", "tax_type": "NONE", "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "level": 1, "active": true, "status": "active", "header": true, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "parent_account": {"id": "12345", "name": "Bank Accounts", "display_id": "1-1100"}, "sub_account": false, "last_reconciliation_date": "2020-09-30", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "ledger-accounts", "operation": "add", "data": {"id": "12345"}} @@ -5641,7 +5615,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "1-12345", "code": "453", "classification": "asset", "type": "bank", "sub_type": "CHECKING_ACCOUNT", "name": "Bank account", "fully_qualified_name": "Asset.Bank.Checking_Account", "description": "Main checking account", "opening_balance": 75000, "current_balance": 20000, "currency": "USD", "tax_type": "NONE", "tax_rate": {"id": "123456", "rate": 10}, "level": 1, "active": true, "status": "active", "header": true, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "parent_account": {"id": "12345", "name": "Bank Accounts", "display_id": "1-1100"}, "sub_account": false, "last_reconciliation_date": "2020-09-30", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"display_id": "1-12345", "code": "453", "classification": "asset", "type": "bank", "sub_type": "CHECKING_ACCOUNT", "name": "Bank account", "fully_qualified_name": "Asset.Bank.Checking_Account", "description": "Main checking account", "opening_balance": 75000, "current_balance": 20000, "currency": "USD", "tax_type": "NONE", "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "level": 1, "active": true, "status": "active", "header": true, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "parent_account": {"id": "12345", "name": "Bank Accounts", "display_id": "1-1100"}, "sub_account": false, "last_reconciliation_date": "2020-09-30", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "ledger-accounts", "operation": "update", "data": {"id": "12345"}} @@ -5800,7 +5774,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"name": "Model Y", "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "display_id": "12345", "code": "120-C", "sold": true, "purchased": true, "tracked": true, "taxable": true, "inventory_date": "2020-10-30", "type": "inventory", "sales_details": {"unit_price": 27500.5, "unit_of_measure": "pc.", "tax_inclusive": true, "tax_rate": {"id": "123456", "rate": 10}}, "purchase_details": {"unit_price": 27500.5, "unit_of_measure": "pc.", "tax_inclusive": true, "tax_rate": {"id": "123456", "rate": 10}}, "quantity": 1, "unit_price": 27500.5, "currency": "USD", "asset_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "income_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "expense_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "tracking_categories": null, "active": true, "department_id": "12345", "location_id": "12345", "subsidiary_id": "12345", "tax_schedule_id": "123456", "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"name": "Model Y", "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "display_id": "12345", "code": "120-C", "sold": true, "purchased": true, "tracked": true, "taxable": true, "inventory_date": "2020-10-30", "type": "inventory", "sales_details": {"unit_price": 27500.5, "unit_of_measure": "pc.", "tax_inclusive": true, "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}}, "purchase_details": {"unit_price": 27500.5, "unit_of_measure": "pc.", "tax_inclusive": true, "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}}, "quantity": 1, "unit_price": 27500.5, "currency": "USD", "asset_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "income_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "expense_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "tracking_categories": null, "active": true, "department_id": "12345", "location_id": "12345", "subsidiary_id": "12345", "tax_schedule_id": "123456", "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "invoice-items", "operation": "add", "data": {"id": "12345"}} @@ -5910,7 +5884,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"name": "Model Y", "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "display_id": "12345", "code": "120-C", "sold": true, "purchased": true, "tracked": true, "taxable": true, "inventory_date": "2020-10-30", "type": "inventory", "sales_details": {"unit_price": 27500.5, "unit_of_measure": "pc.", "tax_inclusive": true, "tax_rate": {"id": "123456", "rate": 10}}, "purchase_details": {"unit_price": 27500.5, "unit_of_measure": "pc.", "tax_inclusive": true, "tax_rate": {"id": "123456", "rate": 10}}, "quantity": 1, "unit_price": 27500.5, "currency": "USD", "asset_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "income_account": null, "expense_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "active": true, "department_id": "12345", "location_id": "12345", "subsidiary_id": "12345", "tax_schedule_id": "123456", "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"name": "Model Y", "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "display_id": "12345", "code": "120-C", "sold": true, "purchased": true, "tracked": true, "taxable": true, "inventory_date": "2020-10-30", "type": "inventory", "sales_details": {"unit_price": 27500.5, "unit_of_measure": "pc.", "tax_inclusive": true, "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}}, "purchase_details": {"unit_price": 27500.5, "unit_of_measure": "pc.", "tax_inclusive": true, "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}}, "quantity": 1, "unit_price": 27500.5, "currency": "USD", "asset_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "income_account": null, "expense_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "active": true, "department_id": "12345", "location_id": "12345", "subsidiary_id": "12345", "tax_schedule_id": "123456", "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "invoice-items", "operation": "update", "data": {"id": "12345"}} @@ -6069,7 +6043,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"number": "OIT00546", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "company_id": "12345", "department_id": "12345", "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "sub_total": 27500, "total_amount": 49.99, "total_tax": 2500, "tax_code": "1234", "balance": 27500, "remaining_credit": 27500, "status": "authorised", "reference": "123456", "date_issued": "2021-05-01T12:00:00.000Z", "date_paid": "2021-05-01T12:00:00.000Z", "type": "accounts_receivable_credit", "account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": null, "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"}], "allocations": [{"id": "123456", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this credit note", "terms": "Some terms about this credit note", "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"number": "OIT00546", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "company_id": "12345", "department_id": "12345", "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "sub_total": 27500, "total_amount": 49.99, "total_tax": 2500, "tax_code": "1234", "balance": 27500, "remaining_credit": 27500, "status": "authorised", "reference": "123456", "date_issued": "2021-05-01T12:00:00.000Z", "date_paid": "2021-05-01T12:00:00.000Z", "type": "accounts_receivable_credit", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": null, "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"}], "allocations": [{"id": "123456", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this credit note", "terms": "Some terms about this credit note", "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "credit-notes", "operation": "add", "data": {"id": "12345"}} @@ -6177,7 +6151,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"number": "OIT00546", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "company_id": "12345", "department_id": "12345", "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "sub_total": 27500, "total_amount": 49.99, "total_tax": 2500, "tax_code": "1234", "balance": 27500, "remaining_credit": 27500, "status": "authorised", "reference": "123456", "date_issued": "2021-05-01T12:00:00.000Z", "date_paid": "2021-05-01T12:00:00.000Z", "type": "accounts_receivable_credit", "account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": [{"id": "123456", "name": "New York"}], "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": null}], "row_version": "1-12345"}], "allocations": [{"id": "123456", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this credit note", "terms": "Some terms about this credit note", "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": null}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"number": "OIT00546", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "company_id": "12345", "department_id": "12345", "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "sub_total": 27500, "total_amount": 49.99, "total_tax": 2500, "tax_code": "1234", "balance": 27500, "remaining_credit": 27500, "status": "authorised", "reference": "123456", "date_issued": "2021-05-01T12:00:00.000Z", "date_paid": "2021-05-01T12:00:00.000Z", "type": "accounts_receivable_credit", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": [{"id": "123456", "name": "New York"}], "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": null}], "row_version": "1-12345"}], "allocations": [{"id": "123456", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this credit note", "terms": "Some terms about this credit note", "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": null}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "credit-notes", "operation": "update", "data": {"id": "12345"}} @@ -6336,7 +6310,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "EMP00101", "display_name": "Windsurf Shop", "company_name": "SpaceX", "company_id": "12345", "customer_category": "Insurance", "title": "CEO", "first_name": "Elon", "middle_name": "D.", "last_name": "Musk", "suffix": "Jr.", "individual": true, "project": false, "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "phone_numbers": [{"id": "12345", "country_code": "1", "area_code": "323", "number": "111-111-1111", "extension": "105", "type": "primary"}], "emails": [{"id": "123", "email": "elon@musk.com", "type": "primary"}], "websites": [{"id": "12345", "url": "http://example.com", "type": "primary"}], "bank_accounts": [{"bank_name": "Monzo", "account_number": "123465", "account_name": "SPACEX LLC", "account_type": "credit_card", "iban": "CH2989144532982975332", "bic": "AUDSCHGGXXX", "routing_number": "012345678", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD"}], "notes": "Some notes about this customer", "tax_rate": {"id": "123456", "rate": 10}, "tax_number": "US123945459", "currency": "USD", "account": null, "parent": {"id": "12345", "name": "Windsurf Shop"}, "status": "active", "payment_method": "cash", "terms": "Net 30 days", "channel": "email", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": null}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"display_id": "EMP00101", "display_name": "Windsurf Shop", "company_name": "SpaceX", "company_id": "12345", "customer_category": "Insurance", "title": "CEO", "first_name": "Elon", "middle_name": "D.", "last_name": "Musk", "suffix": "Jr.", "individual": true, "project": false, "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "phone_numbers": [{"id": "12345", "country_code": "1", "area_code": "323", "number": "111-111-1111", "extension": "105", "type": "primary"}], "emails": [{"id": "123", "email": "elon@musk.com", "type": "primary"}], "websites": [{"id": "12345", "url": "http://example.com", "type": "primary"}], "bank_accounts": [{"bank_name": "Monzo", "account_number": "123465", "account_name": "SPACEX LLC", "account_type": "credit_card", "iban": "CH2989144532982975332", "bic": "AUDSCHGGXXX", "routing_number": "012345678", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD"}], "notes": "Some notes about this customer", "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "tax_number": "US123945459", "currency": "USD", "account": null, "parent": {"id": "12345", "name": "Windsurf Shop"}, "status": "active", "payment_method": "cash", "terms": "Net 30 days", "channel": "email", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": null}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "customers", "operation": "add", "data": {"id": "12345"}} @@ -6444,7 +6418,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "EMP00101", "display_name": "Windsurf Shop", "company_name": "SpaceX", "company_id": "12345", "customer_category": "Insurance", "title": "CEO", "first_name": "Elon", "middle_name": "D.", "last_name": "Musk", "suffix": "Jr.", "individual": true, "project": false, "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "phone_numbers": [{"id": "12345", "country_code": "1", "area_code": "323", "number": "111-111-1111", "extension": "105", "type": "primary"}], "emails": [{"id": "123", "email": "elon@musk.com", "type": "primary"}], "websites": [{"id": "12345", "url": "http://example.com", "type": "primary"}], "bank_accounts": [{"bank_name": "Monzo", "account_number": "123465", "account_name": "SPACEX LLC", "account_type": "credit_card", "iban": "CH2989144532982975332", "bic": "AUDSCHGGXXX", "routing_number": "012345678", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD"}], "notes": "Some notes about this customer", "tax_rate": {"id": "123456", "rate": 10}, "tax_number": "US123945459", "currency": "USD", "account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "parent": {"id": "12345", "name": "Windsurf Shop"}, "status": "active", "payment_method": "cash", "terms": "Net 30 days", "channel": "email", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"display_id": "EMP00101", "display_name": "Windsurf Shop", "company_name": "SpaceX", "company_id": "12345", "customer_category": "Insurance", "title": "CEO", "first_name": "Elon", "middle_name": "D.", "last_name": "Musk", "suffix": "Jr.", "individual": true, "project": false, "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "phone_numbers": [{"id": "12345", "country_code": "1", "area_code": "323", "number": "111-111-1111", "extension": "105", "type": "primary"}], "emails": [{"id": "123", "email": "elon@musk.com", "type": "primary"}], "websites": [{"id": "12345", "url": "http://example.com", "type": "primary"}], "bank_accounts": [{"bank_name": "Monzo", "account_number": "123465", "account_name": "SPACEX LLC", "account_type": "credit_card", "iban": "CH2989144532982975332", "bic": "AUDSCHGGXXX", "routing_number": "012345678", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD"}], "notes": "Some notes about this customer", "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "tax_number": "US123945459", "currency": "USD", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "parent": {"id": "12345", "name": "Windsurf Shop"}, "status": "active", "payment_method": "cash", "terms": "Net 30 days", "channel": "email", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "customers", "operation": "update", "data": {"id": "12345"}} @@ -6603,7 +6577,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "EMP00101", "display_name": "Windsurf Shop", "company_name": "SpaceX", "company_id": "12345", "supplier_category": "Insurance", "title": "CEO", "first_name": "Elon", "middle_name": "D.", "last_name": "Musk", "suffix": "Jr.", "individual": true, "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "phone_numbers": [{"id": "12345", "country_code": "1", "area_code": "323", "number": "111-111-1111", "extension": "105", "type": "primary"}], "emails": [{"id": "123", "email": "elon@musk.com", "type": "primary"}], "websites": [{"id": "12345", "url": "http://example.com", "type": "primary"}], "bank_accounts": [{"bank_name": "Monzo", "account_number": "123465", "account_name": "SPACEX LLC", "account_type": "credit_card", "iban": "CH2989144532982975332", "bic": "AUDSCHGGXXX", "routing_number": "012345678", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD"}], "notes": "Some notes about this supplier", "tax_rate": {"id": "123456", "rate": 10}, "tax_number": "US123945459", "currency": "USD", "account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "status": "active", "payment_method": "cash", "terms": "Net 30 days", "channel": "email", "issued_method": "Email", "issued_email": "john.doe@example.com", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "tax_details": [{"type": "GST on Purchases", "number": "123456", "is_transaction_tax": true, "is_primary_tax": true}], "tax_status_details": [{"country": "US", "transaction_tax_status": "taxable"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}], "subsidiary_id": "12345", "integration_system_id": "12345"} + application/json: {"display_id": "EMP00101", "display_name": "Windsurf Shop", "company_name": "SpaceX", "company_id": "12345", "supplier_category": "Insurance", "title": "CEO", "first_name": "Elon", "middle_name": "D.", "last_name": "Musk", "suffix": "Jr.", "individual": true, "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "phone_numbers": [{"id": "12345", "country_code": "1", "area_code": "323", "number": "111-111-1111", "extension": "105", "type": "primary"}], "emails": [{"id": "123", "email": "elon@musk.com", "type": "primary"}], "websites": [{"id": "12345", "url": "http://example.com", "type": "primary"}], "bank_accounts": [{"bank_name": "Monzo", "account_number": "123465", "account_name": "SPACEX LLC", "account_type": "credit_card", "iban": "CH2989144532982975332", "bic": "AUDSCHGGXXX", "routing_number": "012345678", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD"}], "notes": "Some notes about this supplier", "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "tax_number": "US123945459", "currency": "USD", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "status": "active", "payment_method": "cash", "terms": "Net 30 days", "channel": "email", "issued_method": "Email", "issued_email": "john.doe@example.com", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "tax_details": [{"type": "GST on Purchases", "number": "123456", "is_transaction_tax": true, "is_primary_tax": true}], "tax_status_details": [{"country": "US", "transaction_tax_status": "taxable"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}], "subsidiary_id": "12345", "integration_system_id": "12345"} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "payments", "operation": "add", "data": {"id": "12345"}} @@ -6711,7 +6685,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "EMP00101", "display_name": "Windsurf Shop", "company_name": "SpaceX", "company_id": "12345", "supplier_category": "Insurance", "title": "CEO", "first_name": "Elon", "middle_name": "D.", "last_name": "Musk", "suffix": "Jr.", "individual": true, "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "phone_numbers": [{"id": "12345", "country_code": "1", "area_code": "323", "number": "111-111-1111", "extension": "105", "type": "primary"}], "emails": [{"id": "123", "email": "elon@musk.com", "type": "primary"}], "websites": [{"id": "12345", "url": "http://example.com", "type": "primary"}], "bank_accounts": [{"bank_name": "Monzo", "account_number": "123465", "account_name": "SPACEX LLC", "account_type": "credit_card", "iban": "CH2989144532982975332", "bic": "AUDSCHGGXXX", "routing_number": "012345678", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD"}], "notes": "Some notes about this supplier", "tax_rate": {"id": "123456", "rate": 10}, "tax_number": "US123945459", "currency": "USD", "account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "status": "active", "payment_method": "cash", "terms": "Net 30 days", "channel": "email", "issued_method": "Email", "issued_email": "john.doe@example.com", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "tax_details": [{"type": "GST on Purchases", "number": "123456", "is_transaction_tax": true, "is_primary_tax": true}], "tax_status_details": [{"country": "US", "transaction_tax_status": "taxable"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}], "subsidiary_id": "12345", "integration_system_id": "12345"} + application/json: {"display_id": "EMP00101", "display_name": "Windsurf Shop", "company_name": "SpaceX", "company_id": "12345", "supplier_category": "Insurance", "title": "CEO", "first_name": "Elon", "middle_name": "D.", "last_name": "Musk", "suffix": "Jr.", "individual": true, "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "phone_numbers": [{"id": "12345", "country_code": "1", "area_code": "323", "number": "111-111-1111", "extension": "105", "type": "primary"}], "emails": [{"id": "123", "email": "elon@musk.com", "type": "primary"}], "websites": [{"id": "12345", "url": "http://example.com", "type": "primary"}], "bank_accounts": [{"bank_name": "Monzo", "account_number": "123465", "account_name": "SPACEX LLC", "account_type": "credit_card", "iban": "CH2989144532982975332", "bic": "AUDSCHGGXXX", "routing_number": "012345678", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD"}], "notes": "Some notes about this supplier", "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "tax_number": "US123945459", "currency": "USD", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "status": "active", "payment_method": "cash", "terms": "Net 30 days", "channel": "email", "issued_method": "Email", "issued_email": "john.doe@example.com", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "tax_details": [{"type": "GST on Purchases", "number": "123456", "is_transaction_tax": true, "is_primary_tax": true}], "tax_status_details": [{"country": "US", "transaction_tax_status": "taxable"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}], "subsidiary_id": "12345", "integration_system_id": "12345"} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "suppliers", "operation": "update", "data": {"id": "12345"}} @@ -6870,7 +6844,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"currency": "USD", "currency_rate": 0.69, "total_amount": 49.99, "reference": "123456", "payment_method": "cash", "payment_method_reference": "123456", "payment_method_id": "12345", "account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "transaction_date": "2021-05-01T12:00:00.000Z", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "company_id": "12345", "reconciled": true, "status": "authorised", "type": "accounts_receivable", "allocations": [{"id": "123456", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this transaction", "number": "123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "display_id": "123456", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"currency": "USD", "currency_rate": 0.69, "total_amount": 49.99, "reference": "123456", "payment_method": "cash", "payment_method_reference": "123456", "payment_method_id": "12345", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "transaction_date": "2021-05-01T12:00:00.000Z", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "company_id": "12345", "reconciled": true, "status": "authorised", "type": "accounts_receivable", "allocations": [{"id": "123456", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this transaction", "number": "123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "display_id": "123456", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "payments", "operation": "add", "data": {"id": "12345"}} @@ -6978,7 +6952,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"currency": "USD", "currency_rate": 0.69, "total_amount": 49.99, "reference": "123456", "payment_method": "cash", "payment_method_reference": "123456", "payment_method_id": "12345", "account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "transaction_date": "2021-05-01T12:00:00.000Z", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "company_id": "12345", "reconciled": true, "status": "authorised", "type": "accounts_receivable", "allocations": [{"id": "123456", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this transaction", "number": "123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "display_id": "123456", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"currency": "USD", "currency_rate": 0.69, "total_amount": 49.99, "reference": "123456", "payment_method": "cash", "payment_method_reference": "123456", "payment_method_id": "12345", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "transaction_date": "2021-05-01T12:00:00.000Z", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "company_id": "12345", "reconciled": true, "status": "authorised", "type": "accounts_receivable", "allocations": [{"id": "123456", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this transaction", "number": "123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "display_id": "123456", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "payments", "operation": "update", "data": {"id": "12345"}} @@ -7555,7 +7529,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "12345", "po_number": "90000117", "reference": "123456", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "subsidiary_id": "12345", "company_id": "12345", "department_id": "12345", "status": "open", "issued_date": "2020-09-30", "delivery_date": "2020-09-30", "expected_arrival_date": "2020-09-30", "currency": "USD", "currency_rate": 0.69, "sub_total": 27500, "total_tax": 2500, "total": 27500, "tax_inclusive": true, "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": [{"id": "123456", "name": "New York"}], "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"}], "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "template_id": "123456", "discount_percentage": 5.5, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "accounting_by_row": false, "due_date": "2020-10-30", "payment_method": "cash", "terms": "Net 30 days", "tax_code": "1234", "tax_method": "Due to supplier", "issued_method": "Email", "issued_email": "john.doe@example.com", "channel": "email", "memo": "Thank you for the partnership and have a great day!", "notes": "This is a test purchase order", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"display_id": "12345", "po_number": "90000117", "reference": "123456", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "subsidiary_id": "12345", "company_id": "12345", "department_id": "12345", "status": "open", "issued_date": "2020-09-30", "delivery_date": "2020-09-30", "expected_arrival_date": "2020-09-30", "currency": "USD", "currency_rate": 0.69, "sub_total": 27500, "total_tax": 2500, "total": 27500, "tax_inclusive": true, "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": [{"id": "123456", "name": "New York"}], "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"}], "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "template_id": "123456", "discount_percentage": 5.5, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "accounting_by_row": false, "due_date": "2020-10-30", "payment_method": "cash", "terms": "Net 30 days", "tax_code": "1234", "tax_method": "Due to supplier", "issued_method": "Email", "issued_email": "john.doe@example.com", "channel": "email", "memo": "Thank you for the partnership and have a great day!", "notes": "This is a test purchase order", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "PurchaseOrders", "operation": "add", "data": {"id": "12345"}} @@ -7661,7 +7635,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "12345", "po_number": "90000117", "reference": "123456", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "subsidiary_id": "12345", "company_id": "12345", "department_id": "12345", "status": "open", "issued_date": "2020-09-30", "delivery_date": "2020-09-30", "expected_arrival_date": "2020-09-30", "currency": "USD", "currency_rate": 0.69, "sub_total": 27500, "total_tax": 2500, "total": 27500, "tax_inclusive": true, "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": [{"id": "123456", "name": "New York"}], "ledger_account": null, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"}], "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "template_id": "123456", "discount_percentage": 5.5, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "accounting_by_row": false, "due_date": "2020-10-30", "payment_method": "cash", "terms": "Net 30 days", "tax_code": "1234", "tax_method": "Due to supplier", "issued_method": "Email", "issued_email": "john.doe@example.com", "channel": "email", "memo": "Thank you for the partnership and have a great day!", "notes": "This is a test purchase order", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"display_id": "12345", "po_number": "90000117", "reference": "123456", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "subsidiary_id": "12345", "company_id": "12345", "department_id": "12345", "status": "open", "issued_date": "2020-09-30", "delivery_date": "2020-09-30", "expected_arrival_date": "2020-09-30", "currency": "USD", "currency_rate": 0.69, "sub_total": 27500, "total_tax": 2500, "total": 27500, "tax_inclusive": true, "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "location_id": "12345", "department_id": "12345", "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": [{"id": "123456", "name": "New York"}], "ledger_account": null, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"}], "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "template_id": "123456", "discount_percentage": 5.5, "bank_account": {"bank_name": "Chase Bank", "account_number": "123465", "account_name": "Main Operating Account", "account_type": "credit_card", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "routing_number": "021000021", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "currency": "USD", "country": "US"}, "accounting_by_row": false, "due_date": "2020-10-30", "payment_method": "cash", "terms": "Net 30 days", "tax_code": "1234", "tax_method": "Due to supplier", "issued_method": "Email", "issued_email": "john.doe@example.com", "channel": "email", "memo": "Thank you for the partnership and have a great day!", "notes": "This is a test purchase order", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "PurchaseOrders", "operation": "update", "data": {"id": "12345"}} @@ -9180,7 +9154,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"currency": "USD", "currency_rate": 0.69, "total_amount": 49.99, "reference": "123456", "payment_method": "cash", "payment_method_reference": "123456", "payment_method_id": "12345", "account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "transaction_date": "2021-05-01T12:00:00.000Z", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "reconciled": true, "status": "authorised", "type": "accounts_payable", "allocations": [{"id": "12345", "type": "bill", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this transaction", "number": "123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "display_id": "123456", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"currency": "USD", "currency_rate": 0.69, "total_amount": 49.99, "reference": "123456", "payment_method": "cash", "payment_method_reference": "123456", "payment_method_id": "12345", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "transaction_date": "2021-05-01T12:00:00.000Z", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "reconciled": true, "status": "authorised", "type": "accounts_payable", "allocations": [{"id": "12345", "type": "bill", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this transaction", "number": "123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "display_id": "123456", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "payments", "operation": "add", "data": {"id": "12345"}} @@ -9288,7 +9262,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"currency": "USD", "currency_rate": 0.69, "total_amount": 49.99, "reference": "123456", "payment_method": "cash", "payment_method_reference": "123456", "payment_method_id": "12345", "account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "transaction_date": "2021-05-01T12:00:00.000Z", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "reconciled": true, "status": "authorised", "type": "accounts_payable", "allocations": [{"id": "12345", "type": "bill", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this transaction", "number": "123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": null}], "row_version": "1-12345", "display_id": "123456", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"currency": "USD", "currency_rate": 0.69, "total_amount": 49.99, "reference": "123456", "payment_method": "cash", "payment_method_reference": "123456", "payment_method_id": "12345", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "transaction_date": "2021-05-01T12:00:00.000Z", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "reconciled": true, "status": "authorised", "type": "accounts_payable", "allocations": [{"id": "12345", "type": "bill", "amount": 49.99, "allocation_id": "123456"}], "note": "Some notes about this transaction", "number": "123456", "tracking_categories": [{"id": "123456", "name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": null}], "row_version": "1-12345", "display_id": "123456", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "payments", "operation": "update", "data": {"id": "12345"}} @@ -9440,7 +9414,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"number": "OIT00546", "transaction_date": "2021-05-01T12:00:00.000Z", "account_id": "123456", "customer_id": "12345", "supplier_id": "12345", "company_id": "12345", "department_id": "12345", "payment_type": "cash", "currency": "USD", "currency_rate": 0.69, "type": "expense", "memo": "For travel expenses incurred on 2024-05-15", "tax_rate": {"id": "123456", "rate": 10}, "total_amount": 275, "line_items": [], "reference": "INV-2024-001", "source_document_url": "https://www.invoicesolution.com/expense/123456", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "status": "draft", "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"number": "OIT00546", "transaction_date": "2021-05-01T12:00:00.000Z", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "bank_account": {"id": "ba_123456", "name": "Main Operating Account", "account_number": "123465", "bank_name": "Chase Bank"}, "customer_id": "12345", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "department_id": "12345", "payment_type": "cash", "currency": "USD", "currency_rate": 0.69, "type": "expense", "memo": "For travel expenses incurred on 2024-05-15", "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "tax_inclusive": true, "sub_total": 250, "total_tax": 25, "total_amount": 275, "line_items": [], "reference": "INV-2024-001", "source_document_url": "https://www.invoicesolution.com/expense/123456", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "status": "draft", "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "Expenses", "operation": "add", "data": {"id": "12345"}} @@ -9494,7 +9468,7 @@ examples: x-apideck-service-id: "salesforce" responses: "200": - application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "Expenses", "operation": "one", "data": {"id": "12345", "number": "OIT00546", "transaction_date": "2021-05-01T12:00:00.000Z", "account_id": "123456", "customer_id": "12345", "supplier_id": "12345", "company_id": "12345", "department_id": "12345", "payment_type": "cash", "currency": "USD", "currency_rate": 0.69, "type": "expense", "memo": "For travel expenses incurred on 2024-05-15", "tax_rate": {"id": "123456", "code": "N-T", "name": "GST on Purchases", "rate": 10}, "total_amount": 275, "line_items": [{"id": "12345", "tracking_categories": [{"id": "123456", "name": "New York"}], "account_id": "123456", "customer_id": "12345", "department_id": "12345", "location_id": "12345", "subsidiary_id": "12345", "tax_rate": {"id": "123456", "code": "N-T", "name": "GST on Purchases", "rate": 10}, "description": "Travel US.", "total_amount": 275, "billable": true, "line_number": 1}], "reference": "INV-2024-001", "source_document_url": "https://www.invoicesolution.com/expense/123456", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "status": "draft", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "row_version": "1-12345", "updated_by": "12345", "created_by": "12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]}} + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "Expenses", "operation": "one", "data": {"id": "12345", "number": "OIT00546", "transaction_date": "2021-05-01T12:00:00.000Z", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "bank_account": {"id": "ba_123456", "name": "Main Operating Account", "account_number": "123465", "bank_name": "Chase Bank"}, "customer_id": "12345", "supplier": {"id": "12345", "display_id": "SUPP00101", "display_name": "Windsurf Shop", "company_name": "The boring company", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "department_id": "12345", "payment_type": "cash", "currency": "USD", "currency_rate": 0.69, "type": "expense", "memo": "For travel expenses incurred on 2024-05-15", "tax_rate": {"id": "123456", "code": "N-T", "name": "GST on Purchases", "rate": 10}, "tax_inclusive": true, "sub_total": 250, "total_tax": 25, "total_amount": 275, "line_items": [{"id": "12345", "tracking_categories": [{"id": "123456", "name": "New York"}], "account_id": "123456", "customer_id": "12345", "department_id": "12345", "location_id": "12345", "subsidiary_id": "12345", "tax_rate": {"id": "123456", "code": "N-T", "name": "GST on Purchases", "rate": 10}, "description": "Travel US.", "total_amount": 275, "billable": true, "line_number": 1}], "reference": "INV-2024-001", "source_document_url": "https://www.invoicesolution.com/expense/123456", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "status": "draft", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "row_version": "1-12345", "updated_by": "12345", "created_by": "12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]}} "400": application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror"} "401": @@ -9546,7 +9520,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"number": "OIT00546", "transaction_date": "2021-05-01T12:00:00.000Z", "account_id": "123456", "customer_id": "12345", "supplier_id": "12345", "company_id": "12345", "department_id": "12345", "payment_type": "cash", "currency": "USD", "currency_rate": 0.69, "type": "expense", "memo": "For travel expenses incurred on 2024-05-15", "tax_rate": {"id": "123456", "rate": 10}, "total_amount": 275, "line_items": [], "reference": "INV-2024-001", "source_document_url": "https://www.invoicesolution.com/expense/123456", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "status": "draft", "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + application/json: {"number": "OIT00546", "transaction_date": "2021-05-01T12:00:00.000Z", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "bank_account": {"id": "ba_123456", "name": "Main Operating Account", "account_number": "123465", "bank_name": "Chase Bank"}, "customer_id": "12345", "supplier": {"id": "12345", "display_name": "Windsurf Shop", "address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}}, "company_id": "12345", "department_id": "12345", "payment_type": "cash", "currency": "USD", "currency_rate": 0.69, "type": "expense", "memo": "For travel expenses incurred on 2024-05-15", "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "tax_inclusive": true, "sub_total": 250, "total_tax": 25, "total_amount": 275, "line_items": [], "reference": "INV-2024-001", "source_document_url": "https://www.invoicesolution.com/expense/123456", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "status": "draft", "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "Expenses", "operation": "update", "data": {"id": "12345"}} @@ -19855,7 +19829,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "BA-001", "name": "Main Operating Account", "account_number": "123465", "account_type": "checking", "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "bank_name": "Chase Bank", "currency": "USD", "balance": 25000, "available_balance": 24500, "overdraft_limit": 5000, "routing_number": "021000021", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "country": "US", "status": "active", "description": "Primary operating account for daily transactions", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}]} + application/json: {"display_id": "BA-001", "name": "Main Operating Account", "account_number": "123465", "account_type": "checking", "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "bank_name": "Chase Bank", "currency": "USD", "balance": 25000, "available_balance": 24500, "overdraft_limit": 5000, "routing_number": "021000021", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "country": "US", "status": "active", "description": "Primary operating account for daily transactions", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}]} responses: "201": application/json: {"status_code": 201, "status": "Created", "service": "quickbooks", "resource": "bank-accounts", "operation": "add", "data": {"id": "12345"}} @@ -19910,7 +19884,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"display_id": "BA-001", "name": "Main Operating Account", "account_number": "123465", "account_type": "checking", "ledger_account": {"id": "123456", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "bank_name": "Chase Bank", "currency": "USD", "balance": 25000, "available_balance": 24500, "overdraft_limit": 5000, "routing_number": "021000021", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "country": "US", "status": "active", "description": "Primary operating account for daily transactions", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}]} + application/json: {"display_id": "BA-001", "name": "Main Operating Account", "account_number": "123465", "account_type": "checking", "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "bank_name": "Chase Bank", "currency": "USD", "balance": 25000, "available_balance": 24500, "overdraft_limit": 5000, "routing_number": "021000021", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "country": "US", "status": "active", "description": "Primary operating account for daily transactions", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-accounts", "operation": "update", "data": {"id": "12345"}} @@ -19991,7 +19965,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"name": "Website Redesign Project", "display_id": "PROJ-001", "reference_id": "WD-REF-2024-001", "description": "Complete redesign of the company website including new branding and improved user experience", "status": "active", "active": true, "project_type": "client_project", "priority": "high", "completion_percentage": 75.5, "start_date": "2024-01-15", "end_date": "2024-06-30", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "department": {"id": "DEPT-001", "name": "Marketing"}, "company_id": "12345", "owner_id": "12345", "parent_project": {"id": "PROJ-PARENT-001", "name": "Company Website Overhaul"}, "currency": "USD", "budget_amount": 50000, "approved_amount": 48000, "budget_hours": 400, "hourly_rate": 125, "billing_method": "time_and_materials", "is_billable": true, "phase": "execution", "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": [{"id": "123456", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "tags": ["website", "redesign", "urgent"], "notes": "Client has requested modern design with mobile-first approach", "contract_number": "CNT-2024-001", "profit_margin": 15.5, "schedule_status": "on_schedule", "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "team_size": 8, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"} + application/json: {"name": "Website Redesign Project", "display_id": "PROJ-001", "reference_id": "WD-REF-2024-001", "description": "Complete redesign of the company website including new branding and improved user experience", "status": "active", "active": true, "project_type": "client_project", "priority": "high", "completion_percentage": 75.5, "start_date": "2024-01-15", "end_date": "2024-06-30", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "department": {"id": "DEPT-001", "name": "Marketing"}, "company_id": "12345", "owner_id": "12345", "parent_project": {"id": "PROJ-PARENT-001", "name": "Company Website Overhaul"}, "currency": "USD", "budget_amount": 50000, "approved_amount": 48000, "budget_hours": 400, "hourly_rate": 125, "billing_method": "time_and_materials", "is_billable": true, "phase": "execution", "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "tracking_categories": [{"id": "123456", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "tags": ["website", "redesign", "urgent"], "notes": "Client has requested modern design with mobile-first approach", "contract_number": "CNT-2024-001", "profit_margin": 15.5, "schedule_status": "on_schedule", "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "team_size": 8, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "Projects", "operation": "add", "data": {"id": "12345"}} @@ -20045,7 +20019,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"name": "Website Redesign Project", "display_id": "PROJ-001", "reference_id": "WD-REF-2024-001", "description": "Complete redesign of the company website including new branding and improved user experience", "status": "active", "active": true, "project_type": "client_project", "priority": "high", "completion_percentage": 75.5, "start_date": "2024-01-15", "end_date": "2024-06-30", "customer": null, "department": {"id": "DEPT-001", "name": "Marketing"}, "company_id": "12345", "owner_id": "12345", "parent_project": {"id": "PROJ-PARENT-001", "name": "Company Website Overhaul"}, "currency": "USD", "budget_amount": 50000, "approved_amount": 48000, "budget_hours": 400, "hourly_rate": 125, "billing_method": "time_and_materials", "is_billable": true, "phase": "execution", "tax_rate": {"id": "123456", "rate": 10}, "tracking_categories": [{"id": "123456", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "tags": ["website", "redesign", "urgent"], "notes": "Client has requested modern design with mobile-first approach", "contract_number": "CNT-2024-001", "profit_margin": 15.5, "schedule_status": "on_schedule", "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "team_size": 8, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"} + application/json: {"name": "Website Redesign Project", "display_id": "PROJ-001", "reference_id": "WD-REF-2024-001", "description": "Complete redesign of the company website including new branding and improved user experience", "status": "active", "active": true, "project_type": "client_project", "priority": "high", "completion_percentage": 75.5, "start_date": "2024-01-15", "end_date": "2024-06-30", "customer": null, "department": {"id": "DEPT-001", "name": "Marketing"}, "company_id": "12345", "owner_id": "12345", "parent_project": {"id": "PROJ-PARENT-001", "name": "Company Website Overhaul"}, "currency": "USD", "budget_amount": 50000, "approved_amount": 48000, "budget_hours": 400, "hourly_rate": 125, "billing_method": "time_and_materials", "is_billable": true, "phase": "execution", "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "tracking_categories": [{"id": "123456", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "tags": ["website", "redesign", "urgent"], "notes": "Client has requested modern design with mobile-first approach", "contract_number": "CNT-2024-001", "profit_margin": 15.5, "schedule_status": "on_schedule", "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "team_size": 8, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "Projects", "operation": "update", "data": {"id": "12345"}} @@ -20089,4 +20063,4 @@ examples: application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Java SDK Changes Detected:\n* `apideck.accounting.taxRates.list()`: \n * `response.data.[].displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.taxRates.create()`: \n * `request.taxRate.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.taxRates.get()`: \n * `response.data.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.taxRates.update()`: \n * `request.taxRate.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.taxRates.delete()`: `error.detail` **Changed**\n* `apideck.accounting.bills.list()`: \n * `request.filter` **Changed**\n * `error.detail` **Changed**\n* `apideck.accounting.bills.create()`: `error.detail` **Changed**\n* `apideck.accounting.bills.get()`: `error.detail` **Changed**\n* `apideck.accounting.bills.update()`: `error.detail` **Changed**\n* `apideck.accounting.bills.delete()`: `error.detail` **Changed**\n* `apideck.accounting.invoices.list()`: `error.detail` **Changed**\n* `apideck.accounting.invoices.create()`: `error.detail` **Changed**\n* `apideck.accounting.invoices.get()`: `error.detail` **Changed**\n* `apideck.accounting.invoices.update()`: `error.detail` **Changed**\n* `apideck.accounting.invoices.delete()`: `error.detail` **Changed**\n* `apideck.accounting.ledgerAccounts.list()`: `error.detail` **Changed**\n* `apideck.accounting.ledgerAccounts.create()`: `error.detail` **Changed**\n* `apideck.accounting.ledgerAccounts.get()`: `error.detail` **Changed**\n* `apideck.accounting.ledgerAccounts.update()`: `error.detail` **Changed**\n* `apideck.accounting.ledgerAccounts.delete()`: `error.detail` **Changed**\n* `apideck.accounting.invoiceItems.list()`: \n * `response.data.[].displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.invoiceItems.create()`: \n * `request.invoiceItem.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.invoiceItems.get()`: \n * `response.data.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.invoiceItems.update()`: \n * `request.invoiceItem.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.invoiceItems.delete()`: `error.detail` **Changed**\n* `apideck.accounting.creditNotes.list()`: `error.detail` **Changed**\n* `apideck.accounting.creditNotes.create()`: `error.detail` **Changed**\n* `apideck.accounting.creditNotes.get()`: `error.detail` **Changed**\n* `apideck.accounting.creditNotes.update()`: `error.detail` **Changed**\n* `apideck.accounting.creditNotes.delete()`: `error.detail` **Changed**\n* `apideck.accounting.customers.list()`: `error.detail` **Changed**\n* `apideck.accounting.customers.create()`: `error.detail` **Changed**\n* `apideck.accounting.customers.get()`: `error.detail` **Changed**\n* `apideck.accounting.customers.update()`: `error.detail` **Changed**\n* `apideck.accounting.customers.delete()`: `error.detail` **Changed**\n* `apideck.accounting.suppliers.list()`: `error.detail` **Changed**\n* `apideck.accounting.suppliers.create()`: `error.detail` **Changed**\n* `apideck.accounting.suppliers.get()`: `error.detail` **Changed**\n* `apideck.accounting.suppliers.update()`: `error.detail` **Changed**\n* `apideck.accounting.suppliers.delete()`: `error.detail` **Changed**\n* `apideck.accounting.payments.list()`: `error.detail` **Changed**\n* `apideck.accounting.payments.create()`: `error.detail` **Changed**\n* `apideck.accounting.payments.get()`: `error.detail` **Changed**\n* `apideck.accounting.payments.update()`: `error.detail` **Changed**\n* `apideck.accounting.payments.delete()`: `error.detail` **Changed**\n* `apideck.accounting.companyInfo.get()`: \n * `response.data.defaultSalesTax.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.balanceSheet.get()`: `error.detail` **Changed**\n* `apideck.accounting.profitAndLoss.get()`: `error.detail` **Changed**\n* `apideck.accounting.journalEntries.list()`: \n * `response.data.[].displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.journalEntries.create()`: \n * `request.journalEntry.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.journalEntries.get()`: \n * `response.data.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.journalEntries.update()`: \n * `request.journalEntry.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.journalEntries.delete()`: `error.detail` **Changed**\n* `apideck.accounting.purchaseOrders.list()`: \n * `response.data.[].displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.purchaseOrders.create()`: \n * `request.purchaseOrder.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.purchaseOrders.get()`: \n * `response.data.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.purchaseOrders.update()`: \n * `request.purchaseOrder.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.purchaseOrders.delete()`: `error.detail` **Changed**\n* `apideck.accounting.subsidiaries.list()`: \n * `response.data.[].displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.subsidiaries.create()`: \n * `request.subsidiary.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.subsidiaries.get()`: \n * `response.data.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.subsidiaries.update()`: \n * `request.subsidiary.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.subsidiaries.delete()`: `error.detail` **Changed**\n* `apideck.accounting.locations.list()`: `error.detail` **Changed**\n* `apideck.accounting.locations.create()`: `error.detail` **Changed**\n* `apideck.accounting.locations.get()`: `error.detail` **Changed**\n* `apideck.accounting.locations.update()`: `error.detail` **Changed**\n* `apideck.accounting.locations.delete()`: `error.detail` **Changed**\n* `apideck.accounting.departments.list()`: `error.detail` **Changed**\n* `apideck.accounting.departments.create()`: `error.detail` **Changed**\n* `apideck.accounting.departments.get()`: `error.detail` **Changed**\n* `apideck.accounting.departments.update()`: `error.detail` **Changed**\n* `apideck.accounting.departments.delete()`: `error.detail` **Changed**\n* `apideck.accounting.attachments.list()`: `error.detail` **Changed**\n* `apideck.accounting.attachments.upload()`: `error.detail` **Changed**\n* `apideck.accounting.attachments.get()`: `error.detail` **Changed**\n* `apideck.accounting.attachments.delete()`: `error.detail` **Changed**\n* `apideck.accounting.attachments.download()`: `error.detail` **Changed**\n* `apideck.accounting.bankAccounts.list()`: `error.detail` **Changed**\n* `apideck.accounting.bankAccounts.create()`: `error.detail` **Changed**\n* `apideck.accounting.bankAccounts.get()`: `error.detail` **Changed**\n* `apideck.accounting.bankAccounts.update()`: `error.detail` **Changed**\n* `apideck.accounting.bankAccounts.delete()`: `error.detail` **Changed**\n* `apideck.accounting.trackingCategories.list()`: `error.detail` **Changed**\n* `apideck.accounting.trackingCategories.create()`: `error.detail` **Changed**\n* `apideck.accounting.trackingCategories.get()`: `error.detail` **Changed**\n* `apideck.accounting.trackingCategories.update()`: `error.detail` **Changed**\n* `apideck.accounting.trackingCategories.delete()`: `error.detail` **Changed**\n* `apideck.accounting.billPayments.list()`: `error.detail` **Changed**\n* `apideck.accounting.billPayments.create()`: `error.detail` **Changed**\n* `apideck.accounting.billPayments.get()`: `error.detail` **Changed**\n* `apideck.accounting.billPayments.update()`: `error.detail` **Changed**\n* `apideck.accounting.billPayments.delete()`: `error.detail` **Changed**\n* `apideck.accounting.expenses.list()`: `error.detail` **Changed**\n* `apideck.accounting.expenses.create()`: `error.detail` **Changed**\n* `apideck.accounting.expenses.get()`: `error.detail` **Changed**\n* `apideck.accounting.expenses.update()`: `error.detail` **Changed**\n* `apideck.accounting.expenses.delete()`: `error.detail` **Changed**\n* `apideck.accounting.agedCreditors.get()`: `error.detail` **Changed**\n* `apideck.accounting.agedDebtors.get()`: `error.detail` **Changed**\n* `apideck.accounting.bankFeedAccounts.list()`: `error.detail` **Changed**\n* `apideck.accounting.bankFeedAccounts.create()`: `error.detail` **Changed**\n* `apideck.accounting.bankFeedAccounts.get()`: `error.detail` **Changed**\n* `apideck.accounting.bankFeedAccounts.update()`: `error.detail` **Changed**\n* `apideck.accounting.bankFeedAccounts.delete()`: `error.detail` **Changed**\n* `apideck.accounting.bankFeedStatements.list()`: `error.detail` **Changed**\n* `apideck.accounting.bankFeedStatements.create()`: `error.detail` **Changed**\n* `apideck.accounting.bankFeedStatements.get()`: `error.detail` **Changed**\n* `apideck.accounting.bankFeedStatements.update()`: `error.detail` **Changed**\n* `apideck.accounting.bankFeedStatements.delete()`: `error.detail` **Changed**\n* `apideck.accounting.categories.list()`: \n * `response.data.[].displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.categories.get()`: \n * `response.data.displayId` **Added**\n * `error.detail` **Changed**\n* `apideck.accounting.quotes.list()`: `error.detail` **Changed**\n* `apideck.accounting.quotes.create()`: `error.detail` **Changed**\n* `apideck.accounting.quotes.get()`: `error.detail` **Changed**\n* `apideck.accounting.quotes.update()`: `error.detail` **Changed**\n* `apideck.accounting.quotes.delete()`: `error.detail` **Changed**\n* `apideck.accounting.projects.list()`: `error.detail` **Changed**\n* `apideck.accounting.projects.create()`: `error.detail` **Changed**\n* `apideck.accounting.projects.get()`: `error.detail` **Changed**\n* `apideck.accounting.projects.update()`: `error.detail` **Changed**\n* `apideck.accounting.projects.delete()`: `error.detail` **Changed**\n* `apideck.ats.jobs.list()`: `error.detail` **Changed**\n* `apideck.ats.jobs.get()`: `error.detail` **Changed**\n* `apideck.ats.applicants.list()`: `error.detail` **Changed**\n* `apideck.ats.applicants.create()`: `error.detail` **Changed**\n* `apideck.ats.applicants.get()`: `error.detail` **Changed**\n* `apideck.ats.applicants.update()`: `error.detail` **Changed**\n* `apideck.ats.applicants.delete()`: `error.detail` **Changed**\n* `apideck.ats.applications.list()`: `error.detail` **Changed**\n* `apideck.ats.applications.create()`: `error.detail` **Changed**\n* `apideck.ats.applications.get()`: `error.detail` **Changed**\n* `apideck.ats.applications.update()`: `error.detail` **Changed**\n* `apideck.ats.applications.delete()`: `error.detail` **Changed**\n* `apideck.crm.companies.list()`: `error.detail` **Changed**\n* `apideck.crm.companies.create()`: `error.detail` **Changed**\n* `apideck.crm.companies.get()`: `error.detail` **Changed**\n* `apideck.crm.companies.update()`: `error.detail` **Changed**\n* `apideck.crm.companies.delete()`: `error.detail` **Changed**\n* `apideck.crm.contacts.list()`: `error.detail` **Changed**\n* `apideck.crm.contacts.create()`: `error.detail` **Changed**\n* `apideck.crm.contacts.get()`: `error.detail` **Changed**\n* `apideck.crm.contacts.update()`: `error.detail` **Changed**\n* `apideck.crm.contacts.delete()`: `error.detail` **Changed**\n* `apideck.crm.opportunities.list()`: `error.detail` **Changed**\n* `apideck.crm.opportunities.create()`: `error.detail` **Changed**\n* `apideck.crm.opportunities.get()`: `error.detail` **Changed**\n* `apideck.crm.opportunities.update()`: `error.detail` **Changed**\n* `apideck.crm.opportunities.delete()`: `error.detail` **Changed**\n* `apideck.crm.leads.list()`: `error.detail` **Changed**\n* `apideck.crm.leads.create()`: `error.detail` **Changed**\n* `apideck.crm.leads.get()`: `error.detail` **Changed**\n* `apideck.crm.leads.update()`: `error.detail` **Changed**\n* `apideck.crm.leads.delete()`: `error.detail` **Changed**\n* `apideck.crm.pipelines.list()`: `error.detail` **Changed**\n* `apideck.crm.pipelines.create()`: `error.detail` **Changed**\n* `apideck.crm.pipelines.get()`: `error.detail` **Changed**\n* `apideck.crm.pipelines.update()`: `error.detail` **Changed**\n* `apideck.crm.pipelines.delete()`: `error.detail` **Changed**\n* `apideck.crm.notes.list()`: `error.detail` **Changed**\n* `apideck.crm.notes.create()`: `error.detail` **Changed**\n* `apideck.crm.notes.get()`: `error.detail` **Changed**\n* `apideck.crm.notes.update()`: `error.detail` **Changed**\n* `apideck.crm.notes.delete()`: `error.detail` **Changed**\n* `apideck.crm.users.list()`: `error.detail` **Changed**\n* `apideck.crm.users.create()`: `error.detail` **Changed**\n* `apideck.crm.users.get()`: `error.detail` **Changed**\n* `apideck.crm.users.update()`: `error.detail` **Changed**\n* `apideck.crm.users.delete()`: `error.detail` **Changed**\n* `apideck.crm.activities.list()`: `error.detail` **Changed**\n* `apideck.crm.activities.create()`: `error.detail` **Changed**\n* `apideck.crm.activities.get()`: `error.detail` **Changed**\n* `apideck.crm.activities.update()`: `error.detail` **Changed**\n* `apideck.crm.activities.delete()`: `error.detail` **Changed**\n* `apideck.crm.customObjectSchemas.list()`: `error.detail` **Changed**\n* `apideck.crm.customObjectSchemas.create()`: `error.detail` **Changed**\n* `apideck.crm.customObjectSchemas.get()`: `error.detail` **Changed**\n* `apideck.crm.customObjectSchemas.update()`: `error.detail` **Changed**\n* `apideck.crm.customObjectSchemas.delete()`: `error.detail` **Changed**\n* `apideck.crm.customObjects.list()`: `error.detail` **Changed**\n* `apideck.crm.customObjects.create()`: `error.detail` **Changed**\n* `apideck.crm.customObjects.get()`: `error.detail` **Changed**\n* `apideck.crm.customObjects.update()`: `error.detail` **Changed**\n* `apideck.crm.customObjects.delete()`: `error.detail` **Changed**\n* `apideck.ecommerce.orders.list()`: `error.detail` **Changed**\n* `apideck.ecommerce.orders.get()`: `error.detail` **Changed**\n* `apideck.ecommerce.products.list()`: `error.detail` **Changed**\n* `apideck.ecommerce.products.get()`: `error.detail` **Changed**\n* `apideck.ecommerce.customers.list()`: `error.detail` **Changed**\n* `apideck.ecommerce.customers.get()`: `error.detail` **Changed**\n* `apideck.ecommerce.stores.get()`: `error.detail` **Changed**\n* `apideck.fileStorage.files.list()`: `error.detail` **Changed**\n* `apideck.fileStorage.files.search()`: `error.detail` **Changed**\n* `apideck.fileStorage.files.get()`: `error.detail` **Changed**\n* `apideck.fileStorage.files.update()`: `error.detail` **Changed**\n* `apideck.fileStorage.files.delete()`: `error.detail` **Changed**\n* `apideck.fileStorage.files.download()`: `error.detail` **Changed**\n* `apideck.fileStorage.files.export()`: `error.detail` **Changed**\n* `apideck.fileStorage.folders.create()`: `error.detail` **Changed**\n* `apideck.fileStorage.folders.get()`: `error.detail` **Changed**\n* `apideck.fileStorage.folders.update()`: `error.detail` **Changed**\n* `apideck.fileStorage.folders.delete()`: `error.detail` **Changed**\n* `apideck.fileStorage.folders.copy()`: `error.detail` **Changed**\n* `apideck.fileStorage.sharedLinks.list()`: `error.detail` **Changed**\n* `apideck.fileStorage.sharedLinks.create()`: `error.detail` **Changed**\n* `apideck.fileStorage.sharedLinks.get()`: `error.detail` **Changed**\n* `apideck.fileStorage.sharedLinks.update()`: `error.detail` **Changed**\n* `apideck.fileStorage.sharedLinks.delete()`: `error.detail` **Changed**\n* `apideck.fileStorage.uploadSessions.create()`: `error.detail` **Changed**\n* `apideck.fileStorage.uploadSessions.get()`: `error.detail` **Changed**\n* `apideck.fileStorage.uploadSessions.upload()`: `error.detail` **Changed**\n* `apideck.fileStorage.uploadSessions.delete()`: `error.detail` **Changed**\n* `apideck.fileStorage.uploadSessions.finish()`: `error.detail` **Changed**\n* `apideck.fileStorage.drives.list()`: `error.detail` **Changed**\n* `apideck.fileStorage.drives.create()`: `error.detail` **Changed**\n* `apideck.fileStorage.drives.get()`: `error.detail` **Changed**\n* `apideck.fileStorage.drives.update()`: `error.detail` **Changed**\n* `apideck.fileStorage.drives.delete()`: `error.detail` **Changed**\n* `apideck.fileStorage.driveGroups.list()`: `error.detail` **Changed**\n* `apideck.fileStorage.driveGroups.create()`: `error.detail` **Changed**\n* `apideck.fileStorage.driveGroups.get()`: `error.detail` **Changed**\n* `apideck.fileStorage.driveGroups.update()`: `error.detail` **Changed**\n* `apideck.fileStorage.driveGroups.delete()`: `error.detail` **Changed**\n* `apideck.hris.employees.list()`: `error.detail` **Changed**\n* `apideck.hris.employees.create()`: `error.detail` **Changed**\n* `apideck.hris.employees.get()`: `error.detail` **Changed**\n* `apideck.hris.employees.update()`: `error.detail` **Changed**\n* `apideck.hris.employees.delete()`: `error.detail` **Changed**\n* `apideck.hris.companies.list()`: `error.detail` **Changed**\n* `apideck.hris.companies.create()`: `error.detail` **Changed**\n* `apideck.hris.companies.get()`: `error.detail` **Changed**\n* `apideck.hris.companies.update()`: `error.detail` **Changed**\n* `apideck.hris.companies.delete()`: `error.detail` **Changed**\n* `apideck.hris.departments.list()`: `error.detail` **Changed**\n* `apideck.hris.departments.create()`: `error.detail` **Changed**\n* `apideck.hris.departments.get()`: `error.detail` **Changed**\n* `apideck.hris.departments.update()`: `error.detail` **Changed**\n* `apideck.hris.departments.delete()`: `error.detail` **Changed**\n* `apideck.hris.payrolls.list()`: `error.detail` **Changed**\n* `apideck.hris.payrolls.get()`: `error.detail` **Changed**\n* `apideck.hris.employeePayrolls.list()`: `error.detail` **Changed**\n* `apideck.hris.employeePayrolls.get()`: `error.detail` **Changed**\n* `apideck.hris.employeeSchedules.list()`: `error.detail` **Changed**\n* `apideck.hris.timeOffRequests.list()`: `error.detail` **Changed**\n* `apideck.hris.timeOffRequests.create()`: `error.detail` **Changed**\n* `apideck.hris.timeOffRequests.get()`: `error.detail` **Changed**\n* `apideck.hris.timeOffRequests.update()`: `error.detail` **Changed**\n* `apideck.hris.timeOffRequests.delete()`: `error.detail` **Changed**\n* `apideck.sms.messages.list()`: `error.detail` **Changed**\n* `apideck.sms.messages.create()`: `error.detail` **Changed**\n* `apideck.sms.messages.get()`: `error.detail` **Changed**\n* `apideck.sms.messages.update()`: `error.detail` **Changed**\n* `apideck.sms.messages.delete()`: `error.detail` **Changed**\n* `apideck.issueTracking.collections.list()`: `error.detail` **Changed**\n* `apideck.issueTracking.collections.get()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionTickets.list()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionTickets.create()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionTickets.get()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionTickets.update()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionTickets.delete()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionTicketComments.list()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionTicketComments.create()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionTicketComments.get()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionTicketComments.update()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionTicketComments.delete()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionUsers.list()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionUsers.get()`: `error.detail` **Changed**\n* `apideck.issueTracking.collectionTags.list()`: `error.detail` **Changed**\n* `apideck.connector.connectors.list()`: `error.detail` **Changed**\n* `apideck.connector.connectors.get()`: `error.detail` **Changed**\n* `apideck.connector.connectorDocs.get()`: `error.detail` **Changed**\n* `apideck.connector.connectorResources.get()`: `error.detail` **Changed**\n* `apideck.connector.apis.list()`: `error.detail` **Changed**\n* `apideck.connector.apis.get()`: `error.detail` **Changed**\n* `apideck.connector.apiResources.get()`: `error.detail` **Changed**\n* `apideck.connector.apiResourceCoverage.get()`: `error.detail` **Changed**\n* `apideck.vault.consumers.create()`: `error.detail` **Changed**\n* `apideck.vault.consumers.list()`: `error.detail` **Changed**\n* `apideck.vault.consumers.get()`: `error.detail` **Changed**\n* `apideck.vault.consumers.update()`: `error.detail` **Changed**\n* `apideck.vault.consumers.delete()`: `error.detail` **Changed**\n* `apideck.vault.consumerRequestCounts.list()`: `error.detail` **Changed**\n* `apideck.vault.connections.list()`: \n * `response.data.[]` **Changed**\n * `error.detail` **Changed**\n* `apideck.vault.connections.get()`: \n * `response.data` **Changed**\n * `error.detail` **Changed**\n* `apideck.vault.connections.update()`: \n * `response.data` **Changed**\n * `error.detail` **Changed**\n* `apideck.vault.connections.delete()`: `error.detail` **Changed**\n* `apideck.vault.connections.imports()`: \n * `response.data` **Changed**\n * `error.detail` **Changed**\n* `apideck.vault.connections.token()`: \n * `response.data` **Changed**\n * `error.detail` **Changed**\n* `apideck.vault.validateConnection.state()`: `error.detail` **Changed**\n* `apideck.vault.connectionConsents.list()`: `error.detail` **Changed**\n* `apideck.vault.connectionConsent.update()`: `error.detail` **Changed**\n* `apideck.vault.createCallback.state()`: `error.detail` **Changed**\n* `apideck.vault.connectionSettings.list()`: \n * `response.data` **Changed**\n * `error.detail` **Changed**\n* `apideck.vault.connectionSettings.update()`: \n * `response.data` **Changed**\n * `error.detail` **Changed**\n* `apideck.vault.customFields.list()`: `error.detail` **Changed**\n* `apideck.vault.connectionCustomMappings.list()`: `error.detail` **Changed**\n* `apideck.vault.customMappings.list()`: `error.detail` **Changed**\n* `apideck.vault.sessions.create()`: `error.detail` **Changed**\n* `apideck.vault.logs.list()`: `error.detail` **Changed**\n* `apideck.webhook.webhooks.list()`: `error.detail` **Changed**\n* `apideck.webhook.webhooks.create()`: `error.detail` **Changed**\n* `apideck.webhook.webhooks.get()`: `error.detail` **Changed**\n* `apideck.webhook.webhooks.update()`: `error.detail` **Changed**\n* `apideck.webhook.webhooks.delete()`: `error.detail` **Changed**\n" +releaseNotes: "## Java SDK Changes Detected:\n* `apideck.accounting.expenses.list()`: `response.data.[]` **Changed** **Breaking** :warning:\n* `apideck.accounting.expenses.update()`: \n * `request.expense` **Changed** **Breaking** :warning:\n* `apideck.accounting.expenses.get()`: `response.data` **Changed** **Breaking** :warning:\n* `apideck.accounting.expenses.create()`: \n * `request.expense` **Changed** **Breaking** :warning:\n* `apideck.accounting.creditNotes.create()`: \n * `request.creditNote` **Changed**\n* `apideck.accounting.journalEntries.update()`: \n * `request.journalEntry.lineItems.[]` **Changed**\n* `apideck.accounting.invoiceItems.create()`: \n * `request.invoiceItem` **Changed**\n* `apideck.accounting.invoiceItems.update()`: \n * `request.invoiceItem` **Changed**\n* `apideck.accounting.bills.create()`: \n * `request.bill.lineItems.[]` **Changed**\n* `apideck.accounting.creditNotes.update()`: \n * `request.creditNote` **Changed**\n* `apideck.accounting.customers.create()`: \n * `request.customer` **Changed**\n* `apideck.accounting.customers.update()`: \n * `request.customer` **Changed**\n* `apideck.accounting.suppliers.create()`: \n * `request.supplier` **Changed**\n* `apideck.accounting.suppliers.update()`: \n * `request.supplier` **Changed**\n* `apideck.accounting.payments.create()`: \n * `request.payment.account.name` **Added**\n* `apideck.accounting.payments.update()`: \n * `request.payment.account.name` **Added**\n* `apideck.accounting.journalEntries.create()`: \n * `request.journalEntry.lineItems.[]` **Changed**\n* `apideck.accounting.ledgerAccounts.update()`: \n * `request.ledgerAccount.taxRate.code` **Added**\n* `apideck.accounting.purchaseOrders.create()`: \n * `request.purchaseOrder.lineItems.[]` **Changed**\n* `apideck.accounting.purchaseOrders.update()`: \n * `request.purchaseOrder.lineItems.[]` **Changed**\n* `apideck.accounting.bankAccounts.create()`: \n * `request.accountingBankAccount.ledgerAccount.name` **Added**\n* `apideck.accounting.bankAccounts.update()`: \n * `request.accountingBankAccount.ledgerAccount.name` **Added**\n* `apideck.accounting.billPayments.create()`: \n * `request.billPayment.account.name` **Added**\n* `apideck.accounting.billPayments.update()`: \n * `request.billPayment.account.name` **Added**\n* `apideck.accounting.ledgerAccounts.create()`: \n * `request.ledgerAccount.taxRate.code` **Added**\n* `apideck.accounting.invoices.update()`: \n * `request.invoice.lineItems.[]` **Changed**\n* `apideck.accounting.invoices.create()`: \n * `request.invoice.lineItems.[]` **Changed**\n* `apideck.accounting.bills.update()`: \n * `request.bill.lineItems.[]` **Changed**\n* `apideck.accounting.quotes.create()`: \n * `request.quote.lineItems.[]` **Changed**\n* `apideck.accounting.quotes.update()`: \n * `request.quote.lineItems.[]` **Changed**\n* `apideck.accounting.projects.create()`: \n * `request.project.taxRate.code` **Added**\n* `apideck.accounting.projects.update()`: \n * `request.project.taxRate.code` **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index adec310c7..3b218bed6 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -19,12 +19,13 @@ generation: hoistGlobalSecurity: true schemas: allOfMergeStrategy: shallowMerge + requestBodyFieldName: "" tests: generateTests: true generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.24.0 + version: 0.25.0 additionalDependencies: [] additionalPlugins: [] artifactID: unify diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 761516f3b..f28d277e7 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.645.2 +speakeasyVersion: 1.650.0 sources: Apideck-OAS: sourceNamespace: apideck-oas - sourceRevisionDigest: sha256:b853d0e347c5e03b6d989459d3ce5aeccbf07cdbbcdb400539e37ee3aa87fc95 - sourceBlobDigest: sha256:19888f84ff17da720e26e28b2e0f935c54da5d7d520c4dc7f05944efcf9bb708 + sourceRevisionDigest: sha256:b31dca0e2abcc3e920ba36075604c6c51728ca7c98ff9376c34a8f0df0e3e61a + sourceBlobDigest: sha256:430e9bfae78eb3fc88153280a823c2949f707f61de86c3167b498d6e738156e2 tags: - latest - - speakeasy-sdk-regen-1761781307 + - speakeasy-sdk-regen-1762445118 - 10.21.11 targets: apideck: source: Apideck-OAS sourceNamespace: apideck-oas - sourceRevisionDigest: sha256:b853d0e347c5e03b6d989459d3ce5aeccbf07cdbbcdb400539e37ee3aa87fc95 - sourceBlobDigest: sha256:19888f84ff17da720e26e28b2e0f935c54da5d7d520c4dc7f05944efcf9bb708 + sourceRevisionDigest: sha256:b31dca0e2abcc3e920ba36075604c6c51728ca7c98ff9376c34a8f0df0e3e61a + sourceBlobDigest: sha256:430e9bfae78eb3fc88153280a823c2949f707f61de86c3167b498d6e738156e2 codeSamplesNamespace: apideck-oas-java-code-samples - codeSamplesRevisionDigest: sha256:8120da0ffd08a0792fc0d140f9c183f4bd81f55acaac09109e5b113e78f9e64e + codeSamplesRevisionDigest: sha256:527cf84116c88a02c5a6a69368183d06e9ad2f4cce8f3d4f2431098d0a8d3506 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 45d5146a6..84ddf5841 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.apideck:unify:0.24.0' +implementation 'com.apideck:unify:0.25.0' ``` Maven: @@ -58,7 +58,7 @@ Maven: com.apideck unify - 0.24.0 + 0.25.0 ``` @@ -1025,8 +1025,12 @@ import com.apideck.unify.models.components.TaxRatesFilter; import com.apideck.unify.models.errors.*; import com.apideck.unify.models.operations.AccountingTaxRatesAllRequest; import com.apideck.unify.models.operations.AccountingTaxRatesAllResponse; +import java.io.UncheckedIOException; +import java.lang.Double; import java.lang.Exception; +import java.lang.String; import java.util.Map; +import java.util.Optional; public class Application { @@ -1037,29 +1041,63 @@ public class Application { .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX") .apiKey(System.getenv().getOrDefault("API_KEY", "")) .build(); - - AccountingTaxRatesAllRequest req = AccountingTaxRatesAllRequest.builder() - .serviceId("salesforce") - .filter(TaxRatesFilter.builder() - .assets(true) - .equity(true) - .expenses(true) - .liabilities(true) - .revenue(true) - .build()) - .passThrough(Map.ofEntries( - Map.entry("search", "San Francisco"))) - .fields("id,updated_at") - .build(); + try { + + AccountingTaxRatesAllRequest req = AccountingTaxRatesAllRequest.builder() + .serviceId("salesforce") + .filter(TaxRatesFilter.builder() + .assets(true) + .equity(true) + .expenses(true) + .liabilities(true) + .revenue(true) + .build()) + .passThrough(Map.ofEntries( + Map.entry("search", "San Francisco"))) + .fields("id,updated_at") + .build(); - sdk.accounting().taxRates().list() - .callAsStream() - .forEach((AccountingTaxRatesAllResponse item) -> { - // handle page + sdk.accounting().taxRates().list() + .callAsStream() + .forEach((AccountingTaxRatesAllResponse item) -> { + // handle page + }); + + } catch (ApideckError ex) { // all SDK exceptions inherit from ApideckError + + // ex.ToString() provides a detailed error message including + // HTTP status code, headers, and error payload (if any) + System.out.println(ex); + + // Base exception fields + var rawResponse = ex.rawResponse(); + var headers = ex.headers(); + var contentType = headers.first("Content-Type"); + int statusCode = ex.code(); + Optional responseBody = ex.body(); + + // different error subclasses may be thrown + // depending on the service call + if (ex instanceof BadRequestResponse) { + var e = (BadRequestResponse) ex; + // Check error data fields + e.data().ifPresent(payload -> { + Optional statusCode = payload.statusCode(); + Optional error = payload.error(); + // ... }); + } - } + // An underlying cause may be provided. If the error payload + // cannot be deserialized then the deserialization exception + // will be set as the cause. + if (ex.getCause() != null) { + var cause = ex.getCause(); + } + } catch (UncheckedIOException ex) { + // handle IO error (connection, timeout, etc) + } } } ``` diff --git a/RELEASES.md b/RELEASES.md index cef7fcc53..c465349d7 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -528,4 +528,14 @@ Based on: ### Generated - [java v0.24.0] . ### Releases -- [Maven Central v0.24.0] https://central.sonatype.com/artifact/com.apideck/unify/0.24.0 - . \ No newline at end of file +- [Maven Central v0.24.0] https://central.sonatype.com/artifact/com.apideck/unify/0.24.0 - . + +## 2025-11-06 16:04:54 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.650.0 (2.743.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.25.0] . +### Releases +- [Maven Central v0.25.0] https://central.sonatype.com/artifact/com.apideck/unify/0.25.0 - . \ No newline at end of file diff --git a/docs/models/components/AccountingBankAccountInput.md b/docs/models/components/AccountingBankAccountInput.md index 06148721b..f8fb59d05 100644 --- a/docs/models/components/AccountingBankAccountInput.md +++ b/docs/models/components/AccountingBankAccountInput.md @@ -9,7 +9,7 @@ | `name` | *JsonNullable\* | :heavy_minus_sign: | The name of the bank account | Main Operating Account | | `accountNumber` | *JsonNullable\* | :heavy_minus_sign: | The bank account number | 123465 | | `accountType` | [Optional\](../../models/components/AccountingBankAccountAccountType.md) | :heavy_minus_sign: | The type of bank account | checking | -| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `bankName` | *JsonNullable\* | :heavy_minus_sign: | The name of the bank or financial institution | Chase Bank | | `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | | `balance` | *JsonNullable\* | :heavy_minus_sign: | The current balance of the bank account | 25000 | diff --git a/docs/models/components/Bill.md b/docs/models/components/Bill.md index 61b8b4796..39d71e23c 100644 --- a/docs/models/components/Bill.md +++ b/docs/models/components/Bill.md @@ -24,8 +24,8 @@ | `terms` | *JsonNullable\* | :heavy_minus_sign: | Terms of payment. | Net 30 days | | `balance` | *JsonNullable\* | :heavy_minus_sign: | Balance of bill due. | 27500 | | `deposit` | *JsonNullable\* | :heavy_minus_sign: | Amount of deposit made to this bill. | 0 | -| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Sub-total amount, normally before tax. | 27500 | -| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this bill. | 2500 | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | | `total` | *JsonNullable\* | :heavy_minus_sign: | Total amount of bill, including tax. | 27500 | | `taxCode` | *JsonNullable\* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | | `notes` | *JsonNullable\* | :heavy_minus_sign: | N/A | Some notes about this bill. | diff --git a/docs/models/components/BillInput.md b/docs/models/components/BillInput.md index ac5d3dd3b..d7b0fca8e 100644 --- a/docs/models/components/BillInput.md +++ b/docs/models/components/BillInput.md @@ -22,13 +22,13 @@ | `terms` | *JsonNullable\* | :heavy_minus_sign: | Terms of payment. | Net 30 days | | `balance` | *JsonNullable\* | :heavy_minus_sign: | Balance of bill due. | 27500 | | `deposit` | *JsonNullable\* | :heavy_minus_sign: | Amount of deposit made to this bill. | 0 | -| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Sub-total amount, normally before tax. | 27500 | -| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this bill. | 2500 | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | | `total` | *JsonNullable\* | :heavy_minus_sign: | Total amount of bill, including tax. | 27500 | | `taxCode` | *JsonNullable\* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | | `notes` | *JsonNullable\* | :heavy_minus_sign: | N/A | Some notes about this bill. | | `status` | [JsonNullable\](../../models/components/BillStatus.md) | :heavy_minus_sign: | Invoice status | draft | -| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | | `channel` | *JsonNullable\* | :heavy_minus_sign: | The channel through which the transaction is processed. | email | | `language` | *JsonNullable\* | :heavy_minus_sign: | language code according to ISO 639-1. For the United States - EN | EN | diff --git a/docs/models/components/BillLineItem.md b/docs/models/components/BillLineItem.md index 98cfec8b1..dd3a7def5 100644 --- a/docs/models/components/BillLineItem.md +++ b/docs/models/components/BillLineItem.md @@ -10,8 +10,8 @@ | `code` | *JsonNullable\* | :heavy_minus_sign: | User defined item code | 120-C | | `lineNumber` | *JsonNullable\* | :heavy_minus_sign: | Line number in the invoice | 1 | | `description` | *JsonNullable\* | :heavy_minus_sign: | User defined description | Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection. | -| `type` | [JsonNullable\](../../models/components/BillLineItemType.md) | :heavy_minus_sign: | Bill Line Item type | expense_account | -| `taxAmount` | *JsonNullable\* | :heavy_minus_sign: | Tax amount | 27500 | +| `type` | [JsonNullable\](../../models/components/LineItemType.md) | :heavy_minus_sign: | Line Item type | expense_account | +| `taxAmount` | *JsonNullable\* | :heavy_minus_sign: | Tax amount | 27.5 | | `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | Total amount of the line item | 27500 | | `quantity` | *JsonNullable\* | :heavy_minus_sign: | N/A | 1 | | `unitPrice` | *JsonNullable\* | :heavy_minus_sign: | N/A | 27500.5 | diff --git a/docs/models/components/BillLineItemInput.md b/docs/models/components/BillLineItemInput.md index b1b87e9b8..91978830e 100644 --- a/docs/models/components/BillLineItemInput.md +++ b/docs/models/components/BillLineItemInput.md @@ -9,8 +9,8 @@ | `code` | *JsonNullable\* | :heavy_minus_sign: | User defined item code | 120-C | | `lineNumber` | *JsonNullable\* | :heavy_minus_sign: | Line number in the invoice | 1 | | `description` | *JsonNullable\* | :heavy_minus_sign: | User defined description | Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection. | -| `type` | [JsonNullable\](../../models/components/BillLineItemType.md) | :heavy_minus_sign: | Bill Line Item type | expense_account | -| `taxAmount` | *JsonNullable\* | :heavy_minus_sign: | Tax amount | 27500 | +| `type` | [JsonNullable\](../../models/components/LineItemType.md) | :heavy_minus_sign: | Line Item type | expense_account | +| `taxAmount` | *JsonNullable\* | :heavy_minus_sign: | Tax amount | 27.5 | | `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | Total amount of the line item | 27500 | | `quantity` | *JsonNullable\* | :heavy_minus_sign: | N/A | 1 | | `unitPrice` | *JsonNullable\* | :heavy_minus_sign: | N/A | 27500.5 | @@ -31,7 +31,7 @@ | `paymentAmount` | *JsonNullable\* | :heavy_minus_sign: | Payment amount | 1000 | | `item` | [Optional\](../../models/components/LinkedInvoiceItem.md) | :heavy_minus_sign: | N/A | | | `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | -| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `purchaseOrder` | [JsonNullable\](../../models/components/LinkedPurchaseOrder.md) | :heavy_minus_sign: | N/A | | | `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | | `customer` | [JsonNullable\](../../models/components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | diff --git a/docs/models/components/BillPaymentInput.md b/docs/models/components/BillPaymentInput.md index 0725130f2..263777b3a 100644 --- a/docs/models/components/BillPaymentInput.md +++ b/docs/models/components/BillPaymentInput.md @@ -12,7 +12,7 @@ | `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | | `paymentMethodReference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | | `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | | `supplier` | [JsonNullable\](../../models/components/LinkedSupplierInput.md) | :heavy_minus_sign: | The supplier this entity is linked to. | | | `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | diff --git a/docs/models/components/CreditNoteInput.md b/docs/models/components/CreditNoteInput.md index 1e06e5987..52973cad4 100644 --- a/docs/models/components/CreditNoteInput.md +++ b/docs/models/components/CreditNoteInput.md @@ -23,7 +23,7 @@ | `dateIssued` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | | `datePaid` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | | `type` | [Optional\](../../models/components/CreditNoteType.md) | :heavy_minus_sign: | Type of payment | accounts_receivable_credit | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `lineItems` | List\<[InvoiceLineItemInput](../../models/components/InvoiceLineItemInput.md)> | :heavy_minus_sign: | N/A | | | `allocations` | List\<[AllocationInput](../../models/components/AllocationInput.md)> | :heavy_minus_sign: | N/A | | | `note` | *JsonNullable\* | :heavy_minus_sign: | Optional note to be associated with the credit note. | Some notes about this credit note | diff --git a/docs/models/components/CustomerInput.md b/docs/models/components/CustomerInput.md index f686d1783..8a650ce15 100644 --- a/docs/models/components/CustomerInput.md +++ b/docs/models/components/CustomerInput.md @@ -26,7 +26,7 @@ | `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | | `taxNumber` | *JsonNullable\* | :heavy_minus_sign: | N/A | US123945459 | | `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `parent` | [JsonNullable\](../../models/components/LinkedParentCustomer.md) | :heavy_minus_sign: | The parent customer this entity is linked to. | | | `status` | [JsonNullable\](../../models/components/CustomerStatusStatus.md) | :heavy_minus_sign: | Customer status | active | | `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | diff --git a/docs/models/components/Expense.md b/docs/models/components/Expense.md index 7c879bc71..566aa5063 100644 --- a/docs/models/components/Expense.md +++ b/docs/models/components/Expense.md @@ -1,2 +1,40 @@ # Expense + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Number. | OIT00546 | +| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| ~~`accountId`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead. | 123456 | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `bankAccount` | [JsonNullable\](../../models/components/LinkedBankAccount.md) | :heavy_minus_sign: | N/A | | +| `customerId` | *Optional\* | :heavy_minus_sign: | The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers. | 12345 | +| ~~`supplierId`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The ID of the supplier this entity is linked to. Deprecated, use supplier instead. | 12345 | +| `supplier` | [JsonNullable\](../../models/components/LinkedSupplier.md) | :heavy_minus_sign: | The supplier this entity is linked to. | | +| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | +| `paymentType` | [JsonNullable\](../../models/components/ExpensePaymentType.md) | :heavy_minus_sign: | The type of payment for the expense. | cash | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `type` | [JsonNullable\](../../models/components/ExpenseType.md) | :heavy_minus_sign: | The type of expense. | expense | +| `memo` | *JsonNullable\* | :heavy_minus_sign: | The memo of the expense. | For travel expenses incurred on 2024-05-15 | +| `taxRate` | [Optional\](../../models/components/LinkedTaxRate.md) | :heavy_minus_sign: | N/A | | +| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the expense line item. | 275 | +| `lineItems` | List\<[ExpenseLineItem](../../models/components/ExpenseLineItem.md)> | :heavy_check_mark: | Expense line items linked to this expense. | | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference identifier for the transaction. | INV-2024-001 | +| `sourceDocumentUrl` | *JsonNullable\* | :heavy_minus_sign: | URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero. | https://www.invoicesolution.com/expense/123456 | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `customMappings` | Map\ | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | +| `status` | [JsonNullable\](../../models/components/ExpenseStatus.md) | :heavy_minus_sign: | Expense status | draft | +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `updatedBy` | *JsonNullable\* | :heavy_minus_sign: | The user who last updated the object. | 12345 | +| `createdBy` | *JsonNullable\* | :heavy_minus_sign: | The user who created the object. | 12345 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/Expense1.md b/docs/models/components/Expense1.md deleted file mode 100644 index 0c99fc091..000000000 --- a/docs/models/components/Expense1.md +++ /dev/null @@ -1,36 +0,0 @@ -# Expense1 - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | -| `number` | *JsonNullable\* | :heavy_minus_sign: | Number. | OIT00546 | -| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | -| ~~`accountId`~~ | *String* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead. | 123456 | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | -| `bankAccount` | [JsonNullable\](../../models/components/LinkedBankAccount.md) | :heavy_minus_sign: | N/A | | -| `customerId` | *Optional\* | :heavy_minus_sign: | The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers. | 12345 | -| `supplierId` | *Optional\* | :heavy_minus_sign: | The ID of the supplier this entity is linked to. | 12345 | -| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | -| `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | -| `paymentType` | [JsonNullable\](../../models/components/ExpensePaymentType.md) | :heavy_minus_sign: | The type of payment for the expense. | cash | -| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | -| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | -| `type` | [JsonNullable\](../../models/components/ExpenseType.md) | :heavy_minus_sign: | The type of expense. | expense | -| `memo` | *JsonNullable\* | :heavy_minus_sign: | The memo of the expense. | For travel expenses incurred on 2024-05-15 | -| `taxRate` | [Optional\](../../models/components/LinkedTaxRate.md) | :heavy_minus_sign: | N/A | | -| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the expense line item. | 275 | -| `lineItems` | List\<[ExpenseLineItem](../../models/components/ExpenseLineItem.md)> | :heavy_check_mark: | Expense line items linked to this expense. | | -| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference identifier for the transaction. | INV-2024-001 | -| `sourceDocumentUrl` | *JsonNullable\* | :heavy_minus_sign: | URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero. | https://www.invoicesolution.com/expense/123456 | -| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | -| `customMappings` | Map\ | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | -| `status` | [JsonNullable\](../../models/components/ExpenseStatus.md) | :heavy_minus_sign: | Expense status | draft | -| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | -| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | -| `updatedBy` | *JsonNullable\* | :heavy_minus_sign: | The user who last updated the object. | 12345 | -| `createdBy` | *JsonNullable\* | :heavy_minus_sign: | The user who created the object. | 12345 | -| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/Expense1Input.md b/docs/models/components/Expense1Input.md deleted file mode 100644 index d7a89654b..000000000 --- a/docs/models/components/Expense1Input.md +++ /dev/null @@ -1,30 +0,0 @@ -# Expense1Input - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `number` | *JsonNullable\* | :heavy_minus_sign: | Number. | OIT00546 | -| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | -| ~~`accountId`~~ | *String* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead. | 123456 | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | -| `bankAccount` | [JsonNullable\](../../models/components/LinkedBankAccount.md) | :heavy_minus_sign: | N/A | | -| `customerId` | *Optional\* | :heavy_minus_sign: | The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers. | 12345 | -| `supplierId` | *Optional\* | :heavy_minus_sign: | The ID of the supplier this entity is linked to. | 12345 | -| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | -| `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | -| `paymentType` | [JsonNullable\](../../models/components/ExpensePaymentType.md) | :heavy_minus_sign: | The type of payment for the expense. | cash | -| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | -| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | -| `type` | [JsonNullable\](../../models/components/ExpenseType.md) | :heavy_minus_sign: | The type of expense. | expense | -| `memo` | *JsonNullable\* | :heavy_minus_sign: | The memo of the expense. | For travel expenses incurred on 2024-05-15 | -| `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | -| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the expense line item. | 275 | -| `lineItems` | List\<[ExpenseLineItemInput](../../models/components/ExpenseLineItemInput.md)> | :heavy_check_mark: | Expense line items linked to this expense. | | -| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference identifier for the transaction. | INV-2024-001 | -| `sourceDocumentUrl` | *JsonNullable\* | :heavy_minus_sign: | URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero. | https://www.invoicesolution.com/expense/123456 | -| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | -| `status` | [JsonNullable\](../../models/components/ExpenseStatus.md) | :heavy_minus_sign: | Expense status | draft | -| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | -| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/Expense2.md b/docs/models/components/Expense2.md deleted file mode 100644 index edbf96674..000000000 --- a/docs/models/components/Expense2.md +++ /dev/null @@ -1,36 +0,0 @@ -# Expense2 - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | -| `number` | *JsonNullable\* | :heavy_minus_sign: | Number. | OIT00546 | -| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | -| ~~`accountId`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead. | 123456 | -| `account` | [Optional\](../../models/components/LinkedLedgerAccount.md) | :heavy_check_mark: | N/A | | -| `bankAccount` | [JsonNullable\](../../models/components/LinkedBankAccount.md) | :heavy_minus_sign: | N/A | | -| `customerId` | *Optional\* | :heavy_minus_sign: | The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers. | 12345 | -| `supplierId` | *Optional\* | :heavy_minus_sign: | The ID of the supplier this entity is linked to. | 12345 | -| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | -| `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | -| `paymentType` | [JsonNullable\](../../models/components/Expense2PaymentType.md) | :heavy_minus_sign: | The type of payment for the expense. | cash | -| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | -| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | -| `type` | [JsonNullable\](../../models/components/ExpenseExpenseType.md) | :heavy_minus_sign: | The type of expense. | expense | -| `memo` | *JsonNullable\* | :heavy_minus_sign: | The memo of the expense. | For travel expenses incurred on 2024-05-15 | -| `taxRate` | [Optional\](../../models/components/LinkedTaxRate.md) | :heavy_minus_sign: | N/A | | -| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the expense line item. | 275 | -| `lineItems` | List\<[ExpenseLineItem](../../models/components/ExpenseLineItem.md)> | :heavy_check_mark: | Expense line items linked to this expense. | | -| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference identifier for the transaction. | INV-2024-001 | -| `sourceDocumentUrl` | *JsonNullable\* | :heavy_minus_sign: | URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero. | https://www.invoicesolution.com/expense/123456 | -| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | -| `customMappings` | Map\ | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | -| `status` | [JsonNullable\](../../models/components/Expense2Status.md) | :heavy_minus_sign: | Expense status | draft | -| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | -| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | -| `updatedBy` | *JsonNullable\* | :heavy_minus_sign: | The user who last updated the object. | 12345 | -| `createdBy` | *JsonNullable\* | :heavy_minus_sign: | The user who created the object. | 12345 | -| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/Expense2Input.md b/docs/models/components/Expense2Input.md deleted file mode 100644 index 634d6d407..000000000 --- a/docs/models/components/Expense2Input.md +++ /dev/null @@ -1,30 +0,0 @@ -# Expense2Input - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `number` | *JsonNullable\* | :heavy_minus_sign: | Number. | OIT00546 | -| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | -| ~~`accountId`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead. | 123456 | -| `account` | [Optional\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_check_mark: | N/A | | -| `bankAccount` | [JsonNullable\](../../models/components/LinkedBankAccount.md) | :heavy_minus_sign: | N/A | | -| `customerId` | *Optional\* | :heavy_minus_sign: | The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers. | 12345 | -| `supplierId` | *Optional\* | :heavy_minus_sign: | The ID of the supplier this entity is linked to. | 12345 | -| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | -| `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | -| `paymentType` | [JsonNullable\](../../models/components/Expense2PaymentType.md) | :heavy_minus_sign: | The type of payment for the expense. | cash | -| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | -| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | -| `type` | [JsonNullable\](../../models/components/ExpenseExpenseType.md) | :heavy_minus_sign: | The type of expense. | expense | -| `memo` | *JsonNullable\* | :heavy_minus_sign: | The memo of the expense. | For travel expenses incurred on 2024-05-15 | -| `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | -| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the expense line item. | 275 | -| `lineItems` | List\<[ExpenseLineItemInput](../../models/components/ExpenseLineItemInput.md)> | :heavy_check_mark: | Expense line items linked to this expense. | | -| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference identifier for the transaction. | INV-2024-001 | -| `sourceDocumentUrl` | *JsonNullable\* | :heavy_minus_sign: | URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero. | https://www.invoicesolution.com/expense/123456 | -| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | -| `status` | [JsonNullable\](../../models/components/Expense2Status.md) | :heavy_minus_sign: | Expense status | draft | -| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | -| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/Expense2PaymentType.md b/docs/models/components/Expense2PaymentType.md deleted file mode 100644 index 1c547e848..000000000 --- a/docs/models/components/Expense2PaymentType.md +++ /dev/null @@ -1,13 +0,0 @@ -# Expense2PaymentType - -The type of payment for the expense. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `CASH` | cash | -| `CHECK` | check | -| `CREDIT_CARD` | credit_card | -| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/components/Expense2Status.md b/docs/models/components/Expense2Status.md deleted file mode 100644 index 4ce9dd2cb..000000000 --- a/docs/models/components/Expense2Status.md +++ /dev/null @@ -1,11 +0,0 @@ -# Expense2Status - -Expense status - - -## Values - -| Name | Value | -| -------- | -------- | -| `DRAFT` | draft | -| `POSTED` | posted | \ No newline at end of file diff --git a/docs/models/components/Expense3.md b/docs/models/components/Expense3.md deleted file mode 100644 index 26e7a2b23..000000000 --- a/docs/models/components/Expense3.md +++ /dev/null @@ -1,30 +0,0 @@ -# Expense3 - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `number` | *JsonNullable\* | :heavy_minus_sign: | Number. | OIT00546 | -| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | -| ~~`accountId`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead. | 123456 | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | -| `bankAccount` | [Optional\](../../models/components/LinkedBankAccount.md) | :heavy_check_mark: | N/A | | -| `customerId` | *Optional\* | :heavy_minus_sign: | The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers. | 12345 | -| `supplierId` | *Optional\* | :heavy_minus_sign: | The ID of the supplier this entity is linked to. | 12345 | -| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | -| `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | -| `paymentType` | [JsonNullable\](../../models/components/Expense3PaymentType.md) | :heavy_minus_sign: | The type of payment for the expense. | cash | -| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | -| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | -| `type` | [JsonNullable\](../../models/components/Expense3ExpenseType.md) | :heavy_minus_sign: | The type of expense. | expense | -| `memo` | *JsonNullable\* | :heavy_minus_sign: | The memo of the expense. | For travel expenses incurred on 2024-05-15 | -| `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | -| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the expense line item. | 275 | -| `lineItems` | List\<[ExpenseLineItemInput](../../models/components/ExpenseLineItemInput.md)> | :heavy_check_mark: | Expense line items linked to this expense. | | -| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference identifier for the transaction. | INV-2024-001 | -| `sourceDocumentUrl` | *JsonNullable\* | :heavy_minus_sign: | URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero. | https://www.invoicesolution.com/expense/123456 | -| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | -| `status` | [JsonNullable\](../../models/components/Expense3Status.md) | :heavy_minus_sign: | Expense status | draft | -| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | -| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/Expense3ExpenseType.md b/docs/models/components/Expense3ExpenseType.md deleted file mode 100644 index 66c694b43..000000000 --- a/docs/models/components/Expense3ExpenseType.md +++ /dev/null @@ -1,11 +0,0 @@ -# Expense3ExpenseType - -The type of expense. - - -## Values - -| Name | Value | -| --------- | --------- | -| `EXPENSE` | expense | -| `REFUND` | refund | \ No newline at end of file diff --git a/docs/models/components/Expense3PaymentType.md b/docs/models/components/Expense3PaymentType.md deleted file mode 100644 index b76e7c5de..000000000 --- a/docs/models/components/Expense3PaymentType.md +++ /dev/null @@ -1,13 +0,0 @@ -# Expense3PaymentType - -The type of payment for the expense. - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `CASH` | cash | -| `CHECK` | check | -| `CREDIT_CARD` | credit_card | -| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/components/Expense3Status.md b/docs/models/components/Expense3Status.md deleted file mode 100644 index 11327a457..000000000 --- a/docs/models/components/Expense3Status.md +++ /dev/null @@ -1,11 +0,0 @@ -# Expense3Status - -Expense status - - -## Values - -| Name | Value | -| -------- | -------- | -| `DRAFT` | draft | -| `POSTED` | posted | \ No newline at end of file diff --git a/docs/models/components/ExpenseExpenseType.md b/docs/models/components/ExpenseExpenseType.md deleted file mode 100644 index ecac13067..000000000 --- a/docs/models/components/ExpenseExpenseType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ExpenseExpenseType - -The type of expense. - - -## Values - -| Name | Value | -| --------- | --------- | -| `EXPENSE` | expense | -| `REFUND` | refund | \ No newline at end of file diff --git a/docs/models/components/ExpenseInput.md b/docs/models/components/ExpenseInput.md index 2ac34f58e..c2814224e 100644 --- a/docs/models/components/ExpenseInput.md +++ b/docs/models/components/ExpenseInput.md @@ -1,2 +1,34 @@ # ExpenseInput + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Number. | OIT00546 | +| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| ~~`accountId`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead. | 123456 | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `bankAccount` | [JsonNullable\](../../models/components/LinkedBankAccount.md) | :heavy_minus_sign: | N/A | | +| `customerId` | *Optional\* | :heavy_minus_sign: | The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers. | 12345 | +| ~~`supplierId`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The ID of the supplier this entity is linked to. Deprecated, use supplier instead. | 12345 | +| `supplier` | [JsonNullable\](../../models/components/LinkedSupplierInput.md) | :heavy_minus_sign: | The supplier this entity is linked to. | | +| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | +| `paymentType` | [JsonNullable\](../../models/components/ExpensePaymentType.md) | :heavy_minus_sign: | The type of payment for the expense. | cash | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `type` | [JsonNullable\](../../models/components/ExpenseType.md) | :heavy_minus_sign: | The type of expense. | expense | +| `memo` | *JsonNullable\* | :heavy_minus_sign: | The memo of the expense. | For travel expenses incurred on 2024-05-15 | +| `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | +| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the expense line item. | 275 | +| `lineItems` | List\<[ExpenseLineItemInput](../../models/components/ExpenseLineItemInput.md)> | :heavy_check_mark: | Expense line items linked to this expense. | | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference identifier for the transaction. | INV-2024-001 | +| `sourceDocumentUrl` | *JsonNullable\* | :heavy_minus_sign: | URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero. | https://www.invoicesolution.com/expense/123456 | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `status` | [JsonNullable\](../../models/components/ExpenseStatus.md) | :heavy_minus_sign: | Expense status | draft | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/ExpenseLineItem.md b/docs/models/components/ExpenseLineItem.md index 79875adfc..93b9aa48f 100644 --- a/docs/models/components/ExpenseLineItem.md +++ b/docs/models/components/ExpenseLineItem.md @@ -15,7 +15,12 @@ | `subsidiaryId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the subsidiary | 12345 | | `taxRate` | [Optional\](../../models/components/LinkedTaxRate.md) | :heavy_minus_sign: | N/A | | | `description` | *JsonNullable\* | :heavy_minus_sign: | The expense line item description | Travel US. | +| `type` | [JsonNullable\](../../models/components/LineItemType.md) | :heavy_minus_sign: | Line Item type | expense_account | | `totalAmount` | *Optional\* | :heavy_check_mark: | The total amount of the expense line item. | 275 | -| `billable` | *Optional\* | :heavy_minus_sign: | Boolean that indicates if the line item is billable or not. | true | +| `taxAmount` | *JsonNullable\* | :heavy_minus_sign: | Tax amount | 27.5 | +| `quantity` | *JsonNullable\* | :heavy_minus_sign: | N/A | 1 | +| `unitPrice` | *JsonNullable\* | :heavy_minus_sign: | N/A | 27500.5 | +| `item` | [Optional\](../../models/components/LinkedInvoiceItem.md) | :heavy_minus_sign: | N/A | | +| ~~`billable`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Boolean that indicates if the line item is billable or not. | true | | `lineNumber` | *JsonNullable\* | :heavy_minus_sign: | Line number of the resource | 1 | | `rebilling` | [JsonNullable\](../../models/components/Rebilling.md) | :heavy_minus_sign: | Rebilling metadata for this line item. | | \ No newline at end of file diff --git a/docs/models/components/ExpenseLineItemInput.md b/docs/models/components/ExpenseLineItemInput.md index eaf449770..753f3e59e 100644 --- a/docs/models/components/ExpenseLineItemInput.md +++ b/docs/models/components/ExpenseLineItemInput.md @@ -7,14 +7,19 @@ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | | ~~`accountId`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique identifier for the ledger account. Deprecated, use account instead. | 123456 | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `customerId` | *Optional\* | :heavy_minus_sign: | The ID of the customer this expense item is linked to. | 12345 | | `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | | `locationId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the location | 12345 | | `subsidiaryId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the subsidiary | 12345 | | `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | | `description` | *JsonNullable\* | :heavy_minus_sign: | The expense line item description | Travel US. | +| `type` | [JsonNullable\](../../models/components/LineItemType.md) | :heavy_minus_sign: | Line Item type | expense_account | | `totalAmount` | *Optional\* | :heavy_check_mark: | The total amount of the expense line item. | 275 | -| `billable` | *Optional\* | :heavy_minus_sign: | Boolean that indicates if the line item is billable or not. | true | +| `taxAmount` | *JsonNullable\* | :heavy_minus_sign: | Tax amount | 27.5 | +| `quantity` | *JsonNullable\* | :heavy_minus_sign: | N/A | 1 | +| `unitPrice` | *JsonNullable\* | :heavy_minus_sign: | N/A | 27500.5 | +| `item` | [Optional\](../../models/components/LinkedInvoiceItem.md) | :heavy_minus_sign: | N/A | | +| ~~`billable`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Boolean that indicates if the line item is billable or not. | true | | `lineNumber` | *JsonNullable\* | :heavy_minus_sign: | Line number of the resource | 1 | | `rebilling` | [JsonNullable\](../../models/components/Rebilling.md) | :heavy_minus_sign: | Rebilling metadata for this line item. | | \ No newline at end of file diff --git a/docs/models/components/InvoiceInput.md b/docs/models/components/InvoiceInput.md index b036665da..d30580d6d 100644 --- a/docs/models/components/InvoiceInput.md +++ b/docs/models/components/InvoiceInput.md @@ -43,7 +43,7 @@ | `language` | *JsonNullable\* | :heavy_minus_sign: | language code according to ISO 639-1. For the United States - EN | EN | | `accountingByRow` | *JsonNullable\* | :heavy_minus_sign: | Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row. | false | | `bankAccount` | [Optional\](../../models/components/BankAccount.md) | :heavy_minus_sign: | N/A | | -| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | | `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | | `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/InvoiceItemInput.md b/docs/models/components/InvoiceItemInput.md index d0e71c862..04f869a5a 100644 --- a/docs/models/components/InvoiceItemInput.md +++ b/docs/models/components/InvoiceItemInput.md @@ -20,9 +20,9 @@ | `quantity` | *JsonNullable\* | :heavy_minus_sign: | N/A | 1 | | `unitPrice` | *JsonNullable\* | :heavy_minus_sign: | N/A | 27500.5 | | `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | -| `assetAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | -| `incomeAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | -| `expenseAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `assetAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `incomeAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `expenseAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | ~~`trackingCategory`~~ | [JsonNullable\](../../models/components/DeprecatedLinkedTrackingCategory.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | | `active` | *JsonNullable\* | :heavy_minus_sign: | N/A | true | diff --git a/docs/models/components/InvoiceLineItemInput.md b/docs/models/components/InvoiceLineItemInput.md index 845c3f9c4..9dc1a2b2f 100644 --- a/docs/models/components/InvoiceLineItemInput.md +++ b/docs/models/components/InvoiceLineItemInput.md @@ -33,6 +33,6 @@ | `worktags` | List\<[LinkedWorktag](../../models/components/LinkedWorktag.md)> | :heavy_minus_sign: | Worktags of the line item. This is currently only supported in Workday. | | | `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | | `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | -| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | | `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | \ No newline at end of file diff --git a/docs/models/components/JournalEntryLineItemInput.md b/docs/models/components/JournalEntryLineItemInput.md index d1aec7e0b..4f39492ee 100644 --- a/docs/models/components/JournalEntryLineItemInput.md +++ b/docs/models/components/JournalEntryLineItemInput.md @@ -13,7 +13,7 @@ | `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | | ~~`trackingCategory`~~ | [JsonNullable\](../../models/components/DeprecatedLinkedTrackingCategory.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | -| `ledgerAccount` | [Optional\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_check_mark: | N/A | | +| `ledgerAccount` | [Optional\](../../models/components/LinkedLedgerAccount.md) | :heavy_check_mark: | N/A | | | `customer` | [JsonNullable\](../../models/components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | | `supplier` | [JsonNullable\](../../models/components/LinkedSupplierInput.md) | :heavy_minus_sign: | The supplier this entity is linked to. | | | `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | diff --git a/docs/models/components/BillLineItemType.md b/docs/models/components/LineItemType.md similarity index 85% rename from docs/models/components/BillLineItemType.md rename to docs/models/components/LineItemType.md index 6c8f5e10e..a5c6b4cec 100644 --- a/docs/models/components/BillLineItemType.md +++ b/docs/models/components/LineItemType.md @@ -1,6 +1,6 @@ -# BillLineItemType +# LineItemType -Bill Line Item type +Line Item type ## Values diff --git a/docs/models/components/LinkedLedgerAccountInput.md b/docs/models/components/LinkedLedgerAccountInput.md deleted file mode 100644 index 9d99709c6..000000000 --- a/docs/models/components/LinkedLedgerAccountInput.md +++ /dev/null @@ -1,12 +0,0 @@ -# LinkedLedgerAccountInput - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | The unique identifier for the account. | 123456 | -| `nominalCode` | *JsonNullable\* | :heavy_minus_sign: | The nominal code of the account. | N091 | -| `code` | *JsonNullable\* | :heavy_minus_sign: | The code assigned to the account. | 453 | -| `parentId` | *JsonNullable\* | :heavy_minus_sign: | The parent ID of the account. | 123456 | -| `displayId` | *JsonNullable\* | :heavy_minus_sign: | The display ID of the account. | 123456 | \ No newline at end of file diff --git a/docs/models/components/LinkedTaxRateInput.md b/docs/models/components/LinkedTaxRateInput.md index beca2cc3f..63ecc05f6 100644 --- a/docs/models/components/LinkedTaxRateInput.md +++ b/docs/models/components/LinkedTaxRateInput.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | Example | | ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | | `id` | *JsonNullable\* | :heavy_minus_sign: | The ID of the object. | 123456 | +| `code` | *JsonNullable\* | :heavy_minus_sign: | Tax rate code | N-T | | `rate` | *JsonNullable\* | :heavy_minus_sign: | Rate of the tax rate | 10 | \ No newline at end of file diff --git a/docs/models/components/PaymentInput.md b/docs/models/components/PaymentInput.md index 28ea5ffce..c398b9d74 100644 --- a/docs/models/components/PaymentInput.md +++ b/docs/models/components/PaymentInput.md @@ -14,7 +14,7 @@ | `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | | ~~`accountsReceivableAccountType`~~ | *JsonNullable\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Type of accounts receivable account. | Account | | ~~`accountsReceivableAccountId`~~ | *JsonNullable\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the account to allocate payment to. | 123456 | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | | `customer` | [JsonNullable\](../../models/components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | | ~~`supplier`~~ | [JsonNullable\](../../models/components/DeprecatedLinkedSupplierInput.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The supplier this entity is linked to. | | diff --git a/docs/models/components/PurchaseOrderInput.md b/docs/models/components/PurchaseOrderInput.md index 53bdb0b72..5b007f7eb 100644 --- a/docs/models/components/PurchaseOrderInput.md +++ b/docs/models/components/PurchaseOrderInput.md @@ -25,7 +25,7 @@ | `lineItems` | List\<[InvoiceLineItemInput](../../models/components/InvoiceLineItemInput.md)> | :heavy_minus_sign: | N/A | | | `billingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | | `shippingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | -| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `templateId` | *JsonNullable\* | :heavy_minus_sign: | Optional purchase order template | 123456 | | `discountPercentage` | *JsonNullable\* | :heavy_minus_sign: | Discount percentage applied to this transaction. | 5.5 | | `bankAccount` | [Optional\](../../models/components/BankAccount.md) | :heavy_minus_sign: | N/A | | diff --git a/docs/models/components/QuoteLineItemInput.md b/docs/models/components/QuoteLineItemInput.md index 134dfe07c..f778704a9 100644 --- a/docs/models/components/QuoteLineItemInput.md +++ b/docs/models/components/QuoteLineItemInput.md @@ -25,6 +25,6 @@ | `item` | [Optional\](../../models/components/LinkedInvoiceItem.md) | :heavy_minus_sign: | N/A | | | `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | | `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | -| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `ledgerAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | | `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | \ No newline at end of file diff --git a/docs/models/components/SupplierInput.md b/docs/models/components/SupplierInput.md index 4d6f101be..374a5ea15 100644 --- a/docs/models/components/SupplierInput.md +++ b/docs/models/components/SupplierInput.md @@ -25,7 +25,7 @@ | `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | | `taxNumber` | *JsonNullable\* | :heavy_minus_sign: | N/A | US123945459 | | `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccountInput.md) | :heavy_minus_sign: | N/A | | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | | `status` | [JsonNullable\](../../models/components/SupplierStatus.md) | :heavy_minus_sign: | Supplier status | active | | `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | | `terms` | *JsonNullable\* | :heavy_minus_sign: | Terms of payment. | Net 30 days | diff --git a/docs/models/components/Three.md b/docs/models/components/Three.md deleted file mode 100644 index 1b1e1a81c..000000000 --- a/docs/models/components/Three.md +++ /dev/null @@ -1,36 +0,0 @@ -# Three - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | -| `number` | *JsonNullable\* | :heavy_minus_sign: | Number. | OIT00546 | -| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | -| ~~`accountId`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead. | 123456 | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | -| `bankAccount` | [Optional\](../../models/components/LinkedBankAccount.md) | :heavy_check_mark: | N/A | | -| `customerId` | *Optional\* | :heavy_minus_sign: | The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers. | 12345 | -| `supplierId` | *Optional\* | :heavy_minus_sign: | The ID of the supplier this entity is linked to. | 12345 | -| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | -| `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | -| `paymentType` | [JsonNullable\](../../models/components/Expense3PaymentType.md) | :heavy_minus_sign: | The type of payment for the expense. | cash | -| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | -| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | -| `type` | [JsonNullable\](../../models/components/Expense3ExpenseType.md) | :heavy_minus_sign: | The type of expense. | expense | -| `memo` | *JsonNullable\* | :heavy_minus_sign: | The memo of the expense. | For travel expenses incurred on 2024-05-15 | -| `taxRate` | [Optional\](../../models/components/LinkedTaxRate.md) | :heavy_minus_sign: | N/A | | -| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the expense line item. | 275 | -| `lineItems` | List\<[ExpenseLineItem](../../models/components/ExpenseLineItem.md)> | :heavy_check_mark: | Expense line items linked to this expense. | | -| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference identifier for the transaction. | INV-2024-001 | -| `sourceDocumentUrl` | *JsonNullable\* | :heavy_minus_sign: | URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero. | https://www.invoicesolution.com/expense/123456 | -| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | -| `customMappings` | Map\ | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | -| `status` | [JsonNullable\](../../models/components/Expense3Status.md) | :heavy_minus_sign: | Expense status | draft | -| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | -| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | -| `updatedBy` | *JsonNullable\* | :heavy_minus_sign: | The user who last updated the object. | 12345 | -| `createdBy` | *JsonNullable\* | :heavy_minus_sign: | The user who created the object. | 12345 | -| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/sdks/bankaccounts/README.md b/docs/sdks/bankaccounts/README.md index fb54c8613..9eb0f8385 100644 --- a/docs/sdks/bankaccounts/README.md +++ b/docs/sdks/bankaccounts/README.md @@ -118,8 +118,9 @@ public class Application { .name("Main Operating Account") .accountNumber("123465") .accountType(AccountingBankAccountAccountType.CHECKING) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") + .name("Bank account") .nominalCode("N091") .code("453") .parentId("123456") @@ -281,8 +282,9 @@ public class Application { .name("Main Operating Account") .accountNumber("123465") .accountType(AccountingBankAccountAccountType.CHECKING) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") + .name("Bank account") .nominalCode("N091") .code("453") .parentId("123456") diff --git a/docs/sdks/billpayments/README.md b/docs/sdks/billpayments/README.md index 0df8525af..c68de3b71 100644 --- a/docs/sdks/billpayments/README.md +++ b/docs/sdks/billpayments/README.md @@ -127,7 +127,7 @@ public class Application { .paymentMethod("cash") .paymentMethodReference("123456") .paymentMethodId("12345") - .account(LinkedLedgerAccountInput.builder() + .account(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -378,7 +378,7 @@ public class Application { .paymentMethod("cash") .paymentMethodReference("123456") .paymentMethodId("12345") - .account(LinkedLedgerAccountInput.builder() + .account(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") diff --git a/docs/sdks/bills/README.md b/docs/sdks/bills/README.md index 787dd7eec..2acbf5704 100644 --- a/docs/sdks/bills/README.md +++ b/docs/sdks/bills/README.md @@ -165,7 +165,7 @@ public class Application { .code("120-C") .lineNumber(1L) .description("Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.") - .type(BillLineItemType.EXPENSE_ACCOUNT) + .type(LineItemType.EXPENSE_ACCOUNT) .taxAmount(27500d) .totalAmount(27500d) .quantity(1d) @@ -184,7 +184,7 @@ public class Application { .id("123456") .rate(10d) .build()) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -213,7 +213,7 @@ public class Application { .taxCode("1234") .notes("Some notes about this bill.") .status(BillStatus.DRAFT) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -505,7 +505,7 @@ public class Application { .code("120-C") .lineNumber(1L) .description("Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.") - .type(BillLineItemType.EXPENSE_ACCOUNT) + .type(LineItemType.EXPENSE_ACCOUNT) .taxAmount(27500d) .totalAmount(27500d) .quantity(1d) @@ -524,7 +524,7 @@ public class Application { .id("123456") .rate(10d) .build()) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -541,7 +541,7 @@ public class Application { .code("120-C") .lineNumber(1L) .description("Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.") - .type(BillLineItemType.EXPENSE_ACCOUNT) + .type(LineItemType.EXPENSE_ACCOUNT) .taxAmount(27500d) .totalAmount(27500d) .quantity(1d) @@ -560,7 +560,7 @@ public class Application { .id("123456") .rate(10d) .build()) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -581,7 +581,7 @@ public class Application { .taxCode("1234") .notes("Some notes about this bill.") .status(BillStatus.DRAFT) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") diff --git a/docs/sdks/creditnotes/README.md b/docs/sdks/creditnotes/README.md index a3d17b026..5ec7a41de 100644 --- a/docs/sdks/creditnotes/README.md +++ b/docs/sdks/creditnotes/README.md @@ -139,7 +139,7 @@ public class Application { .dateIssued(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) .datePaid(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) .type(CreditNoteType.ACCOUNTS_RECEIVABLE_CREDIT) - .account(LinkedLedgerAccountInput.builder() + .account(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -179,7 +179,7 @@ public class Application { .id("123456") .name("New York") .build())) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -443,7 +443,7 @@ public class Application { .dateIssued(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) .datePaid(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) .type(CreditNoteType.ACCOUNTS_RECEIVABLE_CREDIT) - .account(LinkedLedgerAccountInput.builder() + .account(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -479,7 +479,7 @@ public class Application { .id("123456") .name("New York") .build())) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") diff --git a/docs/sdks/customers/README.md b/docs/sdks/customers/README.md index a93fedb67..d408b03bb 100644 --- a/docs/sdks/customers/README.md +++ b/docs/sdks/customers/README.md @@ -228,7 +228,7 @@ public class Application { .build()) .taxNumber("US123945459") .currency(Currency.USD) - .account(LinkedLedgerAccountInput.builder() + .account(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -533,7 +533,7 @@ public class Application { .build()) .taxNumber("US123945459") .currency(Currency.USD) - .account(LinkedLedgerAccountInput.builder() + .account(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") diff --git a/docs/sdks/expenses/README.md b/docs/sdks/expenses/README.md index a27948a09..8217ce08b 100644 --- a/docs/sdks/expenses/README.md +++ b/docs/sdks/expenses/README.md @@ -111,9 +111,8 @@ public class Application { .build(); AccountingExpensesAddRequest req = AccountingExpensesAddRequest.builder() - .expense(ExpenseInput.of(Expense1Input.builder() + .expense(ExpenseInput.builder() .transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) - .accountId("123456") .lineItems(List.of( ExpenseLineItemInput.builder() .totalAmount(275d) @@ -144,6 +143,7 @@ public class Application { .lineNumber(1L) .build())) .number("OIT00546") + .accountId("123456") .customerId("12345") .supplierId("12345") .companyId("12345") @@ -223,7 +223,7 @@ public class Application { Map.entry("value", "EUC-99990201-V1-00020000"))))) .build())) .build())) - .build())) + .build()) .serviceId("salesforce") .build(); @@ -354,9 +354,8 @@ public class Application { AccountingExpensesUpdateRequest req = AccountingExpensesUpdateRequest.builder() .id("") - .expense(ExpenseInput.of(Expense1Input.builder() + .expense(ExpenseInput.builder() .transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) - .accountId("123456") .lineItems(List.of( ExpenseLineItemInput.builder() .totalAmount(275d) @@ -387,6 +386,7 @@ public class Application { .lineNumber(1L) .build())) .number("OIT00546") + .accountId("123456") .customerId("12345") .supplierId("12345") .companyId("12345") @@ -440,7 +440,7 @@ public class Application { Map.entry("value", "EUC-99990201-V1-00020000"))))) .build())) .build())) - .build())) + .build()) .serviceId("salesforce") .build(); diff --git a/docs/sdks/invoiceitems/README.md b/docs/sdks/invoiceitems/README.md index 243b85ca5..484822f8d 100644 --- a/docs/sdks/invoiceitems/README.md +++ b/docs/sdks/invoiceitems/README.md @@ -148,17 +148,17 @@ public class Application { .build()) .quantity(1d) .unitPrice(27500.5) - .assetAccount(LinkedLedgerAccountInput.builder() + .assetAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") .build()) - .incomeAccount(LinkedLedgerAccountInput.builder() + .incomeAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") .build()) - .expenseAccount(LinkedLedgerAccountInput.builder() + .expenseAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -355,13 +355,13 @@ public class Application { .build()) .quantity(1d) .unitPrice(27500.5) - .assetAccount(LinkedLedgerAccountInput.builder() + .assetAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") .build()) .incomeAccount(JsonNullable.of(null)) - .expenseAccount(LinkedLedgerAccountInput.builder() + .expenseAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") diff --git a/docs/sdks/invoices/README.md b/docs/sdks/invoices/README.md index 5013d9af3..d793a0c26 100644 --- a/docs/sdks/invoices/README.md +++ b/docs/sdks/invoices/README.md @@ -278,7 +278,7 @@ public class Application { .bankCode("BNH") .currency(Currency.USD) .build()) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -526,7 +526,7 @@ public class Application { .id("123456") .name("New York") .build())) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -634,7 +634,7 @@ public class Application { .bankCode("BNH") .currency(Currency.USD) .build()) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") diff --git a/docs/sdks/journalentries/README.md b/docs/sdks/journalentries/README.md index b4191a868..0d0613d07 100644 --- a/docs/sdks/journalentries/README.md +++ b/docs/sdks/journalentries/README.md @@ -126,7 +126,7 @@ public class Application { .lineItems(List.of( JournalEntryLineItemInput.builder() .type(JournalEntryLineItemType.DEBIT) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -415,7 +415,7 @@ public class Application { .lineItems(List.of( JournalEntryLineItemInput.builder() .type(JournalEntryLineItemType.DEBIT) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index 1645d351e..c9f874d5d 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -127,7 +127,7 @@ public class Application { .paymentMethod("cash") .paymentMethodReference("123456") .paymentMethodId("12345") - .account(LinkedLedgerAccountInput.builder() + .account(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -335,7 +335,7 @@ public class Application { .paymentMethod("cash") .paymentMethodReference("123456") .paymentMethodId("12345") - .account(LinkedLedgerAccountInput.builder() + .account(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") diff --git a/docs/sdks/projects/README.md b/docs/sdks/projects/README.md index fa56553e7..e9ef7a236 100644 --- a/docs/sdks/projects/README.md +++ b/docs/sdks/projects/README.md @@ -154,6 +154,7 @@ public class Application { .phase(ProjectPhase.EXECUTION) .taxRate(LinkedTaxRateInput.builder() .id("123456") + .code("N-T") .rate(10d) .build()) .trackingCategories(List.of( @@ -371,6 +372,7 @@ public class Application { .phase(ProjectPhase.EXECUTION) .taxRate(LinkedTaxRateInput.builder() .id("123456") + .code("N-T") .rate(10d) .build()) .trackingCategories(List.of( diff --git a/docs/sdks/purchaseorders/README.md b/docs/sdks/purchaseorders/README.md index b338c6604..234a72074 100644 --- a/docs/sdks/purchaseorders/README.md +++ b/docs/sdks/purchaseorders/README.md @@ -193,7 +193,7 @@ public class Application { .id("123456") .name("New York") .build())) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -237,7 +237,7 @@ public class Application { .id("123456") .name("New York") .build())) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -281,7 +281,7 @@ public class Application { .id("123456") .name("New York") .build())) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -321,7 +321,7 @@ public class Application { .notes("Address notes or delivery instructions.") .rowVersion("1-12345") .build()) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -613,7 +613,7 @@ public class Application { .rate(10d) .build()) .trackingCategories(JsonNullable.of(null)) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -665,7 +665,7 @@ public class Application { .rate(10d) .build()) .trackingCategories(JsonNullable.of(null)) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -717,7 +717,7 @@ public class Application { .notes("Address notes or delivery instructions.") .rowVersion("1-12345") .build()) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") diff --git a/docs/sdks/quotes/README.md b/docs/sdks/quotes/README.md index d623f4390..13f52068f 100644 --- a/docs/sdks/quotes/README.md +++ b/docs/sdks/quotes/README.md @@ -164,7 +164,7 @@ public class Application { .parentId("123456") .parentName("New York") .build())) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -446,7 +446,7 @@ public class Application { .rate(10d) .build()) .trackingCategories(JsonNullable.of(null)) - .ledgerAccount(LinkedLedgerAccountInput.builder() + .ledgerAccount(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") diff --git a/docs/sdks/suppliers/README.md b/docs/sdks/suppliers/README.md index 49e167186..719aa57af 100644 --- a/docs/sdks/suppliers/README.md +++ b/docs/sdks/suppliers/README.md @@ -219,7 +219,7 @@ public class Application { .build()) .taxNumber("US123945459") .currency(Currency.USD) - .account(LinkedLedgerAccountInput.builder() + .account(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") @@ -495,7 +495,7 @@ public class Application { .build()) .taxNumber("US123945459") .currency(Currency.USD) - .account(LinkedLedgerAccountInput.builder() + .account(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") .code("453") diff --git a/gradle.properties b/gradle.properties index c786e49ac..6e1d2ad2d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.apideck artifactId=unify -version=0.24.0 +version=0.25.0 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/apideck/unify/SDKConfiguration.java b/src/main/java/com/apideck/unify/SDKConfiguration.java index 4012c5621..d7c5d068a 100644 --- a/src/main/java/com/apideck/unify/SDKConfiguration.java +++ b/src/main/java/com/apideck/unify/SDKConfiguration.java @@ -21,8 +21,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "10.21.11"; - public static final String SDK_VERSION = "0.24.0"; - public static final String GEN_VERSION = "2.735.1"; + public static final String SDK_VERSION = "0.25.0"; + public static final String GEN_VERSION = "2.743.2"; private static final String BASE_PACKAGE = "com.apideck.unify"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/com/apideck/unify/models/components/AccountingBankAccountInput.java b/src/main/java/com/apideck/unify/models/components/AccountingBankAccountInput.java index a8f7b9488..f121aafa3 100644 --- a/src/main/java/com/apideck/unify/models/components/AccountingBankAccountInput.java +++ b/src/main/java/com/apideck/unify/models/components/AccountingBankAccountInput.java @@ -50,7 +50,7 @@ public class AccountingBankAccountInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("ledger_account") - private JsonNullable ledgerAccount; + private JsonNullable ledgerAccount; /** * The name of the bank or financial institution @@ -162,7 +162,7 @@ public AccountingBankAccountInput( @JsonProperty("name") JsonNullable name, @JsonProperty("account_number") JsonNullable accountNumber, @JsonProperty("account_type") Optional accountType, - @JsonProperty("ledger_account") JsonNullable ledgerAccount, + @JsonProperty("ledger_account") JsonNullable ledgerAccount, @JsonProperty("bank_name") JsonNullable bankName, @JsonProperty("currency") JsonNullable currency, @JsonProperty("balance") JsonNullable balance, @@ -265,8 +265,8 @@ public Optional accountType() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable ledgerAccount() { - return (JsonNullable) ledgerAccount; + public JsonNullable ledgerAccount() { + return (JsonNullable) ledgerAccount; } /** @@ -468,13 +468,13 @@ public AccountingBankAccountInput withAccountType(Optional ledgerAccount) { + public AccountingBankAccountInput withLedgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; @@ -827,7 +827,7 @@ public final static class Builder { private Optional accountType = Optional.empty(); - private JsonNullable ledgerAccount = JsonNullable.undefined(); + private JsonNullable ledgerAccount = JsonNullable.undefined(); private JsonNullable bankName = JsonNullable.undefined(); @@ -940,13 +940,13 @@ public Builder accountType(Optional } - public Builder ledgerAccount(LinkedLedgerAccountInput ledgerAccount) { + public Builder ledgerAccount(LinkedLedgerAccount ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = JsonNullable.of(ledgerAccount); return this; } - public Builder ledgerAccount(JsonNullable ledgerAccount) { + public Builder ledgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; diff --git a/src/main/java/com/apideck/unify/models/components/Bill.java b/src/main/java/com/apideck/unify/models/components/Bill.java index 48b35248a..d1daeef09 100644 --- a/src/main/java/com/apideck/unify/models/components/Bill.java +++ b/src/main/java/com/apideck/unify/models/components/Bill.java @@ -158,14 +158,14 @@ public class Bill { private JsonNullable deposit; /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("sub_total") private JsonNullable subTotal; /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("total_tax") @@ -687,7 +687,7 @@ public JsonNullable deposit() { } /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ @JsonIgnore public JsonNullable subTotal() { @@ -695,7 +695,7 @@ public JsonNullable subTotal() { } /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ @JsonIgnore public JsonNullable totalTax() { @@ -1272,7 +1272,7 @@ public Bill withDeposit(JsonNullable deposit) { } /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ public Bill withSubTotal(double subTotal) { Utils.checkNotNull(subTotal, "subTotal"); @@ -1281,7 +1281,7 @@ public Bill withSubTotal(double subTotal) { } /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ public Bill withSubTotal(JsonNullable subTotal) { Utils.checkNotNull(subTotal, "subTotal"); @@ -1290,7 +1290,7 @@ public Bill withSubTotal(JsonNullable subTotal) { } /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ public Bill withTotalTax(double totalTax) { Utils.checkNotNull(totalTax, "totalTax"); @@ -1299,7 +1299,7 @@ public Bill withTotalTax(double totalTax) { } /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ public Bill withTotalTax(JsonNullable totalTax) { Utils.checkNotNull(totalTax, "totalTax"); @@ -2396,7 +2396,7 @@ public Builder deposit(JsonNullable deposit) { /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ public Builder subTotal(double subTotal) { Utils.checkNotNull(subTotal, "subTotal"); @@ -2405,7 +2405,7 @@ public Builder subTotal(double subTotal) { } /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ public Builder subTotal(JsonNullable subTotal) { Utils.checkNotNull(subTotal, "subTotal"); @@ -2415,7 +2415,7 @@ public Builder subTotal(JsonNullable subTotal) { /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ public Builder totalTax(double totalTax) { Utils.checkNotNull(totalTax, "totalTax"); @@ -2424,7 +2424,7 @@ public Builder totalTax(double totalTax) { } /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ public Builder totalTax(JsonNullable totalTax) { Utils.checkNotNull(totalTax, "totalTax"); diff --git a/src/main/java/com/apideck/unify/models/components/BillInput.java b/src/main/java/com/apideck/unify/models/components/BillInput.java index 892227e6a..7fb56074d 100644 --- a/src/main/java/com/apideck/unify/models/components/BillInput.java +++ b/src/main/java/com/apideck/unify/models/components/BillInput.java @@ -141,14 +141,14 @@ public class BillInput { private JsonNullable deposit; /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("sub_total") private JsonNullable subTotal; /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("total_tax") @@ -183,7 +183,7 @@ public class BillInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("ledger_account") - private JsonNullable ledgerAccount; + private JsonNullable ledgerAccount; /** * Payment method used for the transaction, such as cash, credit card, bank transfer, or check @@ -334,7 +334,7 @@ public BillInput( @JsonProperty("tax_code") JsonNullable taxCode, @JsonProperty("notes") JsonNullable notes, @JsonProperty("status") JsonNullable status, - @JsonProperty("ledger_account") JsonNullable ledgerAccount, + @JsonProperty("ledger_account") JsonNullable ledgerAccount, @JsonProperty("payment_method") JsonNullable paymentMethod, @JsonProperty("channel") JsonNullable channel, @JsonProperty("language") JsonNullable language, @@ -595,7 +595,7 @@ public JsonNullable deposit() { } /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ @JsonIgnore public JsonNullable subTotal() { @@ -603,7 +603,7 @@ public JsonNullable subTotal() { } /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ @JsonIgnore public JsonNullable totalTax() { @@ -642,8 +642,8 @@ public JsonNullable status() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable ledgerAccount() { - return (JsonNullable) ledgerAccount; + public JsonNullable ledgerAccount() { + return (JsonNullable) ledgerAccount; } /** @@ -1102,7 +1102,7 @@ public BillInput withDeposit(JsonNullable deposit) { } /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ public BillInput withSubTotal(double subTotal) { Utils.checkNotNull(subTotal, "subTotal"); @@ -1111,7 +1111,7 @@ public BillInput withSubTotal(double subTotal) { } /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ public BillInput withSubTotal(JsonNullable subTotal) { Utils.checkNotNull(subTotal, "subTotal"); @@ -1120,7 +1120,7 @@ public BillInput withSubTotal(JsonNullable subTotal) { } /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ public BillInput withTotalTax(double totalTax) { Utils.checkNotNull(totalTax, "totalTax"); @@ -1129,7 +1129,7 @@ public BillInput withTotalTax(double totalTax) { } /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ public BillInput withTotalTax(JsonNullable totalTax) { Utils.checkNotNull(totalTax, "totalTax"); @@ -1203,13 +1203,13 @@ public BillInput withStatus(JsonNullable status) { return this; } - public BillInput withLedgerAccount(LinkedLedgerAccountInput ledgerAccount) { + public BillInput withLedgerAccount(LinkedLedgerAccount ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = JsonNullable.of(ledgerAccount); return this; } - public BillInput withLedgerAccount(JsonNullable ledgerAccount) { + public BillInput withLedgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; @@ -1702,7 +1702,7 @@ public final static class Builder { private JsonNullable status = JsonNullable.undefined(); - private JsonNullable ledgerAccount = JsonNullable.undefined(); + private JsonNullable ledgerAccount = JsonNullable.undefined(); private JsonNullable paymentMethod = JsonNullable.undefined(); @@ -2067,7 +2067,7 @@ public Builder deposit(JsonNullable deposit) { /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ public Builder subTotal(double subTotal) { Utils.checkNotNull(subTotal, "subTotal"); @@ -2076,7 +2076,7 @@ public Builder subTotal(double subTotal) { } /** - * Sub-total amount, normally before tax. + * Subtotal amount, normally before tax. */ public Builder subTotal(JsonNullable subTotal) { Utils.checkNotNull(subTotal, "subTotal"); @@ -2086,7 +2086,7 @@ public Builder subTotal(JsonNullable subTotal) { /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ public Builder totalTax(double totalTax) { Utils.checkNotNull(totalTax, "totalTax"); @@ -2095,7 +2095,7 @@ public Builder totalTax(double totalTax) { } /** - * Total tax amount applied to this bill. + * Total tax amount applied to this transaction. */ public Builder totalTax(JsonNullable totalTax) { Utils.checkNotNull(totalTax, "totalTax"); @@ -2174,13 +2174,13 @@ public Builder status(JsonNullable status) { } - public Builder ledgerAccount(LinkedLedgerAccountInput ledgerAccount) { + public Builder ledgerAccount(LinkedLedgerAccount ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = JsonNullable.of(ledgerAccount); return this; } - public Builder ledgerAccount(JsonNullable ledgerAccount) { + public Builder ledgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; diff --git a/src/main/java/com/apideck/unify/models/components/BillLineItem.java b/src/main/java/com/apideck/unify/models/components/BillLineItem.java index 3375a9c23..c3d9cec78 100644 --- a/src/main/java/com/apideck/unify/models/components/BillLineItem.java +++ b/src/main/java/com/apideck/unify/models/components/BillLineItem.java @@ -58,11 +58,11 @@ public class BillLineItem { private JsonNullable description; /** - * Bill Line Item type + * Line Item type */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("type") - private JsonNullable type; + private JsonNullable type; /** * Tax amount @@ -284,7 +284,7 @@ public BillLineItem( @JsonProperty("code") JsonNullable code, @JsonProperty("line_number") JsonNullable lineNumber, @JsonProperty("description") JsonNullable description, - @JsonProperty("type") JsonNullable type, + @JsonProperty("type") JsonNullable type, @JsonProperty("tax_amount") JsonNullable taxAmount, @JsonProperty("total_amount") JsonNullable totalAmount, @JsonProperty("quantity") JsonNullable quantity, @@ -452,12 +452,12 @@ public JsonNullable description() { } /** - * Bill Line Item type + * Line Item type */ @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable type() { - return (JsonNullable) type; + public JsonNullable type() { + return (JsonNullable) type; } /** @@ -805,18 +805,18 @@ public BillLineItem withDescription(JsonNullable description) { } /** - * Bill Line Item type + * Line Item type */ - public BillLineItem withType(BillLineItemType type) { + public BillLineItem withType(LineItemType type) { Utils.checkNotNull(type, "type"); this.type = JsonNullable.of(type); return this; } /** - * Bill Line Item type + * Line Item type */ - public BillLineItem withType(JsonNullable type) { + public BillLineItem withType(JsonNullable type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -1491,7 +1491,7 @@ public final static class Builder { private JsonNullable description = JsonNullable.undefined(); - private JsonNullable type = JsonNullable.undefined(); + private JsonNullable type = JsonNullable.undefined(); private JsonNullable taxAmount = JsonNullable.undefined(); @@ -1658,18 +1658,18 @@ public Builder description(JsonNullable description) { /** - * Bill Line Item type + * Line Item type */ - public Builder type(BillLineItemType type) { + public Builder type(LineItemType type) { Utils.checkNotNull(type, "type"); this.type = JsonNullable.of(type); return this; } /** - * Bill Line Item type + * Line Item type */ - public Builder type(JsonNullable type) { + public Builder type(JsonNullable type) { Utils.checkNotNull(type, "type"); this.type = type; return this; diff --git a/src/main/java/com/apideck/unify/models/components/BillLineItemInput.java b/src/main/java/com/apideck/unify/models/components/BillLineItemInput.java index 5698ef809..00012819a 100644 --- a/src/main/java/com/apideck/unify/models/components/BillLineItemInput.java +++ b/src/main/java/com/apideck/unify/models/components/BillLineItemInput.java @@ -50,11 +50,11 @@ public class BillLineItemInput { private JsonNullable description; /** - * Bill Line Item type + * Line Item type */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("type") - private JsonNullable type; + private JsonNullable type; /** * Tax amount @@ -198,7 +198,7 @@ public class BillLineItemInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("ledger_account") - private JsonNullable ledgerAccount; + private JsonNullable ledgerAccount; @JsonInclude(Include.NON_ABSENT) @@ -247,7 +247,7 @@ public BillLineItemInput( @JsonProperty("code") JsonNullable code, @JsonProperty("line_number") JsonNullable lineNumber, @JsonProperty("description") JsonNullable description, - @JsonProperty("type") JsonNullable type, + @JsonProperty("type") JsonNullable type, @JsonProperty("tax_amount") JsonNullable taxAmount, @JsonProperty("total_amount") JsonNullable totalAmount, @JsonProperty("quantity") JsonNullable quantity, @@ -269,7 +269,7 @@ public BillLineItemInput( @JsonProperty("payment_amount") JsonNullable paymentAmount, @JsonProperty("item") Optional item, @JsonProperty("tax_rate") Optional taxRate, - @JsonProperty("ledger_account") JsonNullable ledgerAccount, + @JsonProperty("ledger_account") JsonNullable ledgerAccount, @JsonProperty("purchase_order") JsonNullable purchaseOrder, @JsonProperty("tracking_categories") JsonNullable> trackingCategories, @JsonProperty("customer") JsonNullable customer, @@ -391,12 +391,12 @@ public JsonNullable description() { } /** - * Bill Line Item type + * Line Item type */ @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable type() { - return (JsonNullable) type; + public JsonNullable type() { + return (JsonNullable) type; } /** @@ -559,8 +559,8 @@ public Optional taxRate() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable ledgerAccount() { - return (JsonNullable) ledgerAccount; + public JsonNullable ledgerAccount() { + return (JsonNullable) ledgerAccount; } @SuppressWarnings("unchecked") @@ -693,18 +693,18 @@ public BillLineItemInput withDescription(JsonNullable description) { } /** - * Bill Line Item type + * Line Item type */ - public BillLineItemInput withType(BillLineItemType type) { + public BillLineItemInput withType(LineItemType type) { Utils.checkNotNull(type, "type"); this.type = JsonNullable.of(type); return this; } /** - * Bill Line Item type + * Line Item type */ - public BillLineItemInput withType(JsonNullable type) { + public BillLineItemInput withType(JsonNullable type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -1066,13 +1066,13 @@ public BillLineItemInput withTaxRate(Optional taxR return this; } - public BillLineItemInput withLedgerAccount(LinkedLedgerAccountInput ledgerAccount) { + public BillLineItemInput withLedgerAccount(LinkedLedgerAccount ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = JsonNullable.of(ledgerAccount); return this; } - public BillLineItemInput withLedgerAccount(JsonNullable ledgerAccount) { + public BillLineItemInput withLedgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; @@ -1293,7 +1293,7 @@ public final static class Builder { private JsonNullable description = JsonNullable.undefined(); - private JsonNullable type = JsonNullable.undefined(); + private JsonNullable type = JsonNullable.undefined(); private JsonNullable taxAmount = JsonNullable.undefined(); @@ -1337,7 +1337,7 @@ public final static class Builder { private Optional taxRate = Optional.empty(); - private JsonNullable ledgerAccount = JsonNullable.undefined(); + private JsonNullable ledgerAccount = JsonNullable.undefined(); private JsonNullable purchaseOrder = JsonNullable.undefined(); @@ -1433,18 +1433,18 @@ public Builder description(JsonNullable description) { /** - * Bill Line Item type + * Line Item type */ - public Builder type(BillLineItemType type) { + public Builder type(LineItemType type) { Utils.checkNotNull(type, "type"); this.type = JsonNullable.of(type); return this; } /** - * Bill Line Item type + * Line Item type */ - public Builder type(JsonNullable type) { + public Builder type(JsonNullable type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -1826,13 +1826,13 @@ public Builder taxRate(Optional taxRate) { } - public Builder ledgerAccount(LinkedLedgerAccountInput ledgerAccount) { + public Builder ledgerAccount(LinkedLedgerAccount ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = JsonNullable.of(ledgerAccount); return this; } - public Builder ledgerAccount(JsonNullable ledgerAccount) { + public Builder ledgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; diff --git a/src/main/java/com/apideck/unify/models/components/BillPaymentInput.java b/src/main/java/com/apideck/unify/models/components/BillPaymentInput.java index 5e193f25a..bf28b465e 100644 --- a/src/main/java/com/apideck/unify/models/components/BillPaymentInput.java +++ b/src/main/java/com/apideck/unify/models/components/BillPaymentInput.java @@ -74,7 +74,7 @@ public class BillPaymentInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("account") - private JsonNullable account; + private JsonNullable account; /** * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD @@ -181,7 +181,7 @@ public BillPaymentInput( @JsonProperty("payment_method") JsonNullable paymentMethod, @JsonProperty("payment_method_reference") JsonNullable paymentMethodReference, @JsonProperty("payment_method_id") JsonNullable paymentMethodId, - @JsonProperty("account") JsonNullable account, + @JsonProperty("account") JsonNullable account, @JsonProperty("transaction_date") Optional transactionDate, @JsonProperty("supplier") JsonNullable supplier, @JsonProperty("company_id") JsonNullable companyId, @@ -313,8 +313,8 @@ public JsonNullable paymentMethodId() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable account() { - return (JsonNullable) account; + public JsonNullable account() { + return (JsonNullable) account; } /** @@ -566,13 +566,13 @@ public BillPaymentInput withPaymentMethodId(JsonNullable paymentMethodId return this; } - public BillPaymentInput withAccount(LinkedLedgerAccountInput account) { + public BillPaymentInput withAccount(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public BillPaymentInput withAccount(JsonNullable account) { + public BillPaymentInput withAccount(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; @@ -919,7 +919,7 @@ public final static class Builder { private JsonNullable paymentMethodId = JsonNullable.undefined(); - private JsonNullable account = JsonNullable.undefined(); + private JsonNullable account = JsonNullable.undefined(); private Optional transactionDate = Optional.empty(); @@ -1089,13 +1089,13 @@ public Builder paymentMethodId(JsonNullable paymentMethodId) { } - public Builder account(LinkedLedgerAccountInput account) { + public Builder account(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public Builder account(JsonNullable account) { + public Builder account(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; diff --git a/src/main/java/com/apideck/unify/models/components/CreditNoteInput.java b/src/main/java/com/apideck/unify/models/components/CreditNoteInput.java index 0e9970816..b9bda122f 100644 --- a/src/main/java/com/apideck/unify/models/components/CreditNoteInput.java +++ b/src/main/java/com/apideck/unify/models/components/CreditNoteInput.java @@ -150,7 +150,7 @@ public class CreditNoteInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("account") - private JsonNullable account; + private JsonNullable account; @JsonInclude(Include.NON_ABSENT) @@ -234,7 +234,7 @@ public CreditNoteInput( @JsonProperty("date_issued") Optional dateIssued, @JsonProperty("date_paid") JsonNullable datePaid, @JsonProperty("type") Optional type, - @JsonProperty("account") JsonNullable account, + @JsonProperty("account") JsonNullable account, @JsonProperty("line_items") Optional> lineItems, @JsonProperty("allocations") Optional> allocations, @JsonProperty("note") JsonNullable note, @@ -470,8 +470,8 @@ public Optional type() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable account() { - return (JsonNullable) account; + public JsonNullable account() { + return (JsonNullable) account; } @SuppressWarnings("unchecked") @@ -873,13 +873,13 @@ public CreditNoteInput withType(Optional type) { return this; } - public CreditNoteInput withAccount(LinkedLedgerAccountInput account) { + public CreditNoteInput withAccount(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public CreditNoteInput withAccount(JsonNullable account) { + public CreditNoteInput withAccount(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; @@ -1174,7 +1174,7 @@ public final static class Builder { private Optional type = Optional.empty(); - private JsonNullable account = JsonNullable.undefined(); + private JsonNullable account = JsonNullable.undefined(); private Optional> lineItems = Optional.empty(); @@ -1536,13 +1536,13 @@ public Builder type(Optional type) { } - public Builder account(LinkedLedgerAccountInput account) { + public Builder account(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public Builder account(JsonNullable account) { + public Builder account(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; diff --git a/src/main/java/com/apideck/unify/models/components/CustomerInput.java b/src/main/java/com/apideck/unify/models/components/CustomerInput.java index 9addb1e8a..dfee4edcb 100644 --- a/src/main/java/com/apideck/unify/models/components/CustomerInput.java +++ b/src/main/java/com/apideck/unify/models/components/CustomerInput.java @@ -154,7 +154,7 @@ public class CustomerInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("account") - private JsonNullable account; + private JsonNullable account; /** * The parent customer this entity is linked to. @@ -235,7 +235,7 @@ public CustomerInput( @JsonProperty("tax_rate") Optional taxRate, @JsonProperty("tax_number") JsonNullable taxNumber, @JsonProperty("currency") JsonNullable currency, - @JsonProperty("account") JsonNullable account, + @JsonProperty("account") JsonNullable account, @JsonProperty("parent") JsonNullable parent, @JsonProperty("status") JsonNullable status, @JsonProperty("payment_method") JsonNullable paymentMethod, @@ -473,8 +473,8 @@ public JsonNullable currency() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable account() { - return (JsonNullable) account; + public JsonNullable account() { + return (JsonNullable) account; } /** @@ -887,13 +887,13 @@ public CustomerInput withCurrency(JsonNullable currency) { return this; } - public CustomerInput withAccount(LinkedLedgerAccountInput account) { + public CustomerInput withAccount(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public CustomerInput withAccount(JsonNullable account) { + public CustomerInput withAccount(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; @@ -1180,7 +1180,7 @@ public final static class Builder { private JsonNullable currency = JsonNullable.undefined(); - private JsonNullable account = JsonNullable.undefined(); + private JsonNullable account = JsonNullable.undefined(); private JsonNullable parent = JsonNullable.undefined(); @@ -1556,13 +1556,13 @@ public Builder currency(JsonNullable currency) { } - public Builder account(LinkedLedgerAccountInput account) { + public Builder account(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public Builder account(JsonNullable account) { + public Builder account(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; diff --git a/src/main/java/com/apideck/unify/models/components/Expense.java b/src/main/java/com/apideck/unify/models/components/Expense.java index 3ef216f8d..a9ab2f38d 100644 --- a/src/main/java/com/apideck/unify/models/components/Expense.java +++ b/src/main/java/com/apideck/unify/models/components/Expense.java @@ -3,66 +3,1252 @@ */ package com.apideck.unify.models.components; -import com.apideck.unify.utils.OneOfDeserializer; -import com.apideck.unify.utils.TypedObject; -import com.apideck.unify.utils.Utils.JsonShape; -import com.apideck.unify.utils.Utils.TypeReferenceWithShape; import com.apideck.unify.utils.Utils; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Deprecated; +import java.lang.Double; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + -@JsonDeserialize(using = Expense._Deserializer.class) public class Expense { + /** + * A unique identifier for an object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * Number. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("number") + private JsonNullable number; + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("transaction_date") + private Optional transactionDate; + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account_id") + @Deprecated + private Optional accountId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bank_account") + private JsonNullable bankAccount; + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer_id") + private Optional customerId; + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("supplier_id") + @Deprecated + private Optional supplierId; + + /** + * The supplier this entity is linked to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("supplier") + private JsonNullable supplier; + + /** + * The company ID the transaction belongs to + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("company_id") + private JsonNullable companyId; + + /** + * The ID of the department + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("department_id") + private JsonNullable departmentId; + + /** + * The type of payment for the expense. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_type") + private JsonNullable paymentType; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency_rate") + private JsonNullable currencyRate; + + /** + * The type of expense. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private JsonNullable type; + + /** + * The memo of the expense. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("memo") + private JsonNullable memo; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_rate") + private Optional taxRate; + + /** + * Amounts are including tax + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_inclusive") + private JsonNullable taxInclusive; + + /** + * Subtotal amount, normally before tax. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sub_total") + private JsonNullable subTotal; + + /** + * Total tax amount applied to this transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_tax") + private JsonNullable totalTax; + + /** + * The total amount of the expense line item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_amount") + private JsonNullable totalAmount; + + /** + * Expense line items linked to this expense. + */ + @JsonProperty("line_items") + private List lineItems; + + /** + * Optional reference identifier for the transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference") + private JsonNullable reference; + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_document_url") + private JsonNullable sourceDocumentUrl; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_mappings") + private JsonNullable> customMappings; + + /** + * Expense status + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private JsonNullable status; + + /** + * The date and time when the object was last updated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updated_at") + private JsonNullable updatedAt; + + /** + * The date and time when the object was created. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("created_at") + private JsonNullable createdAt; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The user who last updated the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updated_by") + private JsonNullable updatedBy; + + /** + * The user who created the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("created_by") + private JsonNullable createdBy; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public Expense( + @JsonProperty("id") Optional id, + @JsonProperty("number") JsonNullable number, + @JsonProperty("transaction_date") Optional transactionDate, + @JsonProperty("account_id") Optional accountId, + @JsonProperty("account") JsonNullable account, + @JsonProperty("bank_account") JsonNullable bankAccount, + @JsonProperty("customer_id") Optional customerId, + @JsonProperty("supplier_id") Optional supplierId, + @JsonProperty("supplier") JsonNullable supplier, + @JsonProperty("company_id") JsonNullable companyId, + @JsonProperty("department_id") JsonNullable departmentId, + @JsonProperty("payment_type") JsonNullable paymentType, + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("currency_rate") JsonNullable currencyRate, + @JsonProperty("type") JsonNullable type, + @JsonProperty("memo") JsonNullable memo, + @JsonProperty("tax_rate") Optional taxRate, + @JsonProperty("tax_inclusive") JsonNullable taxInclusive, + @JsonProperty("sub_total") JsonNullable subTotal, + @JsonProperty("total_tax") JsonNullable totalTax, + @JsonProperty("total_amount") JsonNullable totalAmount, + @JsonProperty("line_items") List lineItems, + @JsonProperty("reference") JsonNullable reference, + @JsonProperty("source_document_url") JsonNullable sourceDocumentUrl, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("custom_mappings") JsonNullable> customMappings, + @JsonProperty("status") JsonNullable status, + @JsonProperty("updated_at") JsonNullable updatedAt, + @JsonProperty("created_at") JsonNullable createdAt, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("updated_by") JsonNullable updatedBy, + @JsonProperty("created_by") JsonNullable createdBy, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(number, "number"); + Utils.checkNotNull(transactionDate, "transactionDate"); + Utils.checkNotNull(accountId, "accountId"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(bankAccount, "bankAccount"); + Utils.checkNotNull(customerId, "customerId"); + Utils.checkNotNull(supplierId, "supplierId"); + Utils.checkNotNull(supplier, "supplier"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(departmentId, "departmentId"); + Utils.checkNotNull(paymentType, "paymentType"); + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(currencyRate, "currencyRate"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(memo, "memo"); + Utils.checkNotNull(taxRate, "taxRate"); + Utils.checkNotNull(taxInclusive, "taxInclusive"); + Utils.checkNotNull(subTotal, "subTotal"); + Utils.checkNotNull(totalTax, "totalTax"); + Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(lineItems, "lineItems"); + Utils.checkNotNull(reference, "reference"); + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(customMappings, "customMappings"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(updatedBy, "updatedBy"); + Utils.checkNotNull(createdBy, "createdBy"); + Utils.checkNotNull(passThrough, "passThrough"); + this.id = id; + this.number = number; + this.transactionDate = transactionDate; + this.accountId = accountId; + this.account = account; + this.bankAccount = bankAccount; + this.customerId = customerId; + this.supplierId = supplierId; + this.supplier = supplier; + this.companyId = companyId; + this.departmentId = departmentId; + this.paymentType = paymentType; + this.currency = currency; + this.currencyRate = currencyRate; + this.type = type; + this.memo = memo; + this.taxRate = taxRate; + this.taxInclusive = taxInclusive; + this.subTotal = subTotal; + this.totalTax = totalTax; + this.totalAmount = totalAmount; + this.lineItems = lineItems; + this.reference = reference; + this.sourceDocumentUrl = sourceDocumentUrl; + this.customFields = customFields; + this.customMappings = customMappings; + this.status = status; + this.updatedAt = updatedAt; + this.createdAt = createdAt; + this.rowVersion = rowVersion; + this.updatedBy = updatedBy; + this.createdBy = createdBy; + this.passThrough = passThrough; + } + + public Expense( + List lineItems) { + this(Optional.empty(), JsonNullable.undefined(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + lineItems, JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty()); + } + + /** + * A unique identifier for an object. + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * Number. + */ + @JsonIgnore + public JsonNullable number() { + return number; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonIgnore + public Optional transactionDate() { + return transactionDate; + } + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + @JsonIgnore + public Optional accountId() { + return accountId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable bankAccount() { + return (JsonNullable) bankAccount; + } + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + @JsonIgnore + public Optional customerId() { + return customerId; + } + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + @JsonIgnore + public Optional supplierId() { + return supplierId; + } + + /** + * The supplier this entity is linked to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable supplier() { + return (JsonNullable) supplier; + } + + /** + * The company ID the transaction belongs to + */ + @JsonIgnore + public JsonNullable companyId() { + return companyId; + } + + /** + * The ID of the department + */ + @JsonIgnore + public JsonNullable departmentId() { + return departmentId; + } + + /** + * The type of payment for the expense. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable paymentType() { + return (JsonNullable) paymentType; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonIgnore + public JsonNullable currencyRate() { + return currencyRate; + } + + /** + * The type of expense. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable type() { + return (JsonNullable) type; + } + + /** + * The memo of the expense. + */ + @JsonIgnore + public JsonNullable memo() { + return memo; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional taxRate() { + return (Optional) taxRate; + } + + /** + * Amounts are including tax + */ + @JsonIgnore + public JsonNullable taxInclusive() { + return taxInclusive; + } + + /** + * Subtotal amount, normally before tax. + */ + @JsonIgnore + public JsonNullable subTotal() { + return subTotal; + } + + /** + * Total tax amount applied to this transaction. + */ + @JsonIgnore + public JsonNullable totalTax() { + return totalTax; + } + + /** + * The total amount of the expense line item. + */ + @JsonIgnore + public JsonNullable totalAmount() { + return totalAmount; + } + + /** + * Expense line items linked to this expense. + */ + @JsonIgnore + public List lineItems() { + return lineItems; + } + + /** + * Optional reference identifier for the transaction. + */ + @JsonIgnore + public JsonNullable reference() { + return reference; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + @JsonIgnore + public JsonNullable sourceDocumentUrl() { + return sourceDocumentUrl; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> customMappings() { + return (JsonNullable>) customMappings; + } + + /** + * Expense status + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable status() { + return (JsonNullable) status; + } + + /** + * The date and time when the object was last updated. + */ + @JsonIgnore + public JsonNullable updatedAt() { + return updatedAt; + } + + /** + * The date and time when the object was created. + */ + @JsonIgnore + public JsonNullable createdAt() { + return createdAt; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The user who last updated the object. + */ + @JsonIgnore + public JsonNullable updatedBy() { + return updatedBy; + } + + /** + * The user who created the object. + */ + @JsonIgnore + public JsonNullable createdBy() { + return createdBy; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A unique identifier for an object. + */ + public Expense withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * A unique identifier for an object. + */ + public Expense withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Number. + */ + public Expense withNumber(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Number. + */ + public Expense withNumber(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Expense withTransactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = Optional.ofNullable(transactionDate); + return this; + } + + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Expense withTransactionDate(Optional transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Expense withAccountId(String accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = Optional.ofNullable(accountId); + return this; + } + + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Expense withAccountId(Optional accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = accountId; + return this; + } + + public Expense withAccount(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Expense withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + public Expense withBankAccount(LinkedBankAccount bankAccount) { + Utils.checkNotNull(bankAccount, "bankAccount"); + this.bankAccount = JsonNullable.of(bankAccount); + return this; + } + + public Expense withBankAccount(JsonNullable bankAccount) { + Utils.checkNotNull(bankAccount, "bankAccount"); + this.bankAccount = bankAccount; + return this; + } + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + public Expense withCustomerId(String customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = Optional.ofNullable(customerId); + return this; + } + + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + public Expense withCustomerId(Optional customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = customerId; + return this; + } + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Expense withSupplierId(String supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = Optional.ofNullable(supplierId); + return this; + } + + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Expense withSupplierId(Optional supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = supplierId; + return this; + } + + /** + * The supplier this entity is linked to. + */ + public Expense withSupplier(LinkedSupplier supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = JsonNullable.of(supplier); + return this; + } + + /** + * The supplier this entity is linked to. + */ + public Expense withSupplier(JsonNullable supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = supplier; + return this; + } + + /** + * The company ID the transaction belongs to + */ + public Expense withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public Expense withCompanyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + /** + * The ID of the department + */ + public Expense withDepartmentId(String departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = JsonNullable.of(departmentId); + return this; + } + + /** + * The ID of the department + */ + public Expense withDepartmentId(JsonNullable departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = departmentId; + return this; + } + + /** + * The type of payment for the expense. + */ + public Expense withPaymentType(ExpensePaymentType paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = JsonNullable.of(paymentType); + return this; + } + + /** + * The type of payment for the expense. + */ + public Expense withPaymentType(JsonNullable paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = paymentType; + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Expense withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Expense withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Expense withCurrencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Expense withCurrencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + /** + * The type of expense. + */ + public Expense withType(ExpenseType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * The type of expense. + */ + public Expense withType(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The memo of the expense. + */ + public Expense withMemo(String memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = JsonNullable.of(memo); + return this; + } + + /** + * The memo of the expense. + */ + public Expense withMemo(JsonNullable memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = memo; + return this; + } + + public Expense withTaxRate(LinkedTaxRate taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = Optional.ofNullable(taxRate); + return this; + } + + + public Expense withTaxRate(Optional taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = taxRate; + return this; + } + + /** + * Amounts are including tax + */ + public Expense withTaxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public Expense withTaxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public Expense withSubTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public Expense withSubTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public Expense withTotalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public Expense withTotalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + /** + * The total amount of the expense line item. + */ + public Expense withTotalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the expense line item. + */ + public Expense withTotalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + /** + * Expense line items linked to this expense. + */ + public Expense withLineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public Expense withReference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public Expense withReference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public Expense withSourceDocumentUrl(String sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); + return this; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public Expense withSourceDocumentUrl(JsonNullable sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = sourceDocumentUrl; + return this; + } + + public Expense withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public Expense withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } - @JsonValue - private TypedObject value; - - private Expense(TypedObject value) { - this.value = value; + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public Expense withCustomMappings(Map customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = JsonNullable.of(customMappings); + return this; } - public static Expense of(Expense1 value) { - Utils.checkNotNull(value, "value"); - return new Expense(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public Expense withCustomMappings(JsonNullable> customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = customMappings; + return this; } - public static Expense of(Expense2 value) { - Utils.checkNotNull(value, "value"); - return new Expense(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + /** + * Expense status + */ + public Expense withStatus(ExpenseStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; } - public static Expense of(Three value) { - Utils.checkNotNull(value, "value"); - return new Expense(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + /** + * Expense status + */ + public Expense withStatus(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; } - + /** - * Returns an instance of one of these types: - *
    - *
  • {@code com.apideck.unify.models.components.Expense1}
  • - *
  • {@code com.apideck.unify.models.components.Expense2}
  • - *
  • {@code com.apideck.unify.models.components.Three}
  • - *
- * - *

Use {@code instanceof} to determine what type is returned. For example: - * - *

-     * if (obj.value() instanceof String) {
-     *     String answer = (String) obj.value();
-     *     System.out.println("answer=" + answer);
-     * }
-     * 
- * - * @return value of oneOf type - **/ - public java.lang.Object value() { - return value.value(); - } - + * The date and time when the object was last updated. + */ + public Expense withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + /** + * The date and time when the object was last updated. + */ + public Expense withUpdatedAt(JsonNullable updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * The date and time when the object was created. + */ + public Expense withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = JsonNullable.of(createdAt); + return this; + } + + /** + * The date and time when the object was created. + */ + public Expense withCreatedAt(JsonNullable createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Expense withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Expense withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The user who last updated the object. + */ + public Expense withUpdatedBy(String updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + /** + * The user who last updated the object. + */ + public Expense withUpdatedBy(JsonNullable updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = updatedBy; + return this; + } + + /** + * The user who created the object. + */ + public Expense withCreatedBy(String createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = JsonNullable.of(createdBy); + return this; + } + + /** + * The user who created the object. + */ + public Expense withCreatedBy(JsonNullable createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = createdBy; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Expense withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Expense withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,30 +1258,804 @@ public boolean equals(java.lang.Object o) { return false; } Expense other = (Expense) o; - return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.number, other.number) && + Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && + Utils.enhancedDeepEquals(this.accountId, other.accountId) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.bankAccount, other.bankAccount) && + Utils.enhancedDeepEquals(this.customerId, other.customerId) && + Utils.enhancedDeepEquals(this.supplierId, other.supplierId) && + Utils.enhancedDeepEquals(this.supplier, other.supplier) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.departmentId, other.departmentId) && + Utils.enhancedDeepEquals(this.paymentType, other.paymentType) && + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.memo, other.memo) && + Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && + Utils.enhancedDeepEquals(this.taxInclusive, other.taxInclusive) && + Utils.enhancedDeepEquals(this.subTotal, other.subTotal) && + Utils.enhancedDeepEquals(this.totalTax, other.totalTax) && + Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && + Utils.enhancedDeepEquals(this.reference, other.reference) && + Utils.enhancedDeepEquals(this.sourceDocumentUrl, other.sourceDocumentUrl) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.customMappings, other.customMappings) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.updatedBy, other.updatedBy) && + Utils.enhancedDeepEquals(this.createdBy, other.createdBy) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); } @Override public int hashCode() { - return Utils.enhancedHash(value.value()); - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends OneOfDeserializer { - - public _Deserializer() { - super(Expense.class, false, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); - } + return Utils.enhancedHash( + id, number, transactionDate, + accountId, account, bankAccount, + customerId, supplierId, supplier, + companyId, departmentId, paymentType, + currency, currencyRate, type, + memo, taxRate, taxInclusive, + subTotal, totalTax, totalAmount, + lineItems, reference, sourceDocumentUrl, + customFields, customMappings, status, + updatedAt, createdAt, rowVersion, + updatedBy, createdBy, passThrough); } @Override public String toString() { return Utils.toString(Expense.class, - "value", value); + "id", id, + "number", number, + "transactionDate", transactionDate, + "accountId", accountId, + "account", account, + "bankAccount", bankAccount, + "customerId", customerId, + "supplierId", supplierId, + "supplier", supplier, + "companyId", companyId, + "departmentId", departmentId, + "paymentType", paymentType, + "currency", currency, + "currencyRate", currencyRate, + "type", type, + "memo", memo, + "taxRate", taxRate, + "taxInclusive", taxInclusive, + "subTotal", subTotal, + "totalTax", totalTax, + "totalAmount", totalAmount, + "lineItems", lineItems, + "reference", reference, + "sourceDocumentUrl", sourceDocumentUrl, + "customFields", customFields, + "customMappings", customMappings, + "status", status, + "updatedAt", updatedAt, + "createdAt", createdAt, + "rowVersion", rowVersion, + "updatedBy", updatedBy, + "createdBy", createdBy, + "passThrough", passThrough); } - -} + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional id = Optional.empty(); + + private JsonNullable number = JsonNullable.undefined(); + + private Optional transactionDate = Optional.empty(); + + @Deprecated + private Optional accountId = Optional.empty(); + + private JsonNullable account = JsonNullable.undefined(); + + private JsonNullable bankAccount = JsonNullable.undefined(); + + private Optional customerId = Optional.empty(); + + @Deprecated + private Optional supplierId = Optional.empty(); + + private JsonNullable supplier = JsonNullable.undefined(); + + private JsonNullable companyId = JsonNullable.undefined(); + + private JsonNullable departmentId = JsonNullable.undefined(); + + private JsonNullable paymentType = JsonNullable.undefined(); + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable currencyRate = JsonNullable.undefined(); + + private JsonNullable type = JsonNullable.undefined(); + + private JsonNullable memo = JsonNullable.undefined(); + + private Optional taxRate = Optional.empty(); + + private JsonNullable taxInclusive = JsonNullable.undefined(); + + private JsonNullable subTotal = JsonNullable.undefined(); + + private JsonNullable totalTax = JsonNullable.undefined(); + + private JsonNullable totalAmount = JsonNullable.undefined(); + + private List lineItems; + + private JsonNullable reference = JsonNullable.undefined(); + + private JsonNullable sourceDocumentUrl = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable> customMappings = JsonNullable.undefined(); + + private JsonNullable status = JsonNullable.undefined(); + + private JsonNullable updatedAt = JsonNullable.undefined(); + + private JsonNullable createdAt = JsonNullable.undefined(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private JsonNullable updatedBy = JsonNullable.undefined(); + + private JsonNullable createdBy = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * A unique identifier for an object. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * A unique identifier for an object. + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * Number. + */ + public Builder number(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Number. + */ + public Builder number(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = Optional.ofNullable(transactionDate); + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(Optional transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Builder accountId(String accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = Optional.ofNullable(accountId); + return this; + } + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Builder accountId(Optional accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = accountId; + return this; + } + + + public Builder account(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + public Builder bankAccount(LinkedBankAccount bankAccount) { + Utils.checkNotNull(bankAccount, "bankAccount"); + this.bankAccount = JsonNullable.of(bankAccount); + return this; + } + + public Builder bankAccount(JsonNullable bankAccount) { + Utils.checkNotNull(bankAccount, "bankAccount"); + this.bankAccount = bankAccount; + return this; + } + + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + public Builder customerId(String customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = Optional.ofNullable(customerId); + return this; + } + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + public Builder customerId(Optional customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = customerId; + return this; + } + + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Builder supplierId(String supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = Optional.ofNullable(supplierId); + return this; + } + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Builder supplierId(Optional supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = supplierId; + return this; + } + + + /** + * The supplier this entity is linked to. + */ + public Builder supplier(LinkedSupplier supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = JsonNullable.of(supplier); + return this; + } + + /** + * The supplier this entity is linked to. + */ + public Builder supplier(JsonNullable supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = supplier; + return this; + } + + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + /** + * The ID of the department + */ + public Builder departmentId(String departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = JsonNullable.of(departmentId); + return this; + } + + /** + * The ID of the department + */ + public Builder departmentId(JsonNullable departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = departmentId; + return this; + } + + + /** + * The type of payment for the expense. + */ + public Builder paymentType(ExpensePaymentType paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = JsonNullable.of(paymentType); + return this; + } + + /** + * The type of payment for the expense. + */ + public Builder paymentType(JsonNullable paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = paymentType; + return this; + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + + /** + * The type of expense. + */ + public Builder type(ExpenseType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * The type of expense. + */ + public Builder type(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The memo of the expense. + */ + public Builder memo(String memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = JsonNullable.of(memo); + return this; + } + + /** + * The memo of the expense. + */ + public Builder memo(JsonNullable memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = memo; + return this; + } + + + public Builder taxRate(LinkedTaxRate taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = Optional.ofNullable(taxRate); + return this; + } + + public Builder taxRate(Optional taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = taxRate; + return this; + } + + + /** + * Amounts are including tax + */ + public Builder taxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public Builder taxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + + /** + * The total amount of the expense line item. + */ + public Builder totalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the expense line item. + */ + public Builder totalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + + /** + * Expense line items linked to this expense. + */ + public Builder lineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + + /** + * Optional reference identifier for the transaction. + */ + public Builder reference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public Builder reference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public Builder sourceDocumentUrl(String sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); + return this; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public Builder sourceDocumentUrl(JsonNullable sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = sourceDocumentUrl; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public Builder customMappings(Map customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = JsonNullable.of(customMappings); + return this; + } + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public Builder customMappings(JsonNullable> customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = customMappings; + return this; + } + + + /** + * Expense status + */ + public Builder status(ExpenseStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * Expense status + */ + public Builder status(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * The date and time when the object was last updated. + */ + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + /** + * The date and time when the object was last updated. + */ + public Builder updatedAt(JsonNullable updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + /** + * The date and time when the object was created. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = JsonNullable.of(createdAt); + return this; + } + + /** + * The date and time when the object was created. + */ + public Builder createdAt(JsonNullable createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The user who last updated the object. + */ + public Builder updatedBy(String updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + /** + * The user who last updated the object. + */ + public Builder updatedBy(JsonNullable updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = updatedBy; + return this; + } + + + /** + * The user who created the object. + */ + public Builder createdBy(String createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = JsonNullable.of(createdBy); + return this; + } + + /** + * The user who created the object. + */ + public Builder createdBy(JsonNullable createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = createdBy; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public Expense build() { + + return new Expense( + id, number, transactionDate, + accountId, account, bankAccount, + customerId, supplierId, supplier, + companyId, departmentId, paymentType, + currency, currencyRate, type, + memo, taxRate, taxInclusive, + subTotal, totalTax, totalAmount, + lineItems, reference, sourceDocumentUrl, + customFields, customMappings, status, + updatedAt, createdAt, rowVersion, + updatedBy, createdBy, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/Expense1.java b/src/main/java/com/apideck/unify/models/components/Expense1.java deleted file mode 100644 index 9107f6f83..000000000 --- a/src/main/java/com/apideck/unify/models/components/Expense1.java +++ /dev/null @@ -1,1774 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.apideck.unify.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Deprecated; -import java.lang.Double; -import java.lang.Object; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - - -public class Expense1 { - /** - * A unique identifier for an object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - /** - * Number. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("number") - private JsonNullable number; - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("transaction_date") - private Optional transactionDate; - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @JsonProperty("account_id") - @Deprecated - private String accountId; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("account") - private JsonNullable account; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bank_account") - private JsonNullable bankAccount; - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("customer_id") - private Optional customerId; - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("supplier_id") - private Optional supplierId; - - /** - * The company ID the transaction belongs to - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("company_id") - private JsonNullable companyId; - - /** - * The ID of the department - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("department_id") - private JsonNullable departmentId; - - /** - * The type of payment for the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("payment_type") - private JsonNullable paymentType; - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency") - private JsonNullable currency; - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency_rate") - private JsonNullable currencyRate; - - /** - * The type of expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private JsonNullable type; - - /** - * The memo of the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("memo") - private JsonNullable memo; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tax_rate") - private Optional taxRate; - - /** - * The total amount of the expense line item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("total_amount") - private JsonNullable totalAmount; - - /** - * Expense line items linked to this expense. - */ - @JsonProperty("line_items") - private List lineItems; - - /** - * Optional reference identifier for the transaction. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("reference") - private JsonNullable reference; - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("source_document_url") - private JsonNullable sourceDocumentUrl; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("custom_fields") - private Optional> customFields; - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("custom_mappings") - private JsonNullable> customMappings; - - /** - * Expense status - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private JsonNullable status; - - /** - * The date and time when the object was last updated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updated_at") - private JsonNullable updatedAt; - - /** - * The date and time when the object was created. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("created_at") - private JsonNullable createdAt; - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("row_version") - private JsonNullable rowVersion; - - /** - * The user who last updated the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updated_by") - private JsonNullable updatedBy; - - /** - * The user who created the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("created_by") - private JsonNullable createdBy; - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("pass_through") - private Optional> passThrough; - - @JsonCreator - public Expense1( - @JsonProperty("id") Optional id, - @JsonProperty("number") JsonNullable number, - @JsonProperty("transaction_date") Optional transactionDate, - @JsonProperty("account_id") String accountId, - @JsonProperty("account") JsonNullable account, - @JsonProperty("bank_account") JsonNullable bankAccount, - @JsonProperty("customer_id") Optional customerId, - @JsonProperty("supplier_id") Optional supplierId, - @JsonProperty("company_id") JsonNullable companyId, - @JsonProperty("department_id") JsonNullable departmentId, - @JsonProperty("payment_type") JsonNullable paymentType, - @JsonProperty("currency") JsonNullable currency, - @JsonProperty("currency_rate") JsonNullable currencyRate, - @JsonProperty("type") JsonNullable type, - @JsonProperty("memo") JsonNullable memo, - @JsonProperty("tax_rate") Optional taxRate, - @JsonProperty("total_amount") JsonNullable totalAmount, - @JsonProperty("line_items") List lineItems, - @JsonProperty("reference") JsonNullable reference, - @JsonProperty("source_document_url") JsonNullable sourceDocumentUrl, - @JsonProperty("custom_fields") Optional> customFields, - @JsonProperty("custom_mappings") JsonNullable> customMappings, - @JsonProperty("status") JsonNullable status, - @JsonProperty("updated_at") JsonNullable updatedAt, - @JsonProperty("created_at") JsonNullable createdAt, - @JsonProperty("row_version") JsonNullable rowVersion, - @JsonProperty("updated_by") JsonNullable updatedBy, - @JsonProperty("created_by") JsonNullable createdBy, - @JsonProperty("pass_through") Optional> passThrough) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(number, "number"); - Utils.checkNotNull(transactionDate, "transactionDate"); - Utils.checkNotNull(accountId, "accountId"); - Utils.checkNotNull(account, "account"); - Utils.checkNotNull(bankAccount, "bankAccount"); - Utils.checkNotNull(customerId, "customerId"); - Utils.checkNotNull(supplierId, "supplierId"); - Utils.checkNotNull(companyId, "companyId"); - Utils.checkNotNull(departmentId, "departmentId"); - Utils.checkNotNull(paymentType, "paymentType"); - Utils.checkNotNull(currency, "currency"); - Utils.checkNotNull(currencyRate, "currencyRate"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(memo, "memo"); - Utils.checkNotNull(taxRate, "taxRate"); - Utils.checkNotNull(totalAmount, "totalAmount"); - Utils.checkNotNull(lineItems, "lineItems"); - Utils.checkNotNull(reference, "reference"); - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - Utils.checkNotNull(customFields, "customFields"); - Utils.checkNotNull(customMappings, "customMappings"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(createdAt, "createdAt"); - Utils.checkNotNull(rowVersion, "rowVersion"); - Utils.checkNotNull(updatedBy, "updatedBy"); - Utils.checkNotNull(createdBy, "createdBy"); - Utils.checkNotNull(passThrough, "passThrough"); - this.id = id; - this.number = number; - this.transactionDate = transactionDate; - this.accountId = accountId; - this.account = account; - this.bankAccount = bankAccount; - this.customerId = customerId; - this.supplierId = supplierId; - this.companyId = companyId; - this.departmentId = departmentId; - this.paymentType = paymentType; - this.currency = currency; - this.currencyRate = currencyRate; - this.type = type; - this.memo = memo; - this.taxRate = taxRate; - this.totalAmount = totalAmount; - this.lineItems = lineItems; - this.reference = reference; - this.sourceDocumentUrl = sourceDocumentUrl; - this.customFields = customFields; - this.customMappings = customMappings; - this.status = status; - this.updatedAt = updatedAt; - this.createdAt = createdAt; - this.rowVersion = rowVersion; - this.updatedBy = updatedBy; - this.createdBy = createdBy; - this.passThrough = passThrough; - } - - public Expense1( - String accountId, - List lineItems) { - this(Optional.empty(), JsonNullable.undefined(), Optional.empty(), - accountId, JsonNullable.undefined(), JsonNullable.undefined(), - Optional.empty(), Optional.empty(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - Optional.empty(), JsonNullable.undefined(), lineItems, - JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), Optional.empty()); - } - - /** - * A unique identifier for an object. - */ - @JsonIgnore - public Optional id() { - return id; - } - - /** - * Number. - */ - @JsonIgnore - public JsonNullable number() { - return number; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonIgnore - public Optional transactionDate() { - return transactionDate; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - @JsonIgnore - public String accountId() { - return accountId; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable account() { - return (JsonNullable) account; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable bankAccount() { - return (JsonNullable) bankAccount; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonIgnore - public Optional customerId() { - return customerId; - } - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonIgnore - public Optional supplierId() { - return supplierId; - } - - /** - * The company ID the transaction belongs to - */ - @JsonIgnore - public JsonNullable companyId() { - return companyId; - } - - /** - * The ID of the department - */ - @JsonIgnore - public JsonNullable departmentId() { - return departmentId; - } - - /** - * The type of payment for the expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable paymentType() { - return (JsonNullable) paymentType; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable currency() { - return (JsonNullable) currency; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonIgnore - public JsonNullable currencyRate() { - return currencyRate; - } - - /** - * The type of expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable type() { - return (JsonNullable) type; - } - - /** - * The memo of the expense. - */ - @JsonIgnore - public JsonNullable memo() { - return memo; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional taxRate() { - return (Optional) taxRate; - } - - /** - * The total amount of the expense line item. - */ - @JsonIgnore - public JsonNullable totalAmount() { - return totalAmount; - } - - /** - * Expense line items linked to this expense. - */ - @JsonIgnore - public List lineItems() { - return lineItems; - } - - /** - * Optional reference identifier for the transaction. - */ - @JsonIgnore - public JsonNullable reference() { - return reference; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonIgnore - public JsonNullable sourceDocumentUrl() { - return sourceDocumentUrl; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> customFields() { - return (Optional>) customFields; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable> customMappings() { - return (JsonNullable>) customMappings; - } - - /** - * Expense status - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable status() { - return (JsonNullable) status; - } - - /** - * The date and time when the object was last updated. - */ - @JsonIgnore - public JsonNullable updatedAt() { - return updatedAt; - } - - /** - * The date and time when the object was created. - */ - @JsonIgnore - public JsonNullable createdAt() { - return createdAt; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonIgnore - public JsonNullable rowVersion() { - return rowVersion; - } - - /** - * The user who last updated the object. - */ - @JsonIgnore - public JsonNullable updatedBy() { - return updatedBy; - } - - /** - * The user who created the object. - */ - @JsonIgnore - public JsonNullable createdBy() { - return createdBy; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> passThrough() { - return (Optional>) passThrough; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * A unique identifier for an object. - */ - public Expense1 withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - /** - * A unique identifier for an object. - */ - public Expense1 withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Number. - */ - public Expense1 withNumber(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Expense1 withNumber(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Expense1 withTransactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Expense1 withTransactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Expense1 withAccountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - public Expense1 withAccount(LinkedLedgerAccount account) { - Utils.checkNotNull(account, "account"); - this.account = JsonNullable.of(account); - return this; - } - - public Expense1 withAccount(JsonNullable account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - public Expense1 withBankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = JsonNullable.of(bankAccount); - return this; - } - - public Expense1 withBankAccount(JsonNullable bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Expense1 withCustomerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Expense1 withCustomerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Expense1 withSupplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Expense1 withSupplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Expense1 withCompanyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Expense1 withCompanyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - /** - * The ID of the department - */ - public Expense1 withDepartmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Expense1 withDepartmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - /** - * The type of payment for the expense. - */ - public Expense1 withPaymentType(ExpensePaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Expense1 withPaymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Expense1 withCurrency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Expense1 withCurrency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Expense1 withCurrencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Expense1 withCurrencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - /** - * The type of expense. - */ - public Expense1 withType(ExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Expense1 withType(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The memo of the expense. - */ - public Expense1 withMemo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Expense1 withMemo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - public Expense1 withTaxRate(LinkedTaxRate taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - - public Expense1 withTaxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - /** - * The total amount of the expense line item. - */ - public Expense1 withTotalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Expense1 withTotalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - /** - * Expense line items linked to this expense. - */ - public Expense1 withLineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Expense1 withReference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Expense1 withReference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Expense1 withSourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Expense1 withSourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - public Expense1 withCustomFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - - public Expense1 withCustomFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Expense1 withCustomMappings(Map customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = JsonNullable.of(customMappings); - return this; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Expense1 withCustomMappings(JsonNullable> customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = customMappings; - return this; - } - - /** - * Expense status - */ - public Expense1 withStatus(ExpenseStatus status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Expense1 withStatus(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - /** - * The date and time when the object was last updated. - */ - public Expense1 withUpdatedAt(OffsetDateTime updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = JsonNullable.of(updatedAt); - return this; - } - - /** - * The date and time when the object was last updated. - */ - public Expense1 withUpdatedAt(JsonNullable updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - /** - * The date and time when the object was created. - */ - public Expense1 withCreatedAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = JsonNullable.of(createdAt); - return this; - } - - /** - * The date and time when the object was created. - */ - public Expense1 withCreatedAt(JsonNullable createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Expense1 withRowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Expense1 withRowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - /** - * The user who last updated the object. - */ - public Expense1 withUpdatedBy(String updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = JsonNullable.of(updatedBy); - return this; - } - - /** - * The user who last updated the object. - */ - public Expense1 withUpdatedBy(JsonNullable updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = updatedBy; - return this; - } - - /** - * The user who created the object. - */ - public Expense1 withCreatedBy(String createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = JsonNullable.of(createdBy); - return this; - } - - /** - * The user who created the object. - */ - public Expense1 withCreatedBy(JsonNullable createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = createdBy; - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Expense1 withPassThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Expense1 withPassThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Expense1 other = (Expense1) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.number, other.number) && - Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && - Utils.enhancedDeepEquals(this.accountId, other.accountId) && - Utils.enhancedDeepEquals(this.account, other.account) && - Utils.enhancedDeepEquals(this.bankAccount, other.bankAccount) && - Utils.enhancedDeepEquals(this.customerId, other.customerId) && - Utils.enhancedDeepEquals(this.supplierId, other.supplierId) && - Utils.enhancedDeepEquals(this.companyId, other.companyId) && - Utils.enhancedDeepEquals(this.departmentId, other.departmentId) && - Utils.enhancedDeepEquals(this.paymentType, other.paymentType) && - Utils.enhancedDeepEquals(this.currency, other.currency) && - Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.memo, other.memo) && - Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && - Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && - Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && - Utils.enhancedDeepEquals(this.reference, other.reference) && - Utils.enhancedDeepEquals(this.sourceDocumentUrl, other.sourceDocumentUrl) && - Utils.enhancedDeepEquals(this.customFields, other.customFields) && - Utils.enhancedDeepEquals(this.customMappings, other.customMappings) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && - Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && - Utils.enhancedDeepEquals(this.updatedBy, other.updatedBy) && - Utils.enhancedDeepEquals(this.createdBy, other.createdBy) && - Utils.enhancedDeepEquals(this.passThrough, other.passThrough); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, number, transactionDate, - accountId, account, bankAccount, - customerId, supplierId, companyId, - departmentId, paymentType, currency, - currencyRate, type, memo, - taxRate, totalAmount, lineItems, - reference, sourceDocumentUrl, customFields, - customMappings, status, updatedAt, - createdAt, rowVersion, updatedBy, - createdBy, passThrough); - } - - @Override - public String toString() { - return Utils.toString(Expense1.class, - "id", id, - "number", number, - "transactionDate", transactionDate, - "accountId", accountId, - "account", account, - "bankAccount", bankAccount, - "customerId", customerId, - "supplierId", supplierId, - "companyId", companyId, - "departmentId", departmentId, - "paymentType", paymentType, - "currency", currency, - "currencyRate", currencyRate, - "type", type, - "memo", memo, - "taxRate", taxRate, - "totalAmount", totalAmount, - "lineItems", lineItems, - "reference", reference, - "sourceDocumentUrl", sourceDocumentUrl, - "customFields", customFields, - "customMappings", customMappings, - "status", status, - "updatedAt", updatedAt, - "createdAt", createdAt, - "rowVersion", rowVersion, - "updatedBy", updatedBy, - "createdBy", createdBy, - "passThrough", passThrough); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private JsonNullable number = JsonNullable.undefined(); - - private Optional transactionDate = Optional.empty(); - - @Deprecated - private String accountId; - - private JsonNullable account = JsonNullable.undefined(); - - private JsonNullable bankAccount = JsonNullable.undefined(); - - private Optional customerId = Optional.empty(); - - private Optional supplierId = Optional.empty(); - - private JsonNullable companyId = JsonNullable.undefined(); - - private JsonNullable departmentId = JsonNullable.undefined(); - - private JsonNullable paymentType = JsonNullable.undefined(); - - private JsonNullable currency = JsonNullable.undefined(); - - private JsonNullable currencyRate = JsonNullable.undefined(); - - private JsonNullable type = JsonNullable.undefined(); - - private JsonNullable memo = JsonNullable.undefined(); - - private Optional taxRate = Optional.empty(); - - private JsonNullable totalAmount = JsonNullable.undefined(); - - private List lineItems; - - private JsonNullable reference = JsonNullable.undefined(); - - private JsonNullable sourceDocumentUrl = JsonNullable.undefined(); - - private Optional> customFields = Optional.empty(); - - private JsonNullable> customMappings = JsonNullable.undefined(); - - private JsonNullable status = JsonNullable.undefined(); - - private JsonNullable updatedAt = JsonNullable.undefined(); - - private JsonNullable createdAt = JsonNullable.undefined(); - - private JsonNullable rowVersion = JsonNullable.undefined(); - - private JsonNullable updatedBy = JsonNullable.undefined(); - - private JsonNullable createdBy = JsonNullable.undefined(); - - private Optional> passThrough = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * A unique identifier for an object. - */ - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - /** - * A unique identifier for an object. - */ - public Builder id(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Number. - */ - public Builder number(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Builder number(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder accountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - - public Builder account(LinkedLedgerAccount account) { - Utils.checkNotNull(account, "account"); - this.account = JsonNullable.of(account); - return this; - } - - public Builder account(JsonNullable account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - - public Builder bankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = JsonNullable.of(bankAccount); - return this; - } - - public Builder bankAccount(JsonNullable bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - - /** - * The ID of the department - */ - public Builder departmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Builder departmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - - /** - * The type of payment for the expense. - */ - public Builder paymentType(ExpensePaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Builder paymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - - /** - * The type of expense. - */ - public Builder type(ExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Builder type(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * The memo of the expense. - */ - public Builder memo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Builder memo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - - public Builder taxRate(LinkedTaxRate taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - public Builder taxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - - /** - * Expense line items linked to this expense. - */ - public Builder lineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - - public Builder customFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - public Builder customFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Builder customMappings(Map customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = JsonNullable.of(customMappings); - return this; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Builder customMappings(JsonNullable> customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = customMappings; - return this; - } - - - /** - * Expense status - */ - public Builder status(ExpenseStatus status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Builder status(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - /** - * The date and time when the object was last updated. - */ - public Builder updatedAt(OffsetDateTime updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = JsonNullable.of(updatedAt); - return this; - } - - /** - * The date and time when the object was last updated. - */ - public Builder updatedAt(JsonNullable updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - - /** - * The date and time when the object was created. - */ - public Builder createdAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = JsonNullable.of(createdAt); - return this; - } - - /** - * The date and time when the object was created. - */ - public Builder createdAt(JsonNullable createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - - /** - * The user who last updated the object. - */ - public Builder updatedBy(String updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = JsonNullable.of(updatedBy); - return this; - } - - /** - * The user who last updated the object. - */ - public Builder updatedBy(JsonNullable updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = updatedBy; - return this; - } - - - /** - * The user who created the object. - */ - public Builder createdBy(String createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = JsonNullable.of(createdBy); - return this; - } - - /** - * The user who created the object. - */ - public Builder createdBy(JsonNullable createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = createdBy; - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - public Expense1 build() { - - return new Expense1( - id, number, transactionDate, - accountId, account, bankAccount, - customerId, supplierId, companyId, - departmentId, paymentType, currency, - currencyRate, type, memo, - taxRate, totalAmount, lineItems, - reference, sourceDocumentUrl, customFields, - customMappings, status, updatedAt, - createdAt, rowVersion, updatedBy, - createdBy, passThrough); - } - - } -} diff --git a/src/main/java/com/apideck/unify/models/components/Expense1Input.java b/src/main/java/com/apideck/unify/models/components/Expense1Input.java deleted file mode 100644 index 5f6b832c0..000000000 --- a/src/main/java/com/apideck/unify/models/components/Expense1Input.java +++ /dev/null @@ -1,1410 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.apideck.unify.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Deprecated; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - - -public class Expense1Input { - /** - * Number. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("number") - private JsonNullable number; - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("transaction_date") - private Optional transactionDate; - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @JsonProperty("account_id") - @Deprecated - private String accountId; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("account") - private JsonNullable account; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bank_account") - private JsonNullable bankAccount; - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("customer_id") - private Optional customerId; - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("supplier_id") - private Optional supplierId; - - /** - * The company ID the transaction belongs to - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("company_id") - private JsonNullable companyId; - - /** - * The ID of the department - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("department_id") - private JsonNullable departmentId; - - /** - * The type of payment for the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("payment_type") - private JsonNullable paymentType; - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency") - private JsonNullable currency; - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency_rate") - private JsonNullable currencyRate; - - /** - * The type of expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private JsonNullable type; - - /** - * The memo of the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("memo") - private JsonNullable memo; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tax_rate") - private Optional taxRate; - - /** - * The total amount of the expense line item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("total_amount") - private JsonNullable totalAmount; - - /** - * Expense line items linked to this expense. - */ - @JsonProperty("line_items") - private List lineItems; - - /** - * Optional reference identifier for the transaction. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("reference") - private JsonNullable reference; - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("source_document_url") - private JsonNullable sourceDocumentUrl; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("custom_fields") - private Optional> customFields; - - /** - * Expense status - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private JsonNullable status; - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("row_version") - private JsonNullable rowVersion; - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("pass_through") - private Optional> passThrough; - - @JsonCreator - public Expense1Input( - @JsonProperty("number") JsonNullable number, - @JsonProperty("transaction_date") Optional transactionDate, - @JsonProperty("account_id") String accountId, - @JsonProperty("account") JsonNullable account, - @JsonProperty("bank_account") JsonNullable bankAccount, - @JsonProperty("customer_id") Optional customerId, - @JsonProperty("supplier_id") Optional supplierId, - @JsonProperty("company_id") JsonNullable companyId, - @JsonProperty("department_id") JsonNullable departmentId, - @JsonProperty("payment_type") JsonNullable paymentType, - @JsonProperty("currency") JsonNullable currency, - @JsonProperty("currency_rate") JsonNullable currencyRate, - @JsonProperty("type") JsonNullable type, - @JsonProperty("memo") JsonNullable memo, - @JsonProperty("tax_rate") Optional taxRate, - @JsonProperty("total_amount") JsonNullable totalAmount, - @JsonProperty("line_items") List lineItems, - @JsonProperty("reference") JsonNullable reference, - @JsonProperty("source_document_url") JsonNullable sourceDocumentUrl, - @JsonProperty("custom_fields") Optional> customFields, - @JsonProperty("status") JsonNullable status, - @JsonProperty("row_version") JsonNullable rowVersion, - @JsonProperty("pass_through") Optional> passThrough) { - Utils.checkNotNull(number, "number"); - Utils.checkNotNull(transactionDate, "transactionDate"); - Utils.checkNotNull(accountId, "accountId"); - Utils.checkNotNull(account, "account"); - Utils.checkNotNull(bankAccount, "bankAccount"); - Utils.checkNotNull(customerId, "customerId"); - Utils.checkNotNull(supplierId, "supplierId"); - Utils.checkNotNull(companyId, "companyId"); - Utils.checkNotNull(departmentId, "departmentId"); - Utils.checkNotNull(paymentType, "paymentType"); - Utils.checkNotNull(currency, "currency"); - Utils.checkNotNull(currencyRate, "currencyRate"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(memo, "memo"); - Utils.checkNotNull(taxRate, "taxRate"); - Utils.checkNotNull(totalAmount, "totalAmount"); - Utils.checkNotNull(lineItems, "lineItems"); - Utils.checkNotNull(reference, "reference"); - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - Utils.checkNotNull(customFields, "customFields"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(rowVersion, "rowVersion"); - Utils.checkNotNull(passThrough, "passThrough"); - this.number = number; - this.transactionDate = transactionDate; - this.accountId = accountId; - this.account = account; - this.bankAccount = bankAccount; - this.customerId = customerId; - this.supplierId = supplierId; - this.companyId = companyId; - this.departmentId = departmentId; - this.paymentType = paymentType; - this.currency = currency; - this.currencyRate = currencyRate; - this.type = type; - this.memo = memo; - this.taxRate = taxRate; - this.totalAmount = totalAmount; - this.lineItems = lineItems; - this.reference = reference; - this.sourceDocumentUrl = sourceDocumentUrl; - this.customFields = customFields; - this.status = status; - this.rowVersion = rowVersion; - this.passThrough = passThrough; - } - - public Expense1Input( - String accountId, - List lineItems) { - this(JsonNullable.undefined(), Optional.empty(), accountId, - JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), - Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), - JsonNullable.undefined(), lineItems, JsonNullable.undefined(), - JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), - JsonNullable.undefined(), Optional.empty()); - } - - /** - * Number. - */ - @JsonIgnore - public JsonNullable number() { - return number; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonIgnore - public Optional transactionDate() { - return transactionDate; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - @JsonIgnore - public String accountId() { - return accountId; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable account() { - return (JsonNullable) account; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable bankAccount() { - return (JsonNullable) bankAccount; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonIgnore - public Optional customerId() { - return customerId; - } - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonIgnore - public Optional supplierId() { - return supplierId; - } - - /** - * The company ID the transaction belongs to - */ - @JsonIgnore - public JsonNullable companyId() { - return companyId; - } - - /** - * The ID of the department - */ - @JsonIgnore - public JsonNullable departmentId() { - return departmentId; - } - - /** - * The type of payment for the expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable paymentType() { - return (JsonNullable) paymentType; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable currency() { - return (JsonNullable) currency; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonIgnore - public JsonNullable currencyRate() { - return currencyRate; - } - - /** - * The type of expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable type() { - return (JsonNullable) type; - } - - /** - * The memo of the expense. - */ - @JsonIgnore - public JsonNullable memo() { - return memo; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional taxRate() { - return (Optional) taxRate; - } - - /** - * The total amount of the expense line item. - */ - @JsonIgnore - public JsonNullable totalAmount() { - return totalAmount; - } - - /** - * Expense line items linked to this expense. - */ - @JsonIgnore - public List lineItems() { - return lineItems; - } - - /** - * Optional reference identifier for the transaction. - */ - @JsonIgnore - public JsonNullable reference() { - return reference; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonIgnore - public JsonNullable sourceDocumentUrl() { - return sourceDocumentUrl; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> customFields() { - return (Optional>) customFields; - } - - /** - * Expense status - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable status() { - return (JsonNullable) status; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonIgnore - public JsonNullable rowVersion() { - return rowVersion; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> passThrough() { - return (Optional>) passThrough; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number. - */ - public Expense1Input withNumber(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Expense1Input withNumber(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Expense1Input withTransactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Expense1Input withTransactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Expense1Input withAccountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - public Expense1Input withAccount(LinkedLedgerAccountInput account) { - Utils.checkNotNull(account, "account"); - this.account = JsonNullable.of(account); - return this; - } - - public Expense1Input withAccount(JsonNullable account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - public Expense1Input withBankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = JsonNullable.of(bankAccount); - return this; - } - - public Expense1Input withBankAccount(JsonNullable bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Expense1Input withCustomerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Expense1Input withCustomerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Expense1Input withSupplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Expense1Input withSupplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Expense1Input withCompanyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Expense1Input withCompanyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - /** - * The ID of the department - */ - public Expense1Input withDepartmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Expense1Input withDepartmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - /** - * The type of payment for the expense. - */ - public Expense1Input withPaymentType(ExpensePaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Expense1Input withPaymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Expense1Input withCurrency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Expense1Input withCurrency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Expense1Input withCurrencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Expense1Input withCurrencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - /** - * The type of expense. - */ - public Expense1Input withType(ExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Expense1Input withType(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The memo of the expense. - */ - public Expense1Input withMemo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Expense1Input withMemo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - public Expense1Input withTaxRate(LinkedTaxRateInput taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - - public Expense1Input withTaxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - /** - * The total amount of the expense line item. - */ - public Expense1Input withTotalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Expense1Input withTotalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - /** - * Expense line items linked to this expense. - */ - public Expense1Input withLineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Expense1Input withReference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Expense1Input withReference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Expense1Input withSourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Expense1Input withSourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - public Expense1Input withCustomFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - - public Expense1Input withCustomFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - /** - * Expense status - */ - public Expense1Input withStatus(ExpenseStatus status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Expense1Input withStatus(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Expense1Input withRowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Expense1Input withRowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Expense1Input withPassThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Expense1Input withPassThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Expense1Input other = (Expense1Input) o; - return - Utils.enhancedDeepEquals(this.number, other.number) && - Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && - Utils.enhancedDeepEquals(this.accountId, other.accountId) && - Utils.enhancedDeepEquals(this.account, other.account) && - Utils.enhancedDeepEquals(this.bankAccount, other.bankAccount) && - Utils.enhancedDeepEquals(this.customerId, other.customerId) && - Utils.enhancedDeepEquals(this.supplierId, other.supplierId) && - Utils.enhancedDeepEquals(this.companyId, other.companyId) && - Utils.enhancedDeepEquals(this.departmentId, other.departmentId) && - Utils.enhancedDeepEquals(this.paymentType, other.paymentType) && - Utils.enhancedDeepEquals(this.currency, other.currency) && - Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.memo, other.memo) && - Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && - Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && - Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && - Utils.enhancedDeepEquals(this.reference, other.reference) && - Utils.enhancedDeepEquals(this.sourceDocumentUrl, other.sourceDocumentUrl) && - Utils.enhancedDeepEquals(this.customFields, other.customFields) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && - Utils.enhancedDeepEquals(this.passThrough, other.passThrough); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - number, transactionDate, accountId, - account, bankAccount, customerId, - supplierId, companyId, departmentId, - paymentType, currency, currencyRate, - type, memo, taxRate, - totalAmount, lineItems, reference, - sourceDocumentUrl, customFields, status, - rowVersion, passThrough); - } - - @Override - public String toString() { - return Utils.toString(Expense1Input.class, - "number", number, - "transactionDate", transactionDate, - "accountId", accountId, - "account", account, - "bankAccount", bankAccount, - "customerId", customerId, - "supplierId", supplierId, - "companyId", companyId, - "departmentId", departmentId, - "paymentType", paymentType, - "currency", currency, - "currencyRate", currencyRate, - "type", type, - "memo", memo, - "taxRate", taxRate, - "totalAmount", totalAmount, - "lineItems", lineItems, - "reference", reference, - "sourceDocumentUrl", sourceDocumentUrl, - "customFields", customFields, - "status", status, - "rowVersion", rowVersion, - "passThrough", passThrough); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private JsonNullable number = JsonNullable.undefined(); - - private Optional transactionDate = Optional.empty(); - - @Deprecated - private String accountId; - - private JsonNullable account = JsonNullable.undefined(); - - private JsonNullable bankAccount = JsonNullable.undefined(); - - private Optional customerId = Optional.empty(); - - private Optional supplierId = Optional.empty(); - - private JsonNullable companyId = JsonNullable.undefined(); - - private JsonNullable departmentId = JsonNullable.undefined(); - - private JsonNullable paymentType = JsonNullable.undefined(); - - private JsonNullable currency = JsonNullable.undefined(); - - private JsonNullable currencyRate = JsonNullable.undefined(); - - private JsonNullable type = JsonNullable.undefined(); - - private JsonNullable memo = JsonNullable.undefined(); - - private Optional taxRate = Optional.empty(); - - private JsonNullable totalAmount = JsonNullable.undefined(); - - private List lineItems; - - private JsonNullable reference = JsonNullable.undefined(); - - private JsonNullable sourceDocumentUrl = JsonNullable.undefined(); - - private Optional> customFields = Optional.empty(); - - private JsonNullable status = JsonNullable.undefined(); - - private JsonNullable rowVersion = JsonNullable.undefined(); - - private Optional> passThrough = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Number. - */ - public Builder number(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Builder number(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder accountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - - public Builder account(LinkedLedgerAccountInput account) { - Utils.checkNotNull(account, "account"); - this.account = JsonNullable.of(account); - return this; - } - - public Builder account(JsonNullable account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - - public Builder bankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = JsonNullable.of(bankAccount); - return this; - } - - public Builder bankAccount(JsonNullable bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - - /** - * The ID of the department - */ - public Builder departmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Builder departmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - - /** - * The type of payment for the expense. - */ - public Builder paymentType(ExpensePaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Builder paymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - - /** - * The type of expense. - */ - public Builder type(ExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Builder type(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * The memo of the expense. - */ - public Builder memo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Builder memo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - - public Builder taxRate(LinkedTaxRateInput taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - public Builder taxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - - /** - * Expense line items linked to this expense. - */ - public Builder lineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - - public Builder customFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - public Builder customFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - - /** - * Expense status - */ - public Builder status(ExpenseStatus status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Builder status(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - public Expense1Input build() { - - return new Expense1Input( - number, transactionDate, accountId, - account, bankAccount, customerId, - supplierId, companyId, departmentId, - paymentType, currency, currencyRate, - type, memo, taxRate, - totalAmount, lineItems, reference, - sourceDocumentUrl, customFields, status, - rowVersion, passThrough); - } - - } -} diff --git a/src/main/java/com/apideck/unify/models/components/Expense2.java b/src/main/java/com/apideck/unify/models/components/Expense2.java deleted file mode 100644 index 1a2aa0b5a..000000000 --- a/src/main/java/com/apideck/unify/models/components/Expense2.java +++ /dev/null @@ -1,1802 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.apideck.unify.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Deprecated; -import java.lang.Double; -import java.lang.Object; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - - -public class Expense2 { - /** - * A unique identifier for an object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - /** - * Number. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("number") - private JsonNullable number; - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("transaction_date") - private Optional transactionDate; - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("account_id") - @Deprecated - private Optional accountId; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("account") - private Optional account; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bank_account") - private JsonNullable bankAccount; - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("customer_id") - private Optional customerId; - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("supplier_id") - private Optional supplierId; - - /** - * The company ID the transaction belongs to - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("company_id") - private JsonNullable companyId; - - /** - * The ID of the department - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("department_id") - private JsonNullable departmentId; - - /** - * The type of payment for the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("payment_type") - private JsonNullable paymentType; - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency") - private JsonNullable currency; - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency_rate") - private JsonNullable currencyRate; - - /** - * The type of expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private JsonNullable type; - - /** - * The memo of the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("memo") - private JsonNullable memo; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tax_rate") - private Optional taxRate; - - /** - * The total amount of the expense line item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("total_amount") - private JsonNullable totalAmount; - - /** - * Expense line items linked to this expense. - */ - @JsonProperty("line_items") - private List lineItems; - - /** - * Optional reference identifier for the transaction. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("reference") - private JsonNullable reference; - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("source_document_url") - private JsonNullable sourceDocumentUrl; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("custom_fields") - private Optional> customFields; - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("custom_mappings") - private JsonNullable> customMappings; - - /** - * Expense status - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private JsonNullable status; - - /** - * The date and time when the object was last updated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updated_at") - private JsonNullable updatedAt; - - /** - * The date and time when the object was created. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("created_at") - private JsonNullable createdAt; - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("row_version") - private JsonNullable rowVersion; - - /** - * The user who last updated the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updated_by") - private JsonNullable updatedBy; - - /** - * The user who created the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("created_by") - private JsonNullable createdBy; - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("pass_through") - private Optional> passThrough; - - @JsonCreator - public Expense2( - @JsonProperty("id") Optional id, - @JsonProperty("number") JsonNullable number, - @JsonProperty("transaction_date") Optional transactionDate, - @JsonProperty("account_id") Optional accountId, - @JsonProperty("account") Optional account, - @JsonProperty("bank_account") JsonNullable bankAccount, - @JsonProperty("customer_id") Optional customerId, - @JsonProperty("supplier_id") Optional supplierId, - @JsonProperty("company_id") JsonNullable companyId, - @JsonProperty("department_id") JsonNullable departmentId, - @JsonProperty("payment_type") JsonNullable paymentType, - @JsonProperty("currency") JsonNullable currency, - @JsonProperty("currency_rate") JsonNullable currencyRate, - @JsonProperty("type") JsonNullable type, - @JsonProperty("memo") JsonNullable memo, - @JsonProperty("tax_rate") Optional taxRate, - @JsonProperty("total_amount") JsonNullable totalAmount, - @JsonProperty("line_items") List lineItems, - @JsonProperty("reference") JsonNullable reference, - @JsonProperty("source_document_url") JsonNullable sourceDocumentUrl, - @JsonProperty("custom_fields") Optional> customFields, - @JsonProperty("custom_mappings") JsonNullable> customMappings, - @JsonProperty("status") JsonNullable status, - @JsonProperty("updated_at") JsonNullable updatedAt, - @JsonProperty("created_at") JsonNullable createdAt, - @JsonProperty("row_version") JsonNullable rowVersion, - @JsonProperty("updated_by") JsonNullable updatedBy, - @JsonProperty("created_by") JsonNullable createdBy, - @JsonProperty("pass_through") Optional> passThrough) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(number, "number"); - Utils.checkNotNull(transactionDate, "transactionDate"); - Utils.checkNotNull(accountId, "accountId"); - Utils.checkNotNull(account, "account"); - Utils.checkNotNull(bankAccount, "bankAccount"); - Utils.checkNotNull(customerId, "customerId"); - Utils.checkNotNull(supplierId, "supplierId"); - Utils.checkNotNull(companyId, "companyId"); - Utils.checkNotNull(departmentId, "departmentId"); - Utils.checkNotNull(paymentType, "paymentType"); - Utils.checkNotNull(currency, "currency"); - Utils.checkNotNull(currencyRate, "currencyRate"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(memo, "memo"); - Utils.checkNotNull(taxRate, "taxRate"); - Utils.checkNotNull(totalAmount, "totalAmount"); - Utils.checkNotNull(lineItems, "lineItems"); - Utils.checkNotNull(reference, "reference"); - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - Utils.checkNotNull(customFields, "customFields"); - Utils.checkNotNull(customMappings, "customMappings"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(createdAt, "createdAt"); - Utils.checkNotNull(rowVersion, "rowVersion"); - Utils.checkNotNull(updatedBy, "updatedBy"); - Utils.checkNotNull(createdBy, "createdBy"); - Utils.checkNotNull(passThrough, "passThrough"); - this.id = id; - this.number = number; - this.transactionDate = transactionDate; - this.accountId = accountId; - this.account = account; - this.bankAccount = bankAccount; - this.customerId = customerId; - this.supplierId = supplierId; - this.companyId = companyId; - this.departmentId = departmentId; - this.paymentType = paymentType; - this.currency = currency; - this.currencyRate = currencyRate; - this.type = type; - this.memo = memo; - this.taxRate = taxRate; - this.totalAmount = totalAmount; - this.lineItems = lineItems; - this.reference = reference; - this.sourceDocumentUrl = sourceDocumentUrl; - this.customFields = customFields; - this.customMappings = customMappings; - this.status = status; - this.updatedAt = updatedAt; - this.createdAt = createdAt; - this.rowVersion = rowVersion; - this.updatedBy = updatedBy; - this.createdBy = createdBy; - this.passThrough = passThrough; - } - - public Expense2( - List lineItems) { - this(Optional.empty(), JsonNullable.undefined(), Optional.empty(), - Optional.empty(), Optional.empty(), JsonNullable.undefined(), - Optional.empty(), Optional.empty(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - Optional.empty(), JsonNullable.undefined(), lineItems, - JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), Optional.empty()); - } - - /** - * A unique identifier for an object. - */ - @JsonIgnore - public Optional id() { - return id; - } - - /** - * Number. - */ - @JsonIgnore - public JsonNullable number() { - return number; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonIgnore - public Optional transactionDate() { - return transactionDate; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - @JsonIgnore - public Optional accountId() { - return accountId; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional account() { - return (Optional) account; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable bankAccount() { - return (JsonNullable) bankAccount; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonIgnore - public Optional customerId() { - return customerId; - } - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonIgnore - public Optional supplierId() { - return supplierId; - } - - /** - * The company ID the transaction belongs to - */ - @JsonIgnore - public JsonNullable companyId() { - return companyId; - } - - /** - * The ID of the department - */ - @JsonIgnore - public JsonNullable departmentId() { - return departmentId; - } - - /** - * The type of payment for the expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable paymentType() { - return (JsonNullable) paymentType; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable currency() { - return (JsonNullable) currency; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonIgnore - public JsonNullable currencyRate() { - return currencyRate; - } - - /** - * The type of expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable type() { - return (JsonNullable) type; - } - - /** - * The memo of the expense. - */ - @JsonIgnore - public JsonNullable memo() { - return memo; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional taxRate() { - return (Optional) taxRate; - } - - /** - * The total amount of the expense line item. - */ - @JsonIgnore - public JsonNullable totalAmount() { - return totalAmount; - } - - /** - * Expense line items linked to this expense. - */ - @JsonIgnore - public List lineItems() { - return lineItems; - } - - /** - * Optional reference identifier for the transaction. - */ - @JsonIgnore - public JsonNullable reference() { - return reference; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonIgnore - public JsonNullable sourceDocumentUrl() { - return sourceDocumentUrl; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> customFields() { - return (Optional>) customFields; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable> customMappings() { - return (JsonNullable>) customMappings; - } - - /** - * Expense status - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable status() { - return (JsonNullable) status; - } - - /** - * The date and time when the object was last updated. - */ - @JsonIgnore - public JsonNullable updatedAt() { - return updatedAt; - } - - /** - * The date and time when the object was created. - */ - @JsonIgnore - public JsonNullable createdAt() { - return createdAt; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonIgnore - public JsonNullable rowVersion() { - return rowVersion; - } - - /** - * The user who last updated the object. - */ - @JsonIgnore - public JsonNullable updatedBy() { - return updatedBy; - } - - /** - * The user who created the object. - */ - @JsonIgnore - public JsonNullable createdBy() { - return createdBy; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> passThrough() { - return (Optional>) passThrough; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * A unique identifier for an object. - */ - public Expense2 withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - /** - * A unique identifier for an object. - */ - public Expense2 withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Number. - */ - public Expense2 withNumber(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Expense2 withNumber(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Expense2 withTransactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Expense2 withTransactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Expense2 withAccountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.ofNullable(accountId); - return this; - } - - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Expense2 withAccountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - public Expense2 withAccount(LinkedLedgerAccount account) { - Utils.checkNotNull(account, "account"); - this.account = Optional.ofNullable(account); - return this; - } - - - public Expense2 withAccount(Optional account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - public Expense2 withBankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = JsonNullable.of(bankAccount); - return this; - } - - public Expense2 withBankAccount(JsonNullable bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Expense2 withCustomerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Expense2 withCustomerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Expense2 withSupplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Expense2 withSupplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Expense2 withCompanyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Expense2 withCompanyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - /** - * The ID of the department - */ - public Expense2 withDepartmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Expense2 withDepartmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - /** - * The type of payment for the expense. - */ - public Expense2 withPaymentType(Expense2PaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Expense2 withPaymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Expense2 withCurrency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Expense2 withCurrency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Expense2 withCurrencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Expense2 withCurrencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - /** - * The type of expense. - */ - public Expense2 withType(ExpenseExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Expense2 withType(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The memo of the expense. - */ - public Expense2 withMemo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Expense2 withMemo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - public Expense2 withTaxRate(LinkedTaxRate taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - - public Expense2 withTaxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - /** - * The total amount of the expense line item. - */ - public Expense2 withTotalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Expense2 withTotalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - /** - * Expense line items linked to this expense. - */ - public Expense2 withLineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Expense2 withReference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Expense2 withReference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Expense2 withSourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Expense2 withSourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - public Expense2 withCustomFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - - public Expense2 withCustomFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Expense2 withCustomMappings(Map customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = JsonNullable.of(customMappings); - return this; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Expense2 withCustomMappings(JsonNullable> customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = customMappings; - return this; - } - - /** - * Expense status - */ - public Expense2 withStatus(Expense2Status status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Expense2 withStatus(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - /** - * The date and time when the object was last updated. - */ - public Expense2 withUpdatedAt(OffsetDateTime updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = JsonNullable.of(updatedAt); - return this; - } - - /** - * The date and time when the object was last updated. - */ - public Expense2 withUpdatedAt(JsonNullable updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - /** - * The date and time when the object was created. - */ - public Expense2 withCreatedAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = JsonNullable.of(createdAt); - return this; - } - - /** - * The date and time when the object was created. - */ - public Expense2 withCreatedAt(JsonNullable createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Expense2 withRowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Expense2 withRowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - /** - * The user who last updated the object. - */ - public Expense2 withUpdatedBy(String updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = JsonNullable.of(updatedBy); - return this; - } - - /** - * The user who last updated the object. - */ - public Expense2 withUpdatedBy(JsonNullable updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = updatedBy; - return this; - } - - /** - * The user who created the object. - */ - public Expense2 withCreatedBy(String createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = JsonNullable.of(createdBy); - return this; - } - - /** - * The user who created the object. - */ - public Expense2 withCreatedBy(JsonNullable createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = createdBy; - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Expense2 withPassThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Expense2 withPassThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Expense2 other = (Expense2) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.number, other.number) && - Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && - Utils.enhancedDeepEquals(this.accountId, other.accountId) && - Utils.enhancedDeepEquals(this.account, other.account) && - Utils.enhancedDeepEquals(this.bankAccount, other.bankAccount) && - Utils.enhancedDeepEquals(this.customerId, other.customerId) && - Utils.enhancedDeepEquals(this.supplierId, other.supplierId) && - Utils.enhancedDeepEquals(this.companyId, other.companyId) && - Utils.enhancedDeepEquals(this.departmentId, other.departmentId) && - Utils.enhancedDeepEquals(this.paymentType, other.paymentType) && - Utils.enhancedDeepEquals(this.currency, other.currency) && - Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.memo, other.memo) && - Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && - Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && - Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && - Utils.enhancedDeepEquals(this.reference, other.reference) && - Utils.enhancedDeepEquals(this.sourceDocumentUrl, other.sourceDocumentUrl) && - Utils.enhancedDeepEquals(this.customFields, other.customFields) && - Utils.enhancedDeepEquals(this.customMappings, other.customMappings) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && - Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && - Utils.enhancedDeepEquals(this.updatedBy, other.updatedBy) && - Utils.enhancedDeepEquals(this.createdBy, other.createdBy) && - Utils.enhancedDeepEquals(this.passThrough, other.passThrough); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, number, transactionDate, - accountId, account, bankAccount, - customerId, supplierId, companyId, - departmentId, paymentType, currency, - currencyRate, type, memo, - taxRate, totalAmount, lineItems, - reference, sourceDocumentUrl, customFields, - customMappings, status, updatedAt, - createdAt, rowVersion, updatedBy, - createdBy, passThrough); - } - - @Override - public String toString() { - return Utils.toString(Expense2.class, - "id", id, - "number", number, - "transactionDate", transactionDate, - "accountId", accountId, - "account", account, - "bankAccount", bankAccount, - "customerId", customerId, - "supplierId", supplierId, - "companyId", companyId, - "departmentId", departmentId, - "paymentType", paymentType, - "currency", currency, - "currencyRate", currencyRate, - "type", type, - "memo", memo, - "taxRate", taxRate, - "totalAmount", totalAmount, - "lineItems", lineItems, - "reference", reference, - "sourceDocumentUrl", sourceDocumentUrl, - "customFields", customFields, - "customMappings", customMappings, - "status", status, - "updatedAt", updatedAt, - "createdAt", createdAt, - "rowVersion", rowVersion, - "updatedBy", updatedBy, - "createdBy", createdBy, - "passThrough", passThrough); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private JsonNullable number = JsonNullable.undefined(); - - private Optional transactionDate = Optional.empty(); - - @Deprecated - private Optional accountId = Optional.empty(); - - private Optional account = Optional.empty(); - - private JsonNullable bankAccount = JsonNullable.undefined(); - - private Optional customerId = Optional.empty(); - - private Optional supplierId = Optional.empty(); - - private JsonNullable companyId = JsonNullable.undefined(); - - private JsonNullable departmentId = JsonNullable.undefined(); - - private JsonNullable paymentType = JsonNullable.undefined(); - - private JsonNullable currency = JsonNullable.undefined(); - - private JsonNullable currencyRate = JsonNullable.undefined(); - - private JsonNullable type = JsonNullable.undefined(); - - private JsonNullable memo = JsonNullable.undefined(); - - private Optional taxRate = Optional.empty(); - - private JsonNullable totalAmount = JsonNullable.undefined(); - - private List lineItems; - - private JsonNullable reference = JsonNullable.undefined(); - - private JsonNullable sourceDocumentUrl = JsonNullable.undefined(); - - private Optional> customFields = Optional.empty(); - - private JsonNullable> customMappings = JsonNullable.undefined(); - - private JsonNullable status = JsonNullable.undefined(); - - private JsonNullable updatedAt = JsonNullable.undefined(); - - private JsonNullable createdAt = JsonNullable.undefined(); - - private JsonNullable rowVersion = JsonNullable.undefined(); - - private JsonNullable updatedBy = JsonNullable.undefined(); - - private JsonNullable createdBy = JsonNullable.undefined(); - - private Optional> passThrough = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * A unique identifier for an object. - */ - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - /** - * A unique identifier for an object. - */ - public Builder id(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Number. - */ - public Builder number(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Builder number(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder accountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.ofNullable(accountId); - return this; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder accountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - - public Builder account(LinkedLedgerAccount account) { - Utils.checkNotNull(account, "account"); - this.account = Optional.ofNullable(account); - return this; - } - - public Builder account(Optional account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - - public Builder bankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = JsonNullable.of(bankAccount); - return this; - } - - public Builder bankAccount(JsonNullable bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - - /** - * The ID of the department - */ - public Builder departmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Builder departmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - - /** - * The type of payment for the expense. - */ - public Builder paymentType(Expense2PaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Builder paymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - - /** - * The type of expense. - */ - public Builder type(ExpenseExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Builder type(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * The memo of the expense. - */ - public Builder memo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Builder memo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - - public Builder taxRate(LinkedTaxRate taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - public Builder taxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - - /** - * Expense line items linked to this expense. - */ - public Builder lineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - - public Builder customFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - public Builder customFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Builder customMappings(Map customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = JsonNullable.of(customMappings); - return this; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Builder customMappings(JsonNullable> customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = customMappings; - return this; - } - - - /** - * Expense status - */ - public Builder status(Expense2Status status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Builder status(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - /** - * The date and time when the object was last updated. - */ - public Builder updatedAt(OffsetDateTime updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = JsonNullable.of(updatedAt); - return this; - } - - /** - * The date and time when the object was last updated. - */ - public Builder updatedAt(JsonNullable updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - - /** - * The date and time when the object was created. - */ - public Builder createdAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = JsonNullable.of(createdAt); - return this; - } - - /** - * The date and time when the object was created. - */ - public Builder createdAt(JsonNullable createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - - /** - * The user who last updated the object. - */ - public Builder updatedBy(String updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = JsonNullable.of(updatedBy); - return this; - } - - /** - * The user who last updated the object. - */ - public Builder updatedBy(JsonNullable updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = updatedBy; - return this; - } - - - /** - * The user who created the object. - */ - public Builder createdBy(String createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = JsonNullable.of(createdBy); - return this; - } - - /** - * The user who created the object. - */ - public Builder createdBy(JsonNullable createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = createdBy; - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - public Expense2 build() { - - return new Expense2( - id, number, transactionDate, - accountId, account, bankAccount, - customerId, supplierId, companyId, - departmentId, paymentType, currency, - currencyRate, type, memo, - taxRate, totalAmount, lineItems, - reference, sourceDocumentUrl, customFields, - customMappings, status, updatedAt, - createdAt, rowVersion, updatedBy, - createdBy, passThrough); - } - - } -} diff --git a/src/main/java/com/apideck/unify/models/components/Expense2Input.java b/src/main/java/com/apideck/unify/models/components/Expense2Input.java deleted file mode 100644 index e10652a8d..000000000 --- a/src/main/java/com/apideck/unify/models/components/Expense2Input.java +++ /dev/null @@ -1,1438 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.apideck.unify.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Deprecated; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - - -public class Expense2Input { - /** - * Number. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("number") - private JsonNullable number; - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("transaction_date") - private Optional transactionDate; - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("account_id") - @Deprecated - private Optional accountId; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("account") - private Optional account; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("bank_account") - private JsonNullable bankAccount; - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("customer_id") - private Optional customerId; - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("supplier_id") - private Optional supplierId; - - /** - * The company ID the transaction belongs to - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("company_id") - private JsonNullable companyId; - - /** - * The ID of the department - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("department_id") - private JsonNullable departmentId; - - /** - * The type of payment for the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("payment_type") - private JsonNullable paymentType; - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency") - private JsonNullable currency; - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency_rate") - private JsonNullable currencyRate; - - /** - * The type of expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private JsonNullable type; - - /** - * The memo of the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("memo") - private JsonNullable memo; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tax_rate") - private Optional taxRate; - - /** - * The total amount of the expense line item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("total_amount") - private JsonNullable totalAmount; - - /** - * Expense line items linked to this expense. - */ - @JsonProperty("line_items") - private List lineItems; - - /** - * Optional reference identifier for the transaction. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("reference") - private JsonNullable reference; - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("source_document_url") - private JsonNullable sourceDocumentUrl; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("custom_fields") - private Optional> customFields; - - /** - * Expense status - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private JsonNullable status; - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("row_version") - private JsonNullable rowVersion; - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("pass_through") - private Optional> passThrough; - - @JsonCreator - public Expense2Input( - @JsonProperty("number") JsonNullable number, - @JsonProperty("transaction_date") Optional transactionDate, - @JsonProperty("account_id") Optional accountId, - @JsonProperty("account") Optional account, - @JsonProperty("bank_account") JsonNullable bankAccount, - @JsonProperty("customer_id") Optional customerId, - @JsonProperty("supplier_id") Optional supplierId, - @JsonProperty("company_id") JsonNullable companyId, - @JsonProperty("department_id") JsonNullable departmentId, - @JsonProperty("payment_type") JsonNullable paymentType, - @JsonProperty("currency") JsonNullable currency, - @JsonProperty("currency_rate") JsonNullable currencyRate, - @JsonProperty("type") JsonNullable type, - @JsonProperty("memo") JsonNullable memo, - @JsonProperty("tax_rate") Optional taxRate, - @JsonProperty("total_amount") JsonNullable totalAmount, - @JsonProperty("line_items") List lineItems, - @JsonProperty("reference") JsonNullable reference, - @JsonProperty("source_document_url") JsonNullable sourceDocumentUrl, - @JsonProperty("custom_fields") Optional> customFields, - @JsonProperty("status") JsonNullable status, - @JsonProperty("row_version") JsonNullable rowVersion, - @JsonProperty("pass_through") Optional> passThrough) { - Utils.checkNotNull(number, "number"); - Utils.checkNotNull(transactionDate, "transactionDate"); - Utils.checkNotNull(accountId, "accountId"); - Utils.checkNotNull(account, "account"); - Utils.checkNotNull(bankAccount, "bankAccount"); - Utils.checkNotNull(customerId, "customerId"); - Utils.checkNotNull(supplierId, "supplierId"); - Utils.checkNotNull(companyId, "companyId"); - Utils.checkNotNull(departmentId, "departmentId"); - Utils.checkNotNull(paymentType, "paymentType"); - Utils.checkNotNull(currency, "currency"); - Utils.checkNotNull(currencyRate, "currencyRate"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(memo, "memo"); - Utils.checkNotNull(taxRate, "taxRate"); - Utils.checkNotNull(totalAmount, "totalAmount"); - Utils.checkNotNull(lineItems, "lineItems"); - Utils.checkNotNull(reference, "reference"); - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - Utils.checkNotNull(customFields, "customFields"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(rowVersion, "rowVersion"); - Utils.checkNotNull(passThrough, "passThrough"); - this.number = number; - this.transactionDate = transactionDate; - this.accountId = accountId; - this.account = account; - this.bankAccount = bankAccount; - this.customerId = customerId; - this.supplierId = supplierId; - this.companyId = companyId; - this.departmentId = departmentId; - this.paymentType = paymentType; - this.currency = currency; - this.currencyRate = currencyRate; - this.type = type; - this.memo = memo; - this.taxRate = taxRate; - this.totalAmount = totalAmount; - this.lineItems = lineItems; - this.reference = reference; - this.sourceDocumentUrl = sourceDocumentUrl; - this.customFields = customFields; - this.status = status; - this.rowVersion = rowVersion; - this.passThrough = passThrough; - } - - public Expense2Input( - List lineItems) { - this(JsonNullable.undefined(), Optional.empty(), Optional.empty(), - Optional.empty(), JsonNullable.undefined(), Optional.empty(), - Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), - JsonNullable.undefined(), lineItems, JsonNullable.undefined(), - JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), - JsonNullable.undefined(), Optional.empty()); - } - - /** - * Number. - */ - @JsonIgnore - public JsonNullable number() { - return number; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonIgnore - public Optional transactionDate() { - return transactionDate; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - @JsonIgnore - public Optional accountId() { - return accountId; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional account() { - return (Optional) account; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable bankAccount() { - return (JsonNullable) bankAccount; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonIgnore - public Optional customerId() { - return customerId; - } - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonIgnore - public Optional supplierId() { - return supplierId; - } - - /** - * The company ID the transaction belongs to - */ - @JsonIgnore - public JsonNullable companyId() { - return companyId; - } - - /** - * The ID of the department - */ - @JsonIgnore - public JsonNullable departmentId() { - return departmentId; - } - - /** - * The type of payment for the expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable paymentType() { - return (JsonNullable) paymentType; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable currency() { - return (JsonNullable) currency; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonIgnore - public JsonNullable currencyRate() { - return currencyRate; - } - - /** - * The type of expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable type() { - return (JsonNullable) type; - } - - /** - * The memo of the expense. - */ - @JsonIgnore - public JsonNullable memo() { - return memo; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional taxRate() { - return (Optional) taxRate; - } - - /** - * The total amount of the expense line item. - */ - @JsonIgnore - public JsonNullable totalAmount() { - return totalAmount; - } - - /** - * Expense line items linked to this expense. - */ - @JsonIgnore - public List lineItems() { - return lineItems; - } - - /** - * Optional reference identifier for the transaction. - */ - @JsonIgnore - public JsonNullable reference() { - return reference; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonIgnore - public JsonNullable sourceDocumentUrl() { - return sourceDocumentUrl; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> customFields() { - return (Optional>) customFields; - } - - /** - * Expense status - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable status() { - return (JsonNullable) status; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonIgnore - public JsonNullable rowVersion() { - return rowVersion; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> passThrough() { - return (Optional>) passThrough; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number. - */ - public Expense2Input withNumber(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Expense2Input withNumber(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Expense2Input withTransactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Expense2Input withTransactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Expense2Input withAccountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.ofNullable(accountId); - return this; - } - - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Expense2Input withAccountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - public Expense2Input withAccount(LinkedLedgerAccountInput account) { - Utils.checkNotNull(account, "account"); - this.account = Optional.ofNullable(account); - return this; - } - - - public Expense2Input withAccount(Optional account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - public Expense2Input withBankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = JsonNullable.of(bankAccount); - return this; - } - - public Expense2Input withBankAccount(JsonNullable bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Expense2Input withCustomerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Expense2Input withCustomerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Expense2Input withSupplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Expense2Input withSupplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Expense2Input withCompanyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Expense2Input withCompanyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - /** - * The ID of the department - */ - public Expense2Input withDepartmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Expense2Input withDepartmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - /** - * The type of payment for the expense. - */ - public Expense2Input withPaymentType(Expense2PaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Expense2Input withPaymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Expense2Input withCurrency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Expense2Input withCurrency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Expense2Input withCurrencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Expense2Input withCurrencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - /** - * The type of expense. - */ - public Expense2Input withType(ExpenseExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Expense2Input withType(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The memo of the expense. - */ - public Expense2Input withMemo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Expense2Input withMemo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - public Expense2Input withTaxRate(LinkedTaxRateInput taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - - public Expense2Input withTaxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - /** - * The total amount of the expense line item. - */ - public Expense2Input withTotalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Expense2Input withTotalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - /** - * Expense line items linked to this expense. - */ - public Expense2Input withLineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Expense2Input withReference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Expense2Input withReference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Expense2Input withSourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Expense2Input withSourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - public Expense2Input withCustomFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - - public Expense2Input withCustomFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - /** - * Expense status - */ - public Expense2Input withStatus(Expense2Status status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Expense2Input withStatus(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Expense2Input withRowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Expense2Input withRowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Expense2Input withPassThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Expense2Input withPassThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Expense2Input other = (Expense2Input) o; - return - Utils.enhancedDeepEquals(this.number, other.number) && - Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && - Utils.enhancedDeepEquals(this.accountId, other.accountId) && - Utils.enhancedDeepEquals(this.account, other.account) && - Utils.enhancedDeepEquals(this.bankAccount, other.bankAccount) && - Utils.enhancedDeepEquals(this.customerId, other.customerId) && - Utils.enhancedDeepEquals(this.supplierId, other.supplierId) && - Utils.enhancedDeepEquals(this.companyId, other.companyId) && - Utils.enhancedDeepEquals(this.departmentId, other.departmentId) && - Utils.enhancedDeepEquals(this.paymentType, other.paymentType) && - Utils.enhancedDeepEquals(this.currency, other.currency) && - Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.memo, other.memo) && - Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && - Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && - Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && - Utils.enhancedDeepEquals(this.reference, other.reference) && - Utils.enhancedDeepEquals(this.sourceDocumentUrl, other.sourceDocumentUrl) && - Utils.enhancedDeepEquals(this.customFields, other.customFields) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && - Utils.enhancedDeepEquals(this.passThrough, other.passThrough); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - number, transactionDate, accountId, - account, bankAccount, customerId, - supplierId, companyId, departmentId, - paymentType, currency, currencyRate, - type, memo, taxRate, - totalAmount, lineItems, reference, - sourceDocumentUrl, customFields, status, - rowVersion, passThrough); - } - - @Override - public String toString() { - return Utils.toString(Expense2Input.class, - "number", number, - "transactionDate", transactionDate, - "accountId", accountId, - "account", account, - "bankAccount", bankAccount, - "customerId", customerId, - "supplierId", supplierId, - "companyId", companyId, - "departmentId", departmentId, - "paymentType", paymentType, - "currency", currency, - "currencyRate", currencyRate, - "type", type, - "memo", memo, - "taxRate", taxRate, - "totalAmount", totalAmount, - "lineItems", lineItems, - "reference", reference, - "sourceDocumentUrl", sourceDocumentUrl, - "customFields", customFields, - "status", status, - "rowVersion", rowVersion, - "passThrough", passThrough); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private JsonNullable number = JsonNullable.undefined(); - - private Optional transactionDate = Optional.empty(); - - @Deprecated - private Optional accountId = Optional.empty(); - - private Optional account = Optional.empty(); - - private JsonNullable bankAccount = JsonNullable.undefined(); - - private Optional customerId = Optional.empty(); - - private Optional supplierId = Optional.empty(); - - private JsonNullable companyId = JsonNullable.undefined(); - - private JsonNullable departmentId = JsonNullable.undefined(); - - private JsonNullable paymentType = JsonNullable.undefined(); - - private JsonNullable currency = JsonNullable.undefined(); - - private JsonNullable currencyRate = JsonNullable.undefined(); - - private JsonNullable type = JsonNullable.undefined(); - - private JsonNullable memo = JsonNullable.undefined(); - - private Optional taxRate = Optional.empty(); - - private JsonNullable totalAmount = JsonNullable.undefined(); - - private List lineItems; - - private JsonNullable reference = JsonNullable.undefined(); - - private JsonNullable sourceDocumentUrl = JsonNullable.undefined(); - - private Optional> customFields = Optional.empty(); - - private JsonNullable status = JsonNullable.undefined(); - - private JsonNullable rowVersion = JsonNullable.undefined(); - - private Optional> passThrough = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Number. - */ - public Builder number(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Builder number(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder accountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.ofNullable(accountId); - return this; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder accountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - - public Builder account(LinkedLedgerAccountInput account) { - Utils.checkNotNull(account, "account"); - this.account = Optional.ofNullable(account); - return this; - } - - public Builder account(Optional account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - - public Builder bankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = JsonNullable.of(bankAccount); - return this; - } - - public Builder bankAccount(JsonNullable bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - - /** - * The ID of the department - */ - public Builder departmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Builder departmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - - /** - * The type of payment for the expense. - */ - public Builder paymentType(Expense2PaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Builder paymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - - /** - * The type of expense. - */ - public Builder type(ExpenseExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Builder type(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * The memo of the expense. - */ - public Builder memo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Builder memo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - - public Builder taxRate(LinkedTaxRateInput taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - public Builder taxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - - /** - * Expense line items linked to this expense. - */ - public Builder lineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - - public Builder customFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - public Builder customFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - - /** - * Expense status - */ - public Builder status(Expense2Status status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Builder status(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - public Expense2Input build() { - - return new Expense2Input( - number, transactionDate, accountId, - account, bankAccount, customerId, - supplierId, companyId, departmentId, - paymentType, currency, currencyRate, - type, memo, taxRate, - totalAmount, lineItems, reference, - sourceDocumentUrl, customFields, status, - rowVersion, passThrough); - } - - } -} diff --git a/src/main/java/com/apideck/unify/models/components/Expense2PaymentType.java b/src/main/java/com/apideck/unify/models/components/Expense2PaymentType.java deleted file mode 100644 index 9ba982fda..000000000 --- a/src/main/java/com/apideck/unify/models/components/Expense2PaymentType.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * Expense2PaymentType - * - *

The type of payment for the expense. - */ -public enum Expense2PaymentType { - CASH("cash"), - CHECK("check"), - CREDIT_CARD("credit_card"), - OTHER("other"); - - @JsonValue - private final String value; - - Expense2PaymentType(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (Expense2PaymentType o: Expense2PaymentType.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/com/apideck/unify/models/components/Expense2Status.java b/src/main/java/com/apideck/unify/models/components/Expense2Status.java deleted file mode 100644 index 62408f747..000000000 --- a/src/main/java/com/apideck/unify/models/components/Expense2Status.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * Expense2Status - * - *

Expense status - */ -public enum Expense2Status { - DRAFT("draft"), - POSTED("posted"); - - @JsonValue - private final String value; - - Expense2Status(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (Expense2Status o: Expense2Status.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/com/apideck/unify/models/components/Expense3.java b/src/main/java/com/apideck/unify/models/components/Expense3.java deleted file mode 100644 index 351eed2e8..000000000 --- a/src/main/java/com/apideck/unify/models/components/Expense3.java +++ /dev/null @@ -1,1438 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.apideck.unify.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Deprecated; -import java.lang.Double; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - - -public class Expense3 { - /** - * Number. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("number") - private JsonNullable number; - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("transaction_date") - private Optional transactionDate; - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("account_id") - @Deprecated - private Optional accountId; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("account") - private JsonNullable account; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("bank_account") - private Optional bankAccount; - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("customer_id") - private Optional customerId; - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("supplier_id") - private Optional supplierId; - - /** - * The company ID the transaction belongs to - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("company_id") - private JsonNullable companyId; - - /** - * The ID of the department - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("department_id") - private JsonNullable departmentId; - - /** - * The type of payment for the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("payment_type") - private JsonNullable paymentType; - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency") - private JsonNullable currency; - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency_rate") - private JsonNullable currencyRate; - - /** - * The type of expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private JsonNullable type; - - /** - * The memo of the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("memo") - private JsonNullable memo; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tax_rate") - private Optional taxRate; - - /** - * The total amount of the expense line item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("total_amount") - private JsonNullable totalAmount; - - /** - * Expense line items linked to this expense. - */ - @JsonProperty("line_items") - private List lineItems; - - /** - * Optional reference identifier for the transaction. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("reference") - private JsonNullable reference; - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("source_document_url") - private JsonNullable sourceDocumentUrl; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("custom_fields") - private Optional> customFields; - - /** - * Expense status - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private JsonNullable status; - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("row_version") - private JsonNullable rowVersion; - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("pass_through") - private Optional> passThrough; - - @JsonCreator - public Expense3( - @JsonProperty("number") JsonNullable number, - @JsonProperty("transaction_date") Optional transactionDate, - @JsonProperty("account_id") Optional accountId, - @JsonProperty("account") JsonNullable account, - @JsonProperty("bank_account") Optional bankAccount, - @JsonProperty("customer_id") Optional customerId, - @JsonProperty("supplier_id") Optional supplierId, - @JsonProperty("company_id") JsonNullable companyId, - @JsonProperty("department_id") JsonNullable departmentId, - @JsonProperty("payment_type") JsonNullable paymentType, - @JsonProperty("currency") JsonNullable currency, - @JsonProperty("currency_rate") JsonNullable currencyRate, - @JsonProperty("type") JsonNullable type, - @JsonProperty("memo") JsonNullable memo, - @JsonProperty("tax_rate") Optional taxRate, - @JsonProperty("total_amount") JsonNullable totalAmount, - @JsonProperty("line_items") List lineItems, - @JsonProperty("reference") JsonNullable reference, - @JsonProperty("source_document_url") JsonNullable sourceDocumentUrl, - @JsonProperty("custom_fields") Optional> customFields, - @JsonProperty("status") JsonNullable status, - @JsonProperty("row_version") JsonNullable rowVersion, - @JsonProperty("pass_through") Optional> passThrough) { - Utils.checkNotNull(number, "number"); - Utils.checkNotNull(transactionDate, "transactionDate"); - Utils.checkNotNull(accountId, "accountId"); - Utils.checkNotNull(account, "account"); - Utils.checkNotNull(bankAccount, "bankAccount"); - Utils.checkNotNull(customerId, "customerId"); - Utils.checkNotNull(supplierId, "supplierId"); - Utils.checkNotNull(companyId, "companyId"); - Utils.checkNotNull(departmentId, "departmentId"); - Utils.checkNotNull(paymentType, "paymentType"); - Utils.checkNotNull(currency, "currency"); - Utils.checkNotNull(currencyRate, "currencyRate"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(memo, "memo"); - Utils.checkNotNull(taxRate, "taxRate"); - Utils.checkNotNull(totalAmount, "totalAmount"); - Utils.checkNotNull(lineItems, "lineItems"); - Utils.checkNotNull(reference, "reference"); - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - Utils.checkNotNull(customFields, "customFields"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(rowVersion, "rowVersion"); - Utils.checkNotNull(passThrough, "passThrough"); - this.number = number; - this.transactionDate = transactionDate; - this.accountId = accountId; - this.account = account; - this.bankAccount = bankAccount; - this.customerId = customerId; - this.supplierId = supplierId; - this.companyId = companyId; - this.departmentId = departmentId; - this.paymentType = paymentType; - this.currency = currency; - this.currencyRate = currencyRate; - this.type = type; - this.memo = memo; - this.taxRate = taxRate; - this.totalAmount = totalAmount; - this.lineItems = lineItems; - this.reference = reference; - this.sourceDocumentUrl = sourceDocumentUrl; - this.customFields = customFields; - this.status = status; - this.rowVersion = rowVersion; - this.passThrough = passThrough; - } - - public Expense3( - List lineItems) { - this(JsonNullable.undefined(), Optional.empty(), Optional.empty(), - JsonNullable.undefined(), Optional.empty(), Optional.empty(), - Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), - JsonNullable.undefined(), lineItems, JsonNullable.undefined(), - JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), - JsonNullable.undefined(), Optional.empty()); - } - - /** - * Number. - */ - @JsonIgnore - public JsonNullable number() { - return number; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonIgnore - public Optional transactionDate() { - return transactionDate; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - @JsonIgnore - public Optional accountId() { - return accountId; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable account() { - return (JsonNullable) account; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional bankAccount() { - return (Optional) bankAccount; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonIgnore - public Optional customerId() { - return customerId; - } - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonIgnore - public Optional supplierId() { - return supplierId; - } - - /** - * The company ID the transaction belongs to - */ - @JsonIgnore - public JsonNullable companyId() { - return companyId; - } - - /** - * The ID of the department - */ - @JsonIgnore - public JsonNullable departmentId() { - return departmentId; - } - - /** - * The type of payment for the expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable paymentType() { - return (JsonNullable) paymentType; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable currency() { - return (JsonNullable) currency; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonIgnore - public JsonNullable currencyRate() { - return currencyRate; - } - - /** - * The type of expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable type() { - return (JsonNullable) type; - } - - /** - * The memo of the expense. - */ - @JsonIgnore - public JsonNullable memo() { - return memo; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional taxRate() { - return (Optional) taxRate; - } - - /** - * The total amount of the expense line item. - */ - @JsonIgnore - public JsonNullable totalAmount() { - return totalAmount; - } - - /** - * Expense line items linked to this expense. - */ - @JsonIgnore - public List lineItems() { - return lineItems; - } - - /** - * Optional reference identifier for the transaction. - */ - @JsonIgnore - public JsonNullable reference() { - return reference; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonIgnore - public JsonNullable sourceDocumentUrl() { - return sourceDocumentUrl; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> customFields() { - return (Optional>) customFields; - } - - /** - * Expense status - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable status() { - return (JsonNullable) status; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonIgnore - public JsonNullable rowVersion() { - return rowVersion; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> passThrough() { - return (Optional>) passThrough; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * Number. - */ - public Expense3 withNumber(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Expense3 withNumber(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Expense3 withTransactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Expense3 withTransactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Expense3 withAccountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.ofNullable(accountId); - return this; - } - - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Expense3 withAccountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - public Expense3 withAccount(LinkedLedgerAccountInput account) { - Utils.checkNotNull(account, "account"); - this.account = JsonNullable.of(account); - return this; - } - - public Expense3 withAccount(JsonNullable account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - public Expense3 withBankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = Optional.ofNullable(bankAccount); - return this; - } - - - public Expense3 withBankAccount(Optional bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Expense3 withCustomerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Expense3 withCustomerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Expense3 withSupplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Expense3 withSupplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Expense3 withCompanyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Expense3 withCompanyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - /** - * The ID of the department - */ - public Expense3 withDepartmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Expense3 withDepartmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - /** - * The type of payment for the expense. - */ - public Expense3 withPaymentType(Expense3PaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Expense3 withPaymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Expense3 withCurrency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Expense3 withCurrency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Expense3 withCurrencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Expense3 withCurrencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - /** - * The type of expense. - */ - public Expense3 withType(Expense3ExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Expense3 withType(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The memo of the expense. - */ - public Expense3 withMemo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Expense3 withMemo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - public Expense3 withTaxRate(LinkedTaxRateInput taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - - public Expense3 withTaxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - /** - * The total amount of the expense line item. - */ - public Expense3 withTotalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Expense3 withTotalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - /** - * Expense line items linked to this expense. - */ - public Expense3 withLineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Expense3 withReference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Expense3 withReference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Expense3 withSourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Expense3 withSourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - public Expense3 withCustomFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - - public Expense3 withCustomFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - /** - * Expense status - */ - public Expense3 withStatus(Expense3Status status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Expense3 withStatus(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Expense3 withRowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Expense3 withRowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Expense3 withPassThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Expense3 withPassThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Expense3 other = (Expense3) o; - return - Utils.enhancedDeepEquals(this.number, other.number) && - Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && - Utils.enhancedDeepEquals(this.accountId, other.accountId) && - Utils.enhancedDeepEquals(this.account, other.account) && - Utils.enhancedDeepEquals(this.bankAccount, other.bankAccount) && - Utils.enhancedDeepEquals(this.customerId, other.customerId) && - Utils.enhancedDeepEquals(this.supplierId, other.supplierId) && - Utils.enhancedDeepEquals(this.companyId, other.companyId) && - Utils.enhancedDeepEquals(this.departmentId, other.departmentId) && - Utils.enhancedDeepEquals(this.paymentType, other.paymentType) && - Utils.enhancedDeepEquals(this.currency, other.currency) && - Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.memo, other.memo) && - Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && - Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && - Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && - Utils.enhancedDeepEquals(this.reference, other.reference) && - Utils.enhancedDeepEquals(this.sourceDocumentUrl, other.sourceDocumentUrl) && - Utils.enhancedDeepEquals(this.customFields, other.customFields) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && - Utils.enhancedDeepEquals(this.passThrough, other.passThrough); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - number, transactionDate, accountId, - account, bankAccount, customerId, - supplierId, companyId, departmentId, - paymentType, currency, currencyRate, - type, memo, taxRate, - totalAmount, lineItems, reference, - sourceDocumentUrl, customFields, status, - rowVersion, passThrough); - } - - @Override - public String toString() { - return Utils.toString(Expense3.class, - "number", number, - "transactionDate", transactionDate, - "accountId", accountId, - "account", account, - "bankAccount", bankAccount, - "customerId", customerId, - "supplierId", supplierId, - "companyId", companyId, - "departmentId", departmentId, - "paymentType", paymentType, - "currency", currency, - "currencyRate", currencyRate, - "type", type, - "memo", memo, - "taxRate", taxRate, - "totalAmount", totalAmount, - "lineItems", lineItems, - "reference", reference, - "sourceDocumentUrl", sourceDocumentUrl, - "customFields", customFields, - "status", status, - "rowVersion", rowVersion, - "passThrough", passThrough); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private JsonNullable number = JsonNullable.undefined(); - - private Optional transactionDate = Optional.empty(); - - @Deprecated - private Optional accountId = Optional.empty(); - - private JsonNullable account = JsonNullable.undefined(); - - private Optional bankAccount = Optional.empty(); - - private Optional customerId = Optional.empty(); - - private Optional supplierId = Optional.empty(); - - private JsonNullable companyId = JsonNullable.undefined(); - - private JsonNullable departmentId = JsonNullable.undefined(); - - private JsonNullable paymentType = JsonNullable.undefined(); - - private JsonNullable currency = JsonNullable.undefined(); - - private JsonNullable currencyRate = JsonNullable.undefined(); - - private JsonNullable type = JsonNullable.undefined(); - - private JsonNullable memo = JsonNullable.undefined(); - - private Optional taxRate = Optional.empty(); - - private JsonNullable totalAmount = JsonNullable.undefined(); - - private List lineItems; - - private JsonNullable reference = JsonNullable.undefined(); - - private JsonNullable sourceDocumentUrl = JsonNullable.undefined(); - - private Optional> customFields = Optional.empty(); - - private JsonNullable status = JsonNullable.undefined(); - - private JsonNullable rowVersion = JsonNullable.undefined(); - - private Optional> passThrough = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * Number. - */ - public Builder number(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Builder number(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder accountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.ofNullable(accountId); - return this; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder accountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - - public Builder account(LinkedLedgerAccountInput account) { - Utils.checkNotNull(account, "account"); - this.account = JsonNullable.of(account); - return this; - } - - public Builder account(JsonNullable account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - - public Builder bankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = Optional.ofNullable(bankAccount); - return this; - } - - public Builder bankAccount(Optional bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - - /** - * The ID of the department - */ - public Builder departmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Builder departmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - - /** - * The type of payment for the expense. - */ - public Builder paymentType(Expense3PaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Builder paymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - - /** - * The type of expense. - */ - public Builder type(Expense3ExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Builder type(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * The memo of the expense. - */ - public Builder memo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Builder memo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - - public Builder taxRate(LinkedTaxRateInput taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - public Builder taxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - - /** - * Expense line items linked to this expense. - */ - public Builder lineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - - public Builder customFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - public Builder customFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - - /** - * Expense status - */ - public Builder status(Expense3Status status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Builder status(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - public Expense3 build() { - - return new Expense3( - number, transactionDate, accountId, - account, bankAccount, customerId, - supplierId, companyId, departmentId, - paymentType, currency, currencyRate, - type, memo, taxRate, - totalAmount, lineItems, reference, - sourceDocumentUrl, customFields, status, - rowVersion, passThrough); - } - - } -} diff --git a/src/main/java/com/apideck/unify/models/components/Expense3ExpenseType.java b/src/main/java/com/apideck/unify/models/components/Expense3ExpenseType.java deleted file mode 100644 index 1ef552f05..000000000 --- a/src/main/java/com/apideck/unify/models/components/Expense3ExpenseType.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * Expense3ExpenseType - * - *

The type of expense. - */ -public enum Expense3ExpenseType { - EXPENSE("expense"), - REFUND("refund"); - - @JsonValue - private final String value; - - Expense3ExpenseType(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (Expense3ExpenseType o: Expense3ExpenseType.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/com/apideck/unify/models/components/Expense3PaymentType.java b/src/main/java/com/apideck/unify/models/components/Expense3PaymentType.java deleted file mode 100644 index 99066786f..000000000 --- a/src/main/java/com/apideck/unify/models/components/Expense3PaymentType.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * Expense3PaymentType - * - *

The type of payment for the expense. - */ -public enum Expense3PaymentType { - CASH("cash"), - CHECK("check"), - CREDIT_CARD("credit_card"), - OTHER("other"); - - @JsonValue - private final String value; - - Expense3PaymentType(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (Expense3PaymentType o: Expense3PaymentType.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/com/apideck/unify/models/components/Expense3Status.java b/src/main/java/com/apideck/unify/models/components/Expense3Status.java deleted file mode 100644 index 04f571b2b..000000000 --- a/src/main/java/com/apideck/unify/models/components/Expense3Status.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * Expense3Status - * - *

Expense status - */ -public enum Expense3Status { - DRAFT("draft"), - POSTED("posted"); - - @JsonValue - private final String value; - - Expense3Status(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (Expense3Status o: Expense3Status.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseExpenseType.java b/src/main/java/com/apideck/unify/models/components/ExpenseExpenseType.java deleted file mode 100644 index 3fe035f2c..000000000 --- a/src/main/java/com/apideck/unify/models/components/ExpenseExpenseType.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -/** - * ExpenseExpenseType - * - *

The type of expense. - */ -public enum ExpenseExpenseType { - EXPENSE("expense"), - REFUND("refund"); - - @JsonValue - private final String value; - - ExpenseExpenseType(String value) { - this.value = value; - } - - public String value() { - return value; - } - - public static Optional fromValue(String value) { - for (ExpenseExpenseType o: ExpenseExpenseType.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } - } - return Optional.empty(); - } -} - diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseInput.java b/src/main/java/com/apideck/unify/models/components/ExpenseInput.java index b5fcd92c6..d265a39fc 100644 --- a/src/main/java/com/apideck/unify/models/components/ExpenseInput.java +++ b/src/main/java/com/apideck/unify/models/components/ExpenseInput.java @@ -3,66 +3,1030 @@ */ package com.apideck.unify.models.components; -import com.apideck.unify.utils.OneOfDeserializer; -import com.apideck.unify.utils.TypedObject; -import com.apideck.unify.utils.Utils.JsonShape; -import com.apideck.unify.utils.Utils.TypeReferenceWithShape; import com.apideck.unify.utils.Utils; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Deprecated; +import java.lang.Double; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + -@JsonDeserialize(using = ExpenseInput._Deserializer.class) public class ExpenseInput { + /** + * Number. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("number") + private JsonNullable number; + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("transaction_date") + private Optional transactionDate; + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account_id") + @Deprecated + private Optional accountId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("bank_account") + private JsonNullable bankAccount; + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer_id") + private Optional customerId; + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("supplier_id") + @Deprecated + private Optional supplierId; + + /** + * The supplier this entity is linked to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("supplier") + private JsonNullable supplier; + + /** + * The company ID the transaction belongs to + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("company_id") + private JsonNullable companyId; + + /** + * The ID of the department + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("department_id") + private JsonNullable departmentId; + + /** + * The type of payment for the expense. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_type") + private JsonNullable paymentType; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency_rate") + private JsonNullable currencyRate; + + /** + * The type of expense. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private JsonNullable type; - @JsonValue - private TypedObject value; + /** + * The memo of the expense. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("memo") + private JsonNullable memo; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_rate") + private Optional taxRate; + + /** + * Amounts are including tax + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_inclusive") + private JsonNullable taxInclusive; + + /** + * Subtotal amount, normally before tax. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sub_total") + private JsonNullable subTotal; + + /** + * Total tax amount applied to this transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_tax") + private JsonNullable totalTax; + + /** + * The total amount of the expense line item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_amount") + private JsonNullable totalAmount; + + /** + * Expense line items linked to this expense. + */ + @JsonProperty("line_items") + private List lineItems; + + /** + * Optional reference identifier for the transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference") + private JsonNullable reference; + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_document_url") + private JsonNullable sourceDocumentUrl; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * Expense status + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private JsonNullable status; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public ExpenseInput( + @JsonProperty("number") JsonNullable number, + @JsonProperty("transaction_date") Optional transactionDate, + @JsonProperty("account_id") Optional accountId, + @JsonProperty("account") JsonNullable account, + @JsonProperty("bank_account") JsonNullable bankAccount, + @JsonProperty("customer_id") Optional customerId, + @JsonProperty("supplier_id") Optional supplierId, + @JsonProperty("supplier") JsonNullable supplier, + @JsonProperty("company_id") JsonNullable companyId, + @JsonProperty("department_id") JsonNullable departmentId, + @JsonProperty("payment_type") JsonNullable paymentType, + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("currency_rate") JsonNullable currencyRate, + @JsonProperty("type") JsonNullable type, + @JsonProperty("memo") JsonNullable memo, + @JsonProperty("tax_rate") Optional taxRate, + @JsonProperty("tax_inclusive") JsonNullable taxInclusive, + @JsonProperty("sub_total") JsonNullable subTotal, + @JsonProperty("total_tax") JsonNullable totalTax, + @JsonProperty("total_amount") JsonNullable totalAmount, + @JsonProperty("line_items") List lineItems, + @JsonProperty("reference") JsonNullable reference, + @JsonProperty("source_document_url") JsonNullable sourceDocumentUrl, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("status") JsonNullable status, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(number, "number"); + Utils.checkNotNull(transactionDate, "transactionDate"); + Utils.checkNotNull(accountId, "accountId"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(bankAccount, "bankAccount"); + Utils.checkNotNull(customerId, "customerId"); + Utils.checkNotNull(supplierId, "supplierId"); + Utils.checkNotNull(supplier, "supplier"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(departmentId, "departmentId"); + Utils.checkNotNull(paymentType, "paymentType"); + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(currencyRate, "currencyRate"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(memo, "memo"); + Utils.checkNotNull(taxRate, "taxRate"); + Utils.checkNotNull(taxInclusive, "taxInclusive"); + Utils.checkNotNull(subTotal, "subTotal"); + Utils.checkNotNull(totalTax, "totalTax"); + Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(lineItems, "lineItems"); + Utils.checkNotNull(reference, "reference"); + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(passThrough, "passThrough"); + this.number = number; + this.transactionDate = transactionDate; + this.accountId = accountId; + this.account = account; + this.bankAccount = bankAccount; + this.customerId = customerId; + this.supplierId = supplierId; + this.supplier = supplier; + this.companyId = companyId; + this.departmentId = departmentId; + this.paymentType = paymentType; + this.currency = currency; + this.currencyRate = currencyRate; + this.type = type; + this.memo = memo; + this.taxRate = taxRate; + this.taxInclusive = taxInclusive; + this.subTotal = subTotal; + this.totalTax = totalTax; + this.totalAmount = totalAmount; + this.lineItems = lineItems; + this.reference = reference; + this.sourceDocumentUrl = sourceDocumentUrl; + this.customFields = customFields; + this.status = status; + this.rowVersion = rowVersion; + this.passThrough = passThrough; + } - private ExpenseInput(TypedObject value) { - this.value = value; + public ExpenseInput( + List lineItems) { + this(JsonNullable.undefined(), Optional.empty(), Optional.empty(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), lineItems, + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty()); } - public static ExpenseInput of(Expense1Input value) { - Utils.checkNotNull(value, "value"); - return new ExpenseInput(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + /** + * Number. + */ + @JsonIgnore + public JsonNullable number() { + return number; } - public static ExpenseInput of(Expense2Input value) { - Utils.checkNotNull(value, "value"); - return new ExpenseInput(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonIgnore + public Optional transactionDate() { + return transactionDate; } - public static ExpenseInput of(Expense3 value) { - Utils.checkNotNull(value, "value"); - return new ExpenseInput(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + @JsonIgnore + public Optional accountId() { + return accountId; } - + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable bankAccount() { + return (JsonNullable) bankAccount; + } + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + @JsonIgnore + public Optional customerId() { + return customerId; + } + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + @JsonIgnore + public Optional supplierId() { + return supplierId; + } + + /** + * The supplier this entity is linked to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable supplier() { + return (JsonNullable) supplier; + } + + /** + * The company ID the transaction belongs to + */ + @JsonIgnore + public JsonNullable companyId() { + return companyId; + } + + /** + * The ID of the department + */ + @JsonIgnore + public JsonNullable departmentId() { + return departmentId; + } + + /** + * The type of payment for the expense. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable paymentType() { + return (JsonNullable) paymentType; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonIgnore + public JsonNullable currencyRate() { + return currencyRate; + } + + /** + * The type of expense. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable type() { + return (JsonNullable) type; + } + + /** + * The memo of the expense. + */ + @JsonIgnore + public JsonNullable memo() { + return memo; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional taxRate() { + return (Optional) taxRate; + } + + /** + * Amounts are including tax + */ + @JsonIgnore + public JsonNullable taxInclusive() { + return taxInclusive; + } + + /** + * Subtotal amount, normally before tax. + */ + @JsonIgnore + public JsonNullable subTotal() { + return subTotal; + } + + /** + * Total tax amount applied to this transaction. + */ + @JsonIgnore + public JsonNullable totalTax() { + return totalTax; + } + + /** + * The total amount of the expense line item. + */ + @JsonIgnore + public JsonNullable totalAmount() { + return totalAmount; + } + + /** + * Expense line items linked to this expense. + */ + @JsonIgnore + public List lineItems() { + return lineItems; + } + + /** + * Optional reference identifier for the transaction. + */ + @JsonIgnore + public JsonNullable reference() { + return reference; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + @JsonIgnore + public JsonNullable sourceDocumentUrl() { + return sourceDocumentUrl; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * Expense status + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable status() { + return (JsonNullable) status; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Number. + */ + public ExpenseInput withNumber(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + /** - * Returns an instance of one of these types: - *

    - *
  • {@code com.apideck.unify.models.components.Expense1Input}
  • - *
  • {@code com.apideck.unify.models.components.Expense2Input}
  • - *
  • {@code com.apideck.unify.models.components.Expense3}
  • - *
+ * Number. + */ + public ExpenseInput withNumber(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public ExpenseInput withTransactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = Optional.ofNullable(transactionDate); + return this; + } + + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public ExpenseInput withTransactionDate(Optional transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. * - *

Use {@code instanceof} to determine what type is returned. For example: + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public ExpenseInput withAccountId(String accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = Optional.ofNullable(accountId); + return this; + } + + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. * - *

-     * if (obj.value() instanceof String) {
-     *     String answer = (String) obj.value();
-     *     System.out.println("answer=" + answer);
-     * }
-     * 
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public ExpenseInput withAccountId(Optional accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = accountId; + return this; + } + + public ExpenseInput withAccount(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public ExpenseInput withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + public ExpenseInput withBankAccount(LinkedBankAccount bankAccount) { + Utils.checkNotNull(bankAccount, "bankAccount"); + this.bankAccount = JsonNullable.of(bankAccount); + return this; + } + + public ExpenseInput withBankAccount(JsonNullable bankAccount) { + Utils.checkNotNull(bankAccount, "bankAccount"); + this.bankAccount = bankAccount; + return this; + } + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + public ExpenseInput withCustomerId(String customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = Optional.ofNullable(customerId); + return this; + } + + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + public ExpenseInput withCustomerId(Optional customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = customerId; + return this; + } + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. * - * @return value of oneOf type - **/ - public java.lang.Object value() { - return value.value(); - } - + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public ExpenseInput withSupplierId(String supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = Optional.ofNullable(supplierId); + return this; + } + + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public ExpenseInput withSupplierId(Optional supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = supplierId; + return this; + } + + /** + * The supplier this entity is linked to. + */ + public ExpenseInput withSupplier(LinkedSupplierInput supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = JsonNullable.of(supplier); + return this; + } + + /** + * The supplier this entity is linked to. + */ + public ExpenseInput withSupplier(JsonNullable supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = supplier; + return this; + } + + /** + * The company ID the transaction belongs to + */ + public ExpenseInput withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public ExpenseInput withCompanyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + /** + * The ID of the department + */ + public ExpenseInput withDepartmentId(String departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = JsonNullable.of(departmentId); + return this; + } + + /** + * The ID of the department + */ + public ExpenseInput withDepartmentId(JsonNullable departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = departmentId; + return this; + } + + /** + * The type of payment for the expense. + */ + public ExpenseInput withPaymentType(ExpensePaymentType paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = JsonNullable.of(paymentType); + return this; + } + + /** + * The type of payment for the expense. + */ + public ExpenseInput withPaymentType(JsonNullable paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = paymentType; + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public ExpenseInput withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public ExpenseInput withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public ExpenseInput withCurrencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public ExpenseInput withCurrencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + /** + * The type of expense. + */ + public ExpenseInput withType(ExpenseType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * The type of expense. + */ + public ExpenseInput withType(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The memo of the expense. + */ + public ExpenseInput withMemo(String memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = JsonNullable.of(memo); + return this; + } + + /** + * The memo of the expense. + */ + public ExpenseInput withMemo(JsonNullable memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = memo; + return this; + } + + public ExpenseInput withTaxRate(LinkedTaxRateInput taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = Optional.ofNullable(taxRate); + return this; + } + + + public ExpenseInput withTaxRate(Optional taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = taxRate; + return this; + } + + /** + * Amounts are including tax + */ + public ExpenseInput withTaxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public ExpenseInput withTaxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public ExpenseInput withSubTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public ExpenseInput withSubTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public ExpenseInput withTotalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public ExpenseInput withTotalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + /** + * The total amount of the expense line item. + */ + public ExpenseInput withTotalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the expense line item. + */ + public ExpenseInput withTotalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + /** + * Expense line items linked to this expense. + */ + public ExpenseInput withLineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public ExpenseInput withReference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public ExpenseInput withReference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public ExpenseInput withSourceDocumentUrl(String sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); + return this; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public ExpenseInput withSourceDocumentUrl(JsonNullable sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = sourceDocumentUrl; + return this; + } + + public ExpenseInput withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public ExpenseInput withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + /** + * Expense status + */ + public ExpenseInput withStatus(ExpenseStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * Expense status + */ + public ExpenseInput withStatus(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public ExpenseInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public ExpenseInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public ExpenseInput withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public ExpenseInput withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,30 +1036,662 @@ public boolean equals(java.lang.Object o) { return false; } ExpenseInput other = (ExpenseInput) o; - return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); + return + Utils.enhancedDeepEquals(this.number, other.number) && + Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && + Utils.enhancedDeepEquals(this.accountId, other.accountId) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.bankAccount, other.bankAccount) && + Utils.enhancedDeepEquals(this.customerId, other.customerId) && + Utils.enhancedDeepEquals(this.supplierId, other.supplierId) && + Utils.enhancedDeepEquals(this.supplier, other.supplier) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.departmentId, other.departmentId) && + Utils.enhancedDeepEquals(this.paymentType, other.paymentType) && + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.memo, other.memo) && + Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && + Utils.enhancedDeepEquals(this.taxInclusive, other.taxInclusive) && + Utils.enhancedDeepEquals(this.subTotal, other.subTotal) && + Utils.enhancedDeepEquals(this.totalTax, other.totalTax) && + Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && + Utils.enhancedDeepEquals(this.reference, other.reference) && + Utils.enhancedDeepEquals(this.sourceDocumentUrl, other.sourceDocumentUrl) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); } @Override public int hashCode() { - return Utils.enhancedHash(value.value()); - } - - @SuppressWarnings("serial") - public static final class _Deserializer extends OneOfDeserializer { - - public _Deserializer() { - super(ExpenseInput.class, false, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); - } + return Utils.enhancedHash( + number, transactionDate, accountId, + account, bankAccount, customerId, + supplierId, supplier, companyId, + departmentId, paymentType, currency, + currencyRate, type, memo, + taxRate, taxInclusive, subTotal, + totalTax, totalAmount, lineItems, + reference, sourceDocumentUrl, customFields, + status, rowVersion, passThrough); } @Override public String toString() { return Utils.toString(ExpenseInput.class, - "value", value); + "number", number, + "transactionDate", transactionDate, + "accountId", accountId, + "account", account, + "bankAccount", bankAccount, + "customerId", customerId, + "supplierId", supplierId, + "supplier", supplier, + "companyId", companyId, + "departmentId", departmentId, + "paymentType", paymentType, + "currency", currency, + "currencyRate", currencyRate, + "type", type, + "memo", memo, + "taxRate", taxRate, + "taxInclusive", taxInclusive, + "subTotal", subTotal, + "totalTax", totalTax, + "totalAmount", totalAmount, + "lineItems", lineItems, + "reference", reference, + "sourceDocumentUrl", sourceDocumentUrl, + "customFields", customFields, + "status", status, + "rowVersion", rowVersion, + "passThrough", passThrough); } - -} + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable number = JsonNullable.undefined(); + + private Optional transactionDate = Optional.empty(); + + @Deprecated + private Optional accountId = Optional.empty(); + + private JsonNullable account = JsonNullable.undefined(); + + private JsonNullable bankAccount = JsonNullable.undefined(); + + private Optional customerId = Optional.empty(); + + @Deprecated + private Optional supplierId = Optional.empty(); + + private JsonNullable supplier = JsonNullable.undefined(); + + private JsonNullable companyId = JsonNullable.undefined(); + + private JsonNullable departmentId = JsonNullable.undefined(); + + private JsonNullable paymentType = JsonNullable.undefined(); + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable currencyRate = JsonNullable.undefined(); + + private JsonNullable type = JsonNullable.undefined(); + + private JsonNullable memo = JsonNullable.undefined(); + + private Optional taxRate = Optional.empty(); + + private JsonNullable taxInclusive = JsonNullable.undefined(); + + private JsonNullable subTotal = JsonNullable.undefined(); + + private JsonNullable totalTax = JsonNullable.undefined(); + + private JsonNullable totalAmount = JsonNullable.undefined(); + + private List lineItems; + + private JsonNullable reference = JsonNullable.undefined(); + + private JsonNullable sourceDocumentUrl = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable status = JsonNullable.undefined(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Number. + */ + public Builder number(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Number. + */ + public Builder number(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = Optional.ofNullable(transactionDate); + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(Optional transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Builder accountId(String accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = Optional.ofNullable(accountId); + return this; + } + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Builder accountId(Optional accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = accountId; + return this; + } + + + public Builder account(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + public Builder bankAccount(LinkedBankAccount bankAccount) { + Utils.checkNotNull(bankAccount, "bankAccount"); + this.bankAccount = JsonNullable.of(bankAccount); + return this; + } + + public Builder bankAccount(JsonNullable bankAccount) { + Utils.checkNotNull(bankAccount, "bankAccount"); + this.bankAccount = bankAccount; + return this; + } + + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + public Builder customerId(String customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = Optional.ofNullable(customerId); + return this; + } + + /** + * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable + * to customers. + */ + public Builder customerId(Optional customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = customerId; + return this; + } + + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Builder supplierId(String supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = Optional.ofNullable(supplierId); + return this; + } + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Builder supplierId(Optional supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = supplierId; + return this; + } + + + /** + * The supplier this entity is linked to. + */ + public Builder supplier(LinkedSupplierInput supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = JsonNullable.of(supplier); + return this; + } + + /** + * The supplier this entity is linked to. + */ + public Builder supplier(JsonNullable supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = supplier; + return this; + } + + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + /** + * The ID of the department + */ + public Builder departmentId(String departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = JsonNullable.of(departmentId); + return this; + } + + /** + * The ID of the department + */ + public Builder departmentId(JsonNullable departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = departmentId; + return this; + } + + + /** + * The type of payment for the expense. + */ + public Builder paymentType(ExpensePaymentType paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = JsonNullable.of(paymentType); + return this; + } + + /** + * The type of payment for the expense. + */ + public Builder paymentType(JsonNullable paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = paymentType; + return this; + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + + /** + * The type of expense. + */ + public Builder type(ExpenseType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * The type of expense. + */ + public Builder type(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The memo of the expense. + */ + public Builder memo(String memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = JsonNullable.of(memo); + return this; + } + + /** + * The memo of the expense. + */ + public Builder memo(JsonNullable memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = memo; + return this; + } + + + public Builder taxRate(LinkedTaxRateInput taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = Optional.ofNullable(taxRate); + return this; + } + + public Builder taxRate(Optional taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = taxRate; + return this; + } + + + /** + * Amounts are including tax + */ + public Builder taxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public Builder taxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + + /** + * The total amount of the expense line item. + */ + public Builder totalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the expense line item. + */ + public Builder totalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + + /** + * Expense line items linked to this expense. + */ + public Builder lineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + + /** + * Optional reference identifier for the transaction. + */ + public Builder reference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public Builder reference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public Builder sourceDocumentUrl(String sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); + return this; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public Builder sourceDocumentUrl(JsonNullable sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = sourceDocumentUrl; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * Expense status + */ + public Builder status(ExpenseStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * Expense status + */ + public Builder status(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public ExpenseInput build() { + + return new ExpenseInput( + number, transactionDate, accountId, + account, bankAccount, customerId, + supplierId, supplier, companyId, + departmentId, paymentType, currency, + currencyRate, type, memo, + taxRate, taxInclusive, subTotal, + totalTax, totalAmount, lineItems, + reference, sourceDocumentUrl, customFields, + status, rowVersion, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseLineItem.java b/src/main/java/com/apideck/unify/models/components/ExpenseLineItem.java index fcdf8dd34..01023bf51 100644 --- a/src/main/java/com/apideck/unify/models/components/ExpenseLineItem.java +++ b/src/main/java/com/apideck/unify/models/components/ExpenseLineItem.java @@ -91,6 +91,13 @@ public class ExpenseLineItem { @JsonProperty("description") private JsonNullable description; + /** + * Line Item type + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private JsonNullable type; + /** * The total amount of the expense line item. */ @@ -98,11 +105,36 @@ public class ExpenseLineItem { @JsonProperty("total_amount") private Optional totalAmount; + /** + * Tax amount + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_amount") + private JsonNullable taxAmount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("quantity") + private JsonNullable quantity; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("unit_price") + private JsonNullable unitPrice; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("item") + private Optional item; + /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("billable") + @Deprecated private Optional billable; /** @@ -131,7 +163,12 @@ public ExpenseLineItem( @JsonProperty("subsidiary_id") JsonNullable subsidiaryId, @JsonProperty("tax_rate") Optional taxRate, @JsonProperty("description") JsonNullable description, + @JsonProperty("type") JsonNullable type, @JsonProperty("total_amount") Optional totalAmount, + @JsonProperty("tax_amount") JsonNullable taxAmount, + @JsonProperty("quantity") JsonNullable quantity, + @JsonProperty("unit_price") JsonNullable unitPrice, + @JsonProperty("item") Optional item, @JsonProperty("billable") Optional billable, @JsonProperty("line_number") JsonNullable lineNumber, @JsonProperty("rebilling") JsonNullable rebilling) { @@ -145,7 +182,12 @@ public ExpenseLineItem( Utils.checkNotNull(subsidiaryId, "subsidiaryId"); Utils.checkNotNull(taxRate, "taxRate"); Utils.checkNotNull(description, "description"); + Utils.checkNotNull(type, "type"); Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(taxAmount, "taxAmount"); + Utils.checkNotNull(quantity, "quantity"); + Utils.checkNotNull(unitPrice, "unitPrice"); + Utils.checkNotNull(item, "item"); Utils.checkNotNull(billable, "billable"); Utils.checkNotNull(lineNumber, "lineNumber"); Utils.checkNotNull(rebilling, "rebilling"); @@ -159,7 +201,12 @@ public ExpenseLineItem( this.subsidiaryId = subsidiaryId; this.taxRate = taxRate; this.description = description; + this.type = type; this.totalAmount = totalAmount; + this.taxAmount = taxAmount; + this.quantity = quantity; + this.unitPrice = unitPrice; + this.item = item; this.billable = billable; this.lineNumber = lineNumber; this.rebilling = rebilling; @@ -169,8 +216,10 @@ public ExpenseLineItem() { this(Optional.empty(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), - JsonNullable.undefined(), Optional.empty(), Optional.empty(), - JsonNullable.undefined(), JsonNullable.undefined()); + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined()); } /** @@ -253,6 +302,15 @@ public JsonNullable description() { return description; } + /** + * Line Item type + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable type() { + return (JsonNullable) type; + } + /** * The total amount of the expense line item. */ @@ -261,9 +319,36 @@ public Optional totalAmount() { return totalAmount; } + /** + * Tax amount + */ + @JsonIgnore + public JsonNullable taxAmount() { + return taxAmount; + } + + @JsonIgnore + public JsonNullable quantity() { + return quantity; + } + + @JsonIgnore + public JsonNullable unitPrice() { + return unitPrice; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional item() { + return (Optional) item; + } + /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated @JsonIgnore public Optional billable() { return billable; @@ -469,6 +554,24 @@ public ExpenseLineItem withDescription(JsonNullable description) { return this; } + /** + * Line Item type + */ + public ExpenseLineItem withType(LineItemType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * Line Item type + */ + public ExpenseLineItem withType(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + /** * The total amount of the expense line item. */ @@ -488,9 +591,67 @@ public ExpenseLineItem withTotalAmount(Optional totalAmount) { return this; } + /** + * Tax amount + */ + public ExpenseLineItem withTaxAmount(double taxAmount) { + Utils.checkNotNull(taxAmount, "taxAmount"); + this.taxAmount = JsonNullable.of(taxAmount); + return this; + } + + /** + * Tax amount + */ + public ExpenseLineItem withTaxAmount(JsonNullable taxAmount) { + Utils.checkNotNull(taxAmount, "taxAmount"); + this.taxAmount = taxAmount; + return this; + } + + public ExpenseLineItem withQuantity(double quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = JsonNullable.of(quantity); + return this; + } + + public ExpenseLineItem withQuantity(JsonNullable quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = quantity; + return this; + } + + public ExpenseLineItem withUnitPrice(double unitPrice) { + Utils.checkNotNull(unitPrice, "unitPrice"); + this.unitPrice = JsonNullable.of(unitPrice); + return this; + } + + public ExpenseLineItem withUnitPrice(JsonNullable unitPrice) { + Utils.checkNotNull(unitPrice, "unitPrice"); + this.unitPrice = unitPrice; + return this; + } + + public ExpenseLineItem withItem(LinkedInvoiceItem item) { + Utils.checkNotNull(item, "item"); + this.item = Optional.ofNullable(item); + return this; + } + + + public ExpenseLineItem withItem(Optional item) { + Utils.checkNotNull(item, "item"); + this.item = item; + return this; + } + /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public ExpenseLineItem withBillable(boolean billable) { Utils.checkNotNull(billable, "billable"); this.billable = Optional.ofNullable(billable); @@ -500,7 +661,10 @@ public ExpenseLineItem withBillable(boolean billable) { /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public ExpenseLineItem withBillable(Optional billable) { Utils.checkNotNull(billable, "billable"); this.billable = billable; @@ -563,7 +727,12 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.subsidiaryId, other.subsidiaryId) && Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && Utils.enhancedDeepEquals(this.description, other.description) && + Utils.enhancedDeepEquals(this.type, other.type) && Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.taxAmount, other.taxAmount) && + Utils.enhancedDeepEquals(this.quantity, other.quantity) && + Utils.enhancedDeepEquals(this.unitPrice, other.unitPrice) && + Utils.enhancedDeepEquals(this.item, other.item) && Utils.enhancedDeepEquals(this.billable, other.billable) && Utils.enhancedDeepEquals(this.lineNumber, other.lineNumber) && Utils.enhancedDeepEquals(this.rebilling, other.rebilling); @@ -575,8 +744,10 @@ public int hashCode() { id, trackingCategories, accountId, account, customerId, departmentId, locationId, subsidiaryId, taxRate, - description, totalAmount, billable, - lineNumber, rebilling); + description, type, totalAmount, + taxAmount, quantity, unitPrice, + item, billable, lineNumber, + rebilling); } @Override @@ -592,7 +763,12 @@ public String toString() { "subsidiaryId", subsidiaryId, "taxRate", taxRate, "description", description, + "type", type, "totalAmount", totalAmount, + "taxAmount", taxAmount, + "quantity", quantity, + "unitPrice", unitPrice, + "item", item, "billable", billable, "lineNumber", lineNumber, "rebilling", rebilling); @@ -622,8 +798,19 @@ public final static class Builder { private JsonNullable description = JsonNullable.undefined(); + private JsonNullable type = JsonNullable.undefined(); + private Optional totalAmount = Optional.empty(); + private JsonNullable taxAmount = JsonNullable.undefined(); + + private JsonNullable quantity = JsonNullable.undefined(); + + private JsonNullable unitPrice = JsonNullable.undefined(); + + private Optional item = Optional.empty(); + + @Deprecated private Optional billable = Optional.empty(); private JsonNullable lineNumber = JsonNullable.undefined(); @@ -819,6 +1006,25 @@ public Builder description(JsonNullable description) { } + /** + * Line Item type + */ + public Builder type(LineItemType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * Line Item type + */ + public Builder type(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** * The total amount of the expense line item. */ @@ -838,9 +1044,70 @@ public Builder totalAmount(Optional totalAmount) { } + /** + * Tax amount + */ + public Builder taxAmount(double taxAmount) { + Utils.checkNotNull(taxAmount, "taxAmount"); + this.taxAmount = JsonNullable.of(taxAmount); + return this; + } + + /** + * Tax amount + */ + public Builder taxAmount(JsonNullable taxAmount) { + Utils.checkNotNull(taxAmount, "taxAmount"); + this.taxAmount = taxAmount; + return this; + } + + + public Builder quantity(double quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = JsonNullable.of(quantity); + return this; + } + + public Builder quantity(JsonNullable quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = quantity; + return this; + } + + + public Builder unitPrice(double unitPrice) { + Utils.checkNotNull(unitPrice, "unitPrice"); + this.unitPrice = JsonNullable.of(unitPrice); + return this; + } + + public Builder unitPrice(JsonNullable unitPrice) { + Utils.checkNotNull(unitPrice, "unitPrice"); + this.unitPrice = unitPrice; + return this; + } + + + public Builder item(LinkedInvoiceItem item) { + Utils.checkNotNull(item, "item"); + this.item = Optional.ofNullable(item); + return this; + } + + public Builder item(Optional item) { + Utils.checkNotNull(item, "item"); + this.item = item; + return this; + } + + /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder billable(boolean billable) { Utils.checkNotNull(billable, "billable"); this.billable = Optional.ofNullable(billable); @@ -849,7 +1116,10 @@ public Builder billable(boolean billable) { /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder billable(Optional billable) { Utils.checkNotNull(billable, "billable"); this.billable = billable; @@ -900,8 +1170,10 @@ public ExpenseLineItem build() { id, trackingCategories, accountId, account, customerId, departmentId, locationId, subsidiaryId, taxRate, - description, totalAmount, billable, - lineNumber, rebilling); + description, type, totalAmount, + taxAmount, quantity, unitPrice, + item, billable, lineNumber, + rebilling); } } diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseLineItemInput.java b/src/main/java/com/apideck/unify/models/components/ExpenseLineItemInput.java index 029e44978..2b5c20b8c 100644 --- a/src/main/java/com/apideck/unify/models/components/ExpenseLineItemInput.java +++ b/src/main/java/com/apideck/unify/models/components/ExpenseLineItemInput.java @@ -42,7 +42,7 @@ public class ExpenseLineItemInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("account") - private JsonNullable account; + private JsonNullable account; /** * The ID of the customer this expense item is linked to. @@ -84,6 +84,13 @@ public class ExpenseLineItemInput { @JsonProperty("description") private JsonNullable description; + /** + * Line Item type + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private JsonNullable type; + /** * The total amount of the expense line item. */ @@ -91,11 +98,36 @@ public class ExpenseLineItemInput { @JsonProperty("total_amount") private Optional totalAmount; + /** + * Tax amount + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_amount") + private JsonNullable taxAmount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("quantity") + private JsonNullable quantity; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("unit_price") + private JsonNullable unitPrice; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("item") + private Optional item; + /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("billable") + @Deprecated private Optional billable; /** @@ -116,14 +148,19 @@ public class ExpenseLineItemInput { public ExpenseLineItemInput( @JsonProperty("tracking_categories") JsonNullable> trackingCategories, @JsonProperty("account_id") Optional accountId, - @JsonProperty("account") JsonNullable account, + @JsonProperty("account") JsonNullable account, @JsonProperty("customer_id") Optional customerId, @JsonProperty("department_id") JsonNullable departmentId, @JsonProperty("location_id") JsonNullable locationId, @JsonProperty("subsidiary_id") JsonNullable subsidiaryId, @JsonProperty("tax_rate") Optional taxRate, @JsonProperty("description") JsonNullable description, + @JsonProperty("type") JsonNullable type, @JsonProperty("total_amount") Optional totalAmount, + @JsonProperty("tax_amount") JsonNullable taxAmount, + @JsonProperty("quantity") JsonNullable quantity, + @JsonProperty("unit_price") JsonNullable unitPrice, + @JsonProperty("item") Optional item, @JsonProperty("billable") Optional billable, @JsonProperty("line_number") JsonNullable lineNumber, @JsonProperty("rebilling") JsonNullable rebilling) { @@ -136,7 +173,12 @@ public ExpenseLineItemInput( Utils.checkNotNull(subsidiaryId, "subsidiaryId"); Utils.checkNotNull(taxRate, "taxRate"); Utils.checkNotNull(description, "description"); + Utils.checkNotNull(type, "type"); Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(taxAmount, "taxAmount"); + Utils.checkNotNull(quantity, "quantity"); + Utils.checkNotNull(unitPrice, "unitPrice"); + Utils.checkNotNull(item, "item"); Utils.checkNotNull(billable, "billable"); Utils.checkNotNull(lineNumber, "lineNumber"); Utils.checkNotNull(rebilling, "rebilling"); @@ -149,7 +191,12 @@ public ExpenseLineItemInput( this.subsidiaryId = subsidiaryId; this.taxRate = taxRate; this.description = description; + this.type = type; this.totalAmount = totalAmount; + this.taxAmount = taxAmount; + this.quantity = quantity; + this.unitPrice = unitPrice; + this.item = item; this.billable = billable; this.lineNumber = lineNumber; this.rebilling = rebilling; @@ -159,8 +206,9 @@ public ExpenseLineItemInput() { this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), - Optional.empty(), Optional.empty(), JsonNullable.undefined(), - JsonNullable.undefined()); + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -185,8 +233,8 @@ public Optional accountId() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable account() { - return (JsonNullable) account; + public JsonNullable account() { + return (JsonNullable) account; } /** @@ -235,6 +283,15 @@ public JsonNullable description() { return description; } + /** + * Line Item type + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable type() { + return (JsonNullable) type; + } + /** * The total amount of the expense line item. */ @@ -243,9 +300,36 @@ public Optional totalAmount() { return totalAmount; } + /** + * Tax amount + */ + @JsonIgnore + public JsonNullable taxAmount() { + return taxAmount; + } + + @JsonIgnore + public JsonNullable quantity() { + return quantity; + } + + @JsonIgnore + public JsonNullable unitPrice() { + return unitPrice; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional item() { + return (Optional) item; + } + /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated @JsonIgnore public Optional billable() { return billable; @@ -316,13 +400,13 @@ public ExpenseLineItemInput withAccountId(Optional accountId) { return this; } - public ExpenseLineItemInput withAccount(LinkedLedgerAccountInput account) { + public ExpenseLineItemInput withAccount(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public ExpenseLineItemInput withAccount(JsonNullable account) { + public ExpenseLineItemInput withAccount(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; @@ -432,6 +516,24 @@ public ExpenseLineItemInput withDescription(JsonNullable description) { return this; } + /** + * Line Item type + */ + public ExpenseLineItemInput withType(LineItemType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * Line Item type + */ + public ExpenseLineItemInput withType(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + /** * The total amount of the expense line item. */ @@ -451,9 +553,67 @@ public ExpenseLineItemInput withTotalAmount(Optional totalAmount) { return this; } + /** + * Tax amount + */ + public ExpenseLineItemInput withTaxAmount(double taxAmount) { + Utils.checkNotNull(taxAmount, "taxAmount"); + this.taxAmount = JsonNullable.of(taxAmount); + return this; + } + + /** + * Tax amount + */ + public ExpenseLineItemInput withTaxAmount(JsonNullable taxAmount) { + Utils.checkNotNull(taxAmount, "taxAmount"); + this.taxAmount = taxAmount; + return this; + } + + public ExpenseLineItemInput withQuantity(double quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = JsonNullable.of(quantity); + return this; + } + + public ExpenseLineItemInput withQuantity(JsonNullable quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = quantity; + return this; + } + + public ExpenseLineItemInput withUnitPrice(double unitPrice) { + Utils.checkNotNull(unitPrice, "unitPrice"); + this.unitPrice = JsonNullable.of(unitPrice); + return this; + } + + public ExpenseLineItemInput withUnitPrice(JsonNullable unitPrice) { + Utils.checkNotNull(unitPrice, "unitPrice"); + this.unitPrice = unitPrice; + return this; + } + + public ExpenseLineItemInput withItem(LinkedInvoiceItem item) { + Utils.checkNotNull(item, "item"); + this.item = Optional.ofNullable(item); + return this; + } + + + public ExpenseLineItemInput withItem(Optional item) { + Utils.checkNotNull(item, "item"); + this.item = item; + return this; + } + /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public ExpenseLineItemInput withBillable(boolean billable) { Utils.checkNotNull(billable, "billable"); this.billable = Optional.ofNullable(billable); @@ -463,7 +623,10 @@ public ExpenseLineItemInput withBillable(boolean billable) { /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public ExpenseLineItemInput withBillable(Optional billable) { Utils.checkNotNull(billable, "billable"); this.billable = billable; @@ -525,7 +688,12 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.subsidiaryId, other.subsidiaryId) && Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && Utils.enhancedDeepEquals(this.description, other.description) && + Utils.enhancedDeepEquals(this.type, other.type) && Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.taxAmount, other.taxAmount) && + Utils.enhancedDeepEquals(this.quantity, other.quantity) && + Utils.enhancedDeepEquals(this.unitPrice, other.unitPrice) && + Utils.enhancedDeepEquals(this.item, other.item) && Utils.enhancedDeepEquals(this.billable, other.billable) && Utils.enhancedDeepEquals(this.lineNumber, other.lineNumber) && Utils.enhancedDeepEquals(this.rebilling, other.rebilling); @@ -537,8 +705,9 @@ public int hashCode() { trackingCategories, accountId, account, customerId, departmentId, locationId, subsidiaryId, taxRate, description, - totalAmount, billable, lineNumber, - rebilling); + type, totalAmount, taxAmount, + quantity, unitPrice, item, + billable, lineNumber, rebilling); } @Override @@ -553,7 +722,12 @@ public String toString() { "subsidiaryId", subsidiaryId, "taxRate", taxRate, "description", description, + "type", type, "totalAmount", totalAmount, + "taxAmount", taxAmount, + "quantity", quantity, + "unitPrice", unitPrice, + "item", item, "billable", billable, "lineNumber", lineNumber, "rebilling", rebilling); @@ -567,7 +741,7 @@ public final static class Builder { @Deprecated private Optional accountId = Optional.empty(); - private JsonNullable account = JsonNullable.undefined(); + private JsonNullable account = JsonNullable.undefined(); private Optional customerId = Optional.empty(); @@ -581,8 +755,19 @@ public final static class Builder { private JsonNullable description = JsonNullable.undefined(); + private JsonNullable type = JsonNullable.undefined(); + private Optional totalAmount = Optional.empty(); + private JsonNullable taxAmount = JsonNullable.undefined(); + + private JsonNullable quantity = JsonNullable.undefined(); + + private JsonNullable unitPrice = JsonNullable.undefined(); + + private Optional item = Optional.empty(); + + @Deprecated private Optional billable = Optional.empty(); private JsonNullable lineNumber = JsonNullable.undefined(); @@ -638,13 +823,13 @@ public Builder accountId(Optional accountId) { } - public Builder account(LinkedLedgerAccountInput account) { + public Builder account(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public Builder account(JsonNullable account) { + public Builder account(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; @@ -759,6 +944,25 @@ public Builder description(JsonNullable description) { } + /** + * Line Item type + */ + public Builder type(LineItemType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * Line Item type + */ + public Builder type(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** * The total amount of the expense line item. */ @@ -778,9 +982,70 @@ public Builder totalAmount(Optional totalAmount) { } + /** + * Tax amount + */ + public Builder taxAmount(double taxAmount) { + Utils.checkNotNull(taxAmount, "taxAmount"); + this.taxAmount = JsonNullable.of(taxAmount); + return this; + } + + /** + * Tax amount + */ + public Builder taxAmount(JsonNullable taxAmount) { + Utils.checkNotNull(taxAmount, "taxAmount"); + this.taxAmount = taxAmount; + return this; + } + + + public Builder quantity(double quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = JsonNullable.of(quantity); + return this; + } + + public Builder quantity(JsonNullable quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = quantity; + return this; + } + + + public Builder unitPrice(double unitPrice) { + Utils.checkNotNull(unitPrice, "unitPrice"); + this.unitPrice = JsonNullable.of(unitPrice); + return this; + } + + public Builder unitPrice(JsonNullable unitPrice) { + Utils.checkNotNull(unitPrice, "unitPrice"); + this.unitPrice = unitPrice; + return this; + } + + + public Builder item(LinkedInvoiceItem item) { + Utils.checkNotNull(item, "item"); + this.item = Optional.ofNullable(item); + return this; + } + + public Builder item(Optional item) { + Utils.checkNotNull(item, "item"); + this.item = item; + return this; + } + + /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder billable(boolean billable) { Utils.checkNotNull(billable, "billable"); this.billable = Optional.ofNullable(billable); @@ -789,7 +1054,10 @@ public Builder billable(boolean billable) { /** * Boolean that indicates if the line item is billable or not. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder billable(Optional billable) { Utils.checkNotNull(billable, "billable"); this.billable = billable; @@ -840,8 +1108,9 @@ public ExpenseLineItemInput build() { trackingCategories, accountId, account, customerId, departmentId, locationId, subsidiaryId, taxRate, description, - totalAmount, billable, lineNumber, - rebilling); + type, totalAmount, taxAmount, + quantity, unitPrice, item, + billable, lineNumber, rebilling); } } diff --git a/src/main/java/com/apideck/unify/models/components/InvoiceInput.java b/src/main/java/com/apideck/unify/models/components/InvoiceInput.java index 563221492..4d019f100 100644 --- a/src/main/java/com/apideck/unify/models/components/InvoiceInput.java +++ b/src/main/java/com/apideck/unify/models/components/InvoiceInput.java @@ -290,7 +290,7 @@ public class InvoiceInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("ledger_account") - private JsonNullable ledgerAccount; + private JsonNullable ledgerAccount; @JsonInclude(Include.NON_ABSENT) @@ -353,7 +353,7 @@ public InvoiceInput( @JsonProperty("language") JsonNullable language, @JsonProperty("accounting_by_row") JsonNullable accountingByRow, @JsonProperty("bank_account") Optional bankAccount, - @JsonProperty("ledger_account") JsonNullable ledgerAccount, + @JsonProperty("ledger_account") JsonNullable ledgerAccount, @JsonProperty("custom_fields") Optional> customFields, @JsonProperty("row_version") JsonNullable rowVersion, @JsonProperty("pass_through") Optional> passThrough) { @@ -772,8 +772,8 @@ public Optional bankAccount() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable ledgerAccount() { - return (JsonNullable) ledgerAccount; + public JsonNullable ledgerAccount() { + return (JsonNullable) ledgerAccount; } @SuppressWarnings("unchecked") @@ -1485,13 +1485,13 @@ public InvoiceInput withBankAccount(Optional bankAccount) return this; } - public InvoiceInput withLedgerAccount(LinkedLedgerAccountInput ledgerAccount) { + public InvoiceInput withLedgerAccount(LinkedLedgerAccount ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = JsonNullable.of(ledgerAccount); return this; } - public InvoiceInput withLedgerAccount(JsonNullable ledgerAccount) { + public InvoiceInput withLedgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; @@ -1751,7 +1751,7 @@ public final static class Builder { private Optional bankAccount = Optional.empty(); - private JsonNullable ledgerAccount = JsonNullable.undefined(); + private JsonNullable ledgerAccount = JsonNullable.undefined(); private Optional> customFields = Optional.empty(); @@ -2476,13 +2476,13 @@ public Builder bankAccount(Optional bankAccount) { } - public Builder ledgerAccount(LinkedLedgerAccountInput ledgerAccount) { + public Builder ledgerAccount(LinkedLedgerAccount ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = JsonNullable.of(ledgerAccount); return this; } - public Builder ledgerAccount(JsonNullable ledgerAccount) { + public Builder ledgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; diff --git a/src/main/java/com/apideck/unify/models/components/InvoiceItemInput.java b/src/main/java/com/apideck/unify/models/components/InvoiceItemInput.java index 810db8131..91994ebac 100644 --- a/src/main/java/com/apideck/unify/models/components/InvoiceItemInput.java +++ b/src/main/java/com/apideck/unify/models/components/InvoiceItemInput.java @@ -123,17 +123,17 @@ public class InvoiceItemInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("asset_account") - private JsonNullable assetAccount; + private JsonNullable assetAccount; @JsonInclude(Include.NON_ABSENT) @JsonProperty("income_account") - private JsonNullable incomeAccount; + private JsonNullable incomeAccount; @JsonInclude(Include.NON_ABSENT) @JsonProperty("expense_account") - private JsonNullable expenseAccount; + private JsonNullable expenseAccount; /** * @@ -217,9 +217,9 @@ public InvoiceItemInput( @JsonProperty("quantity") JsonNullable quantity, @JsonProperty("unit_price") JsonNullable unitPrice, @JsonProperty("currency") JsonNullable currency, - @JsonProperty("asset_account") JsonNullable assetAccount, - @JsonProperty("income_account") JsonNullable incomeAccount, - @JsonProperty("expense_account") JsonNullable expenseAccount, + @JsonProperty("asset_account") JsonNullable assetAccount, + @JsonProperty("income_account") JsonNullable incomeAccount, + @JsonProperty("expense_account") JsonNullable expenseAccount, @JsonProperty("tracking_category") JsonNullable trackingCategory, @JsonProperty("tracking_categories") JsonNullable> trackingCategories, @JsonProperty("active") JsonNullable active, @@ -412,20 +412,20 @@ public JsonNullable currency() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable assetAccount() { - return (JsonNullable) assetAccount; + public JsonNullable assetAccount() { + return (JsonNullable) assetAccount; } @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable incomeAccount() { - return (JsonNullable) incomeAccount; + public JsonNullable incomeAccount() { + return (JsonNullable) incomeAccount; } @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable expenseAccount() { - return (JsonNullable) expenseAccount; + public JsonNullable expenseAccount() { + return (JsonNullable) expenseAccount; } /** @@ -759,37 +759,37 @@ public InvoiceItemInput withCurrency(JsonNullable currency) return this; } - public InvoiceItemInput withAssetAccount(LinkedLedgerAccountInput assetAccount) { + public InvoiceItemInput withAssetAccount(LinkedLedgerAccount assetAccount) { Utils.checkNotNull(assetAccount, "assetAccount"); this.assetAccount = JsonNullable.of(assetAccount); return this; } - public InvoiceItemInput withAssetAccount(JsonNullable assetAccount) { + public InvoiceItemInput withAssetAccount(JsonNullable assetAccount) { Utils.checkNotNull(assetAccount, "assetAccount"); this.assetAccount = assetAccount; return this; } - public InvoiceItemInput withIncomeAccount(LinkedLedgerAccountInput incomeAccount) { + public InvoiceItemInput withIncomeAccount(LinkedLedgerAccount incomeAccount) { Utils.checkNotNull(incomeAccount, "incomeAccount"); this.incomeAccount = JsonNullable.of(incomeAccount); return this; } - public InvoiceItemInput withIncomeAccount(JsonNullable incomeAccount) { + public InvoiceItemInput withIncomeAccount(JsonNullable incomeAccount) { Utils.checkNotNull(incomeAccount, "incomeAccount"); this.incomeAccount = incomeAccount; return this; } - public InvoiceItemInput withExpenseAccount(LinkedLedgerAccountInput expenseAccount) { + public InvoiceItemInput withExpenseAccount(LinkedLedgerAccount expenseAccount) { Utils.checkNotNull(expenseAccount, "expenseAccount"); this.expenseAccount = JsonNullable.of(expenseAccount); return this; } - public InvoiceItemInput withExpenseAccount(JsonNullable expenseAccount) { + public InvoiceItemInput withExpenseAccount(JsonNullable expenseAccount) { Utils.checkNotNull(expenseAccount, "expenseAccount"); this.expenseAccount = expenseAccount; return this; @@ -1078,11 +1078,11 @@ public final static class Builder { private JsonNullable currency = JsonNullable.undefined(); - private JsonNullable assetAccount = JsonNullable.undefined(); + private JsonNullable assetAccount = JsonNullable.undefined(); - private JsonNullable incomeAccount = JsonNullable.undefined(); + private JsonNullable incomeAccount = JsonNullable.undefined(); - private JsonNullable expenseAccount = JsonNullable.undefined(); + private JsonNullable expenseAccount = JsonNullable.undefined(); @Deprecated private JsonNullable trackingCategory = JsonNullable.undefined(); @@ -1371,39 +1371,39 @@ public Builder currency(JsonNullable currency) { } - public Builder assetAccount(LinkedLedgerAccountInput assetAccount) { + public Builder assetAccount(LinkedLedgerAccount assetAccount) { Utils.checkNotNull(assetAccount, "assetAccount"); this.assetAccount = JsonNullable.of(assetAccount); return this; } - public Builder assetAccount(JsonNullable assetAccount) { + public Builder assetAccount(JsonNullable assetAccount) { Utils.checkNotNull(assetAccount, "assetAccount"); this.assetAccount = assetAccount; return this; } - public Builder incomeAccount(LinkedLedgerAccountInput incomeAccount) { + public Builder incomeAccount(LinkedLedgerAccount incomeAccount) { Utils.checkNotNull(incomeAccount, "incomeAccount"); this.incomeAccount = JsonNullable.of(incomeAccount); return this; } - public Builder incomeAccount(JsonNullable incomeAccount) { + public Builder incomeAccount(JsonNullable incomeAccount) { Utils.checkNotNull(incomeAccount, "incomeAccount"); this.incomeAccount = incomeAccount; return this; } - public Builder expenseAccount(LinkedLedgerAccountInput expenseAccount) { + public Builder expenseAccount(LinkedLedgerAccount expenseAccount) { Utils.checkNotNull(expenseAccount, "expenseAccount"); this.expenseAccount = JsonNullable.of(expenseAccount); return this; } - public Builder expenseAccount(JsonNullable expenseAccount) { + public Builder expenseAccount(JsonNullable expenseAccount) { Utils.checkNotNull(expenseAccount, "expenseAccount"); this.expenseAccount = expenseAccount; return this; diff --git a/src/main/java/com/apideck/unify/models/components/InvoiceLineItemInput.java b/src/main/java/com/apideck/unify/models/components/InvoiceLineItemInput.java index 95adf0d8a..dc621413e 100644 --- a/src/main/java/com/apideck/unify/models/components/InvoiceLineItemInput.java +++ b/src/main/java/com/apideck/unify/models/components/InvoiceLineItemInput.java @@ -213,7 +213,7 @@ public class InvoiceLineItemInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("ledger_account") - private JsonNullable ledgerAccount; + private JsonNullable ledgerAccount; @JsonInclude(Include.NON_ABSENT) @@ -258,7 +258,7 @@ public InvoiceLineItemInput( @JsonProperty("worktags") Optional> worktags, @JsonProperty("tax_rate") Optional taxRate, @JsonProperty("tracking_categories") JsonNullable> trackingCategories, - @JsonProperty("ledger_account") JsonNullable ledgerAccount, + @JsonProperty("ledger_account") JsonNullable ledgerAccount, @JsonProperty("custom_fields") Optional> customFields, @JsonProperty("row_version") JsonNullable rowVersion) { Utils.checkNotNull(id, "id"); @@ -558,8 +558,8 @@ public JsonNullable> trackingCategories() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable ledgerAccount() { - return (JsonNullable) ledgerAccount; + public JsonNullable ledgerAccount() { + return (JsonNullable) ledgerAccount; } @SuppressWarnings("unchecked") @@ -1066,13 +1066,13 @@ public InvoiceLineItemInput withTrackingCategories(JsonNullable ledgerAccount) { + public InvoiceLineItemInput withLedgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; @@ -1265,7 +1265,7 @@ public final static class Builder { private JsonNullable> trackingCategories = JsonNullable.undefined(); - private JsonNullable ledgerAccount = JsonNullable.undefined(); + private JsonNullable ledgerAccount = JsonNullable.undefined(); private Optional> customFields = Optional.empty(); @@ -1784,13 +1784,13 @@ public Builder trackingCategories(JsonNullable ledgerAccount) { + public Builder ledgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; diff --git a/src/main/java/com/apideck/unify/models/components/JournalEntryLineItemInput.java b/src/main/java/com/apideck/unify/models/components/JournalEntryLineItemInput.java index 46e0a90b8..ec54bbef8 100644 --- a/src/main/java/com/apideck/unify/models/components/JournalEntryLineItemInput.java +++ b/src/main/java/com/apideck/unify/models/components/JournalEntryLineItemInput.java @@ -79,7 +79,7 @@ public class JournalEntryLineItemInput { @JsonInclude(Include.ALWAYS) @JsonProperty("ledger_account") - private Optional ledgerAccount; + private Optional ledgerAccount; /** * The customer this entity is linked to. @@ -133,7 +133,7 @@ public JournalEntryLineItemInput( @JsonProperty("tax_rate") Optional taxRate, @JsonProperty("tracking_category") JsonNullable trackingCategory, @JsonProperty("tracking_categories") JsonNullable> trackingCategories, - @JsonProperty("ledger_account") Optional ledgerAccount, + @JsonProperty("ledger_account") Optional ledgerAccount, @JsonProperty("customer") JsonNullable customer, @JsonProperty("supplier") JsonNullable supplier, @JsonProperty("department_id") JsonNullable departmentId, @@ -249,8 +249,8 @@ public JsonNullable> trackingCategories() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional ledgerAccount() { - return (Optional) ledgerAccount; + public Optional ledgerAccount() { + return (Optional) ledgerAccount; } /** @@ -443,14 +443,14 @@ public JournalEntryLineItemInput withTrackingCategories(JsonNullable ledgerAccount) { + public JournalEntryLineItemInput withLedgerAccount(Optional ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; @@ -642,7 +642,7 @@ public final static class Builder { private JsonNullable> trackingCategories = JsonNullable.undefined(); - private Optional ledgerAccount = Optional.empty(); + private Optional ledgerAccount = Optional.empty(); private JsonNullable customer = JsonNullable.undefined(); @@ -802,13 +802,13 @@ public Builder trackingCategories(JsonNullable ledgerAccount) { + public Builder ledgerAccount(Optional ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; diff --git a/src/main/java/com/apideck/unify/models/components/BillLineItemType.java b/src/main/java/com/apideck/unify/models/components/LineItemType.java similarity index 72% rename from src/main/java/com/apideck/unify/models/components/BillLineItemType.java rename to src/main/java/com/apideck/unify/models/components/LineItemType.java index a39304cb2..6d4b2dcb4 100644 --- a/src/main/java/com/apideck/unify/models/components/BillLineItemType.java +++ b/src/main/java/com/apideck/unify/models/components/LineItemType.java @@ -9,11 +9,11 @@ import java.util.Optional; /** - * BillLineItemType + * LineItemType * - *

Bill Line Item type + *

Line Item type */ -public enum BillLineItemType { +public enum LineItemType { EXPENSE_ITEM("expense_item"), EXPENSE_ACCOUNT("expense_account"), OTHER("other"); @@ -21,7 +21,7 @@ public enum BillLineItemType { @JsonValue private final String value; - BillLineItemType(String value) { + LineItemType(String value) { this.value = value; } @@ -29,8 +29,8 @@ public String value() { return value; } - public static Optional fromValue(String value) { - for (BillLineItemType o: BillLineItemType.values()) { + public static Optional fromValue(String value) { + for (LineItemType o: LineItemType.values()) { if (Objects.deepEquals(o.value, value)) { return Optional.of(o); } diff --git a/src/main/java/com/apideck/unify/models/components/LinkedLedgerAccountInput.java b/src/main/java/com/apideck/unify/models/components/LinkedLedgerAccountInput.java deleted file mode 100644 index bed74ff4c..000000000 --- a/src/main/java/com/apideck/unify/models/components/LinkedLedgerAccountInput.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.apideck.unify.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Override; -import java.lang.String; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - - -public class LinkedLedgerAccountInput { - /** - * The unique identifier for the account. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - /** - * The nominal code of the account. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("nominal_code") - private JsonNullable nominalCode; - - /** - * The code assigned to the account. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("code") - private JsonNullable code; - - /** - * The parent ID of the account. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("parent_id") - private JsonNullable parentId; - - /** - * The display ID of the account. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("display_id") - private JsonNullable displayId; - - @JsonCreator - public LinkedLedgerAccountInput( - @JsonProperty("id") Optional id, - @JsonProperty("nominal_code") JsonNullable nominalCode, - @JsonProperty("code") JsonNullable code, - @JsonProperty("parent_id") JsonNullable parentId, - @JsonProperty("display_id") JsonNullable displayId) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(nominalCode, "nominalCode"); - Utils.checkNotNull(code, "code"); - Utils.checkNotNull(parentId, "parentId"); - Utils.checkNotNull(displayId, "displayId"); - this.id = id; - this.nominalCode = nominalCode; - this.code = code; - this.parentId = parentId; - this.displayId = displayId; - } - - public LinkedLedgerAccountInput() { - this(Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined()); - } - - /** - * The unique identifier for the account. - */ - @JsonIgnore - public Optional id() { - return id; - } - - /** - * The nominal code of the account. - */ - @JsonIgnore - public JsonNullable nominalCode() { - return nominalCode; - } - - /** - * The code assigned to the account. - */ - @JsonIgnore - public JsonNullable code() { - return code; - } - - /** - * The parent ID of the account. - */ - @JsonIgnore - public JsonNullable parentId() { - return parentId; - } - - /** - * The display ID of the account. - */ - @JsonIgnore - public JsonNullable displayId() { - return displayId; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * The unique identifier for the account. - */ - public LinkedLedgerAccountInput withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - /** - * The unique identifier for the account. - */ - public LinkedLedgerAccountInput withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * The nominal code of the account. - */ - public LinkedLedgerAccountInput withNominalCode(String nominalCode) { - Utils.checkNotNull(nominalCode, "nominalCode"); - this.nominalCode = JsonNullable.of(nominalCode); - return this; - } - - /** - * The nominal code of the account. - */ - public LinkedLedgerAccountInput withNominalCode(JsonNullable nominalCode) { - Utils.checkNotNull(nominalCode, "nominalCode"); - this.nominalCode = nominalCode; - return this; - } - - /** - * The code assigned to the account. - */ - public LinkedLedgerAccountInput withCode(String code) { - Utils.checkNotNull(code, "code"); - this.code = JsonNullable.of(code); - return this; - } - - /** - * The code assigned to the account. - */ - public LinkedLedgerAccountInput withCode(JsonNullable code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - /** - * The parent ID of the account. - */ - public LinkedLedgerAccountInput withParentId(String parentId) { - Utils.checkNotNull(parentId, "parentId"); - this.parentId = JsonNullable.of(parentId); - return this; - } - - /** - * The parent ID of the account. - */ - public LinkedLedgerAccountInput withParentId(JsonNullable parentId) { - Utils.checkNotNull(parentId, "parentId"); - this.parentId = parentId; - return this; - } - - /** - * The display ID of the account. - */ - public LinkedLedgerAccountInput withDisplayId(String displayId) { - Utils.checkNotNull(displayId, "displayId"); - this.displayId = JsonNullable.of(displayId); - return this; - } - - /** - * The display ID of the account. - */ - public LinkedLedgerAccountInput withDisplayId(JsonNullable displayId) { - Utils.checkNotNull(displayId, "displayId"); - this.displayId = displayId; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LinkedLedgerAccountInput other = (LinkedLedgerAccountInput) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.nominalCode, other.nominalCode) && - Utils.enhancedDeepEquals(this.code, other.code) && - Utils.enhancedDeepEquals(this.parentId, other.parentId) && - Utils.enhancedDeepEquals(this.displayId, other.displayId); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, nominalCode, code, - parentId, displayId); - } - - @Override - public String toString() { - return Utils.toString(LinkedLedgerAccountInput.class, - "id", id, - "nominalCode", nominalCode, - "code", code, - "parentId", parentId, - "displayId", displayId); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private JsonNullable nominalCode = JsonNullable.undefined(); - - private JsonNullable code = JsonNullable.undefined(); - - private JsonNullable parentId = JsonNullable.undefined(); - - private JsonNullable displayId = JsonNullable.undefined(); - - private Builder() { - // force use of static builder() method - } - - - /** - * The unique identifier for the account. - */ - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - /** - * The unique identifier for the account. - */ - public Builder id(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * The nominal code of the account. - */ - public Builder nominalCode(String nominalCode) { - Utils.checkNotNull(nominalCode, "nominalCode"); - this.nominalCode = JsonNullable.of(nominalCode); - return this; - } - - /** - * The nominal code of the account. - */ - public Builder nominalCode(JsonNullable nominalCode) { - Utils.checkNotNull(nominalCode, "nominalCode"); - this.nominalCode = nominalCode; - return this; - } - - - /** - * The code assigned to the account. - */ - public Builder code(String code) { - Utils.checkNotNull(code, "code"); - this.code = JsonNullable.of(code); - return this; - } - - /** - * The code assigned to the account. - */ - public Builder code(JsonNullable code) { - Utils.checkNotNull(code, "code"); - this.code = code; - return this; - } - - - /** - * The parent ID of the account. - */ - public Builder parentId(String parentId) { - Utils.checkNotNull(parentId, "parentId"); - this.parentId = JsonNullable.of(parentId); - return this; - } - - /** - * The parent ID of the account. - */ - public Builder parentId(JsonNullable parentId) { - Utils.checkNotNull(parentId, "parentId"); - this.parentId = parentId; - return this; - } - - - /** - * The display ID of the account. - */ - public Builder displayId(String displayId) { - Utils.checkNotNull(displayId, "displayId"); - this.displayId = JsonNullable.of(displayId); - return this; - } - - /** - * The display ID of the account. - */ - public Builder displayId(JsonNullable displayId) { - Utils.checkNotNull(displayId, "displayId"); - this.displayId = displayId; - return this; - } - - public LinkedLedgerAccountInput build() { - - return new LinkedLedgerAccountInput( - id, nominalCode, code, - parentId, displayId); - } - - } -} diff --git a/src/main/java/com/apideck/unify/models/components/LinkedTaxRateInput.java b/src/main/java/com/apideck/unify/models/components/LinkedTaxRateInput.java index b8daa34dd..d8bac69d6 100644 --- a/src/main/java/com/apideck/unify/models/components/LinkedTaxRateInput.java +++ b/src/main/java/com/apideck/unify/models/components/LinkedTaxRateInput.java @@ -23,6 +23,13 @@ public class LinkedTaxRateInput { @JsonProperty("id") private JsonNullable id; + /** + * Tax rate code + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private JsonNullable code; + /** * Rate of the tax rate */ @@ -33,15 +40,18 @@ public class LinkedTaxRateInput { @JsonCreator public LinkedTaxRateInput( @JsonProperty("id") JsonNullable id, + @JsonProperty("code") JsonNullable code, @JsonProperty("rate") JsonNullable rate) { Utils.checkNotNull(id, "id"); + Utils.checkNotNull(code, "code"); Utils.checkNotNull(rate, "rate"); this.id = id; + this.code = code; this.rate = rate; } public LinkedTaxRateInput() { - this(JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -52,6 +62,14 @@ public JsonNullable id() { return id; } + /** + * Tax rate code + */ + @JsonIgnore + public JsonNullable code() { + return code; + } + /** * Rate of the tax rate */ @@ -83,6 +101,24 @@ public LinkedTaxRateInput withId(JsonNullable id) { return this; } + /** + * Tax rate code + */ + public LinkedTaxRateInput withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = JsonNullable.of(code); + return this; + } + + /** + * Tax rate code + */ + public LinkedTaxRateInput withCode(JsonNullable code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + /** * Rate of the tax rate */ @@ -112,19 +148,21 @@ public boolean equals(java.lang.Object o) { LinkedTaxRateInput other = (LinkedTaxRateInput) o; return Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.code, other.code) && Utils.enhancedDeepEquals(this.rate, other.rate); } @Override public int hashCode() { return Utils.enhancedHash( - id, rate); + id, code, rate); } @Override public String toString() { return Utils.toString(LinkedTaxRateInput.class, "id", id, + "code", code, "rate", rate); } @@ -133,6 +171,8 @@ public final static class Builder { private JsonNullable id = JsonNullable.undefined(); + private JsonNullable code = JsonNullable.undefined(); + private JsonNullable rate = JsonNullable.undefined(); private Builder() { @@ -159,6 +199,25 @@ public Builder id(JsonNullable id) { } + /** + * Tax rate code + */ + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = JsonNullable.of(code); + return this; + } + + /** + * Tax rate code + */ + public Builder code(JsonNullable code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + /** * Rate of the tax rate */ @@ -180,7 +239,7 @@ public Builder rate(JsonNullable rate) { public LinkedTaxRateInput build() { return new LinkedTaxRateInput( - id, rate); + id, code, rate); } } diff --git a/src/main/java/com/apideck/unify/models/components/PaymentInput.java b/src/main/java/com/apideck/unify/models/components/PaymentInput.java index 3b8f78e27..a46cd4dd1 100644 --- a/src/main/java/com/apideck/unify/models/components/PaymentInput.java +++ b/src/main/java/com/apideck/unify/models/components/PaymentInput.java @@ -95,7 +95,7 @@ public class PaymentInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("account") - private JsonNullable account; + private JsonNullable account; /** * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD @@ -214,7 +214,7 @@ public PaymentInput( @JsonProperty("payment_method_id") JsonNullable paymentMethodId, @JsonProperty("accounts_receivable_account_type") JsonNullable accountsReceivableAccountType, @JsonProperty("accounts_receivable_account_id") JsonNullable accountsReceivableAccountId, - @JsonProperty("account") JsonNullable account, + @JsonProperty("account") JsonNullable account, @JsonProperty("transaction_date") Optional transactionDate, @JsonProperty("customer") JsonNullable customer, @JsonProperty("supplier") JsonNullable supplier, @@ -376,8 +376,8 @@ public JsonNullable accountsReceivableAccountId() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable account() { - return (JsonNullable) account; + public JsonNullable account() { + return (JsonNullable) account; } /** @@ -689,13 +689,13 @@ public PaymentInput withAccountsReceivableAccountId(JsonNullable account return this; } - public PaymentInput withAccount(LinkedLedgerAccountInput account) { + public PaymentInput withAccount(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public PaymentInput withAccount(JsonNullable account) { + public PaymentInput withAccount(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; @@ -1079,7 +1079,7 @@ public final static class Builder { @Deprecated private JsonNullable accountsReceivableAccountId = JsonNullable.undefined(); - private JsonNullable account = JsonNullable.undefined(); + private JsonNullable account = JsonNullable.undefined(); private Optional transactionDate = Optional.empty(); @@ -1302,13 +1302,13 @@ public Builder accountsReceivableAccountId(JsonNullable accountsReceivab } - public Builder account(LinkedLedgerAccountInput account) { + public Builder account(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public Builder account(JsonNullable account) { + public Builder account(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; diff --git a/src/main/java/com/apideck/unify/models/components/PurchaseOrderInput.java b/src/main/java/com/apideck/unify/models/components/PurchaseOrderInput.java index 81077a630..029c2238e 100644 --- a/src/main/java/com/apideck/unify/models/components/PurchaseOrderInput.java +++ b/src/main/java/com/apideck/unify/models/components/PurchaseOrderInput.java @@ -157,7 +157,7 @@ public class PurchaseOrderInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("ledger_account") - private JsonNullable ledgerAccount; + private JsonNullable ledgerAccount; /** * Optional purchase order template @@ -313,7 +313,7 @@ public PurchaseOrderInput( @JsonProperty("line_items") Optional> lineItems, @JsonProperty("billing_address") Optional billingAddress, @JsonProperty("shipping_address") Optional shippingAddress, - @JsonProperty("ledger_account") JsonNullable ledgerAccount, + @JsonProperty("ledger_account") JsonNullable ledgerAccount, @JsonProperty("template_id") JsonNullable templateId, @JsonProperty("discount_percentage") JsonNullable discountPercentage, @JsonProperty("bank_account") Optional bankAccount, @@ -589,8 +589,8 @@ public Optional

shippingAddress() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable ledgerAccount() { - return (JsonNullable) ledgerAccount; + public JsonNullable ledgerAccount() { + return (JsonNullable) ledgerAccount; } /** @@ -1093,13 +1093,13 @@ public PurchaseOrderInput withShippingAddress(Optional shippi return this; } - public PurchaseOrderInput withLedgerAccount(LinkedLedgerAccountInput ledgerAccount) { + public PurchaseOrderInput withLedgerAccount(LinkedLedgerAccount ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = JsonNullable.of(ledgerAccount); return this; } - public PurchaseOrderInput withLedgerAccount(JsonNullable ledgerAccount) { + public PurchaseOrderInput withLedgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; @@ -1603,7 +1603,7 @@ public final static class Builder { private Optional shippingAddress = Optional.empty(); - private JsonNullable ledgerAccount = JsonNullable.undefined(); + private JsonNullable ledgerAccount = JsonNullable.undefined(); private JsonNullable templateId = JsonNullable.undefined(); @@ -2006,13 +2006,13 @@ public Builder shippingAddress(Optional shippingAddress) { } - public Builder ledgerAccount(LinkedLedgerAccountInput ledgerAccount) { + public Builder ledgerAccount(LinkedLedgerAccount ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = JsonNullable.of(ledgerAccount); return this; } - public Builder ledgerAccount(JsonNullable ledgerAccount) { + public Builder ledgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; diff --git a/src/main/java/com/apideck/unify/models/components/QuoteLineItemInput.java b/src/main/java/com/apideck/unify/models/components/QuoteLineItemInput.java index 40335fe2c..2472fa828 100644 --- a/src/main/java/com/apideck/unify/models/components/QuoteLineItemInput.java +++ b/src/main/java/com/apideck/unify/models/components/QuoteLineItemInput.java @@ -156,7 +156,7 @@ public class QuoteLineItemInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("ledger_account") - private JsonNullable ledgerAccount; + private JsonNullable ledgerAccount; @JsonInclude(Include.NON_ABSENT) @@ -193,7 +193,7 @@ public QuoteLineItemInput( @JsonProperty("item") Optional item, @JsonProperty("tax_rate") Optional taxRate, @JsonProperty("tracking_categories") JsonNullable> trackingCategories, - @JsonProperty("ledger_account") JsonNullable ledgerAccount, + @JsonProperty("ledger_account") JsonNullable ledgerAccount, @JsonProperty("custom_fields") Optional> customFields, @JsonProperty("row_version") JsonNullable rowVersion) { Utils.checkNotNull(id, "id"); @@ -409,8 +409,8 @@ public JsonNullable> trackingCategories() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable ledgerAccount() { - return (JsonNullable) ledgerAccount; + public JsonNullable ledgerAccount() { + return (JsonNullable) ledgerAccount; } @SuppressWarnings("unchecked") @@ -772,13 +772,13 @@ public QuoteLineItemInput withTrackingCategories(JsonNullable ledgerAccount) { + public QuoteLineItemInput withLedgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; @@ -936,7 +936,7 @@ public final static class Builder { private JsonNullable> trackingCategories = JsonNullable.undefined(); - private JsonNullable ledgerAccount = JsonNullable.undefined(); + private JsonNullable ledgerAccount = JsonNullable.undefined(); private Optional> customFields = Optional.empty(); @@ -1303,13 +1303,13 @@ public Builder trackingCategories(JsonNullable ledgerAccount) { + public Builder ledgerAccount(JsonNullable ledgerAccount) { Utils.checkNotNull(ledgerAccount, "ledgerAccount"); this.ledgerAccount = ledgerAccount; return this; diff --git a/src/main/java/com/apideck/unify/models/components/SupplierInput.java b/src/main/java/com/apideck/unify/models/components/SupplierInput.java index 7ef20a749..c44d7b5f6 100644 --- a/src/main/java/com/apideck/unify/models/components/SupplierInput.java +++ b/src/main/java/com/apideck/unify/models/components/SupplierInput.java @@ -147,7 +147,7 @@ public class SupplierInput { @JsonInclude(Include.NON_ABSENT) @JsonProperty("account") - private JsonNullable account; + private JsonNullable account; /** * Supplier status @@ -258,7 +258,7 @@ public SupplierInput( @JsonProperty("tax_rate") Optional taxRate, @JsonProperty("tax_number") JsonNullable taxNumber, @JsonProperty("currency") JsonNullable currency, - @JsonProperty("account") JsonNullable account, + @JsonProperty("account") JsonNullable account, @JsonProperty("status") JsonNullable status, @JsonProperty("payment_method") JsonNullable paymentMethod, @JsonProperty("terms") JsonNullable terms, @@ -503,8 +503,8 @@ public JsonNullable currency() { @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable account() { - return (JsonNullable) account; + public JsonNullable account() { + return (JsonNullable) account; } /** @@ -934,13 +934,13 @@ public SupplierInput withCurrency(JsonNullable currency) { return this; } - public SupplierInput withAccount(LinkedLedgerAccountInput account) { + public SupplierInput withAccount(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public SupplierInput withAccount(JsonNullable account) { + public SupplierInput withAccount(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; @@ -1317,7 +1317,7 @@ public final static class Builder { private JsonNullable currency = JsonNullable.undefined(); - private JsonNullable account = JsonNullable.undefined(); + private JsonNullable account = JsonNullable.undefined(); private JsonNullable status = JsonNullable.undefined(); @@ -1684,13 +1684,13 @@ public Builder currency(JsonNullable currency) { } - public Builder account(LinkedLedgerAccountInput account) { + public Builder account(LinkedLedgerAccount account) { Utils.checkNotNull(account, "account"); this.account = JsonNullable.of(account); return this; } - public Builder account(JsonNullable account) { + public Builder account(JsonNullable account) { Utils.checkNotNull(account, "account"); this.account = account; return this; diff --git a/src/main/java/com/apideck/unify/models/components/Three.java b/src/main/java/com/apideck/unify/models/components/Three.java deleted file mode 100644 index e828c0e38..000000000 --- a/src/main/java/com/apideck/unify/models/components/Three.java +++ /dev/null @@ -1,1802 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.apideck.unify.models.components; - -import com.apideck.unify.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Deprecated; -import java.lang.Double; -import java.lang.Object; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - - -public class Three { - /** - * A unique identifier for an object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - /** - * Number. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("number") - private JsonNullable number; - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonInclude(Include.ALWAYS) - @JsonProperty("transaction_date") - private Optional transactionDate; - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("account_id") - @Deprecated - private Optional accountId; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("account") - private JsonNullable account; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("bank_account") - private Optional bankAccount; - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("customer_id") - private Optional customerId; - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("supplier_id") - private Optional supplierId; - - /** - * The company ID the transaction belongs to - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("company_id") - private JsonNullable companyId; - - /** - * The ID of the department - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("department_id") - private JsonNullable departmentId; - - /** - * The type of payment for the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("payment_type") - private JsonNullable paymentType; - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency") - private JsonNullable currency; - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("currency_rate") - private JsonNullable currencyRate; - - /** - * The type of expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("type") - private JsonNullable type; - - /** - * The memo of the expense. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("memo") - private JsonNullable memo; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("tax_rate") - private Optional taxRate; - - /** - * The total amount of the expense line item. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("total_amount") - private JsonNullable totalAmount; - - /** - * Expense line items linked to this expense. - */ - @JsonProperty("line_items") - private List lineItems; - - /** - * Optional reference identifier for the transaction. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("reference") - private JsonNullable reference; - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("source_document_url") - private JsonNullable sourceDocumentUrl; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("custom_fields") - private Optional> customFields; - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("custom_mappings") - private JsonNullable> customMappings; - - /** - * Expense status - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("status") - private JsonNullable status; - - /** - * The date and time when the object was last updated. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updated_at") - private JsonNullable updatedAt; - - /** - * The date and time when the object was created. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("created_at") - private JsonNullable createdAt; - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("row_version") - private JsonNullable rowVersion; - - /** - * The user who last updated the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("updated_by") - private JsonNullable updatedBy; - - /** - * The user who created the object. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("created_by") - private JsonNullable createdBy; - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("pass_through") - private Optional> passThrough; - - @JsonCreator - public Three( - @JsonProperty("id") Optional id, - @JsonProperty("number") JsonNullable number, - @JsonProperty("transaction_date") Optional transactionDate, - @JsonProperty("account_id") Optional accountId, - @JsonProperty("account") JsonNullable account, - @JsonProperty("bank_account") Optional bankAccount, - @JsonProperty("customer_id") Optional customerId, - @JsonProperty("supplier_id") Optional supplierId, - @JsonProperty("company_id") JsonNullable companyId, - @JsonProperty("department_id") JsonNullable departmentId, - @JsonProperty("payment_type") JsonNullable paymentType, - @JsonProperty("currency") JsonNullable currency, - @JsonProperty("currency_rate") JsonNullable currencyRate, - @JsonProperty("type") JsonNullable type, - @JsonProperty("memo") JsonNullable memo, - @JsonProperty("tax_rate") Optional taxRate, - @JsonProperty("total_amount") JsonNullable totalAmount, - @JsonProperty("line_items") List lineItems, - @JsonProperty("reference") JsonNullable reference, - @JsonProperty("source_document_url") JsonNullable sourceDocumentUrl, - @JsonProperty("custom_fields") Optional> customFields, - @JsonProperty("custom_mappings") JsonNullable> customMappings, - @JsonProperty("status") JsonNullable status, - @JsonProperty("updated_at") JsonNullable updatedAt, - @JsonProperty("created_at") JsonNullable createdAt, - @JsonProperty("row_version") JsonNullable rowVersion, - @JsonProperty("updated_by") JsonNullable updatedBy, - @JsonProperty("created_by") JsonNullable createdBy, - @JsonProperty("pass_through") Optional> passThrough) { - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(number, "number"); - Utils.checkNotNull(transactionDate, "transactionDate"); - Utils.checkNotNull(accountId, "accountId"); - Utils.checkNotNull(account, "account"); - Utils.checkNotNull(bankAccount, "bankAccount"); - Utils.checkNotNull(customerId, "customerId"); - Utils.checkNotNull(supplierId, "supplierId"); - Utils.checkNotNull(companyId, "companyId"); - Utils.checkNotNull(departmentId, "departmentId"); - Utils.checkNotNull(paymentType, "paymentType"); - Utils.checkNotNull(currency, "currency"); - Utils.checkNotNull(currencyRate, "currencyRate"); - Utils.checkNotNull(type, "type"); - Utils.checkNotNull(memo, "memo"); - Utils.checkNotNull(taxRate, "taxRate"); - Utils.checkNotNull(totalAmount, "totalAmount"); - Utils.checkNotNull(lineItems, "lineItems"); - Utils.checkNotNull(reference, "reference"); - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - Utils.checkNotNull(customFields, "customFields"); - Utils.checkNotNull(customMappings, "customMappings"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(updatedAt, "updatedAt"); - Utils.checkNotNull(createdAt, "createdAt"); - Utils.checkNotNull(rowVersion, "rowVersion"); - Utils.checkNotNull(updatedBy, "updatedBy"); - Utils.checkNotNull(createdBy, "createdBy"); - Utils.checkNotNull(passThrough, "passThrough"); - this.id = id; - this.number = number; - this.transactionDate = transactionDate; - this.accountId = accountId; - this.account = account; - this.bankAccount = bankAccount; - this.customerId = customerId; - this.supplierId = supplierId; - this.companyId = companyId; - this.departmentId = departmentId; - this.paymentType = paymentType; - this.currency = currency; - this.currencyRate = currencyRate; - this.type = type; - this.memo = memo; - this.taxRate = taxRate; - this.totalAmount = totalAmount; - this.lineItems = lineItems; - this.reference = reference; - this.sourceDocumentUrl = sourceDocumentUrl; - this.customFields = customFields; - this.customMappings = customMappings; - this.status = status; - this.updatedAt = updatedAt; - this.createdAt = createdAt; - this.rowVersion = rowVersion; - this.updatedBy = updatedBy; - this.createdBy = createdBy; - this.passThrough = passThrough; - } - - public Three( - List lineItems) { - this(Optional.empty(), JsonNullable.undefined(), Optional.empty(), - Optional.empty(), JsonNullable.undefined(), Optional.empty(), - Optional.empty(), Optional.empty(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - Optional.empty(), JsonNullable.undefined(), lineItems, - JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), Optional.empty()); - } - - /** - * A unique identifier for an object. - */ - @JsonIgnore - public Optional id() { - return id; - } - - /** - * Number. - */ - @JsonIgnore - public JsonNullable number() { - return number; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - @JsonIgnore - public Optional transactionDate() { - return transactionDate; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - @JsonIgnore - public Optional accountId() { - return accountId; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable account() { - return (JsonNullable) account; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional bankAccount() { - return (Optional) bankAccount; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - @JsonIgnore - public Optional customerId() { - return customerId; - } - - /** - * The ID of the supplier this entity is linked to. - */ - @JsonIgnore - public Optional supplierId() { - return supplierId; - } - - /** - * The company ID the transaction belongs to - */ - @JsonIgnore - public JsonNullable companyId() { - return companyId; - } - - /** - * The ID of the department - */ - @JsonIgnore - public JsonNullable departmentId() { - return departmentId; - } - - /** - * The type of payment for the expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable paymentType() { - return (JsonNullable) paymentType; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable currency() { - return (JsonNullable) currency; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - @JsonIgnore - public JsonNullable currencyRate() { - return currencyRate; - } - - /** - * The type of expense. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable type() { - return (JsonNullable) type; - } - - /** - * The memo of the expense. - */ - @JsonIgnore - public JsonNullable memo() { - return memo; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional taxRate() { - return (Optional) taxRate; - } - - /** - * The total amount of the expense line item. - */ - @JsonIgnore - public JsonNullable totalAmount() { - return totalAmount; - } - - /** - * Expense line items linked to this expense. - */ - @JsonIgnore - public List lineItems() { - return lineItems; - } - - /** - * Optional reference identifier for the transaction. - */ - @JsonIgnore - public JsonNullable reference() { - return reference; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - @JsonIgnore - public JsonNullable sourceDocumentUrl() { - return sourceDocumentUrl; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> customFields() { - return (Optional>) customFields; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable> customMappings() { - return (JsonNullable>) customMappings; - } - - /** - * Expense status - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable status() { - return (JsonNullable) status; - } - - /** - * The date and time when the object was last updated. - */ - @JsonIgnore - public JsonNullable updatedAt() { - return updatedAt; - } - - /** - * The date and time when the object was created. - */ - @JsonIgnore - public JsonNullable createdAt() { - return createdAt; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - @JsonIgnore - public JsonNullable rowVersion() { - return rowVersion; - } - - /** - * The user who last updated the object. - */ - @JsonIgnore - public JsonNullable updatedBy() { - return updatedBy; - } - - /** - * The user who created the object. - */ - @JsonIgnore - public JsonNullable createdBy() { - return createdBy; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> passThrough() { - return (Optional>) passThrough; - } - - public static Builder builder() { - return new Builder(); - } - - - /** - * A unique identifier for an object. - */ - public Three withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - - /** - * A unique identifier for an object. - */ - public Three withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - /** - * Number. - */ - public Three withNumber(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Three withNumber(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Three withTransactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Three withTransactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Three withAccountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.ofNullable(accountId); - return this; - } - - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Three withAccountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - public Three withAccount(LinkedLedgerAccount account) { - Utils.checkNotNull(account, "account"); - this.account = JsonNullable.of(account); - return this; - } - - public Three withAccount(JsonNullable account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - public Three withBankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = Optional.ofNullable(bankAccount); - return this; - } - - - public Three withBankAccount(Optional bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Three withCustomerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Three withCustomerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Three withSupplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Three withSupplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Three withCompanyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Three withCompanyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - /** - * The ID of the department - */ - public Three withDepartmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Three withDepartmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - /** - * The type of payment for the expense. - */ - public Three withPaymentType(Expense3PaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Three withPaymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Three withCurrency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Three withCurrency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Three withCurrencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Three withCurrencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - /** - * The type of expense. - */ - public Three withType(Expense3ExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Three withType(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - /** - * The memo of the expense. - */ - public Three withMemo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Three withMemo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - public Three withTaxRate(LinkedTaxRate taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - - public Three withTaxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - /** - * The total amount of the expense line item. - */ - public Three withTotalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Three withTotalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - /** - * Expense line items linked to this expense. - */ - public Three withLineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Three withReference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Three withReference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Three withSourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Three withSourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - public Three withCustomFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - - public Three withCustomFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Three withCustomMappings(Map customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = JsonNullable.of(customMappings); - return this; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Three withCustomMappings(JsonNullable> customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = customMappings; - return this; - } - - /** - * Expense status - */ - public Three withStatus(Expense3Status status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Three withStatus(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - /** - * The date and time when the object was last updated. - */ - public Three withUpdatedAt(OffsetDateTime updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = JsonNullable.of(updatedAt); - return this; - } - - /** - * The date and time when the object was last updated. - */ - public Three withUpdatedAt(JsonNullable updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - /** - * The date and time when the object was created. - */ - public Three withCreatedAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = JsonNullable.of(createdAt); - return this; - } - - /** - * The date and time when the object was created. - */ - public Three withCreatedAt(JsonNullable createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Three withRowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Three withRowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - /** - * The user who last updated the object. - */ - public Three withUpdatedBy(String updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = JsonNullable.of(updatedBy); - return this; - } - - /** - * The user who last updated the object. - */ - public Three withUpdatedBy(JsonNullable updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = updatedBy; - return this; - } - - /** - * The user who created the object. - */ - public Three withCreatedBy(String createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = JsonNullable.of(createdBy); - return this; - } - - /** - * The user who created the object. - */ - public Three withCreatedBy(JsonNullable createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = createdBy; - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Three withPassThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Three withPassThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Three other = (Three) o; - return - Utils.enhancedDeepEquals(this.id, other.id) && - Utils.enhancedDeepEquals(this.number, other.number) && - Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && - Utils.enhancedDeepEquals(this.accountId, other.accountId) && - Utils.enhancedDeepEquals(this.account, other.account) && - Utils.enhancedDeepEquals(this.bankAccount, other.bankAccount) && - Utils.enhancedDeepEquals(this.customerId, other.customerId) && - Utils.enhancedDeepEquals(this.supplierId, other.supplierId) && - Utils.enhancedDeepEquals(this.companyId, other.companyId) && - Utils.enhancedDeepEquals(this.departmentId, other.departmentId) && - Utils.enhancedDeepEquals(this.paymentType, other.paymentType) && - Utils.enhancedDeepEquals(this.currency, other.currency) && - Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && - Utils.enhancedDeepEquals(this.type, other.type) && - Utils.enhancedDeepEquals(this.memo, other.memo) && - Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && - Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && - Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && - Utils.enhancedDeepEquals(this.reference, other.reference) && - Utils.enhancedDeepEquals(this.sourceDocumentUrl, other.sourceDocumentUrl) && - Utils.enhancedDeepEquals(this.customFields, other.customFields) && - Utils.enhancedDeepEquals(this.customMappings, other.customMappings) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && - Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && - Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && - Utils.enhancedDeepEquals(this.updatedBy, other.updatedBy) && - Utils.enhancedDeepEquals(this.createdBy, other.createdBy) && - Utils.enhancedDeepEquals(this.passThrough, other.passThrough); - } - - @Override - public int hashCode() { - return Utils.enhancedHash( - id, number, transactionDate, - accountId, account, bankAccount, - customerId, supplierId, companyId, - departmentId, paymentType, currency, - currencyRate, type, memo, - taxRate, totalAmount, lineItems, - reference, sourceDocumentUrl, customFields, - customMappings, status, updatedAt, - createdAt, rowVersion, updatedBy, - createdBy, passThrough); - } - - @Override - public String toString() { - return Utils.toString(Three.class, - "id", id, - "number", number, - "transactionDate", transactionDate, - "accountId", accountId, - "account", account, - "bankAccount", bankAccount, - "customerId", customerId, - "supplierId", supplierId, - "companyId", companyId, - "departmentId", departmentId, - "paymentType", paymentType, - "currency", currency, - "currencyRate", currencyRate, - "type", type, - "memo", memo, - "taxRate", taxRate, - "totalAmount", totalAmount, - "lineItems", lineItems, - "reference", reference, - "sourceDocumentUrl", sourceDocumentUrl, - "customFields", customFields, - "customMappings", customMappings, - "status", status, - "updatedAt", updatedAt, - "createdAt", createdAt, - "rowVersion", rowVersion, - "updatedBy", updatedBy, - "createdBy", createdBy, - "passThrough", passThrough); - } - - @SuppressWarnings("UnusedReturnValue") - public final static class Builder { - - private Optional id = Optional.empty(); - - private JsonNullable number = JsonNullable.undefined(); - - private Optional transactionDate = Optional.empty(); - - @Deprecated - private Optional accountId = Optional.empty(); - - private JsonNullable account = JsonNullable.undefined(); - - private Optional bankAccount = Optional.empty(); - - private Optional customerId = Optional.empty(); - - private Optional supplierId = Optional.empty(); - - private JsonNullable companyId = JsonNullable.undefined(); - - private JsonNullable departmentId = JsonNullable.undefined(); - - private JsonNullable paymentType = JsonNullable.undefined(); - - private JsonNullable currency = JsonNullable.undefined(); - - private JsonNullable currencyRate = JsonNullable.undefined(); - - private JsonNullable type = JsonNullable.undefined(); - - private JsonNullable memo = JsonNullable.undefined(); - - private Optional taxRate = Optional.empty(); - - private JsonNullable totalAmount = JsonNullable.undefined(); - - private List lineItems; - - private JsonNullable reference = JsonNullable.undefined(); - - private JsonNullable sourceDocumentUrl = JsonNullable.undefined(); - - private Optional> customFields = Optional.empty(); - - private JsonNullable> customMappings = JsonNullable.undefined(); - - private JsonNullable status = JsonNullable.undefined(); - - private JsonNullable updatedAt = JsonNullable.undefined(); - - private JsonNullable createdAt = JsonNullable.undefined(); - - private JsonNullable rowVersion = JsonNullable.undefined(); - - private JsonNullable updatedBy = JsonNullable.undefined(); - - private JsonNullable createdBy = JsonNullable.undefined(); - - private Optional> passThrough = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - - /** - * A unique identifier for an object. - */ - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - /** - * A unique identifier for an object. - */ - public Builder id(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - - /** - * Number. - */ - public Builder number(String number) { - Utils.checkNotNull(number, "number"); - this.number = JsonNullable.of(number); - return this; - } - - /** - * Number. - */ - public Builder number(JsonNullable number) { - Utils.checkNotNull(number, "number"); - this.number = number; - return this; - } - - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(OffsetDateTime transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = Optional.ofNullable(transactionDate); - return this; - } - - /** - * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD - */ - public Builder transactionDate(Optional transactionDate) { - Utils.checkNotNull(transactionDate, "transactionDate"); - this.transactionDate = transactionDate; - return this; - } - - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder accountId(String accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = Optional.ofNullable(accountId); - return this; - } - - /** - * The unique identifier for the ledger account that this expense should be credited to. Deprecated, - * use account instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @Deprecated - public Builder accountId(Optional accountId) { - Utils.checkNotNull(accountId, "accountId"); - this.accountId = accountId; - return this; - } - - - public Builder account(LinkedLedgerAccount account) { - Utils.checkNotNull(account, "account"); - this.account = JsonNullable.of(account); - return this; - } - - public Builder account(JsonNullable account) { - Utils.checkNotNull(account, "account"); - this.account = account; - return this; - } - - - public Builder bankAccount(LinkedBankAccount bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = Optional.ofNullable(bankAccount); - return this; - } - - public Builder bankAccount(Optional bankAccount) { - Utils.checkNotNull(bankAccount, "bankAccount"); - this.bankAccount = bankAccount; - return this; - } - - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(String customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = Optional.ofNullable(customerId); - return this; - } - - /** - * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable - * to customers. - */ - public Builder customerId(Optional customerId) { - Utils.checkNotNull(customerId, "customerId"); - this.customerId = customerId; - return this; - } - - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(String supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = Optional.ofNullable(supplierId); - return this; - } - - /** - * The ID of the supplier this entity is linked to. - */ - public Builder supplierId(Optional supplierId) { - Utils.checkNotNull(supplierId, "supplierId"); - this.supplierId = supplierId; - return this; - } - - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(String companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = JsonNullable.of(companyId); - return this; - } - - /** - * The company ID the transaction belongs to - */ - public Builder companyId(JsonNullable companyId) { - Utils.checkNotNull(companyId, "companyId"); - this.companyId = companyId; - return this; - } - - - /** - * The ID of the department - */ - public Builder departmentId(String departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = JsonNullable.of(departmentId); - return this; - } - - /** - * The ID of the department - */ - public Builder departmentId(JsonNullable departmentId) { - Utils.checkNotNull(departmentId, "departmentId"); - this.departmentId = departmentId; - return this; - } - - - /** - * The type of payment for the expense. - */ - public Builder paymentType(Expense3PaymentType paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = JsonNullable.of(paymentType); - return this; - } - - /** - * The type of payment for the expense. - */ - public Builder paymentType(JsonNullable paymentType) { - Utils.checkNotNull(paymentType, "paymentType"); - this.paymentType = paymentType; - return this; - } - - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(Currency currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = JsonNullable.of(currency); - return this; - } - - /** - * Indicates the associated currency for an amount of money. Values correspond to [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217). - */ - public Builder currency(JsonNullable currency) { - Utils.checkNotNull(currency, "currency"); - this.currency = currency; - return this; - } - - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(double currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = JsonNullable.of(currencyRate); - return this; - } - - /** - * Currency Exchange Rate at the time entity was recorded/generated. - */ - public Builder currencyRate(JsonNullable currencyRate) { - Utils.checkNotNull(currencyRate, "currencyRate"); - this.currencyRate = currencyRate; - return this; - } - - - /** - * The type of expense. - */ - public Builder type(Expense3ExpenseType type) { - Utils.checkNotNull(type, "type"); - this.type = JsonNullable.of(type); - return this; - } - - /** - * The type of expense. - */ - public Builder type(JsonNullable type) { - Utils.checkNotNull(type, "type"); - this.type = type; - return this; - } - - - /** - * The memo of the expense. - */ - public Builder memo(String memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = JsonNullable.of(memo); - return this; - } - - /** - * The memo of the expense. - */ - public Builder memo(JsonNullable memo) { - Utils.checkNotNull(memo, "memo"); - this.memo = memo; - return this; - } - - - public Builder taxRate(LinkedTaxRate taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = Optional.ofNullable(taxRate); - return this; - } - - public Builder taxRate(Optional taxRate) { - Utils.checkNotNull(taxRate, "taxRate"); - this.taxRate = taxRate; - return this; - } - - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(double totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = JsonNullable.of(totalAmount); - return this; - } - - /** - * The total amount of the expense line item. - */ - public Builder totalAmount(JsonNullable totalAmount) { - Utils.checkNotNull(totalAmount, "totalAmount"); - this.totalAmount = totalAmount; - return this; - } - - - /** - * Expense line items linked to this expense. - */ - public Builder lineItems(List lineItems) { - Utils.checkNotNull(lineItems, "lineItems"); - this.lineItems = lineItems; - return this; - } - - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(String reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = JsonNullable.of(reference); - return this; - } - - /** - * Optional reference identifier for the transaction. - */ - public Builder reference(JsonNullable reference) { - Utils.checkNotNull(reference, "reference"); - this.reference = reference; - return this; - } - - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(String sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); - return this; - } - - /** - * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only - * supported for Xero. - */ - public Builder sourceDocumentUrl(JsonNullable sourceDocumentUrl) { - Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); - this.sourceDocumentUrl = sourceDocumentUrl; - return this; - } - - - public Builder customFields(List customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = Optional.ofNullable(customFields); - return this; - } - - public Builder customFields(Optional> customFields) { - Utils.checkNotNull(customFields, "customFields"); - this.customFields = customFields; - return this; - } - - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Builder customMappings(Map customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = JsonNullable.of(customMappings); - return this; - } - - /** - * When custom mappings are configured on the resource, the result is included here. - */ - public Builder customMappings(JsonNullable> customMappings) { - Utils.checkNotNull(customMappings, "customMappings"); - this.customMappings = customMappings; - return this; - } - - - /** - * Expense status - */ - public Builder status(Expense3Status status) { - Utils.checkNotNull(status, "status"); - this.status = JsonNullable.of(status); - return this; - } - - /** - * Expense status - */ - public Builder status(JsonNullable status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - /** - * The date and time when the object was last updated. - */ - public Builder updatedAt(OffsetDateTime updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = JsonNullable.of(updatedAt); - return this; - } - - /** - * The date and time when the object was last updated. - */ - public Builder updatedAt(JsonNullable updatedAt) { - Utils.checkNotNull(updatedAt, "updatedAt"); - this.updatedAt = updatedAt; - return this; - } - - - /** - * The date and time when the object was created. - */ - public Builder createdAt(OffsetDateTime createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = JsonNullable.of(createdAt); - return this; - } - - /** - * The date and time when the object was created. - */ - public Builder createdAt(JsonNullable createdAt) { - Utils.checkNotNull(createdAt, "createdAt"); - this.createdAt = createdAt; - return this; - } - - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(String rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = JsonNullable.of(rowVersion); - return this; - } - - /** - * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each - * time an update is made to the object. - */ - public Builder rowVersion(JsonNullable rowVersion) { - Utils.checkNotNull(rowVersion, "rowVersion"); - this.rowVersion = rowVersion; - return this; - } - - - /** - * The user who last updated the object. - */ - public Builder updatedBy(String updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = JsonNullable.of(updatedBy); - return this; - } - - /** - * The user who last updated the object. - */ - public Builder updatedBy(JsonNullable updatedBy) { - Utils.checkNotNull(updatedBy, "updatedBy"); - this.updatedBy = updatedBy; - return this; - } - - - /** - * The user who created the object. - */ - public Builder createdBy(String createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = JsonNullable.of(createdBy); - return this; - } - - /** - * The user who created the object. - */ - public Builder createdBy(JsonNullable createdBy) { - Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = createdBy; - return this; - } - - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(List passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = Optional.ofNullable(passThrough); - return this; - } - - /** - * The pass_through property allows passing service-specific, custom data or structured modifications - * in request body when creating or updating resources. - */ - public Builder passThrough(Optional> passThrough) { - Utils.checkNotNull(passThrough, "passThrough"); - this.passThrough = passThrough; - return this; - } - - public Three build() { - - return new Three( - id, number, transactionDate, - accountId, account, bankAccount, - customerId, supplierId, companyId, - departmentId, paymentType, currency, - currencyRate, type, memo, - taxRate, totalAmount, lineItems, - reference, sourceDocumentUrl, customFields, - customMappings, status, updatedAt, - createdAt, rowVersion, updatedBy, - createdBy, passThrough); - } - - } -}