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.LicenseSpringException
public Order getOrder(Long id) throws com.licensespring.model.exceptions.LicenseSpringException
id
- id of the Order, 16 digit numbercom.licensespring.model.exceptions.LicenseSpringException
public 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.LicenseSpringException
public 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.LicenseSpringException
public 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.LicenseSpringException
public CreateOrderResponse createOrder(com.licensespring.model.order.WebhookOrder order) throws com.licensespring.model.exceptions.LicenseSpringException
order
- can be made with buildercom.licensespring.model.exceptions.LicenseSpringException
public 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.LicenseSpringException
public 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.LicenseSpringException
public 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.LicenseSpringException
public BackOfficeInstallationFile getInstallationFile(int id) throws com.licensespring.model.exceptions.LicenseSpringException
id
- id of the installation file that needs to be retrievedcom.licensespring.model.exceptions.LicenseSpringException
public BackOfficeInstallationFile createInstallationFile(CreateInstallationFileRequest request) throws com.licensespring.model.exceptions.LicenseSpringException
request
- DTO CreateInstallationFileRequest
object with information about the new installation filecom.licensespring.model.exceptions.LicenseSpringException
public 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.LicenseSpringException
public 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.LicenseSpringException
public 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.LicenseSpringException
Copyright © 2023 Cense Data Inc.. All rights reserved.