
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultPaymentAdviceService 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.paymentadvice.PaymentAdvice;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.paymentadvice.PaymentAdviceByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.paymentadvice.PaymentAdviceCreateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.paymentadvice.PaymentAdviceDeleteFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.paymentadvice.PaymentAdviceFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.paymentadvice.PaymentAdviceItem;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.paymentadvice.PaymentAdviceItemByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.paymentadvice.PaymentAdviceItemCreateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.paymentadvice.PaymentAdviceItemDeleteFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.paymentadvice.PaymentAdviceItemFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.paymentadvice.PaymentAdviceItemUpdateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.paymentadvice.PaymentAdviceUpdateFluentHelper;
/**
*
* This service enables you to create, read, update, and delete payment advices of any supported type, both for
* customers and suppliers.
*
* You can use this inbound synchronous service to create, read, update, and delete payment advices related to a
* customer or a supplier. It is based on the OData protocol and can be consumed in SAP Fiori apps and other user
* interfaces. The service can be used with payment advices of any supported type..
*
*
*
* Reference: SAP
* API Business Hub
*
* Details:
*
*
* OData Service:
* API_PAYMENT_ADVICE_SRV
*
*
* API Version:
* 1
*
*
* Communication Scenario:
* Finance - Payment Advice Integration (SAP_COM_0331)
*
*
* Scope Items:
* Accounts Receivable (J59)
*
*
* Authentication Methods:
* Basic, x509, OAuth2
*
*
* Business Object:
* PaymentAdvice
*
*
*
*/
@Named( "com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultPaymentAdviceService" )
public class DefaultPaymentAdviceService implements PaymentAdviceService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link PaymentAdviceService#DEFAULT_SERVICE_PATH} to send the requests.
*
*/
public DefaultPaymentAdviceService()
{
servicePath = PaymentAdviceService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultPaymentAdviceService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultPaymentAdviceService withServicePath( @Nonnull final String servicePath )
{
return new DefaultPaymentAdviceService(servicePath);
}
@Override
@Nonnull
public PaymentAdviceFluentHelper getAllPaymentAdvice()
{
return new PaymentAdviceFluentHelper(servicePath);
}
@Override
@Nonnull
public PaymentAdviceByKeyFluentHelper getPaymentAdviceByKey(
final String companyCode,
final String paymentAdviceAccountType,
final String paymentAdviceAccount,
final String paymentAdvice )
{
return new PaymentAdviceByKeyFluentHelper(
servicePath,
companyCode,
paymentAdviceAccountType,
paymentAdviceAccount,
paymentAdvice);
}
@Override
@Nonnull
public PaymentAdviceCreateFluentHelper createPaymentAdvice( @Nonnull final PaymentAdvice paymentAdvice )
{
return new PaymentAdviceCreateFluentHelper(servicePath, paymentAdvice);
}
@Override
@Nonnull
public PaymentAdviceUpdateFluentHelper updatePaymentAdvice( @Nonnull final PaymentAdvice paymentAdvice )
{
return new PaymentAdviceUpdateFluentHelper(servicePath, paymentAdvice);
}
@Override
@Nonnull
public PaymentAdviceDeleteFluentHelper deletePaymentAdvice( @Nonnull final PaymentAdvice paymentAdvice )
{
return new PaymentAdviceDeleteFluentHelper(servicePath, paymentAdvice);
}
@Override
@Nonnull
public PaymentAdviceItemFluentHelper getAllPaymentAdviceItem()
{
return new PaymentAdviceItemFluentHelper(servicePath);
}
@Override
@Nonnull
public PaymentAdviceItemByKeyFluentHelper getPaymentAdviceItemByKey(
final String companyCode,
final String paymentAdviceAccountType,
final String paymentAdviceAccount,
final String paymentAdvice,
final String paymentAdviceItem )
{
return new PaymentAdviceItemByKeyFluentHelper(
servicePath,
companyCode,
paymentAdviceAccountType,
paymentAdviceAccount,
paymentAdvice,
paymentAdviceItem);
}
@Override
@Nonnull
public PaymentAdviceItemCreateFluentHelper createPaymentAdviceItem(
@Nonnull final PaymentAdviceItem paymentAdviceItem )
{
return new PaymentAdviceItemCreateFluentHelper(servicePath, paymentAdviceItem);
}
@Override
@Nonnull
public PaymentAdviceItemUpdateFluentHelper updatePaymentAdviceItem(
@Nonnull final PaymentAdviceItem paymentAdviceItem )
{
return new PaymentAdviceItemUpdateFluentHelper(servicePath, paymentAdviceItem);
}
@Override
@Nonnull
public PaymentAdviceItemDeleteFluentHelper deletePaymentAdviceItem(
@Nonnull final PaymentAdviceItem paymentAdviceItem )
{
return new PaymentAdviceItemDeleteFluentHelper(servicePath, paymentAdviceItem);
}
}