
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultCostRateService 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.util.UUID;
import javax.annotation.Nonnull;
import javax.inject.Named;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.costrate.ActualCostRateByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.costrate.ActualCostRateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.costrate.PlanCostRateByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.costrate.PlanCostRateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.costrate.ServiceCostRateByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.costrate.ServiceCostRateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.costrate.batch.DefaultCostRateServiceBatch;
/**
*
* This service enables you to create, read, update, or delete the master data of cost rates.
*
*
*
* Reference: SAP API
* Business Hub
*
* Details:
*
*
* OData Service:
* API_FCO_COST_RATE_SRV
*
*
* API Version:
* 1
*
*
* Communication Scenario:
* Finance - Activity Type Integration (SAP_COM_0129)
*
*
* Scope Items:
* Overhead Cost Accounting (J54)
*
*
* Authentication Methods:
* Basic, x509
*
*
*
*/
@Named( "com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultCostRateService" )
public class DefaultCostRateService implements CostRateService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link CostRateService#DEFAULT_SERVICE_PATH} to send the requests.
*
*/
public DefaultCostRateService()
{
servicePath = CostRateService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultCostRateService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultCostRateService withServicePath( @Nonnull final String servicePath )
{
return new DefaultCostRateService(servicePath);
}
/**
* {@inheritDoc}
*
*/
@Override
@Nonnull
public DefaultCostRateServiceBatch batch()
{
return new DefaultCostRateServiceBatch(this);
}
@Override
@Nonnull
public ActualCostRateFluentHelper getAllActualCostRate()
{
return new ActualCostRateFluentHelper(servicePath);
}
@Override
@Nonnull
public ActualCostRateByKeyFluentHelper getActualCostRateByKey( final UUID accountingCostRateUUID )
{
return new ActualCostRateByKeyFluentHelper(servicePath, accountingCostRateUUID);
}
@Override
@Nonnull
public PlanCostRateFluentHelper getAllPlanCostRate()
{
return new PlanCostRateFluentHelper(servicePath);
}
@Override
@Nonnull
public PlanCostRateByKeyFluentHelper getPlanCostRateByKey( final UUID accountingCostRateUUID )
{
return new PlanCostRateByKeyFluentHelper(servicePath, accountingCostRateUUID);
}
@Override
@Nonnull
public ServiceCostRateFluentHelper getAllServiceCostRate()
{
return new ServiceCostRateFluentHelper(servicePath);
}
@Override
@Nonnull
public ServiceCostRateByKeyFluentHelper getServiceCostRateByKey( final UUID accountingCostRateUUID )
{
return new ServiceCostRateByKeyFluentHelper(servicePath, accountingCostRateUUID);
}
}