(accounting().billPayments())
- list - List Bill Payments
- create - Create Bill Payment
- get - Get Bill Payment
- update - Update Bill Payment
- delete - Delete Bill Payment
List Bill Payments
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.PaymentsFilter;
import com.apideck.unify.models.components.PaymentsSort;
import com.apideck.unify.models.components.PaymentsSortBy;
import com.apideck.unify.models.components.SortDirection;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.AccountingBillPaymentsAllRequest;
import com.apideck.unify.models.operations.AccountingBillPaymentsAllResponse;
import java.lang.Exception;
import java.time.OffsetDateTime;
import java.util.Map;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
AccountingBillPaymentsAllRequest req = AccountingBillPaymentsAllRequest.builder()
.serviceId("salesforce")
.filter(PaymentsFilter.builder()
.updatedSince(OffsetDateTime.parse("2020-09-30T07:43:32.000Z"))
.build())
.sort(PaymentsSort.builder()
.by(PaymentsSortBy.UPDATED_AT)
.direction(SortDirection.DESC)
.build())
.passThrough(Map.ofEntries(
Map.entry("search", "San Francisco")))
.fields("id,updated_at")
.build();
AccountingBillPaymentsAllResponse res = sdk.accounting().billPayments().list()
.request(req)
.call();
if (res.getBillPaymentsResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingBillPaymentsAllRequest | ✔️ | The request object to use for the request. |
AccountingBillPaymentsAllResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/BadRequestResponse | 400 | application/json |
models/errors/UnauthorizedResponse | 401 | application/json |
models/errors/PaymentRequiredResponse | 402 | application/json |
models/errors/NotFoundResponse | 404 | application/json |
models/errors/UnprocessableResponse | 422 | application/json |
models/errors/APIException | 4XX, 5XX | */* |
Create Bill Payment
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.Address;
import com.apideck.unify.models.components.BillPaymentAllocationType;
import com.apideck.unify.models.components.BillPaymentAllocations;
import com.apideck.unify.models.components.BillPaymentInput;
import com.apideck.unify.models.components.BillPaymentType;
import com.apideck.unify.models.components.Currency;
import com.apideck.unify.models.components.CustomField;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.LinkedLedgerAccountInput;
import com.apideck.unify.models.components.LinkedSupplierInput;
import com.apideck.unify.models.components.LinkedTrackingCategory;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.components.PaymentStatus;
import com.apideck.unify.models.components.Type;
import com.apideck.unify.models.components.Value;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.AccountingBillPaymentsAddRequest;
import com.apideck.unify.models.operations.AccountingBillPaymentsAddResponse;
import java.lang.Exception;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
AccountingBillPaymentsAddRequest req = AccountingBillPaymentsAddRequest.builder()
.billPayment(BillPaymentInput.builder()
.totalAmount(49.99d)
.transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z"))
.currency(Currency.USD)
.currencyRate(0.69d)
.reference("123456")
.paymentMethod("cash")
.paymentMethodReference("123456")
.paymentMethodId("12345")
.account(LinkedLedgerAccountInput.builder()
.id("123456")
.nominalCode("N091")
.code("453")
.build())
.supplier(LinkedSupplierInput.builder()
.id("12345")
.displayName("Windsurf Shop")
.address(Address.builder()
.id("123")
.type(Type.PRIMARY)
.string("25 Spring Street, Blackburn, VIC 3130")
.name("HQ US")
.line1("Main street")
.line2("apt #")
.line3("Suite #")
.line4("delivery instructions")
.streetNumber("25")
.city("San Francisco")
.state("CA")
.postalCode("94104")
.country("US")
.latitude("40.759211")
.longitude("-73.984638")
.county("Santa Clara")
.contactName("Elon Musk")
.salutation("Mr")
.phoneNumber("111-111-1111")
.fax("122-111-1111")
.email("[email protected]")
.website("https://elonmusk.com")
.notes("Address notes or delivery instructions.")
.rowVersion("1-12345")
.build())
.build())
.companyId("12345")
.reconciled(true)
.status(PaymentStatus.AUTHORISED)
.type(BillPaymentType.ACCOUNTS_PAYABLE)
.allocations(List.of(
BillPaymentAllocations.builder()
.id("12345")
.type(BillPaymentAllocationType.BILL)
.amount(49.99d)
.allocationId("123456")
.build()))
.note("Some notes about this transaction")
.number("123456")
.trackingCategories(List.of(
LinkedTrackingCategory.builder()
.id("123456")
.name("New York")
.build(),
LinkedTrackingCategory.builder()
.id("123456")
.name("New York")
.build()))
.customFields(List.of(
CustomField.builder()
.id("2389328923893298")
.name("employee_level")
.description("Employee Level")
.value(Value.of("Uses Salesforce and Marketo"))
.build()))
.rowVersion("1-12345")
.displayId("123456")
.passThrough(List.of(
PassThroughBody.builder()
.serviceId("<id>")
.extendPaths(List.of(
ExtendPaths.builder()
.path("$.nested.property")
.value(Map.ofEntries(\n Map.entry("TaxClassificationRef", Map.ofEntries(\n Map.entry("value", "EUC-99990201-V1-00020000")))))
.build()))
.build()))
.build())
.serviceId("salesforce")
.build();
AccountingBillPaymentsAddResponse res = sdk.accounting().billPayments().create()
.request(req)
.call();
if (res.createBillPaymentResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingBillPaymentsAddRequest | ✔️ | The request object to use for the request. |
AccountingBillPaymentsAddResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/BadRequestResponse | 400 | application/json |
models/errors/UnauthorizedResponse | 401 | application/json |
models/errors/PaymentRequiredResponse | 402 | application/json |
models/errors/NotFoundResponse | 404 | application/json |
models/errors/UnprocessableResponse | 422 | application/json |
models/errors/APIException | 4XX, 5XX | */* |
Get Bill Payment
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.AccountingBillPaymentsOneRequest;
import com.apideck.unify.models.operations.AccountingBillPaymentsOneResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
AccountingBillPaymentsOneRequest req = AccountingBillPaymentsOneRequest.builder()
.id("<id>")
.serviceId("salesforce")
.fields("id,updated_at")
.build();
AccountingBillPaymentsOneResponse res = sdk.accounting().billPayments().get()
.request(req)
.call();
if (res.getBillPaymentResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingBillPaymentsOneRequest | ✔️ | The request object to use for the request. |
AccountingBillPaymentsOneResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/BadRequestResponse | 400 | application/json |
models/errors/UnauthorizedResponse | 401 | application/json |
models/errors/PaymentRequiredResponse | 402 | application/json |
models/errors/NotFoundResponse | 404 | application/json |
models/errors/UnprocessableResponse | 422 | application/json |
models/errors/APIException | 4XX, 5XX | */* |
Update Bill Payment
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.Address;
import com.apideck.unify.models.components.BillPaymentAllocationType;
import com.apideck.unify.models.components.BillPaymentAllocations;
import com.apideck.unify.models.components.BillPaymentInput;
import com.apideck.unify.models.components.BillPaymentType;
import com.apideck.unify.models.components.Currency;
import com.apideck.unify.models.components.CustomField;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.LinkedLedgerAccountInput;
import com.apideck.unify.models.components.LinkedSupplierInput;
import com.apideck.unify.models.components.LinkedTrackingCategory;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.components.PaymentStatus;
import com.apideck.unify.models.components.Type;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.AccountingBillPaymentsUpdateRequest;
import com.apideck.unify.models.operations.AccountingBillPaymentsUpdateResponse;
import java.lang.Exception;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
AccountingBillPaymentsUpdateRequest req = AccountingBillPaymentsUpdateRequest.builder()
.id("<id>")
.billPayment(BillPaymentInput.builder()
.totalAmount(49.99d)
.transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z"))
.currency(Currency.USD)
.currencyRate(0.69d)
.reference("123456")
.paymentMethod("cash")
.paymentMethodReference("123456")
.paymentMethodId("12345")
.account(LinkedLedgerAccountInput.builder()
.id("123456")
.nominalCode("N091")
.code("453")
.build())
.supplier(LinkedSupplierInput.builder()
.id("12345")
.displayName("Windsurf Shop")
.address(Address.builder()
.id("123")
.type(Type.PRIMARY)
.string("25 Spring Street, Blackburn, VIC 3130")
.name("HQ US")
.line1("Main street")
.line2("apt #")
.line3("Suite #")
.line4("delivery instructions")
.streetNumber("25")
.city("San Francisco")
.state("CA")
.postalCode("94104")
.country("US")
.latitude("40.759211")
.longitude("-73.984638")
.county("Santa Clara")
.contactName("Elon Musk")
.salutation("Mr")
.phoneNumber("111-111-1111")
.fax("122-111-1111")
.email("[email protected]")
.website("https://elonmusk.com")
.notes("Address notes or delivery instructions.")
.rowVersion("1-12345")
.build())
.build())
.companyId("12345")
.reconciled(true)
.status(PaymentStatus.AUTHORISED)
.type(BillPaymentType.ACCOUNTS_PAYABLE)
.allocations(List.of(
BillPaymentAllocations.builder()
.id("12345")
.type(BillPaymentAllocationType.BILL)
.amount(49.99d)
.allocationId("123456")
.build(),
BillPaymentAllocations.builder()
.id("12345")
.type(BillPaymentAllocationType.BILL)
.amount(49.99d)
.allocationId("123456")
.build(),
BillPaymentAllocations.builder()
.id("12345")
.type(BillPaymentAllocationType.BILL)
.amount(49.99d)
.allocationId("123456")
.build()))
.note("Some notes about this transaction")
.number("123456")
.trackingCategories(List.of(
LinkedTrackingCategory.builder()
.id("123456")
.name("New York")
.build(),
LinkedTrackingCategory.builder()
.id("123456")
.name("New York")
.build()))
.customFields(List.of(
CustomField.builder()
.id("2389328923893298")
.name("employee_level")
.description("Employee Level")
.build()))
.rowVersion("1-12345")
.displayId("123456")
.passThrough(List.of(
PassThroughBody.builder()
.serviceId("<id>")
.extendPaths(List.of(
ExtendPaths.builder()
.path("$.nested.property")
.value(Map.ofEntries(\n Map.entry("TaxClassificationRef", Map.ofEntries(\n Map.entry("value", "EUC-99990201-V1-00020000")))))
.build(),
ExtendPaths.builder()
.path("$.nested.property")
.value(Map.ofEntries(\n Map.entry("TaxClassificationRef", Map.ofEntries(\n Map.entry("value", "EUC-99990201-V1-00020000")))))
.build(),
ExtendPaths.builder()
.path("$.nested.property")
.value(Map.ofEntries(\n Map.entry("TaxClassificationRef", Map.ofEntries(\n Map.entry("value", "EUC-99990201-V1-00020000")))))
.build()))
.build()))
.build())
.serviceId("salesforce")
.build();
AccountingBillPaymentsUpdateResponse res = sdk.accounting().billPayments().update()
.request(req)
.call();
if (res.updateBillPaymentResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingBillPaymentsUpdateRequest | ✔️ | The request object to use for the request. |
AccountingBillPaymentsUpdateResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/BadRequestResponse | 400 | application/json |
models/errors/UnauthorizedResponse | 401 | application/json |
models/errors/PaymentRequiredResponse | 402 | application/json |
models/errors/NotFoundResponse | 404 | application/json |
models/errors/UnprocessableResponse | 422 | application/json |
models/errors/APIException | 4XX, 5XX | */* |
Delete Bill Payment
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.AccountingBillPaymentsDeleteRequest;
import com.apideck.unify.models.operations.AccountingBillPaymentsDeleteResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
AccountingBillPaymentsDeleteRequest req = AccountingBillPaymentsDeleteRequest.builder()
.id("<id>")
.serviceId("salesforce")
.build();
AccountingBillPaymentsDeleteResponse res = sdk.accounting().billPayments().delete()
.request(req)
.call();
if (res.deleteBillPaymentResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingBillPaymentsDeleteRequest | ✔️ | The request object to use for the request. |
AccountingBillPaymentsDeleteResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/BadRequestResponse | 400 | application/json |
models/errors/UnauthorizedResponse | 401 | application/json |
models/errors/PaymentRequiredResponse | 402 | application/json |
models/errors/NotFoundResponse | 404 | application/json |
models/errors/UnprocessableResponse | 422 | application/json |
models/errors/APIException | 4XX, 5XX | */* |