# ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.CartRetailApi

All URIs are relative to *http://localhost/gemini-web/rest*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createCartTransaction**](CartRetailApi.md#createCartTransaction) | **POST** /cart-retail/cart-transactions | insert resource
[**getAllCartTransactions**](CartRetailApi.md#getAllCartTransactions) | **GET** /cart-retail/cart-transactions | get list of resources
[**getSingleCartTransaction**](CartRetailApi.md#getSingleCartTransaction) | **GET** /cart-retail/cart-transactions/{id} | get resource


<a name="createCartTransaction"></a>
# **createCartTransaction**
> CartTransactionJson createCartTransaction(body, transactionId, opts)

insert resource

Inserts a single resource.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.CartRetailApi();

var body = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.CartTransactionJson(); // CartTransactionJson | The item to insert.

var transactionId = "transactionId_example"; // String | A unique transaction ID used for idempotent inserts.

var opts = { 
  'expand': "expand_example", // String | Expandable properties:cart,transaction,cartCheck,hardwareDevice
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createCartTransaction(body, transactionId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**CartTransactionJson**](CartTransactionJson.md)| The item to insert. | 
 **transactionId** | **String**| A unique transaction ID used for idempotent inserts. | 
 **expand** | **String**| Expandable properties:cart,transaction,cartCheck,hardwareDevice | [optional] 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

[**CartTransactionJson**](CartTransactionJson.md)

### Authorization

[gemini_auth](../README.md#gemini_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="getAllCartTransactions"></a>
# **getAllCartTransactions**
> CartTransactionRestResultPage getAllCartTransactions(opts)

get list of resources

Gets a list of resources.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.CartRetailApi();

var opts = { 
  'limit': 56, // Number | An integer which is the limit (max number) of returned records (used for pagination).
  'offset': 56, // Number | An integer (< list-size-1) that is the offset of the first record to transmit (used for pagination).
  'page': 56, // Number | An integer that designates the pagenumber of the first record to transmit (used for pagination).
  'sort': "sort_example", // String | Valid sorting properties: editedBy, createdBy, id, editedOn, createdOn.
  'cartId': 789, // Number | The ID of the cart which was used to create a transaction.
  'transactionId': 789, // Number | The ID of the referenced transaction.
  'expand': "expand_example", // String | Expandable properties:cart,transaction,cartCheck,hardwareDevice
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getAllCartTransactions(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **limit** | **Number**| An integer which is the limit (max number) of returned records (used for pagination). | [optional] 
 **offset** | **Number**| An integer (&lt; list-size-1) that is the offset of the first record to transmit (used for pagination). | [optional] 
 **page** | **Number**| An integer that designates the pagenumber of the first record to transmit (used for pagination). | [optional] 
 **sort** | **String**| Valid sorting properties: editedBy, createdBy, id, editedOn, createdOn. | [optional] 
 **cartId** | **Number**| The ID of the cart which was used to create a transaction. | [optional] 
 **transactionId** | **Number**| The ID of the referenced transaction. | [optional] 
 **expand** | **String**| Expandable properties:cart,transaction,cartCheck,hardwareDevice | [optional] 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

[**CartTransactionRestResultPage**](CartTransactionRestResultPage.md)

### Authorization

[gemini_auth](../README.md#gemini_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="getSingleCartTransaction"></a>
# **getSingleCartTransaction**
> CartTransactionJson getSingleCartTransaction(id, opts)

get resource

Gets a single resource.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.CartRetailApi();

var id = 789; // Number | The ID of the resource.

var opts = { 
  'expand': "expand_example", // String | Expandable properties:cart,transaction,cartCheck,hardwareDevice
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getSingleCartTransaction(id, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**| The ID of the resource. | 
 **expand** | **String**| Expandable properties:cart,transaction,cartCheck,hardwareDevice | [optional] 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

[**CartTransactionJson**](CartTransactionJson.md)

### Authorization

[gemini_auth](../README.md#gemini_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

