List Quotes
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.*;
import com.apideck.unify.models.operations.AccountingQuotesAllRequest;
import com.apideck.unify.models.operations.AccountingQuotesAllResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.apiKey(System.getenv().getOrDefault("API_KEY", ""))
.build();
AccountingQuotesAllRequest req = AccountingQuotesAllRequest.builder()
.serviceId("salesforce")
.companyId("12345")
.build();
sdk.accounting().quotes().list()
.callAsStream()
.forEach((AccountingQuotesAllResponse item) -> {
// handle page
});
}
}
AccountingQuotesAllResponse
| 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 Quote
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.*;
import com.apideck.unify.models.errors.*;
import com.apideck.unify.models.operations.AccountingQuotesAddRequest;
import com.apideck.unify.models.operations.AccountingQuotesAddResponse;
import java.lang.Exception;
import java.time.LocalDate;
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()
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.apiKey(System.getenv().getOrDefault("API_KEY", ""))
.build();
AccountingQuotesAddRequest req = AccountingQuotesAddRequest.builder()
.quote(QuoteInput.builder()
.number("QT00546")
.customer(LinkedCustomerInput.builder()
.id("12345")
.displayName("Windsurf Shop")
.email("boring@boring.com")
.build())
.salesOrderId("123456")
.companyId("12345")
.departmentId("12345")
.projectId("12345")
.quoteDate(LocalDate.parse("2020-09-30"))
.expiryDate(LocalDate.parse("2020-10-30"))
.terms("Valid for 30 days")
.termsId("12345")
.reference("INV-2024-001")
.status(QuoteStatus.DRAFT)
.currency(Currency.USD)
.currencyRate(0.69)
.taxInclusive(true)
.subTotal(27500d)
.totalTax(2500d)
.taxCode("1234")
.discountPercentage(5.5)
.discountAmount(25d)
.total(27500d)
.customerMemo("Thank you for considering our services!")
.lineItems(List.of(
QuoteLineItemInput.builder()
.id("12345")
.rowId("12345")
.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(QuoteLineItemType.SALES_ITEM)
.taxAmount(27500d)
.totalAmount(27500d)
.quantity(1d)
.unitPrice(27500.5)
.unitOfMeasure("pc.")
.discountPercentage(0.01)
.discountAmount(19.99)
.categoryId("12345")
.locationId("12345")
.departmentId("12345")
.item(LinkedInvoiceItem.builder()
.id("12344")
.code("120-C")
.name("Model Y")
.build())
.taxRate(LinkedTaxRateInput.builder()
.id("123456")
.rate(10d)
.build())
.trackingCategories(List.of(
LinkedTrackingCategory.builder()
.id("123456")
.name("New York")
.parentId("123456")
.parentName("New York")
.build()))
.ledgerAccount(LinkedLedgerAccount.builder()
.id("123456")
.nominalCode("N091")
.code("453")
.build())
.customFields(List.of(
CustomField.of(CustomField1.builder()
.id("2389328923893298")
.name("employee_level")
.description("Employee Level")
.value(CustomField1Value.of("Uses Salesforce and Marketo"))
.build())))
.rowVersion("1-12345")
.build()))
.billingAddress(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")
.line5("Attention: Finance Dept")
.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("elon@musk.com")
.website("https://elonmusk.com")
.notes("Address notes or delivery instructions.")
.rowVersion("1-12345")
.build())
.shippingAddress(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")
.line5("Attention: Finance Dept")
.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("elon@musk.com")
.website("https://elonmusk.com")
.notes("Address notes or delivery instructions.")
.rowVersion("1-12345")
.build())
.trackingCategories(List.of(
LinkedTrackingCategory.builder()
.id("123456")
.name("New York")
.parentId("123456")
.parentName("New York")
.build()))
.templateId("123456")
.sourceDocumentUrl("https://www.quotesolution.com/quote/123456")
.customFields(List.of(
CustomField.of(CustomField1.builder()
.id("2389328923893298")
.name("employee_level")
.description("Employee Level")
.value(CustomField1Value.of("Uses Salesforce and Marketo"))
.build())))
.rowVersion("1-12345")
.passThrough(List.of(
PassThroughBody.builder()
.serviceId("<id>")
.extendPaths(List.of(
ExtendPaths.builder()
.path("$.nested.property")
.value(Map.ofEntries(
Map.entry("TaxClassificationRef", Map.ofEntries(
Map.entry("value", "EUC-99990201-V1-00020000")))))
.build()))
.build()))
.build())
.serviceId("salesforce")
.companyId("12345")
.build();
AccountingQuotesAddResponse res = sdk.accounting().quotes().create()
.request(req)
.call();
if (res.createQuoteResponse().isPresent()) {
System.out.println(res.createQuoteResponse().get());
}
}
}
AccountingQuotesAddResponse
| 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 Quote
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.*;
import com.apideck.unify.models.operations.AccountingQuotesOneRequest;
import com.apideck.unify.models.operations.AccountingQuotesOneResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.apiKey(System.getenv().getOrDefault("API_KEY", ""))
.build();
AccountingQuotesOneRequest req = AccountingQuotesOneRequest.builder()
.id("<id>")
.serviceId("salesforce")
.companyId("12345")
.build();
AccountingQuotesOneResponse res = sdk.accounting().quotes().get()
.request(req)
.call();
if (res.getQuoteResponse().isPresent()) {
System.out.println(res.getQuoteResponse().get());
}
}
}
AccountingQuotesOneResponse
| 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 Quote
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.*;
import com.apideck.unify.models.errors.*;
import com.apideck.unify.models.operations.AccountingQuotesUpdateRequest;
import com.apideck.unify.models.operations.AccountingQuotesUpdateResponse;
import java.lang.Exception;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
import org.openapitools.jackson.nullable.JsonNullable;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.apiKey(System.getenv().getOrDefault("API_KEY", ""))
.build();
AccountingQuotesUpdateRequest req = AccountingQuotesUpdateRequest.builder()
.id("<id>")
.quote(QuoteInput.builder()
.number("QT00546")
.customer(LinkedCustomerInput.builder()
.id("12345")
.displayName("Windsurf Shop")
.email("boring@boring.com")
.build())
.salesOrderId("123456")
.companyId("12345")
.departmentId("12345")
.projectId("12345")
.quoteDate(LocalDate.parse("2020-09-30"))
.expiryDate(LocalDate.parse("2020-10-30"))
.terms("Valid for 30 days")
.termsId("12345")
.reference("INV-2024-001")
.status(QuoteStatus.DRAFT)
.currency(Currency.USD)
.currencyRate(0.69)
.taxInclusive(true)
.subTotal(27500d)
.totalTax(2500d)
.taxCode("1234")
.discountPercentage(5.5)
.discountAmount(25d)
.total(27500d)
.customerMemo("Thank you for considering our services!")
.lineItems(List.of(
QuoteLineItemInput.builder()
.id("12345")
.rowId("12345")
.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(QuoteLineItemType.SALES_ITEM)
.taxAmount(27500d)
.totalAmount(27500d)
.quantity(1d)
.unitPrice(27500.5)
.unitOfMeasure("pc.")
.discountPercentage(0.01)
.discountAmount(19.99)
.categoryId("12345")
.locationId("12345")
.departmentId("12345")
.item(LinkedInvoiceItem.builder()
.id("12344")
.code("120-C")
.name("Model Y")
.build())
.taxRate(LinkedTaxRateInput.builder()
.id("123456")
.rate(10d)
.build())
.trackingCategories(JsonNullable.of(null))
.ledgerAccount(LinkedLedgerAccount.builder()
.id("123456")
.nominalCode("N091")
.code("453")
.build())
.customFields(List.of(
CustomField.of(CustomField1.builder()
.id("2389328923893298")
.name("employee_level")
.description("Employee Level")
.value(CustomField1Value.of("Uses Salesforce and Marketo"))
.build())))
.rowVersion("1-12345")
.build()))
.billingAddress(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")
.line5("Attention: Finance Dept")
.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("elon@musk.com")
.website("https://elonmusk.com")
.notes("Address notes or delivery instructions.")
.rowVersion("1-12345")
.build())
.shippingAddress(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")
.line5("Attention: Finance Dept")
.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("elon@musk.com")
.website("https://elonmusk.com")
.notes("Address notes or delivery instructions.")
.rowVersion("1-12345")
.build())
.trackingCategories(List.of(
LinkedTrackingCategory.builder()
.id("123456")
.name("New York")
.parentId("123456")
.parentName("New York")
.build()))
.templateId("123456")
.sourceDocumentUrl("https://www.quotesolution.com/quote/123456")
.customFields(List.of(
CustomField.of(CustomField1.builder()
.id("2389328923893298")
.name("employee_level")
.description("Employee Level")
.value(CustomField1Value.of("Uses Salesforce and Marketo"))
.build())))
.rowVersion("1-12345")
.passThrough(List.of(
PassThroughBody.builder()
.serviceId("<id>")
.extendPaths(List.of(
ExtendPaths.builder()
.path("$.nested.property")
.value(Map.ofEntries(
Map.entry("TaxClassificationRef", Map.ofEntries(
Map.entry("value", "EUC-99990201-V1-00020000")))))
.build()))
.build()))
.build())
.serviceId("salesforce")
.companyId("12345")
.build();
AccountingQuotesUpdateResponse res = sdk.accounting().quotes().update()
.request(req)
.call();
if (res.updateQuoteResponse().isPresent()) {
System.out.println(res.updateQuoteResponse().get());
}
}
}
AccountingQuotesUpdateResponse
| 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 Quote
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.*;
import com.apideck.unify.models.operations.AccountingQuotesDeleteRequest;
import com.apideck.unify.models.operations.AccountingQuotesDeleteResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.apiKey(System.getenv().getOrDefault("API_KEY", ""))
.build();
AccountingQuotesDeleteRequest req = AccountingQuotesDeleteRequest.builder()
.id("<id>")
.serviceId("salesforce")
.companyId("12345")
.build();
AccountingQuotesDeleteResponse res = sdk.accounting().quotes().delete()
.request(req)
.call();
if (res.deleteQuoteResponse().isPresent()) {
System.out.println(res.deleteQuoteResponse().get());
}
}
}
AccountingQuotesDeleteResponse
| 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 |
*/* |