docs/AffiliateApi.md in ultracart_api-3.10.220 vs docs/AffiliateApi.md in ultracart_api-4.0.32.rc

- old
+ new

@@ -1,126 +1,173 @@ -# UltracartClient::AffiliateApi - -All URIs are relative to *https://secure.ultracart.com/rest/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_clicks_by_query**](AffiliateApi.md#get_clicks_by_query) | **POST** /affiliate/clicks/query | Retrieve clicks -[**get_ledgers_by_query**](AffiliateApi.md#get_ledgers_by_query) | **POST** /affiliate/ledgers/query | Retrieve ledger entries - - -# **get_clicks_by_query** -> AffiliateClicksResponse get_clicks_by_query(click_query, opts) - -Retrieve clicks - -Retrieves a group of clicks from the account based on a query object. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the clicks returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. - -### Example -```ruby -# load the gem -require 'ultracart_api' - -# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key -simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00' -api_instance = UltracartClient::AffiliateApi.new_using_api_key(simple_key, false, false) - - -click_query = UltracartClient::AffiliateClickQuery.new # AffiliateClickQuery | Click query - -opts = { - _limit: 10000, # Integer | The maximum number of records to return on this one API call. (Maximum 10000) - _offset: 0, # Integer | Pagination of the record set. Offset is a zero based index. - _expand: '_expand_example' # String | The object expansion to perform on the result. Only option is link. -} - -begin - #Retrieve clicks - result = api_instance.get_clicks_by_query(click_query, opts) - p result -rescue UltracartClient::ApiError => e - puts "Exception when calling AffiliateApi->get_clicks_by_query: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **click_query** | [**AffiliateClickQuery**](AffiliateClickQuery.md)| Click query | - **_limit** | **Integer**| The maximum number of records to return on this one API call. (Maximum 10000) | [optional] [default to 10000] - **_offset** | **Integer**| Pagination of the record set. Offset is a zero based index. | [optional] [default to 0] - **_expand** | **String**| The object expansion to perform on the result. Only option is link. | [optional] - -### Return type - -[**AffiliateClicksResponse**](AffiliateClicksResponse.md) - -### Authorization - -[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_ledgers_by_query** -> AffiliateLedgersResponse get_ledgers_by_query(ledger_query, opts) - -Retrieve ledger entries - -Retrieves a group of ledger entries from the account based on a query object. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the ledgers returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. - -### Example -```ruby -# load the gem -require 'ultracart_api' - -# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key -simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00' -api_instance = UltracartClient::AffiliateApi.new_using_api_key(simple_key, false, false) - - -ledger_query = UltracartClient::AffiliateLedgerQuery.new # AffiliateLedgerQuery | Ledger query - -opts = { - _limit: 100, # Integer | The maximum number of records to return on this one API call. (Maximum 200) - _offset: 0, # Integer | Pagination of the record set. Offset is a zero based index. - _expand: '_expand_example' # String | The object expansion to perform on the result. Only option is link. -} - -begin - #Retrieve ledger entries - result = api_instance.get_ledgers_by_query(ledger_query, opts) - p result -rescue UltracartClient::ApiError => e - puts "Exception when calling AffiliateApi->get_ledgers_by_query: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ledger_query** | [**AffiliateLedgerQuery**](AffiliateLedgerQuery.md)| Ledger query | - **_limit** | **Integer**| The maximum number of records to return on this one API call. (Maximum 200) | [optional] [default to 100] - **_offset** | **Integer**| Pagination of the record set. Offset is a zero based index. | [optional] [default to 0] - **_expand** | **String**| The object expansion to perform on the result. Only option is link. | [optional] - -### Return type - -[**AffiliateLedgersResponse**](AffiliateLedgersResponse.md) - -### Authorization - -[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - +# UltracartClient::AffiliateApi + +All URIs are relative to *https://secure.ultracart.com/rest/v2* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**get_clicks_by_query**](AffiliateApi.md#get_clicks_by_query) | **POST** /affiliate/clicks/query | Retrieve clicks | +| [**get_ledgers_by_query**](AffiliateApi.md#get_ledgers_by_query) | **POST** /affiliate/ledgers/query | Retrieve ledger entries | + + +## get_clicks_by_query + +> <AffiliateClicksResponse> get_clicks_by_query(click_query, opts) + +Retrieve clicks + +Retrieves a group of clicks from the account based on a query object. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the clicks returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. + +### Examples + +```ruby +require 'time' +require 'ultracart_api' +# setup authorization +UltracartClient.configure do |config| + # Configure OAuth2 access token for authorization: ultraCartOauth + config.access_token = 'YOUR ACCESS TOKEN' + + # Configure API key authorization: ultraCartSimpleApiKey + config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer' +end + +api_instance = UltracartClient::AffiliateApi.new +click_query = UltracartClient::AffiliateClickQuery.new # AffiliateClickQuery | Click query +opts = { + _limit: 56, # Integer | The maximum number of records to return on this one API call. (Maximum 10000) + _offset: 56, # Integer | Pagination of the record set. Offset is a zero based index. + _expand: '_expand_example' # String | The object expansion to perform on the result. Only option is link. +} + +begin + # Retrieve clicks + result = api_instance.get_clicks_by_query(click_query, opts) + p result +rescue UltracartClient::ApiError => e + puts "Error when calling AffiliateApi->get_clicks_by_query: #{e}" +end +``` + +#### Using the get_clicks_by_query_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> <Array(<AffiliateClicksResponse>, Integer, Hash)> get_clicks_by_query_with_http_info(click_query, opts) + +```ruby +begin + # Retrieve clicks + data, status_code, headers = api_instance.get_clicks_by_query_with_http_info(click_query, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => <AffiliateClicksResponse> +rescue UltracartClient::ApiError => e + puts "Error when calling AffiliateApi->get_clicks_by_query_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **click_query** | [**AffiliateClickQuery**](AffiliateClickQuery.md) | Click query | | +| **_limit** | **Integer** | The maximum number of records to return on this one API call. (Maximum 10000) | [optional][default to 10000] | +| **_offset** | **Integer** | Pagination of the record set. Offset is a zero based index. | [optional][default to 0] | +| **_expand** | **String** | The object expansion to perform on the result. Only option is link. | [optional] | + +### Return type + +[**AffiliateClicksResponse**](AffiliateClicksResponse.md) + +### Authorization + +[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## get_ledgers_by_query + +> <AffiliateLedgersResponse> get_ledgers_by_query(ledger_query, opts) + +Retrieve ledger entries + +Retrieves a group of ledger entries from the account based on a query object. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the ledgers returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. + +### Examples + +```ruby +require 'time' +require 'ultracart_api' +# setup authorization +UltracartClient.configure do |config| + # Configure OAuth2 access token for authorization: ultraCartOauth + config.access_token = 'YOUR ACCESS TOKEN' + + # Configure API key authorization: ultraCartSimpleApiKey + config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY' + # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) + # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer' +end + +api_instance = UltracartClient::AffiliateApi.new +ledger_query = UltracartClient::AffiliateLedgerQuery.new # AffiliateLedgerQuery | Ledger query +opts = { + _limit: 56, # Integer | The maximum number of records to return on this one API call. (Maximum 200) + _offset: 56, # Integer | Pagination of the record set. Offset is a zero based index. + _expand: '_expand_example' # String | The object expansion to perform on the result. Only option is link. +} + +begin + # Retrieve ledger entries + result = api_instance.get_ledgers_by_query(ledger_query, opts) + p result +rescue UltracartClient::ApiError => e + puts "Error when calling AffiliateApi->get_ledgers_by_query: #{e}" +end +``` + +#### Using the get_ledgers_by_query_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> <Array(<AffiliateLedgersResponse>, Integer, Hash)> get_ledgers_by_query_with_http_info(ledger_query, opts) + +```ruby +begin + # Retrieve ledger entries + data, status_code, headers = api_instance.get_ledgers_by_query_with_http_info(ledger_query, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => <AffiliateLedgersResponse> +rescue UltracartClient::ApiError => e + puts "Error when calling AffiliateApi->get_ledgers_by_query_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ledger_query** | [**AffiliateLedgerQuery**](AffiliateLedgerQuery.md) | Ledger query | | +| **_limit** | **Integer** | The maximum number of records to return on this one API call. (Maximum 200) | [optional][default to 100] | +| **_offset** | **Integer** | Pagination of the record set. Offset is a zero based index. | [optional][default to 0] | +| **_expand** | **String** | The object expansion to perform on the result. Only option is link. | [optional] | + +### Return type + +[**AffiliateLedgersResponse**](AffiliateLedgersResponse.md) + +### Authorization + +[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json +