# SwaggerJsClient.CouponsApi

All URIs are relative to *https://localhost/buyborghi-api/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**townsTownIdCompaniesCompanyIdCouponsGet**](CouponsApi.md#townsTownIdCompaniesCompanyIdCouponsGet) | **GET** /towns/{townId}/companies/{companyId}/coupons | Get coupons made by the company
[**townsTownIdCouponsCouponIdGet**](CouponsApi.md#townsTownIdCouponsCouponIdGet) | **GET** /towns/{townId}/coupons/{couponId} | Get coupons's details
[**townsTownIdCouponsGet**](CouponsApi.md#townsTownIdCouponsGet) | **GET** /towns/{townId}/coupons | Get coupons related to the town


<a name="townsTownIdCompaniesCompanyIdCouponsGet"></a>
# **townsTownIdCompaniesCompanyIdCouponsGet**
> GetTownsCompaniesIdCouponsResponse townsTownIdCompaniesCompanyIdCouponsGet(townId, companyId)

Get coupons made by the company



### Example
```javascript
var SwaggerJsClient = require('swagger-js-client');

var apiInstance = new SwaggerJsClient.CouponsApi();

var townId = "townId_example"; // String | A unique identifier used to identify the town.

var companyId = "companyId_example"; // String | A unique identifier used to identify the company.


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **townId** | **String**| A unique identifier used to identify the town. | 
 **companyId** | **String**| A unique identifier used to identify the company. | 

### Return type

[**GetTownsCompaniesIdCouponsResponse**](GetTownsCompaniesIdCouponsResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="townsTownIdCouponsCouponIdGet"></a>
# **townsTownIdCouponsCouponIdGet**
> GetTownsIdCouponsIdResponse townsTownIdCouponsCouponIdGet(townId, couponId)

Get coupons's details



### Example
```javascript
var SwaggerJsClient = require('swagger-js-client');

var apiInstance = new SwaggerJsClient.CouponsApi();

var townId = "townId_example"; // String | A unique identifier used to identify the town.

var couponId = "couponId_example"; // String | A unique identifier used to identify the coupon.


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **townId** | **String**| A unique identifier used to identify the town. | 
 **couponId** | **String**| A unique identifier used to identify the coupon. | 

### Return type

[**GetTownsIdCouponsIdResponse**](GetTownsIdCouponsIdResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="townsTownIdCouponsGet"></a>
# **townsTownIdCouponsGet**
> GetTownsIdCouponsResponse townsTownIdCouponsGet(townId)

Get coupons related to the town



### Example
```javascript
var SwaggerJsClient = require('swagger-js-client');

var apiInstance = new SwaggerJsClient.CouponsApi();

var townId = "townId_example"; // String | A unique identifier used to identify the town.


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **townId** | **String**| A unique identifier used to identify the town. | 

### Return type

[**GetTownsIdCouponsResponse**](GetTownsIdCouponsResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

