
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultCostCenterTestService 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.costcentertest.CostCenterByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.costcentertest.CostCenterFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.costcentertest.CostCenterTextByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.costcentertest.CostCenterTextFluentHelper;
/**
*
* Cost Center Data Provider.
*
*
* Reference: SAP API
* Business Hub
*
* Details:
*
*
* OData Service:
* FCO_PI_COST_CENTER
*
*
* API Version:
* 1
*
*
*
*/
@Named( "com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultCostCenterTestService" )
public class DefaultCostCenterTestService implements CostCenterTestService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link CostCenterTestService#DEFAULT_SERVICE_PATH} to send the requests.
*
*/
public DefaultCostCenterTestService()
{
servicePath = CostCenterTestService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultCostCenterTestService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultCostCenterTestService withServicePath( @Nonnull final String servicePath )
{
return new DefaultCostCenterTestService(servicePath);
}
@Override
@Nonnull
public CostCenterFluentHelper getAllCostCenter()
{
return new CostCenterFluentHelper(servicePath);
}
@Override
@Nonnull
public
CostCenterByKeyFluentHelper
getCostCenterByKey( final String companyCode, final String costCenterID, final LocalDateTime validityEndDate )
{
return new CostCenterByKeyFluentHelper(servicePath, companyCode, costCenterID, validityEndDate);
}
@Override
@Nonnull
public CostCenterTextFluentHelper getAllCostCenterText()
{
return new CostCenterTextFluentHelper(servicePath);
}
@Override
@Nonnull
public CostCenterTextByKeyFluentHelper getCostCenterTextByKey(
final String companyCode,
final String costCenterID,
final LocalDateTime validityEndDate,
final String language )
{
return new CostCenterTextByKeyFluentHelper(servicePath, companyCode, costCenterID, validityEndDate, language);
}
}