saps4hana.itcm.promotion
Module saps4hana.itcm.promotion
Definitions
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_saps4hana.itcm.promotion_1.5.1.png)
ballerinax/saps4hana.itcm.promotion Ballerina library
Overview
This is a generated connector for SAPS4HANA Intelligent Trade Claims Management API v1.0.0 OpenAPI specification. In SAPS4HANA Intelligent Trade Claims Management, the promotion service allows you to create, add, and delete information about promotions. Execution of Promotions should be done in an particular order.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create and configure an OAuth2 client credentials by following this guide.
Clients![](/images/permalink.svg)
saps4hana.itcm.promotion: Client![](/images/permalink.svg)
This is a generated connector for SAPS4HANA Intelligent Trade Claims Management API v1.0.0 OpenAPI specification. In SAPS4HANA Intelligent Trade Claims Management, the promotion service allows you to create, add, and delete information about promotions. Execution of Promotions should be done in an particular order.
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create and configure an OAuth2 client credentials by following this guide.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string - URL of the target service
createPromotion![](/images/permalink.svg)
function createPromotion(ExternalPromotionDTO payload) returns ResponsePromotionCreationMessage|error
Create a new Promotion
Parameters
- payload ExternalPromotionDTO - Request payload to create promotion
Return Type
- ResponsePromotionCreationMessage|error - Success Created.
getPromotionByExternalId![](/images/permalink.svg)
function getPromotionByExternalId(string externalId) returns ResponseExternalPromotionMessage|error
Get Promotion with externalId
Parameters
- externalId string - The external id of the promotion, for example
348328430
Return Type
deletePromotion![](/images/permalink.svg)
function deletePromotion(string externalId) returns ResponsePromotionDeletionMessage|error
Delete a Promotion with externalId
Parameters
- externalId string - The external id of the promotion, for example
348328430
Return Type
Records![](/images/permalink.svg)
saps4hana.itcm.promotion: ClientHttp1Settings![](/images/permalink.svg)
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
saps4hana.itcm.promotion: ConnectionConfig![](/images/permalink.svg)
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth OAuth2ClientCredentialsGrantConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
saps4hana.itcm.promotion: ExternalCustomerHierarchyNodeKeyVDTO![](/images/permalink.svg)
Fields
- customerHierarchyNodeId string -
- customerHierarchyTypeCode string -
- hierarchyId string -
saps4hana.itcm.promotion: ExternalProductHierarchyNodeKeyVDTO![](/images/permalink.svg)
Fields
- hierarchyId string -
- productHierarchyNodeId string -
- productHierarchyTypeCode string -
saps4hana.itcm.promotion: ExternalPromotionCustomerVDTO![](/images/permalink.svg)
Fields
- customerExternalId string? -
- customerHierarchyNodeKey ExternalCustomerHierarchyNodeKeyVDTO? -
saps4hana.itcm.promotion: ExternalPromotionDTO![](/images/permalink.svg)
Fields
- businessSystem int -
- description string? -
- documentReferences ExternalPromotionReferenceDTO[]? -
- externalId string -
- externalSalesArea ExternalSalesAreaVDTO? -
- id int? -
- internalId string? -
- isMarkedForDeletion boolean? -
- promotionCustomer ExternalPromotionCustomerVDTO -
- promotionDates PromotionDateDTO[] -
- promotionProducts ExternalPromotionProductDTO[] -
- status string? -
- types PromotionTypeCodeV[]? -
saps4hana.itcm.promotion: ExternalPromotionProductDTO![](/images/permalink.svg)
Fields
- productExternalId string -
- productHierarchyNodeKey ExternalProductHierarchyNodeKeyVDTO -
saps4hana.itcm.promotion: ExternalPromotionReferenceDTO![](/images/permalink.svg)
Fields
- documentId string? -
- documentType string? -
saps4hana.itcm.promotion: ExternalSalesAreaVDTO![](/images/permalink.svg)
Fields
- distributionChannel string? -
- salesDivision string? -
- salesOrganization string? -
saps4hana.itcm.promotion: OAuth2ClientCredentialsGrantConfig![](/images/permalink.svg)
OAuth2 Client Credentials Grant Configs
Fields
- Fields Included from *OAuth2ClientCredentialsGrantConfig
- tokenUrl string(default "https://colgate-dev1.authentication.us30.hana.ondemand.com/oauth/token") - Token URL
saps4hana.itcm.promotion: PromotionDateDTO![](/images/permalink.svg)
Fields
- promotionDateTypeCode string -
- validFrom string -
- validTo string -
saps4hana.itcm.promotion: PromotionTypeCodeV![](/images/permalink.svg)
Fields
- promotionTypeCode string? -
saps4hana.itcm.promotion: ProxyConfig![](/images/permalink.svg)
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
saps4hana.itcm.promotion: ResponseExternalPromotionListMessage![](/images/permalink.svg)
Fields
- message string? -
- promotions ExternalPromotionDTO[]? -
- timestamp string? -
saps4hana.itcm.promotion: ResponseExternalPromotionMessage![](/images/permalink.svg)
Fields
- externalId string? -
- message string? -
- count int? -
- promotion ExternalPromotionDTO? -
- timestamp string? -
saps4hana.itcm.promotion: ResponseForbiddenMessage![](/images/permalink.svg)
Fields
- message string? -
- timestamp string? -
- uri string? -
saps4hana.itcm.promotion: ResponseInvalidCustomer![](/images/permalink.svg)
Fields
- message string? -
- uri string? -
- timestamp string? -
saps4hana.itcm.promotion: ResponseInvalidDate![](/images/permalink.svg)
Fields
- externalId int? -
- message string? -
- timestamp string? -
saps4hana.itcm.promotion: ResponseInvalidProduct![](/images/permalink.svg)
Fields
- message string? -
- uri string? -
- timestamp string? -
saps4hana.itcm.promotion: ResponseMessage![](/images/permalink.svg)
Fields
- message string? -
- uri string? -
- timestamp string? -
saps4hana.itcm.promotion: ResponseNotFoundMessage![](/images/permalink.svg)
Fields
- message string? -
- 'error string? -
- timestamp string? -
saps4hana.itcm.promotion: ResponseNotFoundPromotionDeletionMessage![](/images/permalink.svg)
Fields
- externalId string? -
- message string? -
- promotion ExternalPromotionDTO? -
- timestamp string? -
saps4hana.itcm.promotion: ResponseNotFoundPromotionMessage![](/images/permalink.svg)
Fields
- externalId string? -
- message string? -
- promotion ExternalPromotionDTO? -
- timestamp string? -
saps4hana.itcm.promotion: ResponsePromotionCreationMessage![](/images/permalink.svg)
Fields
- externalId int? -
- message string? -
- timestamp string? -
saps4hana.itcm.promotion: ResponsePromotionDeleteAllMessage![](/images/permalink.svg)
Fields
- count int? -
- message string? -
- timestamp string? -
saps4hana.itcm.promotion: ResponsePromotionDeletionMessage![](/images/permalink.svg)
Fields
- externalId string? -
- message string? -
- timestamp string? -
saps4hana.itcm.promotion: ResponseUnauthorizedMessage![](/images/permalink.svg)
Fields
- message string? -
- timestamp string? -
- uri string? -
Union types![](/images/permalink.svg)
saps4hana.itcm.promotion: InlineResponse400![](/images/permalink.svg)
InlineResponse400
Import
import ballerinax/saps4hana.itcm.promotion;
Metadata
Released date: over 1 year ago
Version: 1.5.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Business Management/ERP
Cost/Paid
Contributors