
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultTrialBalanceService 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 java.time.LocalDateTime;
import javax.annotation.Nonnull;
import javax.inject.Named;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.CompanyCodeByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.CompanyCodeFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.GLAccountByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.GLAccountFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.LedgerByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.LedgerFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.ODataQueryAdditionalMetadataByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.ODataQueryAdditionalMetadataFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.ProjectByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.ProjectFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.TRIALBALANCEParametersByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.trialbalance.batch.DefaultTrialBalanceServiceBatch;
/**
*
* This service enables you to read trial balance data in an API call. It is based on the OData protocol, and can be
* consumed in Fiori apps and on other user interfaces.
*
*
*
* Reference: SAP API
* Business Hub
*
* Details:
*
*
* OData Service:
* C_TRIALBALANCE_CDS
*
*
* API Version:
* 1
*
*
* Communication Scenario:
* Finance - Accounting Analytics Integration (SAP_COM_0303)
*
*
* Scope Items:
* Accounting and Financial Close (J58)
*
*
*
*/
@Named( "com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultTrialBalanceService" )
public class DefaultTrialBalanceService implements TrialBalanceService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link TrialBalanceService#DEFAULT_SERVICE_PATH} to send the requests.
*
*/
public DefaultTrialBalanceService()
{
servicePath = TrialBalanceService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultTrialBalanceService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultTrialBalanceService withServicePath( @Nonnull final String servicePath )
{
return new DefaultTrialBalanceService(servicePath);
}
/**
* {@inheritDoc}
*
*/
@Override
@Nonnull
public DefaultTrialBalanceServiceBatch batch()
{
return new DefaultTrialBalanceServiceBatch(this);
}
@Override
@Nonnull
public LedgerFluentHelper getAllLedger()
{
return new LedgerFluentHelper(servicePath);
}
@Override
@Nonnull
public LedgerByKeyFluentHelper getLedgerByKey( final String ledger )
{
return new LedgerByKeyFluentHelper(servicePath, ledger);
}
@Override
@Nonnull
public CompanyCodeFluentHelper getAllCompanyCode()
{
return new CompanyCodeFluentHelper(servicePath);
}
@Override
@Nonnull
public CompanyCodeByKeyFluentHelper getCompanyCodeByKey( final String companyCode )
{
return new CompanyCodeByKeyFluentHelper(servicePath, companyCode);
}
@Override
@Nonnull
public GLAccountFluentHelper getAllGLAccount()
{
return new GLAccountFluentHelper(servicePath);
}
@Override
@Nonnull
public GLAccountByKeyFluentHelper getGLAccountByKey( final String gLAccount )
{
return new GLAccountByKeyFluentHelper(servicePath, gLAccount);
}
@Override
@Nonnull
public ProjectFluentHelper getAllProject()
{
return new ProjectFluentHelper(servicePath);
}
@Override
@Nonnull
public ProjectByKeyFluentHelper getProjectByKey( final String project )
{
return new ProjectByKeyFluentHelper(servicePath, project);
}
@Override
@Nonnull
public ODataQueryAdditionalMetadataFluentHelper getAllODataQueryAdditionalMetadata()
{
return new ODataQueryAdditionalMetadataFluentHelper(servicePath);
}
@Override
@Nonnull
public ODataQueryAdditionalMetadataByKeyFluentHelper getODataQueryAdditionalMetadataByKey(
final String oDataQueryMetadata )
{
return new ODataQueryAdditionalMetadataByKeyFluentHelper(servicePath, oDataQueryMetadata);
}
@Override
@Nonnull
public
TRIALBALANCEParametersByKeyFluentHelper
getTRIALBALANCEParametersByKey( final LocalDateTime p_FromPostingDate, final LocalDateTime p_ToPostingDate )
{
return new TRIALBALANCEParametersByKeyFluentHelper(servicePath, p_FromPostingDate, p_ToPostingDate);
}
}