
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultAccountingDocumentService Maven / Gradle / Ivy
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.sap.cloud.sdk.s4hana.datamodel.odata.services;
import javax.annotation.Nonnull;
import javax.inject.Named;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.accountingdocument.OperationalAcctgDocItemCubeByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.accountingdocument.OperationalAcctgDocItemCubeFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.accountingdocument.batch.DefaultAccountingDocumentServiceBatch;
/**
*
* This service enables you to display accounting document master data to be consumed in SAP Fiori apps and on other
* user interfaces.
*
*
*
* Reference: SAP
* API Business Hub
*
* Details:
*
*
* OData Service:
* API_OPLACCTGDOCITEMCUBE_SRV
*
*
* API Version:
* 1
*
*
* Communication Scenario:
* Finance - Accounting Analytics Integration (SAP_COM_0303)
*
*
* Scope Items:
* Accounting and Financial Close (J58)
*
*
* Authentication Methods:
* Basic, x509
*
*
*
*/
@Named( "com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultAccountingDocumentService" )
public class DefaultAccountingDocumentService implements AccountingDocumentService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link AccountingDocumentService#DEFAULT_SERVICE_PATH} to send the requests.
*
*/
public DefaultAccountingDocumentService()
{
servicePath = AccountingDocumentService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultAccountingDocumentService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultAccountingDocumentService withServicePath( @Nonnull final String servicePath )
{
return new DefaultAccountingDocumentService(servicePath);
}
/**
* {@inheritDoc}
*
*/
@Override
@Nonnull
public DefaultAccountingDocumentServiceBatch batch()
{
return new DefaultAccountingDocumentServiceBatch(this);
}
@Override
@Nonnull
public OperationalAcctgDocItemCubeFluentHelper getAllOperationalAcctgDocItemCube()
{
return new OperationalAcctgDocItemCubeFluentHelper(servicePath);
}
@Override
@Nonnull
public OperationalAcctgDocItemCubeByKeyFluentHelper getOperationalAcctgDocItemCubeByKey(
final String companyCode,
final String fiscalYear,
final String accountingDocument,
final String accountingDocumentItem )
{
return new OperationalAcctgDocItemCubeByKeyFluentHelper(
servicePath,
companyCode,
fiscalYear,
accountingDocument,
accountingDocumentItem);
}
}