updatedBy) {
public AccountingBankAccount build() {
return new AccountingBankAccount(
- id, displayId, name,
- accountNumber, accountType, ledgerAccount,
- bankName, currency, balance,
- availableBalance, overdraftLimit, routingNumber,
- iban, bic, bsbNumber,
- branchIdentifier, bankCode, country,
- status, description, customFields,
- customMappings, createdAt, updatedAt,
- createdBy, updatedBy);
+ id, downstreamId, displayId,
+ name, accountNumber, accountType,
+ ledgerAccount, bankName, currency,
+ balance, availableBalance, overdraftLimit,
+ routingNumber, iban, bic,
+ bsbNumber, branchIdentifier, bankCode,
+ country, status, description,
+ customFields, customMappings, createdAt,
+ updatedAt, createdBy, updatedBy);
}
}
diff --git a/src/main/java/com/apideck/unify/models/components/AccountingMethod.java b/src/main/java/com/apideck/unify/models/components/AccountingMethod.java
new file mode 100644
index 000000000..435485ece
--- /dev/null
+++ b/src/main/java/com/apideck/unify/models/components/AccountingMethod.java
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+/**
+ * AccountingMethod
+ *
+ * The accounting method used for the report: cash or accrual.
+ */
+public enum AccountingMethod {
+ CASH("cash"),
+ ACCRUAL("accrual");
+
+ @JsonValue
+ private final String value;
+
+ AccountingMethod(String value) {
+ this.value = value;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static Optional fromValue(String value) {
+ for (AccountingMethod o: AccountingMethod.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/BalanceSheetFilter.java b/src/main/java/com/apideck/unify/models/components/BalanceSheetFilter.java
index 00a2e0370..5c8747024 100644
--- a/src/main/java/com/apideck/unify/models/components/BalanceSheetFilter.java
+++ b/src/main/java/com/apideck/unify/models/components/BalanceSheetFilter.java
@@ -49,28 +49,37 @@ public class BalanceSheetFilter {
@SpeakeasyMetadata("queryParam:name=location_id")
private Optional locationId;
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ @SpeakeasyMetadata("queryParam:name=accounting_method")
+ private Optional extends AccountingMethod> accountingMethod;
+
@JsonCreator
public BalanceSheetFilter(
Optional startDate,
Optional endDate,
Optional periodCount,
Optional extends PeriodType> periodType,
- Optional locationId) {
+ Optional locationId,
+ Optional extends AccountingMethod> accountingMethod) {
Utils.checkNotNull(startDate, "startDate");
Utils.checkNotNull(endDate, "endDate");
Utils.checkNotNull(periodCount, "periodCount");
Utils.checkNotNull(periodType, "periodType");
Utils.checkNotNull(locationId, "locationId");
+ Utils.checkNotNull(accountingMethod, "accountingMethod");
this.startDate = startDate;
this.endDate = endDate;
this.periodCount = periodCount;
this.periodType = periodType;
this.locationId = locationId;
+ this.accountingMethod = accountingMethod;
}
public BalanceSheetFilter() {
this(Optional.empty(), Optional.empty(), Optional.empty(),
- Optional.empty(), Optional.empty());
+ Optional.empty(), Optional.empty(), Optional.empty());
}
/**
@@ -117,6 +126,15 @@ public Optional locationId() {
return locationId;
}
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public Optional accountingMethod() {
+ return (Optional) accountingMethod;
+ }
+
public static Builder builder() {
return new Builder();
}
@@ -223,6 +241,25 @@ public BalanceSheetFilter withLocationId(Optional locationId) {
return this;
}
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ public BalanceSheetFilter withAccountingMethod(AccountingMethod accountingMethod) {
+ Utils.checkNotNull(accountingMethod, "accountingMethod");
+ this.accountingMethod = Optional.ofNullable(accountingMethod);
+ return this;
+ }
+
+
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ public BalanceSheetFilter withAccountingMethod(Optional extends AccountingMethod> accountingMethod) {
+ Utils.checkNotNull(accountingMethod, "accountingMethod");
+ this.accountingMethod = accountingMethod;
+ return this;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -237,14 +274,15 @@ public boolean equals(java.lang.Object o) {
Utils.enhancedDeepEquals(this.endDate, other.endDate) &&
Utils.enhancedDeepEquals(this.periodCount, other.periodCount) &&
Utils.enhancedDeepEquals(this.periodType, other.periodType) &&
- Utils.enhancedDeepEquals(this.locationId, other.locationId);
+ Utils.enhancedDeepEquals(this.locationId, other.locationId) &&
+ Utils.enhancedDeepEquals(this.accountingMethod, other.accountingMethod);
}
@Override
public int hashCode() {
return Utils.enhancedHash(
startDate, endDate, periodCount,
- periodType, locationId);
+ periodType, locationId, accountingMethod);
}
@Override
@@ -254,7 +292,8 @@ public String toString() {
"endDate", endDate,
"periodCount", periodCount,
"periodType", periodType,
- "locationId", locationId);
+ "locationId", locationId,
+ "accountingMethod", accountingMethod);
}
@SuppressWarnings("UnusedReturnValue")
@@ -271,6 +310,8 @@ public final static class Builder {
private Optional locationId = Optional.empty();
+ private Optional extends AccountingMethod> accountingMethod = Optional.empty();
+
private Builder() {
// force use of static builder() method
}
@@ -376,11 +417,30 @@ public Builder locationId(Optional locationId) {
return this;
}
+
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ public Builder accountingMethod(AccountingMethod accountingMethod) {
+ Utils.checkNotNull(accountingMethod, "accountingMethod");
+ this.accountingMethod = Optional.ofNullable(accountingMethod);
+ return this;
+ }
+
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ public Builder accountingMethod(Optional extends AccountingMethod> accountingMethod) {
+ Utils.checkNotNull(accountingMethod, "accountingMethod");
+ this.accountingMethod = accountingMethod;
+ return this;
+ }
+
public BalanceSheetFilter build() {
return new BalanceSheetFilter(
startDate, endDate, periodCount,
- periodType, locationId);
+ periodType, locationId, accountingMethod);
}
}
diff --git a/src/main/java/com/apideck/unify/models/components/BankAccountsFilter.java b/src/main/java/com/apideck/unify/models/components/BankAccountsFilter.java
index 4a6ba6cfa..7a16e0b33 100644
--- a/src/main/java/com/apideck/unify/models/components/BankAccountsFilter.java
+++ b/src/main/java/com/apideck/unify/models/components/BankAccountsFilter.java
@@ -20,6 +20,12 @@ public class BankAccountsFilter {
@SpeakeasyMetadata("queryParam:name=name")
private Optional name;
+ /**
+ * Filter by account type
+ */
+ @SpeakeasyMetadata("queryParam:name=account_type")
+ private Optional extends BankAccountsFilterAccountType> accountType;
+
/**
* Filter by account status
*/
@@ -29,15 +35,18 @@ public class BankAccountsFilter {
@JsonCreator
public BankAccountsFilter(
Optional name,
+ Optional extends BankAccountsFilterAccountType> accountType,
Optional extends BankAccountsFilterStatus> status) {
Utils.checkNotNull(name, "name");
+ Utils.checkNotNull(accountType, "accountType");
Utils.checkNotNull(status, "status");
this.name = name;
+ this.accountType = accountType;
this.status = status;
}
public BankAccountsFilter() {
- this(Optional.empty(), Optional.empty());
+ this(Optional.empty(), Optional.empty(), Optional.empty());
}
/**
@@ -48,6 +57,15 @@ public Optional name() {
return name;
}
+ /**
+ * Filter by account type
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public Optional accountType() {
+ return (Optional) accountType;
+ }
+
/**
* Filter by account status
*/
@@ -81,6 +99,25 @@ public BankAccountsFilter withName(Optional name) {
return this;
}
+ /**
+ * Filter by account type
+ */
+ public BankAccountsFilter withAccountType(BankAccountsFilterAccountType accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = Optional.ofNullable(accountType);
+ return this;
+ }
+
+
+ /**
+ * Filter by account type
+ */
+ public BankAccountsFilter withAccountType(Optional extends BankAccountsFilterAccountType> accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = accountType;
+ return this;
+ }
+
/**
* Filter by account status
*/
@@ -111,19 +148,21 @@ public boolean equals(java.lang.Object o) {
BankAccountsFilter other = (BankAccountsFilter) o;
return
Utils.enhancedDeepEquals(this.name, other.name) &&
+ Utils.enhancedDeepEquals(this.accountType, other.accountType) &&
Utils.enhancedDeepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Utils.enhancedHash(
- name, status);
+ name, accountType, status);
}
@Override
public String toString() {
return Utils.toString(BankAccountsFilter.class,
"name", name,
+ "accountType", accountType,
"status", status);
}
@@ -132,6 +171,8 @@ public final static class Builder {
private Optional name = Optional.empty();
+ private Optional extends BankAccountsFilterAccountType> accountType = Optional.empty();
+
private Optional extends BankAccountsFilterStatus> status = Optional.empty();
private Builder() {
@@ -158,6 +199,25 @@ public Builder name(Optional name) {
}
+ /**
+ * Filter by account type
+ */
+ public Builder accountType(BankAccountsFilterAccountType accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = Optional.ofNullable(accountType);
+ return this;
+ }
+
+ /**
+ * Filter by account type
+ */
+ public Builder accountType(Optional extends BankAccountsFilterAccountType> accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = accountType;
+ return this;
+ }
+
+
/**
* Filter by account status
*/
@@ -179,7 +239,7 @@ public Builder status(Optional extends BankAccountsFilterStatus> status) {
public BankAccountsFilter build() {
return new BankAccountsFilter(
- name, status);
+ name, accountType, status);
}
}
diff --git a/src/main/java/com/apideck/unify/models/components/BankAccountsFilterAccountType.java b/src/main/java/com/apideck/unify/models/components/BankAccountsFilterAccountType.java
new file mode 100644
index 000000000..5ed32b6e3
--- /dev/null
+++ b/src/main/java/com/apideck/unify/models/components/BankAccountsFilterAccountType.java
@@ -0,0 +1,45 @@
+/*
+ * 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;
+
+/**
+ * BankAccountsFilterAccountType
+ *
+ * Filter by account type
+ */
+public enum BankAccountsFilterAccountType {
+ CHECKING("checking"),
+ SAVINGS("savings"),
+ CREDIT_CARD("credit_card"),
+ MONEY_MARKET("money_market"),
+ LINE_OF_CREDIT("line_of_credit"),
+ OTHER("other"),
+ CASH("cash");
+
+ @JsonValue
+ private final String value;
+
+ BankAccountsFilterAccountType(String value) {
+ this.value = value;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static Optional fromValue(String value) {
+ for (BankAccountsFilterAccountType o: BankAccountsFilterAccountType.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/CreditNoteStatus.java b/src/main/java/com/apideck/unify/models/components/CreditNoteStatus.java
index 967822fa5..80ad92e0c 100644
--- a/src/main/java/com/apideck/unify/models/components/CreditNoteStatus.java
+++ b/src/main/java/com/apideck/unify/models/components/CreditNoteStatus.java
@@ -16,6 +16,7 @@
public enum CreditNoteStatus {
DRAFT("draft"),
AUTHORISED("authorised"),
+ PARTIALLY_PAID("partially_paid"),
PAID("paid"),
VOIDED("voided"),
DELETED("deleted");
diff --git a/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilter.java b/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilter.java
index f07306921..950a7c724 100644
--- a/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilter.java
+++ b/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilter.java
@@ -9,6 +9,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.lang.Override;
import java.lang.String;
+import java.lang.SuppressWarnings;
import java.util.Optional;
@@ -37,25 +38,34 @@ public class ProfitAndLossFilter {
@SpeakeasyMetadata("queryParam:name=location_id")
private Optional locationId;
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ @SpeakeasyMetadata("queryParam:name=accounting_method")
+ private Optional extends ProfitAndLossFilterAccountingMethod> accountingMethod;
+
@JsonCreator
public ProfitAndLossFilter(
Optional customerId,
Optional startDate,
Optional endDate,
- Optional locationId) {
+ Optional locationId,
+ Optional extends ProfitAndLossFilterAccountingMethod> accountingMethod) {
Utils.checkNotNull(customerId, "customerId");
Utils.checkNotNull(startDate, "startDate");
Utils.checkNotNull(endDate, "endDate");
Utils.checkNotNull(locationId, "locationId");
+ Utils.checkNotNull(accountingMethod, "accountingMethod");
this.customerId = customerId;
this.startDate = startDate;
this.endDate = endDate;
this.locationId = locationId;
+ this.accountingMethod = accountingMethod;
}
public ProfitAndLossFilter() {
this(Optional.empty(), Optional.empty(), Optional.empty(),
- Optional.empty());
+ Optional.empty(), Optional.empty());
}
/**
@@ -90,6 +100,15 @@ public Optional locationId() {
return locationId;
}
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public Optional accountingMethod() {
+ return (Optional) accountingMethod;
+ }
+
public static Builder builder() {
return new Builder();
}
@@ -171,6 +190,25 @@ public ProfitAndLossFilter withLocationId(Optional locationId) {
return this;
}
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ public ProfitAndLossFilter withAccountingMethod(ProfitAndLossFilterAccountingMethod accountingMethod) {
+ Utils.checkNotNull(accountingMethod, "accountingMethod");
+ this.accountingMethod = Optional.ofNullable(accountingMethod);
+ return this;
+ }
+
+
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ public ProfitAndLossFilter withAccountingMethod(Optional extends ProfitAndLossFilterAccountingMethod> accountingMethod) {
+ Utils.checkNotNull(accountingMethod, "accountingMethod");
+ this.accountingMethod = accountingMethod;
+ return this;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -184,14 +222,15 @@ public boolean equals(java.lang.Object o) {
Utils.enhancedDeepEquals(this.customerId, other.customerId) &&
Utils.enhancedDeepEquals(this.startDate, other.startDate) &&
Utils.enhancedDeepEquals(this.endDate, other.endDate) &&
- Utils.enhancedDeepEquals(this.locationId, other.locationId);
+ Utils.enhancedDeepEquals(this.locationId, other.locationId) &&
+ Utils.enhancedDeepEquals(this.accountingMethod, other.accountingMethod);
}
@Override
public int hashCode() {
return Utils.enhancedHash(
customerId, startDate, endDate,
- locationId);
+ locationId, accountingMethod);
}
@Override
@@ -200,7 +239,8 @@ public String toString() {
"customerId", customerId,
"startDate", startDate,
"endDate", endDate,
- "locationId", locationId);
+ "locationId", locationId,
+ "accountingMethod", accountingMethod);
}
@SuppressWarnings("UnusedReturnValue")
@@ -214,6 +254,8 @@ public final static class Builder {
private Optional locationId = Optional.empty();
+ private Optional extends ProfitAndLossFilterAccountingMethod> accountingMethod = Optional.empty();
+
private Builder() {
// force use of static builder() method
}
@@ -294,11 +336,30 @@ public Builder locationId(Optional locationId) {
return this;
}
+
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ public Builder accountingMethod(ProfitAndLossFilterAccountingMethod accountingMethod) {
+ Utils.checkNotNull(accountingMethod, "accountingMethod");
+ this.accountingMethod = Optional.ofNullable(accountingMethod);
+ return this;
+ }
+
+ /**
+ * The accounting method used for the report: cash or accrual.
+ */
+ public Builder accountingMethod(Optional extends ProfitAndLossFilterAccountingMethod> accountingMethod) {
+ Utils.checkNotNull(accountingMethod, "accountingMethod");
+ this.accountingMethod = accountingMethod;
+ return this;
+ }
+
public ProfitAndLossFilter build() {
return new ProfitAndLossFilter(
customerId, startDate, endDate,
- locationId);
+ locationId, accountingMethod);
}
}
diff --git a/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilterAccountingMethod.java b/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilterAccountingMethod.java
new file mode 100644
index 000000000..65a891142
--- /dev/null
+++ b/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilterAccountingMethod.java
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+/**
+ * ProfitAndLossFilterAccountingMethod
+ *
+ * The accounting method used for the report: cash or accrual.
+ */
+public enum ProfitAndLossFilterAccountingMethod {
+ CASH("cash"),
+ ACCRUAL("accrual");
+
+ @JsonValue
+ private final String value;
+
+ ProfitAndLossFilterAccountingMethod(String value) {
+ this.value = value;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static Optional fromValue(String value) {
+ for (ProfitAndLossFilterAccountingMethod o: ProfitAndLossFilterAccountingMethod.values()) {
+ if (Objects.deepEquals(o.value, value)) {
+ return Optional.of(o);
+ }
+ }
+ return Optional.empty();
+ }
+}
+