Class LexOfficeServiceImpl
- java.lang.Object
-
- co.mastermindcms.modules.services.LexOfficeServiceImpl
-
- All Implemented Interfaces:
LexOfficeService
@Service public class LexOfficeServiceImpl extends java.lang.Object implements LexOfficeService
-
-
Field Summary
Fields Modifier and Type Field Description private BillingService
billingService
private CommonProperties
commonProperties
private co.mastermindcms.modules.filestorage.services.FileManagerService
fileManagerService
private io.rocketbase.lexoffice.LexofficeApi
lexofficeApi
private OrderRepository
orderRepository
private ProfileRepository
profileRepository
private SellerRepository
sellerRepository
private TranslationService
translationService
-
Fields inherited from interface co.mastermindcms.modules.services.LexOfficeService
LEX_OFFICE_SERVICE_NAME
-
-
Constructor Summary
Constructors Constructor Description LexOfficeServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attachment
createCommissionInvoice(java.lang.String orderId, java.lang.String profileId)
This method creates an invoice for payoutprivate io.rocketbase.lexoffice.model.Contact
createContact(Profile profile, Seller vendor)
io.rocketbase.lexoffice.model.Contact
createContact(io.rocketbase.lexoffice.model.Contact contact)
This method creates a contactAttachment
createPayoutInvoice(java.lang.String orderId, java.lang.String profileId)
This method creates an invoice for payoutprivate io.rocketbase.lexoffice.model.Contact
findContact(Profile profile, Seller vendor)
private java.lang.String
getInvoicePath(java.lang.String orderId, java.lang.String vendorId, java.lang.String fileName)
void
init()
boolean
isLexOfficeKeyDefined()
This method does return boolean result.private io.rocketbase.lexoffice.model.LineItem
mapLineItem(CommerceItem commerceItem)
private io.rocketbase.lexoffice.model.LineItem
prepareCommissionLineItem(Order order, java.lang.Boolean isNegative)
io.rocketbase.lexoffice.model.Contact
retrieveContact(java.lang.String id)
This method retrieves a contactio.rocketbase.lexoffice.model.Contact
updateContact(io.rocketbase.lexoffice.model.Contact contact)
This method does update a contact
-
-
-
Field Detail
-
sellerRepository
@Autowired private SellerRepository sellerRepository
-
profileRepository
@Autowired private ProfileRepository profileRepository
-
orderRepository
@Autowired private OrderRepository orderRepository
-
fileManagerService
@Autowired private co.mastermindcms.modules.filestorage.services.FileManagerService fileManagerService
-
translationService
@Autowired private TranslationService translationService
-
commonProperties
@Autowired private CommonProperties commonProperties
-
billingService
@Autowired private BillingService billingService
-
lexofficeApi
private io.rocketbase.lexoffice.LexofficeApi lexofficeApi
-
-
Method Detail
-
init
@PostConstruct public void init()
-
isLexOfficeKeyDefined
public boolean isLexOfficeKeyDefined()
Description copied from interface:LexOfficeService
This method does return boolean result.- Specified by:
isLexOfficeKeyDefined
in interfaceLexOfficeService
- Returns:
- value as boolean
-
createPayoutInvoice
public Attachment createPayoutInvoice(java.lang.String orderId, java.lang.String profileId)
Description copied from interface:LexOfficeService
This method creates an invoice for payout- Specified by:
createPayoutInvoice
in interfaceLexOfficeService
- Parameters:
orderId
- order unique identifierprofileId
- user profile unique identifier- Returns:
- definition of attachment
-
createCommissionInvoice
public Attachment createCommissionInvoice(java.lang.String orderId, java.lang.String profileId)
Description copied from interface:LexOfficeService
This method creates an invoice for payout- Specified by:
createCommissionInvoice
in interfaceLexOfficeService
- Parameters:
orderId
- order unique identifierprofileId
- user profile unique identifier- Returns:
- definition of attachment
-
createContact
public io.rocketbase.lexoffice.model.Contact createContact(io.rocketbase.lexoffice.model.Contact contact)
Description copied from interface:LexOfficeService
This method creates a contact- Specified by:
createContact
in interfaceLexOfficeService
- Parameters:
contact
- contact- Returns:
- created contact
-
retrieveContact
public io.rocketbase.lexoffice.model.Contact retrieveContact(java.lang.String id)
Description copied from interface:LexOfficeService
This method retrieves a contact- Specified by:
retrieveContact
in interfaceLexOfficeService
- Parameters:
id
- identifier of contact- Returns:
- retrieved contact
-
updateContact
public io.rocketbase.lexoffice.model.Contact updateContact(io.rocketbase.lexoffice.model.Contact contact)
Description copied from interface:LexOfficeService
This method does update a contact- Specified by:
updateContact
in interfaceLexOfficeService
- Parameters:
contact
- contact to update- Returns:
- updated contact
-
getInvoicePath
private java.lang.String getInvoicePath(java.lang.String orderId, java.lang.String vendorId, java.lang.String fileName)
-
mapLineItem
private io.rocketbase.lexoffice.model.LineItem mapLineItem(CommerceItem commerceItem)
-
findContact
private io.rocketbase.lexoffice.model.Contact findContact(Profile profile, Seller vendor)
-
createContact
private io.rocketbase.lexoffice.model.Contact createContact(Profile profile, Seller vendor)
-
prepareCommissionLineItem
private io.rocketbase.lexoffice.model.LineItem prepareCommissionLineItem(Order order, java.lang.Boolean isNegative)
-
-