@Named(value="com.sap.cloud.sdk.s4hana.onpremise.v2020.datamodel.odata.services.DefaultLeadService") public class DefaultLeadService extends Object implements LeadService
The service contains header, item, person responsible, and text entities. The information is sent in the request as a payload. All information is used when creating, updating or deleting a lead data, including appropriate checks for restricted values and authorizations. Once the lead has been created or updated, the lead information is sent in the response. If there are any issues when the lead is created or updated, the system returns error messages. In each API call, you can use the following operations: - Retrieve leads. - Create leads. Note: You must use “deep insert” requests (a header plus the following entities: person responsible, text, and item). - Create new item, person responsible, text for existing leads. - Update the header, person responsible, text, and item for existing leads. - Delete the person responsible, text, and item for existing leads. .
Reference: SAP API Business Hub
OData Service: | OP_API_LEAD_SRV_0001 |
API Version: | 1 |
Minimum ERP Version: | 2020 |
Authentication Methods: | Basic, x509 |
DEFAULT_SERVICE_PATH
Constructor and Description |
---|
DefaultLeadService()
Creates a service using
LeadService.DEFAULT_SERVICE_PATH to send the requests. |
Modifier and Type | Method and Description |
---|---|
DefaultLeadServiceBatch |
batch()
Instantiate a new FluentHelper instance for a single OData batch request.
|
LeadCreateFluentHelper |
createLead(Lead lead)
Create a new
Lead entity
and save it to the S/4HANA system. |
LeadItemCreateFluentHelper |
createLeadItem(LeadItem leadItem)
Create a new
LeadItem
entity and save it to the S/4HANA system. |
LeadPersonRespCreateFluentHelper |
createLeadPersonResp(LeadPersonResp leadPersonResp)
Create a new
LeadPersonResp entity and save it to the S/4HANA system. |
LeadTextCreateFluentHelper |
createLeadText(LeadText leadText)
Create a new
LeadText
entity and save it to the S/4HANA system. |
LeadItemDeleteFluentHelper |
deleteLeadItem(LeadItem leadItem)
Deletes an existing
LeadItem entity in the S/4HANA system. |
LeadPersonRespDeleteFluentHelper |
deleteLeadPersonResp(LeadPersonResp leadPersonResp)
Deletes an existing
LeadPersonResp
entity in the S/4HANA system. |
LeadTextDeleteFluentHelper |
deleteLeadText(LeadText leadText)
Deletes an existing
LeadText entity in the S/4HANA system. |
LeadFluentHelper |
getAllLead()
Fetch multiple
Lead
entities. |
LeadItemFluentHelper |
getAllLeadItem()
Fetch multiple
LeadItem
entities. |
LeadPersonRespFluentHelper |
getAllLeadPersonResp()
Fetch multiple
LeadPersonResp entities. |
LeadTextFluentHelper |
getAllLeadText()
Fetch multiple
LeadText
entities. |
LeadByKeyFluentHelper |
getLeadByKey(String lead)
Fetch a single
Lead entity
using key fields. |
LeadItemByKeyFluentHelper |
getLeadItemByKey(String lead,
String leadItem)
Fetch a single
LeadItem
entity using key fields. |
LeadPersonRespByKeyFluentHelper |
getLeadPersonRespByKey(String lead,
String responsibleEmployee)
Fetch a single
LeadPersonResp entity using key fields. |
LeadTextByKeyFluentHelper |
getLeadTextByKey(String lead,
String textObjectType,
String language)
Fetch a single
LeadText
entity using key fields. |
LeadUpdateFluentHelper |
updateLead(Lead lead)
Update an existing
Lead
entity and save it to the S/4HANA system. |
LeadItemUpdateFluentHelper |
updateLeadItem(LeadItem leadItem)
Update an existing
LeadItem entity and save it to the S/4HANA system. |
LeadPersonRespUpdateFluentHelper |
updateLeadPersonResp(LeadPersonResp leadPersonResp)
Update an existing
LeadPersonResp entity and save it to the S/4HANA system. |
LeadTextUpdateFluentHelper |
updateLeadText(LeadText leadText)
Update an existing
LeadText entity and save it to the S/4HANA system. |
DefaultLeadService |
withServicePath(String servicePath)
Overrides the default service path and returns a new service instance with the specified service path.
|
public DefaultLeadService()
LeadService.DEFAULT_SERVICE_PATH
to send the requests.@Nonnull public DefaultLeadService withServicePath(@Nonnull String servicePath)
LeadService
withServicePath
in interface LeadService
servicePath
- Service path that will override the default.@Nonnull public DefaultLeadServiceBatch batch()
batch
in interface BatchService<LeadServiceBatch>
@Nonnull public LeadFluentHelper getAllLead()
LeadService
Lead
entities.getAllLead
in interface LeadService
Lead
entities. This
fluent helper allows methods which modify the underlying query to be called before executing the query
itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadByKeyFluentHelper getLeadByKey(String lead)
LeadService
Lead
entity
using key fields.getLeadByKey
in interface LeadService
lead
- Transaction ID
Constraints: Not nullable, Maximum length: 10
Lead
entity using
key fields. This fluent helper allows methods which modify the underlying query to be called before
executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadCreateFluentHelper createLead(@Nonnull Lead lead)
LeadService
Lead
entity
and save it to the S/4HANA system.createLead
in interface LeadService
lead
- Lead
entity
object that will be created in the S/4HANA system.Lead
entity. To
perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadUpdateFluentHelper updateLead(@Nonnull Lead lead)
LeadService
Lead
entity and save it to the S/4HANA system.updateLead
in interface LeadService
lead
- Lead
entity
object that will be updated in the S/4HANA system.Lead
entity. To
perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadItemFluentHelper getAllLeadItem()
LeadService
LeadItem
entities.getAllLeadItem
in interface LeadService
LeadItem
entities. This fluent helper allows methods which modify the underlying query to be called before
executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadItemByKeyFluentHelper getLeadItemByKey(String lead, String leadItem)
LeadService
LeadItem
entity using key fields.getLeadItemByKey
in interface LeadService
lead
- Transaction ID
Constraints: Not nullable, Maximum length: 10
leadItem
- Shortened Item Number in Document
Constraints: Not nullable, Maximum length: 6
LeadItem
entity
using key fields. This fluent helper allows methods which modify the underlying query to be called before
executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadItemCreateFluentHelper createLeadItem(@Nonnull LeadItem leadItem)
LeadService
LeadItem
entity and save it to the S/4HANA system.createLeadItem
in interface LeadService
leadItem
- LeadItem
entity object that will be created in the S/4HANA system.LeadItem
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadItemUpdateFluentHelper updateLeadItem(@Nonnull LeadItem leadItem)
LeadService
LeadItem
entity and save it to the S/4HANA system.updateLeadItem
in interface LeadService
leadItem
- LeadItem
entity object that will be updated in the S/4HANA system.LeadItem
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadItemDeleteFluentHelper deleteLeadItem(@Nonnull LeadItem leadItem)
LeadService
LeadItem
entity in the S/4HANA system.deleteLeadItem
in interface LeadService
leadItem
- LeadItem
entity object that will be deleted in the S/4HANA system.LeadItem
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadPersonRespFluentHelper getAllLeadPersonResp()
LeadService
LeadPersonResp
entities.getAllLeadPersonResp
in interface LeadService
LeadPersonResp
entities. This fluent helper allows methods which modify the underlying query to be
called before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadPersonRespByKeyFluentHelper getLeadPersonRespByKey(String lead, String responsibleEmployee)
LeadService
LeadPersonResp
entity using key fields.getLeadPersonRespByKey
in interface LeadService
lead
- Transaction ID
Constraints: Not nullable, Maximum length: 10
responsibleEmployee
- Business Partner Number
Constraints: Not nullable, Maximum length: 10
LeadPersonResp
entity using key fields. This fluent helper allows methods which modify the underlying
query to be called before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadPersonRespCreateFluentHelper createLeadPersonResp(@Nonnull LeadPersonResp leadPersonResp)
LeadService
LeadPersonResp
entity and save it to the S/4HANA system.createLeadPersonResp
in interface LeadService
leadPersonResp
- LeadPersonResp
entity object that will be created in the S/4HANA system.LeadPersonResp
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadPersonRespUpdateFluentHelper updateLeadPersonResp(@Nonnull LeadPersonResp leadPersonResp)
LeadService
LeadPersonResp
entity and save it to the S/4HANA system.updateLeadPersonResp
in interface LeadService
leadPersonResp
- LeadPersonResp
entity object that will be updated in the S/4HANA system.LeadPersonResp
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadPersonRespDeleteFluentHelper deleteLeadPersonResp(@Nonnull LeadPersonResp leadPersonResp)
LeadService
LeadPersonResp
entity in the S/4HANA system.deleteLeadPersonResp
in interface LeadService
leadPersonResp
- LeadPersonResp
entity object that will be deleted in the S/4HANA system.LeadPersonResp
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadTextFluentHelper getAllLeadText()
LeadService
LeadText
entities.getAllLeadText
in interface LeadService
LeadText
entities. This fluent helper allows methods which modify the underlying query to be called before
executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadTextByKeyFluentHelper getLeadTextByKey(String lead, String textObjectType, String language)
LeadService
LeadText
entity using key fields.getLeadTextByKey
in interface LeadService
lead
- Transaction ID
Constraints: Not nullable, Maximum length: 10
textObjectType
- Text ID
Constraints: Not nullable, Maximum length: 4
language
- Language Key
Constraints: Not nullable, Maximum length: 2
LeadText
entity
using key fields. This fluent helper allows methods which modify the underlying query to be called before
executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadTextCreateFluentHelper createLeadText(@Nonnull LeadText leadText)
LeadService
LeadText
entity and save it to the S/4HANA system.createLeadText
in interface LeadService
leadText
- LeadText
entity object that will be created in the S/4HANA system.LeadText
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadTextUpdateFluentHelper updateLeadText(@Nonnull LeadText leadText)
LeadService
LeadText
entity and save it to the S/4HANA system.updateLeadText
in interface LeadService
leadText
- LeadText
entity object that will be updated in the S/4HANA system.LeadText
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull public LeadTextDeleteFluentHelper deleteLeadText(@Nonnull LeadText leadText)
LeadService
LeadText
entity in the S/4HANA system.deleteLeadText
in interface LeadService
leadText
- LeadText
entity object that will be deleted in the S/4HANA system.LeadText
entity. To perform execution, call the
execute
method on the fluent helper object.Copyright © 2021 SAP SE. All rights reserved.