new module:api/PromotionsApi(apiClient)
Constructs a new PromotionsApi.
Parameters:
Name | Type | Description |
---|---|---|
apiClient |
module:ApiClient | Optional API client implementation to use, default to module:ApiClient#instance if unspecified. |
- Source:
Methods
getPromotions(campaignId, opts) → {Promise}
Handles get promotion by filter criteria Returns an array of enabled promotions matching specified filter criteria. In the request URL, you must provide a campaign_id parameter, and you can optionally specify a date range by providing start_date and end_date parameters. Both parameters are required to specify a date range: omitting one causes the server to return a MissingParameterException fault. Each request returns only enabled promotions; the server does not consider promotion qualifiers or schedules.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
campaignId |
String | Find the promotions assigned to this campaign (mandatory) |
||||||||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/PromotionResult
- Type
- Promise
getPromotionsByID(id, opts) → {Promise}
Returns an enabled promotion using a specified id. Each request returns a response only for an enabled promotion; the server does not consider promotion qualifiers or schedules.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
id |
String | The id of the requested promotion. |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/Promotion
- Type
- Promise
getPromotionsByIDs(ids, opts) → {Promise}
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
ids |
Array.<String> | |||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/PromotionResult
- Type
- Promise
getPromotionsByIDsWithHttpInfo(ids, opts) → {Promise}
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
ids |
Array.<String> | |||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/PromotionResult and HTTP response
- Type
- Promise
getPromotionsByIDWithHttpInfo(id, opts) → {Promise}
Returns an enabled promotion using a specified id. Each request returns a response only for an enabled promotion; the server does not consider promotion qualifiers or schedules.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
id |
String | The id of the requested promotion. |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/Promotion and HTTP response
- Type
- Promise
getPromotionsWithHttpInfo(campaignId, opts) → {Promise}
Handles get promotion by filter criteria Returns an array of enabled promotions matching specified filter criteria. In the request URL, you must provide a campaign_id parameter, and you can optionally specify a date range by providing start_date and end_date parameters. Both parameters are required to specify a date range: omitting one causes the server to return a MissingParameterException fault. Each request returns only enabled promotions; the server does not consider promotion qualifiers or schedules.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
campaignId |
String | Find the promotions assigned to this campaign (mandatory) |
||||||||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/PromotionResult and HTTP response
- Type
- Promise