cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
133 lines (86 loc) • 3.86 kB
Markdown
All URIs are relative to *https://apitest.cybersource.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createOffer**](OffersApi.md
[**getOffer**](OffersApi.md
<a name="createOffer"></a>
> InlineResponse2018 createOffer(contentType, xRequestid, vCMerchantId, vCCorrelationId, vCOrganizationId, offerRequest)
Create an Offer
Creates an offer record on the provider system.
### Example
```javascript
var CyberSource = require('CyberSource');
var apiInstance = new CyberSource.OffersApi();
var contentType = "contentType_example"; // String |
var xRequestid = "xRequestid_example"; // String |
var vCMerchantId = "vCMerchantId_example"; // String |
var vCCorrelationId = "vCCorrelationId_example"; // String |
var vCOrganizationId = "vCOrganizationId_example"; // String |
var offerRequest = new CyberSource.OfferRequest(); // OfferRequest |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createOffer(contentType, xRequestid, vCMerchantId, vCCorrelationId, vCOrganizationId, offerRequest, callback);
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**contentType** | **String**| |
**xRequestid** | **String**| |
**vCMerchantId** | **String**| |
**vCCorrelationId** | **String**| |
**vCOrganizationId** | **String**| |
**offerRequest** | [**OfferRequest**](OfferRequest.md)| |
[**InlineResponse2018**](InlineResponse2018.md)
No authorization required
- **Content-Type**: application/json;charset=utf-8
- **Accept**: application/hal+json;charset=utf-8
<a name="getOffer"></a>
> InlineResponse20015 getOffer(contentType, xRequestid, vCMerchantId, vCCorrelationId, vCOrganizationId, id)
Retrieve an Offer
Retrieves an offer record from the system.
### Example
```javascript
var CyberSource = require('CyberSource');
var apiInstance = new CyberSource.OffersApi();
var contentType = "contentType_example"; // String |
var xRequestid = "xRequestid_example"; // String |
var vCMerchantId = "vCMerchantId_example"; // String |
var vCCorrelationId = "vCCorrelationId_example"; // String |
var vCOrganizationId = "vCOrganizationId_example"; // String |
var id = "id_example"; // String | Request ID generated by Cybersource. This was sent in the header on the request. Echo value from v-c-request-id
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getOffer(contentType, xRequestid, vCMerchantId, vCCorrelationId, vCOrganizationId, id, callback);
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**contentType** | **String**| |
**xRequestid** | **String**| |
**vCMerchantId** | **String**| |
**vCCorrelationId** | **String**| |
**vCOrganizationId** | **String**| |
**id** | **String**| Request ID generated by Cybersource. This was sent in the header on the request. Echo value from v-c-request-id |
[**InlineResponse20015**](InlineResponse20015.md)
No authorization required
- **Content-Type**: application/json;charset=utf-8
- **Accept**: application/hal+json;charset=utf-8