Class LexOfficeServiceImpl
- java.lang.Object
-
- co.mastermindcms.modules.services.lexoffice.LexOfficeServiceImpl
-
- All Implemented Interfaces:
LexOfficeService
@Service public class LexOfficeServiceImpl extends java.lang.Object implements LexOfficeService
-
-
Field Summary
Fields Modifier and Type Field Description private BillingServicebillingServiceprivate CommonPropertiescommonPropertiesprivate co.mastermindcms.modules.filestorage.services.FileManagerServicefileManagerServiceprivate io.rocketbase.lexoffice.LexofficeApilexofficeApiprivate OrderRepositoryorderRepositoryprivate ProfileRepositoryprofileRepositoryprivate SellerRepositorysellerRepositoryprivate TranslationServicetranslationService-
Fields inherited from interface co.mastermindcms.modules.services.lexoffice.LexOfficeService
LEX_OFFICE_SERVICE_NAME
-
-
Constructor Summary
Constructors Constructor Description LexOfficeServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttachmentcreateCommissionInvoice(java.lang.String orderId, java.lang.String profileId)This method creates an invoice for payoutprivate io.rocketbase.lexoffice.model.ContactcreateContact(Profile profile, Seller vendor)io.rocketbase.lexoffice.model.ContactcreateContact(io.rocketbase.lexoffice.model.Contact contact)This method creates a contactAttachmentcreatePayoutInvoice(java.lang.String orderId, java.lang.String profileId)This method creates an invoice for payoutprivate io.rocketbase.lexoffice.model.ContactfindContact(Profile profile, Seller vendor)private java.lang.StringgetInvoicePath(java.lang.String orderId, java.lang.String vendorId, java.lang.String fileName)voidinit()booleanisLexOfficeKeyDefined()This method does return boolean result.private io.rocketbase.lexoffice.model.LineItemmapLineItem(CommerceItem commerceItem)private io.rocketbase.lexoffice.model.LineItemprepareCommissionLineItem(Order order, java.lang.Boolean isNegative)io.rocketbase.lexoffice.model.ContactretrieveContact(java.lang.String id)This method retrieves a contactio.rocketbase.lexoffice.model.ContactupdateContact(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:LexOfficeServiceThis method does return boolean result.- Specified by:
isLexOfficeKeyDefinedin interfaceLexOfficeService- Returns:
- value as boolean
-
createPayoutInvoice
public Attachment createPayoutInvoice(java.lang.String orderId, java.lang.String profileId)
Description copied from interface:LexOfficeServiceThis method creates an invoice for payout- Specified by:
createPayoutInvoicein 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:LexOfficeServiceThis method creates an invoice for payout- Specified by:
createCommissionInvoicein 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:LexOfficeServiceThis method creates a contact- Specified by:
createContactin interfaceLexOfficeService- Parameters:
contact- contact- Returns:
- created contact
-
retrieveContact
public io.rocketbase.lexoffice.model.Contact retrieveContact(java.lang.String id)
Description copied from interface:LexOfficeServiceThis method retrieves a contact- Specified by:
retrieveContactin 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:LexOfficeServiceThis method does update a contact- Specified by:
updateContactin 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)
-
-