public class OrderService extends Object
| Constructor and Description |
|---|
OrderService(ManagementConfiguration configuration)
OrderService has to be built using the ManagementConfiguration object.
|
| Modifier and Type | Method and Description |
|---|---|
Manager |
addManagerToOrder(Long orderId,
AddManagerToOrderRequest request)
Adds a manager to an order.
|
BackOfficeInstallationFile |
createInstallationFile(CreateInstallationFileRequest request)
Creates and returns a new installation file with the details provided in the request.
|
CreateOrderResponse |
createOrder(com.licensespring.model.order.WebhookOrder order)
Creates an order.
|
String |
exportToCsv(LocalDate from,
LocalDate to,
String destinationDirectory)
Generates a csv file with orders from the requested time range.
|
String |
exportToCsv(Range range,
String destinationDirectory)
Generates a csv file with orders from the requested time range.
|
String[] |
generateLicenseKeys(com.licensespring.dto.GenerateLicenseRequest request)
Generates UNIQUE license keys.
|
BackOfficeInstallationFile |
getInstallationFile(int id)
Gets the installation file with the provided id.
|
Order |
getOrder(Long id)
Finds an order with provided order id.
|
BackOfficeProduct |
getProduct(Long id)
Gets the product with the provided id.
|
List<BackOfficeInstallationFile> |
paginateThroughAllInstallationFiles(SearchInstallationFilesRequest request)
Goes through all pages of the response and returns a list with all possible installation files that satisfy the request.
|
List<Order> |
paginateThroughAllOrders(SearchOrdersRequest request)
Goes through all pages of the response and returns a list with all possible orders that satisfy the request.
|
List<BackOfficeProduct> |
paginateThroughAllProducts(SearchProductsRequest request)
Goes through all pages of the response and returns a list with all possible products that satisfy the request.
|
ProductCustomFieldsService |
productCustomFieldsService()
Returns the service for product custom fields.
|
SearchResult<BackOfficeInstallationFile> |
searchInstallationFiles(SearchInstallationFilesRequest request)
Searches the orders by applying the filtering and ordering conditions in the
SearchInstallationFilesRequest
class. |
SearchResult<Order> |
searchOrders(SearchOrdersRequest request)
Searches the orders by applying the filtering and ordering conditions in the
SearchOrdersRequest
class. |
SearchResult<BackOfficeProduct> |
searchProducts(SearchProductsRequest request)
Searches the orders by applying the filtering and ordering conditions in the
SearchProductsRequest
class. |
public OrderService(ManagementConfiguration configuration)
configuration - build via the builder patternpublic ProductCustomFieldsService productCustomFieldsService()
public SearchResult<Order> searchOrders(SearchOrdersRequest request) throws com.licensespring.model.exceptions.LicenseSpringException
SearchOrdersRequest
class.request - search request that can be made using the buildercom.licensespring.model.exceptions.LicenseSpringExceptionpublic Order getOrder(Long id) throws com.licensespring.model.exceptions.LicenseSpringException
id - id of the Order, 16 digit numbercom.licensespring.model.exceptions.LicenseSpringExceptionpublic String exportToCsv(LocalDate from, LocalDate to, String destinationDirectory) throws com.licensespring.model.exceptions.LicenseSpringException
from - e.g. LocalDate.of(GGGG,MM,DD)to - e.g. LocalDate.of(GGGG,MM,DD)destinationDirectory - where the SDK will save the CSVcom.licensespring.model.exceptions.LicenseSpringExceptionpublic String exportToCsv(Range range, String destinationDirectory) throws com.licensespring.model.exceptions.LicenseSpringException
range - Range enum, represents the last x days, where x is an intdestinationDirectory - where the SDK will save the CSVcom.licensespring.model.exceptions.LicenseSpringExceptionpublic String[] generateLicenseKeys(com.licensespring.dto.GenerateLicenseRequest request) throws com.licensespring.model.exceptions.LicenseSpringException
request - the request parameters, multiple license keys can be generated at oncecreateOrder(WebhookOrder) callcom.licensespring.model.exceptions.LicenseSpringExceptionpublic CreateOrderResponse createOrder(com.licensespring.model.order.WebhookOrder order) throws com.licensespring.model.exceptions.LicenseSpringException
order - can be made with buildercom.licensespring.model.exceptions.LicenseSpringExceptionpublic Manager addManagerToOrder(Long orderId, AddManagerToOrderRequest request)
orderId - id of the orderrequest - email and password of the managerpublic SearchResult<BackOfficeProduct> searchProducts(SearchProductsRequest request) throws com.licensespring.model.exceptions.LicenseSpringException
SearchProductsRequest
class.request - search request that can be made using the buildercom.licensespring.model.exceptions.LicenseSpringExceptionpublic BackOfficeProduct getProduct(Long id) throws com.licensespring.model.exceptions.LicenseSpringException
id - id of the product you want to get, 16 digit numbercom.licensespring.model.exceptions.LicenseSpringExceptionpublic SearchResult<BackOfficeInstallationFile> searchInstallationFiles(SearchInstallationFilesRequest request) throws com.licensespring.model.exceptions.LicenseSpringException
SearchInstallationFilesRequest
class.request - search request that can be made using the buildercom.licensespring.model.exceptions.LicenseSpringExceptionpublic BackOfficeInstallationFile getInstallationFile(int id) throws com.licensespring.model.exceptions.LicenseSpringException
id - id of the installation file that needs to be retrievedcom.licensespring.model.exceptions.LicenseSpringExceptionpublic BackOfficeInstallationFile createInstallationFile(CreateInstallationFileRequest request) throws com.licensespring.model.exceptions.LicenseSpringException
request - DTO CreateInstallationFileRequest object with information about the new installation filecom.licensespring.model.exceptions.LicenseSpringExceptionpublic List<Order> paginateThroughAllOrders(SearchOrdersRequest request) throws com.licensespring.model.exceptions.LicenseSpringException
searchOrders(SearchOrdersRequest)in order to get results per page.request - can be made with builder, contains query fieldscom.licensespring.model.exceptions.LicenseSpringExceptionpublic List<BackOfficeProduct> paginateThroughAllProducts(SearchProductsRequest request) throws com.licensespring.model.exceptions.LicenseSpringException
searchProducts(SearchProductsRequest)} in order to get results per page.request - can be made with builder, contains query fieldscom.licensespring.model.exceptions.LicenseSpringExceptionpublic List<BackOfficeInstallationFile> paginateThroughAllInstallationFiles(SearchInstallationFilesRequest request) throws com.licensespring.model.exceptions.LicenseSpringException
searchInstallationFiles(SearchInstallationFilesRequest) in order to get results per page.request - can be made with builder, contains query fieldscom.licensespring.model.exceptions.LicenseSpringExceptionCopyright © 2023 Cense Data Inc.. All rights reserved.