diff --git a/README.md b/README.md index 11115a5f..1ec88091 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: -- Package version: 5.1.0 +- Package version: 6.0.0 - Build package: org.openapitools.codegen.languages.PhpClientCodegen ## Requirements @@ -78,8 +78,6 @@ composer install ### Integration API -**Note:** The Integration API's V1 `Update customer session` and `Update customer profile` endpoints are now deprecated. Use their V2 instead. See [Migrating to V2](https://docs.talon.one/docs/dev/tutorials/migrating-to-v2) for more information. - ```php

Important

This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. +Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint.

Important

This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). This endpoint overrides the reservation limit set for the coupon code during coupon creation.
To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. ### Example @@ -505,7 +506,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$integrationId = 'integrationId_example'; // string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. +$integrationId = 'integrationId_example'; // string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. try { $apiInstance->deleteCustomerData($integrationId); @@ -520,7 +521,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **integrationId** | **string**| The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | + **integrationId** | **string**| The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | ### Return type @@ -567,7 +568,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$integrationId = 'integrationId_example'; // string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. +$integrationId = 'integrationId_example'; // string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. $profile = True; // bool | Set to `true` to include customer profile information in the response. $referrals = True; // bool | Set to `true` to include referral information in the response. $coupons = True; // bool | Set to `true` to include coupon information in the response. @@ -588,7 +589,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **integrationId** | **string**| The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | + **integrationId** | **string**| The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | **profile** | **bool**| Set to `true` to include customer profile information in the response. | [optional] **referrals** | **bool**| Set to `true` to include referral information in the response. | [optional] **coupons** | **bool**| Set to `true` to include coupon information in the response. | [optional] @@ -682,7 +683,7 @@ Name | Type | Description | Notes Get customer's loyalty points -Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date. If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. **Note:** For more information, see [our documentation on managing loyalty data](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-data#obtaining-the-loyalty-balances-of-a-customer). +Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date. If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. **Note:** For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) ### Example @@ -703,9 +704,9 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyProgramId = 56; // int | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. $integrationId = 'integrationId_example'; // string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. -$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. try { $result = $apiInstance->getLoyaltyBalances($loyaltyProgramId, $integrationId, $endDate); @@ -721,9 +722,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyProgramId** | **int**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **integrationId** | **string**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | - **endDate** | **\DateTime**| Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. | [optional] + **endDate** | **\DateTime**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. | [optional] ### Return type @@ -772,7 +773,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( ); $loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. $loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. -$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. try { $result = $apiInstance->getLoyaltyCardBalances($loyaltyProgramId, $loyaltyCardId, $endDate); @@ -790,7 +791,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | - **endDate** | **\DateTime**| Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. | [optional] + **endDate** | **\DateTime**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. | [optional] ### Return type @@ -810,9 +811,82 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) +## getLoyaltyCardPoints + +> \TalonOne\Client\Model\InlineResponse2003 getLoyaltyCardPoints($loyaltyProgramId, $loyaltyCardId, $status, $subledgerId, $pageSize, $skip) + +List card's unused loyalty points + +Get paginated results of loyalty points for a given loyalty card identifier in a card-based loyalty program. This endpoint returns only the balances of unused points on a loyalty card. You can filter points by status: - `active`: Points ready to be redeemed. - `pending`: Points with a start date in the future. - `expired`: Points with an expiration date in the past. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\IntegrationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. +$status = 'active'; // string | Filter points based on their status. +$subledgerId = 'subledgerId_example'; // string | The ID of the subledger by which we filter the data. +$pageSize = 50; // int | The number of items in this response. +$skip = 56; // int | The number of items to skip when paging through large result sets. + +try { + $result = $apiInstance->getLoyaltyCardPoints($loyaltyProgramId, $loyaltyCardId, $status, $subledgerId, $pageSize, $skip); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling IntegrationApi->getLoyaltyCardPoints: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | + **status** | **string**| Filter points based on their status. | [optional] [default to 'active'] + **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 50] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] + +### Return type + +[**\TalonOne\Client\Model\InlineResponse2003**](../Model/InlineResponse2003.md) + +### Authorization + +[api_key_v1](../../README.md#api_key_v1) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + ## getLoyaltyCardTransactions -> \TalonOne\Client\Model\InlineResponse2001 getLoyaltyCardTransactions($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip) +> \TalonOne\Client\Model\InlineResponse2001 getLoyaltyCardTransactions($loyaltyProgramId, $loyaltyCardId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip) List card's transactions @@ -840,13 +914,14 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( $loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. $loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. $subledgerId = 'subledgerId_example'; // string | The ID of the subledger by which we filter the data. +$loyaltyTransactionType = 'loyaltyTransactionType_example'; // string | Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. $startDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. $endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. try { - $result = $apiInstance->getLoyaltyCardTransactions($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + $result = $apiInstance->getLoyaltyCardTransactions($loyaltyProgramId, $loyaltyCardId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip); print_r($result); } catch (Exception $e) { echo 'Exception when calling IntegrationApi->getLoyaltyCardTransactions: ', $e->getMessage(), PHP_EOL; @@ -862,10 +937,11 @@ Name | Type | Description | Notes **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] + **loyaltyTransactionType** | **string**| Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. | [optional] **startDate** | **\DateTime**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] **endDate** | **\DateTime**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] ### Return type @@ -885,9 +961,82 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) +## getLoyaltyProgramProfilePoints + +> \TalonOne\Client\Model\InlineResponse2004 getLoyaltyProgramProfilePoints($loyaltyProgramId, $integrationId, $status, $subledgerId, $pageSize, $skip) + +List customer's unused loyalty points + +Get paginated results of loyalty points for a given Integration ID in the specified profile-based loyalty program. This endpoint returns only the balances of unused points linked to a customer profile. You can filter points by status: - `active`: Points ready to be redeemed. - `pending`: Points with a start date in the future. - `expired`: Points with an expiration date in the past. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\IntegrationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$integrationId = 'integrationId_example'; // string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. +$status = 'active'; // string | Filter points based on their status. +$subledgerId = 'subledgerId_example'; // string | The ID of the subledger by which we filter the data. +$pageSize = 50; // int | The number of items in this response. +$skip = 56; // int | The number of items to skip when paging through large result sets. + +try { + $result = $apiInstance->getLoyaltyProgramProfilePoints($loyaltyProgramId, $integrationId, $status, $subledgerId, $pageSize, $skip); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling IntegrationApi->getLoyaltyProgramProfilePoints: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **int**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **integrationId** | **string**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | + **status** | **string**| Filter points based on their status. | [optional] [default to 'active'] + **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 50] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] + +### Return type + +[**\TalonOne\Client\Model\InlineResponse2004**](../Model/InlineResponse2004.md) + +### Authorization + +[api_key_v1](../../README.md#api_key_v1) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + ## getLoyaltyProgramProfileTransactions -> \TalonOne\Client\Model\InlineResponse2002 getLoyaltyProgramProfileTransactions($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip) +> \TalonOne\Client\Model\InlineResponse2002 getLoyaltyProgramProfileTransactions($loyaltyProgramId, $integrationId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip) List customer's loyalty transactions @@ -912,16 +1061,17 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyProgramId = 56; // int | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. $integrationId = 'integrationId_example'; // string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. $subledgerId = 'subledgerId_example'; // string | The ID of the subledger by which we filter the data. +$loyaltyTransactionType = 'loyaltyTransactionType_example'; // string | Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. $startDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. $endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. $pageSize = 50; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. try { - $result = $apiInstance->getLoyaltyProgramProfileTransactions($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + $result = $apiInstance->getLoyaltyProgramProfileTransactions($loyaltyProgramId, $integrationId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip); print_r($result); } catch (Exception $e) { echo 'Exception when calling IntegrationApi->getLoyaltyProgramProfileTransactions: ', $e->getMessage(), PHP_EOL; @@ -934,13 +1084,14 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyProgramId** | **int**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **integrationId** | **string**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] + **loyaltyTransactionType** | **string**| Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. | [optional] **startDate** | **\DateTime**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] **endDate** | **\DateTime**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] **pageSize** | **int**| The number of items in this response. | [optional] [default to 50] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] ### Return type @@ -1029,7 +1180,7 @@ Name | Type | Description | Notes Link customer profile to card -[Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/loyalty-card-overview) allow customers to collect and spend loyalty points within a [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). They are useful to gamify loyalty programs and can be used with or without customer profiles linked to them. Link a customer profile to a given loyalty card for the card to be set as **Registered**. This affects how it can be used. See the [docs](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/managing-loyalty-cards#linking-customer-profiles-to-a-loyalty-card). **Note:** You can link as many customer profiles to a given loyalty card as the [**card user limit**](https://docs.talon.one/docs/product/loyalty-programs/creating-loyalty-programs#creating-card-based-loyalty-programs) allows. +[Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) allow customers to collect and spend loyalty points within a [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). They are useful to gamify loyalty programs and can be used with or without customer profiles linked to them. Link a customer profile to a given loyalty card for the card to be set as **Registered**. This affects how it can be used. See the [docs](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards#linking-customer-profiles-to-a-loyalty-card). **Note:** You can link as many customer profiles to a given loyalty card as the [**card user limit**](https://docs.talon.one/docs/product/loyalty-programs/card-based/creating-cb-programs) allows. ### Example @@ -1096,7 +1247,7 @@ Name | Type | Description | Notes Reopen customer session -Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities#customer-session). For example, if a session has been completed but still needs to be edited, you can reopen it with this endpoint. A reopen session is treated like a standard open session. When reopening a session: - The `talon_session_reopened` event is triggered. You can see it in the **Events** view in the Campaign Manager. - The session state is updated to `open`. - Modified budgets and triggered effects when the session was closed are rolled back except for the list below.
Effects and budgets unimpacted by a session reopening

The following effects and budgets are left the way they were once the session was originally closed:

To see an example of roll back, see the Cancelling a session with campaign budgets tutorial.

**Note:** If your order workflow requires you to create a new session instead of reopening a session, use the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint to cancel a closed session and create a new one. +Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). For example, if a session has been completed but still needs to be edited, you can reopen it with this endpoint. A reopen session is treated like a standard open session. When reopening a session: - The `talon_session_reopened` event is triggered. You can see it in the **Events** view in the Campaign Manager. - The session state is updated to `open`. - Modified budgets and triggered effects when the session was closed are rolled back except for the list below.
Effects and budgets unimpacted by a session reopening

The following effects and budgets are left the way they were once the session was originally closed:

To see an example of roll back, see the Cancelling a session with campaign budgets tutorial.

**Note:** If your order workflow requires you to create a new session instead of reopening a session, use the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint to cancel a closed session and create a new one. ### Example @@ -1159,7 +1310,7 @@ Name | Type | Description | Notes Return cart items -Create a new return request for the specified cart items. This endpoint automatically changes the session state from `closed` to `partially_returned`. Its behavior depends on whether [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled for the Application. **Note:** This will roll back any effects associated with these cart items. For more information, see [our documentation on session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session-states) and [this tutorial](https://docs.talon.one/docs/dev/tutorials/partially-returning-a-session). +Create a new return request for the specified cart items. This endpoint automatically changes the session state from `closed` to `partially_returned`. **Note:** This will roll back any effects associated with these cart items. For more information, see [our documentation on session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions#customer-session-states) and [this tutorial](https://docs.talon.one/docs/dev/tutorials/partially-returning-a-session). ### Example @@ -1285,78 +1436,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## trackEvent - -> \TalonOne\Client\Model\IntegrationState trackEvent($body, $dry) - -Track event - -

Deprecation warning

This endpoint is DEPRECATED and will be sunset on March 31st 2023. Use Track Event V2 instead.

See Migrating to V2.

Triggers a custom event in a customer session. You can then check this event in your rules. Before using this endpoint, create your event as a custom attribute of type `event`. An event is always part of a session. If either the profile or the session does not exist, a new empty profile/session is created. If the specified session already exists, it must belong to the same `profileId` or an error will be returned. - -### Example - -```php -setApiKey('Authorization', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); - - -$apiInstance = new TalonOne\Client\Api\IntegrationApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -$body = new \TalonOne\Client\Model\NewEvent(); // \TalonOne\Client\Model\NewEvent | body -$dry = True; // bool | Indicates whether to persist the changes. Changes are ignored when `dry=true`. - -try { - $result = $apiInstance->trackEvent($body, $dry); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling IntegrationApi->trackEvent: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\NewEvent**](../Model/NewEvent.md)| body | - **dry** | **bool**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. | [optional] - -### Return type - -[**\TalonOne\Client\Model\IntegrationState**](../Model/IntegrationState.md) - -### Authorization - -[api_key_v1](../../README.md#api_key_v1) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../../README.md#documentation-for-models) -[[Back to README]](../../README.md) - - ## trackEventV2 -> \TalonOne\Client\Model\IntegrationStateV2 trackEventV2($body, $silent, $dry) +> \TalonOne\Client\Model\TrackEventV2Response trackEventV2($body, $silent, $dry) -Track event V2 +Track event -Triggers a custom event. You can build a condition around this event in your rules. Talon.One offers a set of [built-in events](https://docs.talon.one/docs/dev/concepts/events). Ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a customer shares a link to a product. See the [tutorial](https://docs.talon.one/docs/product/tutorials/referrals/incentivizing-product-link-sharing). **Important:** - `profileId` is required. An event V2 is associated with a customer profile. - Before using this endpoint, create your event as a custom attribute of type `event`. See the [Developer docs](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event). When you successfully sent an event to Talon.One, you can list received events in the **Events** view in the Campaign Manager. +Triggers a custom event. To use this endpoint: 1. Define a [custom event](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) in the Campaign Manager. 1. Update or create a rule to check for this event. 1. Trigger the event with this endpoint. After you have successfully sent an event to Talon.One, you can list the received events in the **Events** view in the Campaign Manager. Talon.One also offers a set of [built-in events](https://docs.talon.one/docs/dev/concepts/entities/events). Ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a customer shares a link to a product. See the [tutorial](https://docs.talon.one/docs/product/tutorials/referrals/incentivizing-product-link-sharing).

Important

1. `profileId` is required even though the schema does not say it. 1. If the customer profile ID is new, a new profile is automatically created but the `customer_profile_created` [built-in event ](https://docs.talon.one/docs/dev/concepts/entities/events) is **not** triggered. 1. We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests).
### Example @@ -1401,7 +1487,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\IntegrationStateV2**](../Model/IntegrationStateV2.md) +[**\TalonOne\Client\Model\TrackEventV2Response**](../Model/TrackEventV2Response.md) ### Authorization @@ -1487,7 +1573,7 @@ void (empty response body) Update audience name -Update the name of the given audience created by a third-party integration. Sending a request to this endpoint does **not** trigger the rule engine. To update the audience's members, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint. +Update the name of the given audience created by a third-party integration. Sending a request to this endpoint does **not** trigger the Rule Engine. To update the audience's members, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint. ### Example @@ -1552,7 +1638,7 @@ Name | Type | Description | Notes Update multiple customer profiles' audiences -Update the specified customer profiles with the specified audiences. Use this endpoint when customers join or leave audiences. The limit of customer profiles per request is 1000. +Update the specified customer profiles with the specified audiences. Use this endpoint when customers join or leave audiences. The limit of customer profiles per request is 1000. **Note:** You can also add customer profiles to or remove them from an audience using the [Update audience](https://docs.talon.one/docs/product/rules/effects/using-effects#updating-an-audience) effect. ### Example @@ -1610,11 +1696,11 @@ void (empty response body) ## updateCustomerProfileV2 -> \TalonOne\Client\Model\IntegrationStateV2 updateCustomerProfileV2($integrationId, $body, $runRuleEngine, $dry) +> \TalonOne\Client\Model\CustomerProfileIntegrationResponseV2 updateCustomerProfileV2($integrationId, $body, $runRuleEngine, $dry) Update customer profile -Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities#customer-profile). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of.

Performance tips

Updating a customer profile returns a response with the requested integration state. You can use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests.
+Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of.

Performance tips

- Updating a customer profile returns a response with the requested integration state. - You can use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests).
### Example @@ -1661,7 +1747,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\IntegrationStateV2**](../Model/IntegrationStateV2.md) +[**\TalonOne\Client\Model\CustomerProfileIntegrationResponseV2**](../Model/CustomerProfileIntegrationResponseV2.md) ### Authorization @@ -1683,7 +1769,7 @@ Name | Type | Description | Notes Update multiple customer profiles -Update (or create) up to 1000 [customer profiles](https://docs.talon.one/docs/dev/concepts/entities#customer-profile) in 1 request. The `integrationId` must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. A customer profile [can be linked to one or more sessions](https://docs.talon.one/integration-api#tag/Customer-sessions). +Update (or create) up to 1000 [customer profiles](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) in 1 request. The `integrationId` must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. A customer profile [can be linked to one or more sessions](https://docs.talon.one/integration-api#tag/Customer-sessions). **Note:** This endpoint does not trigger the Rule Engine. To trigger the Rule Engine for customer profile updates, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint. ### Example @@ -1748,7 +1834,7 @@ Name | Type | Description | Notes Update customer session -Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities#customer-session). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer's cart with Talon.One. **Note:** The currency for the session and the cart items in the session is the currency set for the Application that owns this session. ### Session management To use this endpoint, start by learning about [customer sessions](https://docs.talon.one/docs/dev/concepts/entities#customer-session) and their states and refer to the `state` parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. - While you can create an anonymous session with `profileId=\"\"`, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. **Note:** If the specified profile does not exist, an empty profile is **created automatically**. You can update it with [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2).

Performance tips

Updating a customer session returns a response with the new integration state. Use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests.
For more information, see: - The introductory video in [Getting started](https://docs.talon.one/docs/dev/getting-started/overview). - The [integration tutorial](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one). +Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer's cart with Talon.One. **Note:** The currency for the session and the cart items in the session is the currency set for the Application that owns this session. ### Session management To use this endpoint, start by learning about [customer sessions](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions) and their states and refer to the `state` parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. - While you can create an anonymous session with `profileId=\"\"`, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. **Note:** If the specified profile does not exist, an empty profile is **created automatically**. You can update it with [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2).

Performance tips

- Updating a customer session returns a response with the new integration state. Use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests).
For more information, see: - The introductory video in [Getting started](https://docs.talon.one/docs/dev/getting-started/overview). - The [integration tutorial](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one). ### Example @@ -1771,7 +1857,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( ); $customerSessionId = 'customerSessionId_example'; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. $body = new \TalonOne\Client\Model\IntegrationRequest(); // \TalonOne\Client\Model\IntegrationRequest | body -$dry = True; // bool | Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. +$dry = True; // bool | Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). try { $result = $apiInstance->updateCustomerSessionV2($customerSessionId, $body, $dry); @@ -1789,7 +1875,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. | **body** | [**\TalonOne\Client\Model\IntegrationRequest**](../Model/IntegrationRequest.md)| body | - **dry** | **bool**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. | [optional] + **dry** | **bool**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). | [optional] ### Return type diff --git a/docs/Api/ManagementApi.md b/docs/Api/ManagementApi.md index f1c7bfc7..150f224d 100644 --- a/docs/Api/ManagementApi.md +++ b/docs/Api/ManagementApi.md @@ -11,33 +11,35 @@ Method | HTTP request | Description [**createAdditionalCost**](ManagementApi.md#createAdditionalCost) | **POST** /v1/additional_costs | Create additional cost [**createAttribute**](ManagementApi.md#createAttribute) | **POST** /v1/attributes | Create custom attribute [**createCampaignFromTemplate**](ManagementApi.md#createCampaignFromTemplate) | **POST** /v1/applications/{applicationId}/create_campaign_from_template | Create campaign from campaign template -[**createCollection**](ManagementApi.md#createCollection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | Create collection +[**createCollection**](ManagementApi.md#createCollection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | Create campaign-level collection [**createCoupons**](ManagementApi.md#createCoupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create coupons [**createCouponsAsync**](ManagementApi.md#createCouponsAsync) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously [**createCouponsForMultipleRecipients**](ManagementApi.md#createCouponsForMultipleRecipients) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients | Create coupons for multiple recipients -[**createNotificationWebhook**](ManagementApi.md#createNotificationWebhook) | **POST** /v1/applications/{applicationId}/notification_webhooks | Create notification about campaign-related changes [**createPasswordRecoveryEmail**](ManagementApi.md#createPasswordRecoveryEmail) | **POST** /v1/password_recovery_emails | Request a password reset [**createSession**](ManagementApi.md#createSession) | **POST** /v1/sessions | Create session +[**createStore**](ManagementApi.md#createStore) | **POST** /v1/applications/{applicationId}/stores | Create store [**deductLoyaltyCardPoints**](ManagementApi.md#deductLoyaltyCardPoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_points | Deduct points from card [**deleteAccountCollection**](ManagementApi.md#deleteAccountCollection) | **DELETE** /v1/collections/{collectionId} | Delete account-level collection [**deleteCampaign**](ManagementApi.md#deleteCampaign) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId} | Delete campaign -[**deleteCollection**](ManagementApi.md#deleteCollection) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Delete collection +[**deleteCollection**](ManagementApi.md#deleteCollection) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Delete campaign-level collection [**deleteCoupon**](ManagementApi.md#deleteCoupon) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId} | Delete coupon [**deleteCoupons**](ManagementApi.md#deleteCoupons) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Delete coupons [**deleteLoyaltyCard**](ManagementApi.md#deleteLoyaltyCard) | **DELETE** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Delete loyalty card -[**deleteNotificationWebhook**](ManagementApi.md#deleteNotificationWebhook) | **DELETE** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Delete notification about campaign-related changes [**deleteReferral**](ManagementApi.md#deleteReferral) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Delete referral +[**deleteStore**](ManagementApi.md#deleteStore) | **DELETE** /v1/applications/{applicationId}/stores/{storeId} | Delete store [**destroySession**](ManagementApi.md#destroySession) | **DELETE** /v1/sessions | Destroy session [**exportAccountCollectionItems**](ManagementApi.md#exportAccountCollectionItems) | **GET** /v1/collections/{collectionId}/export | Export account-level collection's items -[**exportCollectionItems**](ManagementApi.md#exportCollectionItems) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export | Export a collection's items +[**exportCollectionItems**](ManagementApi.md#exportCollectionItems) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export | Export campaign-level collection's items [**exportCoupons**](ManagementApi.md#exportCoupons) | **GET** /v1/applications/{applicationId}/export_coupons | Export coupons [**exportCustomerSessions**](ManagementApi.md#exportCustomerSessions) | **GET** /v1/applications/{applicationId}/export_customer_sessions | Export customer sessions +[**exportCustomersTiers**](ManagementApi.md#exportCustomersTiers) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_customers_tiers | Export customers' tier data [**exportEffects**](ManagementApi.md#exportEffects) | **GET** /v1/applications/{applicationId}/export_effects | Export triggered effects [**exportLoyaltyBalance**](ManagementApi.md#exportLoyaltyBalance) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance | Export customer loyalty balance to CSV [**exportLoyaltyBalances**](ManagementApi.md#exportLoyaltyBalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances | Export customer loyalty balances [**exportLoyaltyCardBalances**](ManagementApi.md#exportLoyaltyCardBalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_card_balances | Export all card transaction logs [**exportLoyaltyCardLedger**](ManagementApi.md#exportLoyaltyCardLedger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log | Export card's ledger log [**exportLoyaltyLedger**](ManagementApi.md#exportLoyaltyLedger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log | Export customer's transaction logs +[**exportPoolGiveaways**](ManagementApi.md#exportPoolGiveaways) | **GET** /v1/giveaways/pools/{poolId}/export | Export giveaway codes of a giveaway pool [**exportReferrals**](ManagementApi.md#exportReferrals) | **GET** /v1/applications/{applicationId}/export_referrals | Export referrals [**getAccessLogsWithoutTotalCount**](ManagementApi.md#getAccessLogsWithoutTotalCount) | **GET** /v1/applications/{applicationId}/access_logs/no_total | Get access logs for Application [**getAccount**](ManagementApi.md#getAccount) | **GET** /v1/accounts/{accountId} | Get account details @@ -67,7 +69,7 @@ Method | HTTP request | Description [**getCampaignTemplates**](ManagementApi.md#getCampaignTemplates) | **GET** /v1/campaign_templates | List campaign templates [**getCampaigns**](ManagementApi.md#getCampaigns) | **GET** /v1/applications/{applicationId}/campaigns | List campaigns [**getChanges**](ManagementApi.md#getChanges) | **GET** /v1/changes | Get audit logs for an account -[**getCollection**](ManagementApi.md#getCollection) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Get collection +[**getCollection**](ManagementApi.md#getCollection) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Get campaign-level collection [**getCollectionItems**](ManagementApi.md#getCollectionItems) | **GET** /v1/collections/{collectionId}/items | Get collection items [**getCouponsWithoutTotalCount**](ManagementApi.md#getCouponsWithoutTotalCount) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_total | List coupons [**getCustomerActivityReport**](ManagementApi.md#getCustomerActivityReport) | **GET** /v1/applications/{applicationId}/customer_activity_reports/{customerId} | Get customer's activity report @@ -86,31 +88,35 @@ Method | HTTP request | Description [**getLoyaltyProgramTransactions**](ManagementApi.md#getLoyaltyProgramTransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/transactions | List loyalty program transactions [**getLoyaltyPrograms**](ManagementApi.md#getLoyaltyPrograms) | **GET** /v1/loyalty_programs | List loyalty programs [**getLoyaltyStatistics**](ManagementApi.md#getLoyaltyStatistics) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/statistics | Get loyalty program statistics -[**getNotificationWebhook**](ManagementApi.md#getNotificationWebhook) | **GET** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Get notification about campaign-related changes -[**getNotificationWebhooks**](ManagementApi.md#getNotificationWebhooks) | **GET** /v1/applications/{applicationId}/notification_webhooks | List notifications about campaign-related changes [**getReferralsWithoutTotalCount**](ManagementApi.md#getReferralsWithoutTotalCount) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total | List referrals [**getRole**](ManagementApi.md#getRole) | **GET** /v1/roles/{roleId} | Get role [**getRuleset**](ManagementApi.md#getRuleset) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Get ruleset [**getRulesets**](ManagementApi.md#getRulesets) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets | List campaign rulesets +[**getStore**](ManagementApi.md#getStore) | **GET** /v1/applications/{applicationId}/stores/{storeId} | Get store [**getUser**](ManagementApi.md#getUser) | **GET** /v1/users/{userId} | Get user [**getUsers**](ManagementApi.md#getUsers) | **GET** /v1/users | List users in account [**getWebhook**](ManagementApi.md#getWebhook) | **GET** /v1/webhooks/{webhookId} | Get webhook [**getWebhookActivationLogs**](ManagementApi.md#getWebhookActivationLogs) | **GET** /v1/webhook_activation_logs | List webhook activation log entries [**getWebhookLogs**](ManagementApi.md#getWebhookLogs) | **GET** /v1/webhook_logs | List webhook log entries [**getWebhooks**](ManagementApi.md#getWebhooks) | **GET** /v1/webhooks | List webhooks -[**importAccountCollection**](ManagementApi.md#importAccountCollection) | **POST** /v1/collections/{collectionId}/import | Import data in existing account-level collection +[**importAccountCollection**](ManagementApi.md#importAccountCollection) | **POST** /v1/collections/{collectionId}/import | Import data into existing account-level collection [**importAllowedList**](ManagementApi.md#importAllowedList) | **POST** /v1/attributes/{attributeId}/allowed_list/import | Import allowed values for attribute -[**importCollection**](ManagementApi.md#importCollection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import | Import data in existing collection +[**importCollection**](ManagementApi.md#importCollection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import | Import data into existing campaign-level collection [**importCoupons**](ManagementApi.md#importCoupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons | Import coupons [**importLoyaltyCards**](ManagementApi.md#importLoyaltyCards) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/import_cards | Import loyalty cards +[**importLoyaltyCustomersTiers**](ManagementApi.md#importLoyaltyCustomersTiers) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/import_customers_tiers | Import customers into loyalty tiers [**importLoyaltyPoints**](ManagementApi.md#importLoyaltyPoints) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/import_points | Import loyalty points [**importPoolGiveaways**](ManagementApi.md#importPoolGiveaways) | **POST** /v1/giveaways/pools/{poolId}/import | Import giveaway codes into a giveaway pool [**importReferrals**](ManagementApi.md#importReferrals) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals | Import referrals [**listAccountCollections**](ManagementApi.md#listAccountCollections) | **GET** /v1/collections | List collections in account -[**listCollections**](ManagementApi.md#listCollections) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | List collections -[**listCollectionsInApplication**](ManagementApi.md#listCollectionsInApplication) | **GET** /v1/applications/{applicationId}/collections | List collections in application +[**listCatalogItems**](ManagementApi.md#listCatalogItems) | **GET** /v1/catalogs/{catalogId}/items | List items in a catalog +[**listCollections**](ManagementApi.md#listCollections) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | List collections in campaign +[**listCollectionsInApplication**](ManagementApi.md#listCollectionsInApplication) | **GET** /v1/applications/{applicationId}/collections | List collections in Application +[**listStores**](ManagementApi.md#listStores) | **GET** /v1/applications/{applicationId}/stores | List stores +[**notificationActivation**](ManagementApi.md#notificationActivation) | **PUT** /v1/notifications/{notificationId}/activation | Activate or deactivate notification [**postAddedDeductedPointsNotification**](ManagementApi.md#postAddedDeductedPointsNotification) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_points | Create notification about added or deducted loyalty points -[**postCatalogsStrikethroughNotification**](ManagementApi.md#postCatalogsStrikethroughNotification) | **POST** /v1/catalogs/{applicationId}/notifications/strikethrough | Create strikethrough notification +[**postCatalogsStrikethroughNotification**](ManagementApi.md#postCatalogsStrikethroughNotification) | **POST** /v1/applications/{applicationId}/catalogs/notifications/strikethrough | Create strikethrough notification +[**postPendingPointsNotification**](ManagementApi.md#postPendingPointsNotification) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/notifications/pending_points | Create notification about pending loyalty points [**removeLoyaltyPoints**](ManagementApi.md#removeLoyaltyPoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points | Deduct points from customer profile [**resetPassword**](ManagementApi.md#resetPassword) | **POST** /v1/reset_password | Reset password [**searchCouponsAdvancedApplicationWideWithoutTotalCount**](ManagementApi.md#searchCouponsAdvancedApplicationWideWithoutTotalCount) | **POST** /v1/applications/{applicationId}/coupons_search_advanced/no_total | List coupons that match the given attributes (without total count) @@ -120,12 +126,12 @@ Method | HTTP request | Description [**updateAdditionalCost**](ManagementApi.md#updateAdditionalCost) | **PUT** /v1/additional_costs/{additionalCostId} | Update additional cost [**updateAttribute**](ManagementApi.md#updateAttribute) | **PUT** /v1/attributes/{attributeId} | Update custom attribute [**updateCampaign**](ManagementApi.md#updateCampaign) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId} | Update campaign -[**updateCollection**](ManagementApi.md#updateCollection) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Update collection description +[**updateCollection**](ManagementApi.md#updateCollection) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Update campaign-level collection's description [**updateCoupon**](ManagementApi.md#updateCoupon) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId} | Update coupon [**updateCouponBatch**](ManagementApi.md#updateCouponBatch) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Update coupons [**updateLoyaltyCard**](ManagementApi.md#updateLoyaltyCard) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Update loyalty card status -[**updateNotificationWebhook**](ManagementApi.md#updateNotificationWebhook) | **PUT** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Update notification about campaign-related changes [**updateReferral**](ManagementApi.md#updateReferral) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Update referral +[**updateStore**](ManagementApi.md#updateStore) | **PUT** /v1/applications/{applicationId}/stores/{storeId} | Update store @@ -273,7 +279,7 @@ void (empty response body) ## copyCampaignToApplications -> \TalonOne\Client\Model\InlineResponse2004 copyCampaignToApplications($applicationId, $campaignId, $body) +> \TalonOne\Client\Model\InlineResponse2006 copyCampaignToApplications($applicationId, $campaignId, $body) Copy the campaign into the specified Application @@ -327,7 +333,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse2004**](../Model/InlineResponse2004.md) +[**\TalonOne\Client\Model\InlineResponse2006**](../Model/InlineResponse2006.md) ### Authorization @@ -349,7 +355,7 @@ Name | Type | Description | Notes Create account-level collection -Create account-level collection. +Create an account-level collection. ### Example @@ -621,9 +627,9 @@ Name | Type | Description | Notes > \TalonOne\Client\Model\Collection createCollection($applicationId, $campaignId, $body) -Create collection +Create campaign-level collection -Create a collection. +Create a campaign-level collection in a given campaign. ### Example @@ -691,7 +697,7 @@ Name | Type | Description | Notes ## createCoupons -> \TalonOne\Client\Model\InlineResponse2007 createCoupons($applicationId, $campaignId, $body, $silent) +> \TalonOne\Client\Model\InlineResponse2008 createCoupons($applicationId, $campaignId, $body, $silent) Create coupons @@ -747,7 +753,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse2007**](../Model/InlineResponse2007.md) +[**\TalonOne\Client\Model\InlineResponse2008**](../Model/InlineResponse2008.md) ### Authorization @@ -837,7 +843,7 @@ Name | Type | Description | Notes ## createCouponsForMultipleRecipients -> \TalonOne\Client\Model\InlineResponse2007 createCouponsForMultipleRecipients($applicationId, $campaignId, $body, $silent) +> \TalonOne\Client\Model\InlineResponse2008 createCouponsForMultipleRecipients($applicationId, $campaignId, $body, $silent) Create coupons for multiple recipients @@ -893,7 +899,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse2007**](../Model/InlineResponse2007.md) +[**\TalonOne\Client\Model\InlineResponse2008**](../Model/InlineResponse2008.md) ### Authorization @@ -909,13 +915,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## createNotificationWebhook +## createPasswordRecoveryEmail -> \TalonOne\Client\Model\NotificationWebhook createNotificationWebhook($applicationId, $body) +> \TalonOne\Client\Model\NewPasswordEmail createPasswordRecoveryEmail($body) -Create notification about campaign-related changes +Request a password reset -Create a [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). A notification about campaign-related changes is different from regular webhooks in that it is Application-scoped and has a predefined payload. [Regular webhooks](https://docs.talon.one/docs/dev/getting-started/webhooks) have user-definable payloads. **Tip:** - You can create these notifications using the Campaign Manager. See [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications). - You can review the payload you will receive in the [specs](https://docs.talon.one/outbound-notifications#/paths/campaign_created/post). +Send an email with a password recovery link to the email address of an existing account. **Note:** The password recovery link expires 30 minutes after this endpoint is triggered. ### Example @@ -941,14 +947,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\NewNotificationWebhook(); // \TalonOne\Client\Model\NewNotificationWebhook | body +$body = new \TalonOne\Client\Model\NewPasswordEmail(); // \TalonOne\Client\Model\NewPasswordEmail | body try { - $result = $apiInstance->createNotificationWebhook($applicationId, $body); + $result = $apiInstance->createPasswordRecoveryEmail($body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->createNotificationWebhook: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->createPasswordRecoveryEmail: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -958,12 +963,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\NewNotificationWebhook**](../Model/NewNotificationWebhook.md)| body | + **body** | [**\TalonOne\Client\Model\NewPasswordEmail**](../Model/NewPasswordEmail.md)| body | ### Return type -[**\TalonOne\Client\Model\NotificationWebhook**](../Model/NotificationWebhook.md) +[**\TalonOne\Client\Model\NewPasswordEmail**](../Model/NewPasswordEmail.md) ### Authorization @@ -979,13 +983,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## createPasswordRecoveryEmail +## createSession -> \TalonOne\Client\Model\NewPasswordEmail createPasswordRecoveryEmail($body) +> \TalonOne\Client\Model\Session createSession($body) -Request a password reset +Create session -Send an email with a password recovery link to the email address of an existing account. **Note:** The password recovery link expires 30 minutes after this endpoint is triggered. +Create a session to use the Management API endpoints. Use the value of the `token` property provided in the response as bearer token in other API calls. A token is valid for 3 months. In accordance with best pratices, use your generated token for all your API requests. Do **not** regenerate a token for each request. This endpoint has a rate limit of 3 to 6 requests per second per account, depending on your setup.

Granular API key

Instead of using a session, you can also use the Management API key feature in the Campaign Manager to decide which endpoints can be used with a given key.
### Example @@ -1011,13 +1015,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\NewPasswordEmail(); // \TalonOne\Client\Model\NewPasswordEmail | body +$body = new \TalonOne\Client\Model\LoginParams(); // \TalonOne\Client\Model\LoginParams | body try { - $result = $apiInstance->createPasswordRecoveryEmail($body); + $result = $apiInstance->createSession($body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->createPasswordRecoveryEmail: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->createSession: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -1027,11 +1031,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\NewPasswordEmail**](../Model/NewPasswordEmail.md)| body | + **body** | [**\TalonOne\Client\Model\LoginParams**](../Model/LoginParams.md)| body | ### Return type -[**\TalonOne\Client\Model\NewPasswordEmail**](../Model/NewPasswordEmail.md) +[**\TalonOne\Client\Model\Session**](../Model/Session.md) ### Authorization @@ -1047,13 +1051,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## createSession +## createStore -> \TalonOne\Client\Model\Session createSession($body) +> \TalonOne\Client\Model\Store createStore($applicationId, $body) -Create session +Create store -Create a session to use the Management API endpoints. Use the value of the `token` property provided in the response as bearer token in other API calls. A token is valid for 3 months. In accordance with best pratices, use your generated token for all your API requests. Do **not** regenerate a token for each request. This endpoint has a rate limit of 3 to 6 requests per second per account, depending on your setup.

Granular API key

Instead of using a session, you can also use the Management API key feature in the Campaign Manager to decide which endpoints can be used with a given key.
+Create a new store in a specific Application. ### Example @@ -1079,13 +1083,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\LoginParams(); // \TalonOne\Client\Model\LoginParams | body +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$body = new \TalonOne\Client\Model\NewStore(); // \TalonOne\Client\Model\NewStore | body try { - $result = $apiInstance->createSession($body); + $result = $apiInstance->createStore($applicationId, $body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->createSession: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->createStore: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -1095,11 +1100,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\LoginParams**](../Model/LoginParams.md)| body | + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **body** | [**\TalonOne\Client\Model\NewStore**](../Model/NewStore.md)| body | ### Return type -[**\TalonOne\Client\Model\Session**](../Model/Session.md) +[**\TalonOne\Client\Model\Store**](../Model/Store.md) ### Authorization @@ -1192,7 +1198,7 @@ void (empty response body) Delete account-level collection -Delete the given account-level collection. +Delete a given account-level collection. ### Example @@ -1218,7 +1224,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. try { $apiInstance->deleteAccountCollection($collectionId); @@ -1233,7 +1239,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. | ### Return type @@ -1326,9 +1332,9 @@ void (empty response body) > deleteCollection($applicationId, $campaignId, $collectionId) -Delete collection +Delete campaign-level collection -Delete the given collection. +Delete a given campaign-level collection. ### Example @@ -1356,7 +1362,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. try { $apiInstance->deleteCollection($applicationId, $campaignId, $collectionId); @@ -1373,7 +1379,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. | ### Return type @@ -1628,13 +1634,13 @@ void (empty response body) [[Back to README]](../../README.md) -## deleteNotificationWebhook +## deleteReferral -> deleteNotificationWebhook($applicationId, $notificationWebhookId) +> deleteReferral($applicationId, $campaignId, $referralId) -Delete notification about campaign-related changes +Delete referral -Remove the given existing [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). +Delete the specified referral. ### Example @@ -1661,12 +1667,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$notificationWebhookId = 56; // int | The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. +$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. +$referralId = 'referralId_example'; // string | The ID of the referral code. try { - $apiInstance->deleteNotificationWebhook($applicationId, $notificationWebhookId); + $apiInstance->deleteReferral($applicationId, $campaignId, $referralId); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->deleteNotificationWebhook: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->deleteReferral: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -1677,7 +1684,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **notificationWebhookId** | **int**| The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. | + **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + **referralId** | **string**| The ID of the referral code. | ### Return type @@ -1697,13 +1705,13 @@ void (empty response body) [[Back to README]](../../README.md) -## deleteReferral +## deleteStore -> deleteReferral($applicationId, $campaignId, $referralId) +> deleteStore($applicationId, $storeId) -Delete referral +Delete store -Delete the specified referral. +Delete the specified store. ### Example @@ -1730,13 +1738,12 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$referralId = 'referralId_example'; // string | The ID of the referral code. +$storeId = 'storeId_example'; // string | The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. try { - $apiInstance->deleteReferral($applicationId, $campaignId, $referralId); + $apiInstance->deleteStore($applicationId, $storeId); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->deleteReferral: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->deleteStore: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -1747,8 +1754,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **referralId** | **string**| The ID of the referral code. | + **storeId** | **string**| The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. | ### Return type @@ -1761,7 +1767,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) @@ -1837,7 +1843,7 @@ void (empty response body) Export account-level collection's items -Download a CSV file containing items from an account-level collection. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). +Download a CSV file containing items from a given account-level collection. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). ### Example @@ -1863,7 +1869,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. try { $result = $apiInstance->exportAccountCollectionItems($collectionId); @@ -1879,7 +1885,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. | ### Return type @@ -1903,9 +1909,9 @@ Name | Type | Description | Notes > string exportCollectionItems($applicationId, $campaignId, $collectionId) -Export a collection's items +Export campaign-level collection's items -Download a CSV file containing a collection's items. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). +Download a CSV file containing items from a given campaign-level collection. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). ### Example @@ -1933,7 +1939,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. try { $result = $apiInstance->exportCollectionItems($applicationId, $campaignId, $collectionId); @@ -1951,7 +1957,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. | ### Return type @@ -1973,11 +1979,11 @@ Name | Type | Description | Notes ## exportCoupons -> string exportCoupons($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState) +> string exportCoupons($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState, $valuesOnly) Export coupons -Download a CSV file containing the coupons that match the given properties. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `accountid`: The ID of your deployment. - `applicationid`: The ID of the Application this coupon is related to. - `attributes`: A json object describing _custom_ referral attribute names and their values. - `batchid`: The ID of the batch this coupon is part of. - `campaignid`: The ID of the campaign this coupon is related to. - `counter`: The number of times this coupon has been redeemed. - `created`: The creation date of the coupon code. - `deleted`: Whether the coupon code is deleted. - `deleted_changelogid`: The ID of the delete event in the logs. - `discount_counter`: The amount of discount given by this coupon. - `discount_limitval`: The maximum discount amount that can be given be this coupon. - `expirydate`: The end date in RFC3339 of the code redemption period. - `id`: The internal ID of the coupon code. - `importid`: The ID of the import job that created this coupon. - `is_reservation_mandatory`: Whether this coupon requires a reservation to be redeemed. - `limits`: The limits set on this coupon. - `limitval`: The maximum number of redemptions of this code. - `recipientintegrationid`: The integration ID of the customer considered as recipient of the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon is reserved. - `reservation_counter`: How many times this coupon has been reserved. - `reservation_limitval`: The maximum of number of reservations this coupon can have. - `startdate`: The start date in RFC3339 of the code redemption period. - `value`: The coupon code. +Download a CSV file containing the coupons that match the given properties. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file can contain the following columns: - `accountid`: The ID of your deployment. - `applicationid`: The ID of the Application this coupon is related to. - `attributes`: A json object describing _custom_ referral attribute names and their values. - `batchid`: The ID of the batch this coupon is part of. - `campaignid`: The ID of the campaign this coupon is related to. - `counter`: The number of times this coupon has been redeemed. - `created`: The creation date of the coupon code. - `deleted`: Whether the coupon code is deleted. - `deleted_changelogid`: The ID of the delete event in the logs. - `discount_counter`: The amount of discount given by this coupon. - `discount_limitval`: The maximum discount amount that can be given be this coupon. - `expirydate`: The end date in RFC3339 of the code redemption period. - `id`: The internal ID of the coupon code. - `importid`: The ID of the import job that created this coupon. - `is_reservation_mandatory`: Whether this coupon requires a reservation to be redeemed. - `limits`: The limits set on this coupon. - `limitval`: The maximum number of redemptions of this code. - `recipientintegrationid`: The integration ID of the customer considered as recipient of the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon is reserved. - `reservation_counter`: How many times this coupon has been reserved. - `reservation_limitval`: The maximum of number of reservations this coupon can have. - `startdate`: The start date in RFC3339 of the code redemption period. - `value`: The coupon code. ### Example @@ -2012,14 +2018,15 @@ $createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filte $valid = 'valid_example'; // string | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. $usable = 'usable_example'; // string | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. $referralId = 56; // int | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. -$recipientIntegrationId = 'recipientIntegrationId_example'; // string | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field +$recipientIntegrationId = 'recipientIntegrationId_example'; // string | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field. $batchId = 'batchId_example'; // string | Filter results by batches of coupons -$exactMatch = false; // bool | Filter results to an exact case-insensitive matching against the coupon code +$exactMatch = false; // bool | Filter results to an exact case-insensitive matching against the coupon code. $dateFormat = 'dateFormat_example'; // string | Determines the format of dates in the export document. $campaignState = 'campaignState_example'; // string | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. +$valuesOnly = false; // bool | Filter results to only return the coupon codes (`value` column) without the associated coupon data. try { - $result = $apiInstance->exportCoupons($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); + $result = $apiInstance->exportCoupons($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState, $valuesOnly); print_r($result); } catch (Exception $e) { echo 'Exception when calling ManagementApi->exportCoupons: ', $e->getMessage(), PHP_EOL; @@ -2041,11 +2048,12 @@ Name | Type | Description | Notes **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. | [optional] **usable** | **string**| Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. | [optional] **referralId** | **int**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | [optional] - **recipientIntegrationId** | **string**| Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field | [optional] + **recipientIntegrationId** | **string**| Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field. | [optional] **batchId** | **string**| Filter results by batches of coupons | [optional] - **exactMatch** | **bool**| Filter results to an exact case-insensitive matching against the coupon code | [optional] [default to false] + **exactMatch** | **bool**| Filter results to an exact case-insensitive matching against the coupon code. | [optional] [default to false] **dateFormat** | **string**| Determines the format of dates in the export document. | [optional] **campaignState** | **string**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. | [optional] + **valuesOnly** | **bool**| Filter results to only return the coupon codes (`value` column) without the associated coupon data. | [optional] [default to false] ### Return type @@ -2071,7 +2079,7 @@ Name | Type | Description | Notes Export customer sessions -Download a CSV file containing the customer sessions that match the request. **Important:** Archived sessions cannot be exported. See the [retention policy](https://docs.talon.one/docs/product/server-infrastructure-and-data-retention#data-retention-policy). **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). - `id`: The internal ID of the session. - `firstsession`: Whether this is a first session. - `integrationid`: The integration ID of the session. - `applicationid`: The ID of the Application. - `profileid`: The internal ID of the customer profile. - `profileintegrationid`: The integration ID of the customer profile. - `created`: The timestamp when the session was created. - `state`: The [state](https://docs.talon.one/docs/dev/concepts/entities#customer-session-states) of the session. - `cartitems`: The cart items in the session. - `discounts`: The discounts in the session. - `total`: The total value of the session. - `attributes`: The attributes set in the session. - `closedat`: Timestamp when the session was closed. - `cancelledat`: Timestamp when the session was cancelled. - `referral`: The referral code in the session. - `identifiers`: The identifiers in the session. - `additional_costs`: The [additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs) in the session. - `updated`: Timestamp of the last session update. - `coupons`: Coupon codes in the session. +Download a CSV file containing the customer sessions that match the request. **Important:** Archived sessions cannot be exported. See the [retention policy](https://docs.talon.one/docs/product/server-infrastructure-and-data-retention#data-retention-policy). **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). - `id`: The internal ID of the session. - `firstsession`: Whether this is a first session. - `integrationid`: The integration ID of the session. - `applicationid`: The ID of the Application. - `profileid`: The internal ID of the customer profile. - `profileintegrationid`: The integration ID of the customer profile. - `created`: The timestamp when the session was created. - `state`: The [state](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions#customer-session-states) of the session. - `cartitems`: The cart items in the session. - `discounts`: The discounts in the session. - `total`: The total value of cart items and additional costs in the session, before any discounts are applied. - `attributes`: The attributes set in the session. - `closedat`: Timestamp when the session was closed. - `cancelledat`: Timestamp when the session was cancelled. - `referral`: The referral code in the session. - `identifiers`: The identifiers in the session. - `additional_costs`: The [additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs) in the session. - `updated`: Timestamp of the last session update. - `store_integration_id`: The integration ID of the store. - `coupons`: Coupon codes in the session. ### Example @@ -2143,13 +2151,85 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) +## exportCustomersTiers + +> string exportCustomersTiers($loyaltyProgramId, $subledgerIds, $tierNames) + +Export customers' tier data + +Download a CSV file containing the tier information for customers of the specified loyalty program. The generated file contains the following columns: - `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. - `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. - `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. - `tiername`: The name of the tier. - `startdate`: The tier start date in RFC3339. - `expirydate`: The tier expiry date in RFC3339. You can filter the results by providing the following optional input parameters: - `subledgerId` (optional): Filter results by subledger ID. If no value is provided, all subledger data for the specified loyalty program will be exported. - `tierName` (optional): Filter results by tier name. If no value is provided, all tier data for the specified loyalty program will be exported. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 'loyaltyProgramId_example'; // string | The identifier for the loyalty program. +$subledgerIds = array('subledgerIds_example'); // string[] | An array of subledgers IDs to filter the export by. +$tierNames = array('tierNames_example'); // string[] | An array of tier names to filter the export by. + +try { + $result = $apiInstance->exportCustomersTiers($loyaltyProgramId, $subledgerIds, $tierNames); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->exportCustomersTiers: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **string**| The identifier for the loyalty program. | + **subledgerIds** | [**string[]**](../Model/string.md)| An array of subledgers IDs to filter the export by. | [optional] + **tierNames** | [**string[]**](../Model/string.md)| An array of tier names to filter the export by. | [optional] + +### Return type + +**string** + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/csv + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + ## exportEffects > string exportEffects($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat) Export triggered effects -Download a CSV file containing the triggered effects that match the given attributes. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `applicationid`: The ID of the Application. - `campaignid`: The ID of the campaign. - `couponid`: The ID of the coupon, when applicable to the effect. - `created`: The timestamp of the effect. - `event_type`: The name of the event. See the [docs](https://docs.talon.one/docs/dev/concepts/events). - `eventid`: The internal ID of the effect. - `name`: The effect name. See the [docs](https://docs.talon.one/docs/dev/integration-api/api-effects). - `profileintegrationid`: The ID of the customer profile, when applicable. - `props`: The [properties](https://docs.talon.one/docs/dev/integration-api/api-effects) of the effect. - `ruleindex`: The index of the rule. - `rulesetid`: The ID of the rule set. - `sessionid`: The internal ID of the session that triggered the effect. - `profileid`: The internal ID of the customer profile. - `sessionintegrationid`: The integration ID of the session. - `total_revenue`: The total revenue. +Download a CSV file containing the triggered effects that match the given attributes. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `applicationid`: The ID of the Application. - `campaignid`: The ID of the campaign. - `couponid`: The ID of the coupon, when applicable to the effect. - `created`: The timestamp of the effect. - `event_type`: The name of the event. See the [docs](https://docs.talon.one/docs/dev/concepts/entities/events). - `eventid`: The internal ID of the effect. - `name`: The effect name. See the [docs](https://docs.talon.one/docs/dev/integration-api/api-effects). - `profileintegrationid`: The ID of the customer profile, when applicable. - `props`: The [properties](https://docs.talon.one/docs/dev/integration-api/api-effects) of the effect. - `ruleindex`: The index of the rule. - `rulesetid`: The ID of the rule set. - `sessionid`: The internal ID of the session that triggered the effect. - `profileid`: The internal ID of the customer profile. - `sessionintegrationid`: The integration ID of the session. - `total_revenue`: The total revenue. - `store_integration_id`: The integration ID of the store. You choose this ID when you create a store. ### Example @@ -2252,7 +2332,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $loyaltyProgramId = 'loyaltyProgramId_example'; // string | The identifier for the loyalty program. -$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. try { $result = $apiInstance->exportLoyaltyBalance($loyaltyProgramId, $endDate); @@ -2269,7 +2349,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyaltyProgramId** | **string**| The identifier for the loyalty program. | - **endDate** | **\DateTime**| Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. | [optional] + **endDate** | **\DateTime**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. | [optional] ### Return type @@ -2322,7 +2402,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $loyaltyProgramId = 'loyaltyProgramId_example'; // string | The identifier for the loyalty program. -$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. try { $result = $apiInstance->exportLoyaltyBalances($loyaltyProgramId, $endDate); @@ -2339,7 +2419,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyaltyProgramId** | **string**| The identifier for the loyalty program. | - **endDate** | **\DateTime**| Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. | [optional] + **endDate** | **\DateTime**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. | [optional] ### Return type @@ -2392,7 +2472,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. -$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. try { $result = $apiInstance->exportLoyaltyCardBalances($loyaltyProgramId, $endDate); @@ -2409,7 +2489,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | - **endDate** | **\DateTime**| Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. | [optional] + **endDate** | **\DateTime**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. | [optional] ### Return type @@ -2581,6 +2661,78 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) +## exportPoolGiveaways + +> string exportPoolGiveaways($poolId, $createdBefore, $createdAfter) + +Export giveaway codes of a giveaway pool + +Download a CSV file containing the giveaway codes of a specific giveaway pool. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `id`: The internal ID of the giveaway. - `poolid`: The internal ID of the giveaway pool. - `code`: The giveaway code. - `startdate`: The validity start date in RFC3339 of the giveaway (can be empty). - `enddate`: The validity end date in RFC3339 of the giveaway (can be empty). - `attributes`: Any custom attributes associated with the giveaway code (can be empty). - `used`: An indication of whether the giveaway is already awarded. - `importid`: The ID of the import which created the giveaway. - `created`: The creation time of the giveaway code. - `profileintegrationid`: The third-party integration ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded. - `profileid`: The internal ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded or an internal ID does not exist. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$poolId = 56; // int | The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. +$createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. +$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. + +try { + $result = $apiInstance->exportPoolGiveaways($poolId, $createdBefore, $createdAfter); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->exportPoolGiveaways: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **poolId** | **int**| The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. | + **createdBefore** | **\DateTime**| Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. | [optional] + **createdAfter** | **\DateTime**| Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. | [optional] + +### Return type + +**string** + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/csv + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + ## exportReferrals > string exportReferrals($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat) @@ -2665,7 +2817,7 @@ Name | Type | Description | Notes ## getAccessLogsWithoutTotalCount -> \TalonOne\Client\Model\InlineResponse20018 getAccessLogsWithoutTotalCount($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20019 getAccessLogsWithoutTotalCount($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) Get access logs for Application @@ -2702,7 +2854,7 @@ $path = 'path_example'; // string | Only return results where the request path m $method = 'method_example'; // string | Only return results where the request method matches the given regular expression. $status = 'status_example'; // string | Filter results by HTTP status codes. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { @@ -2726,12 +2878,12 @@ Name | Type | Description | Notes **method** | **string**| Only return results where the request method matches the given regular expression. | [optional] **status** | **string**| Filter results by HTTP status codes. | [optional] **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20018**](../Model/InlineResponse20018.md) +[**\TalonOne\Client\Model\InlineResponse20019**](../Model/InlineResponse20019.md) ### Authorization @@ -2915,7 +3067,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. try { $result = $apiInstance->getAccountCollection($collectionId); @@ -2931,7 +3083,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. | ### Return type @@ -3021,7 +3173,7 @@ Name | Type | Description | Notes ## getAdditionalCosts -> \TalonOne\Client\Model\InlineResponse20032 getAdditionalCosts($pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20034 getAdditionalCosts($pageSize, $skip, $sort) List additional costs @@ -3052,7 +3204,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { @@ -3070,12 +3222,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20032**](../Model/InlineResponse20032.md) +[**\TalonOne\Client\Model\InlineResponse20034**](../Model/InlineResponse20034.md) ### Authorization @@ -3093,7 +3245,7 @@ Name | Type | Description | Notes ## getAllAccessLogs -> \TalonOne\Client\Model\InlineResponse20019 getAllAccessLogs($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20020 getAllAccessLogs($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) List access logs @@ -3129,7 +3281,7 @@ $path = 'path_example'; // string | Only return results where the request path m $method = 'method_example'; // string | Only return results where the request method matches the given regular expression. $status = 'status_example'; // string | Filter results by HTTP status codes. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { @@ -3152,12 +3304,12 @@ Name | Type | Description | Notes **method** | **string**| Only return results where the request method matches the given regular expression. | [optional] **status** | **string**| Filter results by HTTP status codes. | [optional] **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20019**](../Model/InlineResponse20019.md) +[**\TalonOne\Client\Model\InlineResponse20020**](../Model/InlineResponse20020.md) ### Authorization @@ -3175,7 +3327,7 @@ Name | Type | Description | Notes ## getAllRoles -> \TalonOne\Client\Model\InlineResponse20040 getAllRoles() +> \TalonOne\Client\Model\InlineResponse20042 getAllRoles() List roles @@ -3221,7 +3373,7 @@ This endpoint does not need any parameter. ### Return type -[**\TalonOne\Client\Model\InlineResponse20040**](../Model/InlineResponse20040.md) +[**\TalonOne\Client\Model\InlineResponse20042**](../Model/InlineResponse20042.md) ### Authorization @@ -3445,7 +3597,7 @@ Name | Type | Description | Notes ## getApplicationCustomerFriends -> \TalonOne\Client\Model\InlineResponse20030 getApplicationCustomerFriends($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize) +> \TalonOne\Client\Model\InlineResponse20031 getApplicationCustomerFriends($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize) List friends referred by customer profile @@ -3478,7 +3630,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $integrationId = 'integrationId_example'; // string | The Integration ID of the Advocate's Profile. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. @@ -3499,13 +3651,13 @@ Name | Type | Description | Notes **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **integrationId** | **string**| The Integration ID of the Advocate's Profile. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20030**](../Model/InlineResponse20030.md) +[**\TalonOne\Client\Model\InlineResponse20031**](../Model/InlineResponse20031.md) ### Authorization @@ -3523,7 +3675,7 @@ Name | Type | Description | Notes ## getApplicationCustomers -> \TalonOne\Client\Model\InlineResponse20021 getApplicationCustomers($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize) +> \TalonOne\Client\Model\InlineResponse20022 getApplicationCustomers($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize) List application's customers @@ -3556,7 +3708,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $integrationId = 'integrationId_example'; // string | Filter results performing an exact matching against the profile integration identifier. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. try { @@ -3576,12 +3728,12 @@ Name | Type | Description | Notes **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **integrationId** | **string**| Filter results performing an exact matching against the profile integration identifier. | [optional] **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20021**](../Model/InlineResponse20021.md) +[**\TalonOne\Client\Model\InlineResponse20022**](../Model/InlineResponse20022.md) ### Authorization @@ -3599,7 +3751,7 @@ Name | Type | Description | Notes ## getApplicationCustomersByAttributes -> \TalonOne\Client\Model\InlineResponse20022 getApplicationCustomersByAttributes($applicationId, $body, $pageSize, $skip, $withTotalResultSize) +> \TalonOne\Client\Model\InlineResponse20023 getApplicationCustomersByAttributes($applicationId, $body, $pageSize, $skip, $withTotalResultSize) List application customers matching the given attributes @@ -3632,7 +3784,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $body = new \TalonOne\Client\Model\CustomerProfileSearchQuery(); // \TalonOne\Client\Model\CustomerProfileSearchQuery | body $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. try { @@ -3652,12 +3804,12 @@ Name | Type | Description | Notes **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **body** | [**\TalonOne\Client\Model\CustomerProfileSearchQuery**](../Model/CustomerProfileSearchQuery.md)| body | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20022**](../Model/InlineResponse20022.md) +[**\TalonOne\Client\Model\InlineResponse20023**](../Model/InlineResponse20023.md) ### Authorization @@ -3675,11 +3827,11 @@ Name | Type | Description | Notes ## getApplicationEventTypes -> \TalonOne\Client\Model\InlineResponse20028 getApplicationEventTypes($applicationId, $pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20029 getApplicationEventTypes($applicationId, $pageSize, $skip, $sort) List Applications event types -Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](https://docs.talon.one/integration-api#operation/trackEvent) +Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) ### Example @@ -3707,7 +3859,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { @@ -3726,12 +3878,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20028**](../Model/InlineResponse20028.md) +[**\TalonOne\Client\Model\InlineResponse20029**](../Model/InlineResponse20029.md) ### Authorization @@ -3749,7 +3901,7 @@ Name | Type | Description | Notes ## getApplicationEventsWithoutTotalCount -> \TalonOne\Client\Model\InlineResponse20027 getApplicationEventsWithoutTotalCount($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery) +> \TalonOne\Client\Model\InlineResponse20028 getApplicationEventsWithoutTotalCount($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery) List Applications events @@ -3781,7 +3933,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $type = 'type_example'; // string | Comma-separated list of types by which to filter events. Must be exact match(es). $createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. @@ -3811,7 +3963,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **type** | **string**| Comma-separated list of types by which to filter events. Must be exact match(es). | [optional] **createdBefore** | **\DateTime**| Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. | [optional] @@ -3827,7 +3979,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20027**](../Model/InlineResponse20027.md) +[**\TalonOne\Client\Model\InlineResponse20028**](../Model/InlineResponse20028.md) ### Authorization @@ -3915,7 +4067,7 @@ Name | Type | Description | Notes ## getApplicationSessions -> \TalonOne\Client\Model\InlineResponse20026 getApplicationSessions($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId) +> \TalonOne\Client\Model\InlineResponse20027 getApplicationSessions($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId) List Application sessions @@ -3947,7 +4099,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $profile = 'profile_example'; // string | Profile integration ID filter for sessions. Must be exact match. $state = 'state_example'; // string | Filter by sessions with this state. Must be exact match. @@ -3973,7 +4125,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **profile** | **string**| Profile integration ID filter for sessions. Must be exact match. | [optional] **state** | **string**| Filter by sessions with this state. Must be exact match. | [optional] @@ -3985,7 +4137,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20026**](../Model/InlineResponse20026.md) +[**\TalonOne\Client\Model\InlineResponse20027**](../Model/InlineResponse20027.md) ### Authorization @@ -4003,7 +4155,7 @@ Name | Type | Description | Notes ## getApplications -> \TalonOne\Client\Model\InlineResponse2003 getApplications($pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse2005 getApplications($pageSize, $skip, $sort) List Applications @@ -4034,7 +4186,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { @@ -4052,12 +4204,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse2003**](../Model/InlineResponse2003.md) +[**\TalonOne\Client\Model\InlineResponse2005**](../Model/InlineResponse2005.md) ### Authorization @@ -4143,7 +4295,7 @@ Name | Type | Description | Notes ## getAttributes -> \TalonOne\Client\Model\InlineResponse20031 getAttributes($pageSize, $skip, $sort, $entity) +> \TalonOne\Client\Model\InlineResponse20032 getAttributes($pageSize, $skip, $sort, $entity) List custom attributes @@ -4174,7 +4326,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $entity = 'entity_example'; // string | Returned attributes will be filtered by supplied entity. @@ -4193,13 +4345,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **entity** | **string**| Returned attributes will be filtered by supplied entity. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20031**](../Model/InlineResponse20031.md) +[**\TalonOne\Client\Model\InlineResponse20032**](../Model/InlineResponse20032.md) ### Authorization @@ -4217,7 +4369,7 @@ Name | Type | Description | Notes ## getAudiences -> \TalonOne\Client\Model\InlineResponse20029 getAudiences($pageSize, $skip, $sort, $withTotalResultSize) +> \TalonOne\Client\Model\InlineResponse20030 getAudiences($pageSize, $skip, $sort, $withTotalResultSize) List audiences @@ -4248,7 +4400,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. @@ -4267,13 +4419,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20029**](../Model/InlineResponse20029.md) +[**\TalonOne\Client\Model\InlineResponse20030**](../Model/InlineResponse20030.md) ### Authorization @@ -4361,7 +4513,7 @@ Name | Type | Description | Notes ## getCampaignAnalytics -> \TalonOne\Client\Model\InlineResponse20020 getCampaignAnalytics($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity) +> \TalonOne\Client\Model\InlineResponse20021 getCampaignAnalytics($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity) Get analytics of campaigns @@ -4419,7 +4571,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20020**](../Model/InlineResponse20020.md) +[**\TalonOne\Client\Model\InlineResponse20021**](../Model/InlineResponse20021.md) ### Authorization @@ -4437,7 +4589,7 @@ Name | Type | Description | Notes ## getCampaignByAttributes -> \TalonOne\Client\Model\InlineResponse2004 getCampaignByAttributes($applicationId, $body, $pageSize, $skip, $sort, $campaignState) +> \TalonOne\Client\Model\InlineResponse2006 getCampaignByAttributes($applicationId, $body, $pageSize, $skip, $sort, $campaignState) List campaigns that match the given attributes @@ -4470,7 +4622,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $body = new \TalonOne\Client\Model\CampaignSearch(); // \TalonOne\Client\Model\CampaignSearch | body $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $campaignState = 'campaignState_example'; // string | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. @@ -4491,13 +4643,13 @@ Name | Type | Description | Notes **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **body** | [**\TalonOne\Client\Model\CampaignSearch**](../Model/CampaignSearch.md)| body | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **campaignState** | **string**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse2004**](../Model/InlineResponse2004.md) +[**\TalonOne\Client\Model\InlineResponse2006**](../Model/InlineResponse2006.md) ### Authorization @@ -4515,7 +4667,7 @@ Name | Type | Description | Notes ## getCampaignTemplates -> \TalonOne\Client\Model\InlineResponse20010 getCampaignTemplates($pageSize, $skip, $sort, $state, $name, $tags, $userId) +> \TalonOne\Client\Model\InlineResponse20011 getCampaignTemplates($pageSize, $skip, $sort, $state, $name, $tags, $userId) List campaign templates @@ -4546,7 +4698,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $state = 'state_example'; // string | Filter results by the state of the campaign template. $name = 'name_example'; // string | Filter results performing case-insensitive matching against the name of the campaign template. @@ -4568,7 +4720,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **state** | **string**| Filter results by the state of the campaign template. | [optional] **name** | **string**| Filter results performing case-insensitive matching against the name of the campaign template. | [optional] @@ -4577,7 +4729,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20010**](../Model/InlineResponse20010.md) +[**\TalonOne\Client\Model\InlineResponse20011**](../Model/InlineResponse20011.md) ### Authorization @@ -4595,7 +4747,7 @@ Name | Type | Description | Notes ## getCampaigns -> \TalonOne\Client\Model\InlineResponse2004 getCampaigns($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId) +> \TalonOne\Client\Model\InlineResponse2006 getCampaigns($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId, $storeId) List campaigns @@ -4627,18 +4779,19 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $campaignState = 'campaignState_example'; // string | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. $name = 'name_example'; // string | Filter results performing case-insensitive matching against the name of the campaign. $tags = 'tags_example'; // string | Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values $createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. $createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. -$campaignGroupId = 56; // int | Filter results to campaigns owned by the specified campaign group ID. +$campaignGroupId = 56; // int | Filter results to campaigns owned by the specified campaign access group ID. $templateId = 56; // int | The ID of the Campaign Template this Campaign was created from. +$storeId = 56; // int | Filter results to campaigns linked to the specified store ID. try { - $result = $apiInstance->getCampaigns($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId); + $result = $apiInstance->getCampaigns($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId, $storeId); print_r($result); } catch (Exception $e) { echo 'Exception when calling ManagementApi->getCampaigns: ', $e->getMessage(), PHP_EOL; @@ -4653,19 +4806,20 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **campaignState** | **string**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. | [optional] **name** | **string**| Filter results performing case-insensitive matching against the name of the campaign. | [optional] **tags** | **string**| Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values | [optional] **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] - **campaignGroupId** | **int**| Filter results to campaigns owned by the specified campaign group ID. | [optional] + **campaignGroupId** | **int**| Filter results to campaigns owned by the specified campaign access group ID. | [optional] **templateId** | **int**| The ID of the Campaign Template this Campaign was created from. | [optional] + **storeId** | **int**| Filter results to campaigns linked to the specified store ID. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse2004**](../Model/InlineResponse2004.md) +[**\TalonOne\Client\Model\InlineResponse2006**](../Model/InlineResponse2006.md) ### Authorization @@ -4683,7 +4837,7 @@ Name | Type | Description | Notes ## getChanges -> \TalonOne\Client\Model\InlineResponse20038 getChanges($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld) +> \TalonOne\Client\Model\InlineResponse20040 getChanges($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld) Get audit logs for an account @@ -4714,7 +4868,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $applicationId = 3.4; // float | Filter results by Application ID. $entityPath = 'entityPath_example'; // string | Filter results on a case insensitive matching of the url path of the entity @@ -4740,7 +4894,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **applicationId** | **float**| Filter results by Application ID. | [optional] **entityPath** | **string**| Filter results on a case insensitive matching of the url path of the entity | [optional] @@ -4753,7 +4907,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20038**](../Model/InlineResponse20038.md) +[**\TalonOne\Client\Model\InlineResponse20040**](../Model/InlineResponse20040.md) ### Authorization @@ -4773,9 +4927,9 @@ Name | Type | Description | Notes > \TalonOne\Client\Model\Collection getCollection($applicationId, $campaignId, $collectionId) -Get collection +Get campaign-level collection -Retrieve a given collection. +Retrieve a given campaign-level collection. ### Example @@ -4803,7 +4957,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. try { $result = $apiInstance->getCollection($applicationId, $campaignId, $collectionId); @@ -4821,7 +4975,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. | ### Return type @@ -4843,11 +4997,11 @@ Name | Type | Description | Notes ## getCollectionItems -> \TalonOne\Client\Model\InlineResponse20016 getCollectionItems($collectionId, $pageSize, $skip) +> \TalonOne\Client\Model\InlineResponse20017 getCollectionItems($collectionId, $pageSize, $skip) Get collection items -Retrieve the items from the given collection. +Retrieve items from a given collection. You can retrieve items from both account-level collections and campaign-level collections using this endpoint. ### Example @@ -4873,9 +5027,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. try { $result = $apiInstance->getCollectionItems($collectionId, $pageSize, $skip); @@ -4891,13 +5045,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20016**](../Model/InlineResponse20016.md) +[**\TalonOne\Client\Model\InlineResponse20017**](../Model/InlineResponse20017.md) ### Authorization @@ -4915,7 +5069,7 @@ Name | Type | Description | Notes ## getCouponsWithoutTotalCount -> \TalonOne\Client\Model\InlineResponse2008 getCouponsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch) +> \TalonOne\Client\Model\InlineResponse2009 getCouponsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch) List coupons @@ -4948,7 +5102,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $value = 'value_example'; // string | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. $createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @@ -4977,7 +5131,7 @@ Name | Type | Description | Notes **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **value** | **string**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. | [optional] **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] @@ -4991,7 +5145,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse2008**](../Model/InlineResponse2008.md) +[**\TalonOne\Client\Model\InlineResponse2009**](../Model/InlineResponse2009.md) ### Authorization @@ -5044,7 +5198,7 @@ $rangeEnd = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only retu $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $customerId = 56; // int | The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. try { $result = $apiInstance->getCustomerActivityReport($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); @@ -5065,7 +5219,7 @@ Name | Type | Description | Notes **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **customerId** | **int**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] ### Return type @@ -5087,7 +5241,7 @@ Name | Type | Description | Notes ## getCustomerActivityReportsWithoutTotalCount -> \TalonOne\Client\Model\InlineResponse20025 getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) +> \TalonOne\Client\Model\InlineResponse20026 getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) Get Activity Reports for Application Customers @@ -5121,7 +5275,7 @@ $rangeStart = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only re $rangeEnd = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from before this timestamp. This must be an RFC3339 timestamp string. $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $name = 'name_example'; // string | Only return reports matching the customer name $integrationId = 'integrationId_example'; // string | Filter results performing an exact matching against the profile integration identifier. @@ -5146,7 +5300,7 @@ Name | Type | Description | Notes **rangeEnd** | **\DateTime**| Only return results from before this timestamp. This must be an RFC3339 timestamp string. | **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **name** | **string**| Only return reports matching the customer name | [optional] **integrationId** | **string**| Filter results performing an exact matching against the profile integration identifier. | [optional] @@ -5155,7 +5309,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20025**](../Model/InlineResponse20025.md) +[**\TalonOne\Client\Model\InlineResponse20026**](../Model/InlineResponse20026.md) ### Authorization @@ -5206,7 +5360,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $customerId = 56; // int | The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { @@ -5226,7 +5380,7 @@ Name | Type | Description | Notes **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **customerId** | **int**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type @@ -5317,7 +5471,7 @@ Name | Type | Description | Notes ## getCustomerProfiles -> \TalonOne\Client\Model\InlineResponse20024 getCustomerProfiles($pageSize, $skip, $sandbox) +> \TalonOne\Client\Model\InlineResponse20025 getCustomerProfiles($pageSize, $skip, $sandbox) List customer profiles @@ -5348,7 +5502,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sandbox = false; // bool | Indicates whether you are pointing to a sandbox or Live customer. try { @@ -5366,12 +5520,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sandbox** | **bool**| Indicates whether you are pointing to a sandbox or Live customer. | [optional] [default to false] ### Return type -[**\TalonOne\Client\Model\InlineResponse20024**](../Model/InlineResponse20024.md) +[**\TalonOne\Client\Model\InlineResponse20025**](../Model/InlineResponse20025.md) ### Authorization @@ -5389,7 +5543,7 @@ Name | Type | Description | Notes ## getCustomersByAttributes -> \TalonOne\Client\Model\InlineResponse20023 getCustomersByAttributes($body, $pageSize, $skip, $sandbox) +> \TalonOne\Client\Model\InlineResponse20024 getCustomersByAttributes($body, $pageSize, $skip, $sandbox) List customer profiles matching the given attributes @@ -5421,7 +5575,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $body = new \TalonOne\Client\Model\CustomerProfileSearchQuery(); // \TalonOne\Client\Model\CustomerProfileSearchQuery | body $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sandbox = false; // bool | Indicates whether you are pointing to a sandbox or Live customer. try { @@ -5440,12 +5594,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**\TalonOne\Client\Model\CustomerProfileSearchQuery**](../Model/CustomerProfileSearchQuery.md)| body | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sandbox** | **bool**| Indicates whether you are pointing to a sandbox or Live customer. | [optional] [default to false] ### Return type -[**\TalonOne\Client\Model\InlineResponse20023**](../Model/InlineResponse20023.md) +[**\TalonOne\Client\Model\InlineResponse20024**](../Model/InlineResponse20024.md) ### Authorization @@ -5463,7 +5617,7 @@ Name | Type | Description | Notes ## getEventTypes -> \TalonOne\Client\Model\InlineResponse20036 getEventTypes($name, $includeOldVersions, $pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20038 getEventTypes($name, $includeOldVersions, $pageSize, $skip, $sort) List event types @@ -5496,7 +5650,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $name = 'name_example'; // string | Filter results to event types with the given name. This parameter implies `includeOldVersions`. $includeOldVersions = false; // bool | Include all versions of every event type. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { @@ -5516,12 +5670,12 @@ Name | Type | Description | Notes **name** | **string**| Filter results to event types with the given name. This parameter implies `includeOldVersions`. | [optional] **includeOldVersions** | **bool**| Include all versions of every event type. | [optional] [default to false] **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20036**](../Model/InlineResponse20036.md) +[**\TalonOne\Client\Model\InlineResponse20038**](../Model/InlineResponse20038.md) ### Authorization @@ -5539,7 +5693,7 @@ Name | Type | Description | Notes ## getExports -> \TalonOne\Client\Model\InlineResponse20039 getExports($pageSize, $skip, $applicationId, $campaignId, $entity) +> \TalonOne\Client\Model\InlineResponse20041 getExports($pageSize, $skip, $applicationId, $campaignId, $entity) Get exports @@ -5570,7 +5724,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $applicationId = 3.4; // float | Filter results by Application ID. $campaignId = 56; // int | Filter by the campaign ID on which the limit counters are used. $entity = 'entity_example'; // string | The name of the entity type that was exported. @@ -5590,14 +5744,14 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **applicationId** | **float**| Filter results by Application ID. | [optional] **campaignId** | **int**| Filter by the campaign ID on which the limit counters are used. | [optional] **entity** | **string**| The name of the entity type that was exported. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20039**](../Model/InlineResponse20039.md) +[**\TalonOne\Client\Model\InlineResponse20041**](../Model/InlineResponse20041.md) ### Authorization @@ -5685,11 +5839,11 @@ Name | Type | Description | Notes ## getLoyaltyCardTransactionLogs -> \TalonOne\Client\Model\InlineResponse20014 getLoyaltyCardTransactionLogs($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId) +> \TalonOne\Client\Model\InlineResponse20015 getLoyaltyCardTransactionLogs($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId) List card's transactions -Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/loyalty-card-overview) within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. +Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. ### Example @@ -5720,7 +5874,7 @@ $loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty $startDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. $endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $subledgerId = 'subledgerId_example'; // string | The ID of the subledger by which we filter the data. try { @@ -5742,12 +5896,12 @@ Name | Type | Description | Notes **startDate** | **\DateTime**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] **endDate** | **\DateTime**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20014**](../Model/InlineResponse20014.md) +[**\TalonOne\Client\Model\InlineResponse20015**](../Model/InlineResponse20015.md) ### Authorization @@ -5765,7 +5919,7 @@ Name | Type | Description | Notes ## getLoyaltyCards -> \TalonOne\Client\Model\InlineResponse20013 getLoyaltyCards($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId) +> \TalonOne\Client\Model\InlineResponse20014 getLoyaltyCards($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId) List loyalty cards @@ -5797,7 +5951,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $identifier = 'identifier_example'; // string | Optional query parameter to search cards by identifier. $profileId = 56; // int | Filter by the profile ID. @@ -5818,14 +5972,14 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **identifier** | **string**| Optional query parameter to search cards by identifier. | [optional] **profileId** | **int**| Filter by the profile ID. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20013**](../Model/InlineResponse20013.md) +[**\TalonOne\Client\Model\InlineResponse20014**](../Model/InlineResponse20014.md) ### Authorization @@ -5981,7 +6135,7 @@ Name | Type | Description | Notes ## getLoyaltyProgramTransactions -> \TalonOne\Client\Model\InlineResponse20012 getLoyaltyProgramTransactions($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip) +> \TalonOne\Client\Model\InlineResponse20013 getLoyaltyProgramTransactions($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip) List loyalty program transactions @@ -6017,7 +6171,7 @@ $subledgerId = 'subledgerId_example'; // string | The ID of the subledger by whi $startDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. $endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. $pageSize = 50; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. try { $result = $apiInstance->getLoyaltyProgramTransactions($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip); @@ -6039,11 +6193,11 @@ Name | Type | Description | Notes **startDate** | **\DateTime**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] **endDate** | **\DateTime**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] **pageSize** | **int**| The number of items in this response. | [optional] [default to 50] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20012**](../Model/InlineResponse20012.md) +[**\TalonOne\Client\Model\InlineResponse20013**](../Model/InlineResponse20013.md) ### Authorization @@ -6061,7 +6215,7 @@ Name | Type | Description | Notes ## getLoyaltyPrograms -> \TalonOne\Client\Model\InlineResponse20011 getLoyaltyPrograms() +> \TalonOne\Client\Model\InlineResponse20012 getLoyaltyPrograms() List loyalty programs @@ -6107,7 +6261,7 @@ This endpoint does not need any parameter. ### Return type -[**\TalonOne\Client\Model\InlineResponse20011**](../Model/InlineResponse20011.md) +[**\TalonOne\Client\Model\InlineResponse20012**](../Model/InlineResponse20012.md) ### Authorization @@ -6125,7 +6279,7 @@ This endpoint does not need any parameter. ## getLoyaltyStatistics -> \TalonOne\Client\Model\LoyaltyStatistics getLoyaltyStatistics($loyaltyProgramId) +> \TalonOne\Client\Model\LoyaltyDashboardData getLoyaltyStatistics($loyaltyProgramId) Get loyalty program statistics @@ -6175,7 +6329,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\LoyaltyStatistics**](../Model/LoyaltyStatistics.md) +[**\TalonOne\Client\Model\LoyaltyDashboardData**](../Model/LoyaltyDashboardData.md) ### Authorization @@ -6191,83 +6345,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getNotificationWebhook +## getReferralsWithoutTotalCount -> \TalonOne\Client\Model\NotificationWebhook getNotificationWebhook($applicationId, $notificationWebhookId) +> \TalonOne\Client\Model\InlineResponse20010 getReferralsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate) -Get notification about campaign-related changes +List referrals -Return the given [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). - -### Example - -```php -setApiKey('Authorization', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); - -// Configure API key authorization: manager_auth -$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); - - -$apiInstance = new TalonOne\Client\Api\ManagementApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$notificationWebhookId = 56; // int | The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. - -try { - $result = $apiInstance->getNotificationWebhook($applicationId, $notificationWebhookId); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ManagementApi->getNotificationWebhook: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **notificationWebhookId** | **int**| The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. | - -### Return type - -[**\TalonOne\Client\Model\NotificationWebhook**](../Model/NotificationWebhook.md) - -### Authorization - -[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../../README.md#documentation-for-models) -[[Back to README]](../../README.md) - - -## getNotificationWebhooks - -> \TalonOne\Client\Model\InlineResponse2005 getNotificationWebhooks($applicationId) - -List notifications about campaign-related changes - -List all [notifications about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications) for the given Application. +List all referrals of the specified campaign. ### Example @@ -6294,12 +6378,22 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | The number of items to skip when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$code = 'code_example'; // string | Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. +$createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. +$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. +$valid = 'valid_example'; // string | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. +$usable = 'usable_example'; // string | Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. +$advocate = 'advocate_example'; // string | Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field try { - $result = $apiInstance->getNotificationWebhooks($applicationId); + $result = $apiInstance->getReferralsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getNotificationWebhooks: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getReferralsWithoutTotalCount: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -6310,10 +6404,20 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **code** | **string**| Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. | [optional] + **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] + **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] + **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. | [optional] + **usable** | **string**| Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. | [optional] + **advocate** | **string**| Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse2005**](../Model/InlineResponse2005.md) +[**\TalonOne\Client\Model\InlineResponse20010**](../Model/InlineResponse20010.md) ### Authorization @@ -6329,13 +6433,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getReferralsWithoutTotalCount +## getRole -> \TalonOne\Client\Model\InlineResponse2009 getReferralsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate) +> \TalonOne\Client\Model\Role getRole($roleId) -List referrals +Get role -List all referrals of the specified campaign. +Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). ### Example @@ -6361,23 +6465,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. -$code = 'code_example'; // string | Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. -$createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. -$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. -$valid = 'valid_example'; // string | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. -$usable = 'usable_example'; // string | Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. -$advocate = 'advocate_example'; // string | Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field +$roleId = 56; // int | The ID of role. try { - $result = $apiInstance->getReferralsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate); + $result = $apiInstance->getRole($roleId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getReferralsWithoutTotalCount: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getRole: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -6387,21 +6481,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] - **code** | **string**| Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. | [optional] - **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] - **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. | [optional] - **usable** | **string**| Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. | [optional] - **advocate** | **string**| Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field | [optional] + **roleId** | **int**| The ID of role. | ### Return type -[**\TalonOne\Client\Model\InlineResponse2009**](../Model/InlineResponse2009.md) +[**\TalonOne\Client\Model\Role**](../Model/Role.md) ### Authorization @@ -6417,13 +6501,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getRole +## getRuleset -> \TalonOne\Client\Model\Role getRole($roleId) +> \TalonOne\Client\Model\Ruleset getRuleset($applicationId, $campaignId, $rulesetId) -Get role +Get ruleset -Get the details of the specified role. To see all the roles, use [List roles](#operation/getAllRoles). +Retrieve the specified ruleset. ### Example @@ -6449,13 +6533,15 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$roleId = 56; // int | The Id of role. +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. +$rulesetId = 56; // int | The ID of the ruleset. try { - $result = $apiInstance->getRole($roleId); + $result = $apiInstance->getRuleset($applicationId, $campaignId, $rulesetId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getRole: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getRuleset: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -6465,11 +6551,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **roleId** | **int**| The Id of role. | + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + **rulesetId** | **int**| The ID of the ruleset. | ### Return type -[**\TalonOne\Client\Model\Role**](../Model/Role.md) +[**\TalonOne\Client\Model\Ruleset**](../Model/Ruleset.md) ### Authorization @@ -6485,13 +6573,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getRuleset +## getRulesets -> \TalonOne\Client\Model\Ruleset getRuleset($applicationId, $campaignId, $rulesetId) +> \TalonOne\Client\Model\InlineResponse2007 getRulesets($applicationId, $campaignId, $pageSize, $skip, $sort) -Get ruleset +List campaign rulesets -Retrieve the specified ruleset. +List all rulesets of this campaign. A ruleset is a revision of the rules of a campaign. **Important:** The response also includes deleted rules. You should only consider the latest revision of the returned rulesets. ### Example @@ -6519,13 +6607,15 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$rulesetId = 56; // int | The ID of the ruleset. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | The number of items to skip when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { - $result = $apiInstance->getRuleset($applicationId, $campaignId, $rulesetId); + $result = $apiInstance->getRulesets($applicationId, $campaignId, $pageSize, $skip, $sort); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getRuleset: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getRulesets: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -6537,11 +6627,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **rulesetId** | **int**| The ID of the ruleset. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\Ruleset**](../Model/Ruleset.md) +[**\TalonOne\Client\Model\InlineResponse2007**](../Model/InlineResponse2007.md) ### Authorization @@ -6557,13 +6649,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getRulesets +## getStore -> \TalonOne\Client\Model\InlineResponse2006 getRulesets($applicationId, $campaignId, $pageSize, $skip, $sort) +> \TalonOne\Client\Model\Store getStore($applicationId, $storeId) -List campaign rulesets +Get store -List all rulesets of this campaign. A ruleset is a revision of the rules of a campaign. **Important:** The response also includes deleted rules. You should only consider the latest revision of the returned rulesets. +Get store details for a specific store ID. ### Example @@ -6590,16 +6682,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$storeId = 'storeId_example'; // string | The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. try { - $result = $apiInstance->getRulesets($applicationId, $campaignId, $pageSize, $skip, $sort); + $result = $apiInstance->getStore($applicationId, $storeId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getRulesets: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getStore: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -6610,14 +6699,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **storeId** | **string**| The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. | ### Return type -[**\TalonOne\Client\Model\InlineResponse2006**](../Model/InlineResponse2006.md) +[**\TalonOne\Client\Model\Store**](../Model/Store.md) ### Authorization @@ -6703,7 +6789,7 @@ Name | Type | Description | Notes ## getUsers -> \TalonOne\Client\Model\InlineResponse20037 getUsers($pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20039 getUsers($pageSize, $skip, $sort) List users in account @@ -6734,7 +6820,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { @@ -6752,12 +6838,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20037**](../Model/InlineResponse20037.md) +[**\TalonOne\Client\Model\InlineResponse20039**](../Model/InlineResponse20039.md) ### Authorization @@ -6843,7 +6929,7 @@ Name | Type | Description | Notes ## getWebhookActivationLogs -> \TalonOne\Client\Model\InlineResponse20034 getWebhookActivationLogs($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter) +> \TalonOne\Client\Model\InlineResponse20036 getWebhookActivationLogs($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter) List webhook activation log entries @@ -6874,7 +6960,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $integrationRequestUuid = 'integrationRequestUuid_example'; // string | Filter results by integration request UUID. $webhookId = 3.4; // float | Filter results by Webhook. @@ -6898,7 +6984,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **integrationRequestUuid** | **string**| Filter results by integration request UUID. | [optional] **webhookId** | **float**| Filter results by Webhook. | [optional] @@ -6909,7 +6995,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20034**](../Model/InlineResponse20034.md) +[**\TalonOne\Client\Model\InlineResponse20036**](../Model/InlineResponse20036.md) ### Authorization @@ -6927,7 +7013,7 @@ Name | Type | Description | Notes ## getWebhookLogs -> \TalonOne\Client\Model\InlineResponse20035 getWebhookLogs($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter) +> \TalonOne\Client\Model\InlineResponse20037 getWebhookLogs($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter) List webhook log entries @@ -6958,7 +7044,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $status = 'status_example'; // string | Filter results by HTTP status codes. $webhookId = 3.4; // float | Filter results by Webhook. @@ -6983,7 +7069,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **status** | **string**| Filter results by HTTP status codes. | [optional] **webhookId** | **float**| Filter results by Webhook. | [optional] @@ -6995,7 +7081,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20035**](../Model/InlineResponse20035.md) +[**\TalonOne\Client\Model\InlineResponse20037**](../Model/InlineResponse20037.md) ### Authorization @@ -7013,7 +7099,7 @@ Name | Type | Description | Notes ## getWebhooks -> \TalonOne\Client\Model\InlineResponse20033 getWebhooks($applicationIds, $sort, $pageSize, $skip) +> \TalonOne\Client\Model\InlineResponse20035 getWebhooks($applicationIds, $sort, $pageSize, $skip, $creationType, $visibility, $outgoingIntegrationsTypeId, $title) List webhooks @@ -7043,16 +7129,382 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationIds = 'applicationIds_example'; // string | Filter by one or more application IDs separated by a comma. -$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. -$pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$applicationIds = 'applicationIds_example'; // string | Filter by one or more Application IDs, separated by a comma. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | The number of items to skip when paging through large result sets. +$creationType = 'creationType_example'; // string | Filter results by creation type. +$visibility = 'visibility_example'; // string | Filter results by visibility. +$outgoingIntegrationsTypeId = 56; // int | Filter results by outgoing integration type ID. +$title = 'title_example'; // string | Filter results performing case-insensitive matching against the webhook title. + +try { + $result = $apiInstance->getWebhooks($applicationIds, $sort, $pageSize, $skip, $creationType, $visibility, $outgoingIntegrationsTypeId, $title); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->getWebhooks: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationIds** | **string**| Filter by one or more Application IDs, separated by a comma. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] + **creationType** | **string**| Filter results by creation type. | [optional] + **visibility** | **string**| Filter results by visibility. | [optional] + **outgoingIntegrationsTypeId** | **int**| Filter results by outgoing integration type ID. | [optional] + **title** | **string**| Filter results performing case-insensitive matching against the webhook title. | [optional] + +### Return type + +[**\TalonOne\Client\Model\InlineResponse20035**](../Model/InlineResponse20035.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## importAccountCollection + +> \TalonOne\Client\Model\Import importAccountCollection($collectionId, $upFile) + +Import data into existing account-level collection + +Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. Example: ``` item Addidas Nike Asics ``` **Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. +$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. + +try { + $result = $apiInstance->importAccountCollection($collectionId, $upFile); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->importAccountCollection: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **int**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. | + **upFile** | **string**| The file with the information about the data that should be imported. | [optional] + +### Return type + +[**\TalonOne\Client\Model\Import**](../Model/Import.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## importAllowedList + +> \TalonOne\Client\Model\Import importAllowedList($attributeId, $upFile) + +Import allowed values for attribute + +Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item` (required): the values in your allowed list, for example a list of SKU's. An allowed list is limited to 500,000 items. Example: ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ``` + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$attributeId = 56; // int | The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. +$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. + +try { + $result = $apiInstance->importAllowedList($attributeId, $upFile); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->importAllowedList: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeId** | **int**| The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. | + **upFile** | **string**| The file with the information about the data that should be imported. | [optional] + +### Return type + +[**\TalonOne\Client\Model\Import**](../Model/Import.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## importCollection + +> \TalonOne\Client\Model\Import importCollection($applicationId, $campaignId, $collectionId, $upFile) + +Import data into existing campaign-level collection + +Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. Example: ``` item Addidas Nike Asics ``` **Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. +$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. + +try { + $result = $apiInstance->importCollection($applicationId, $campaignId, $collectionId, $upFile); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->importCollection: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. | + **upFile** | **string**| The file with the information about the data that should be imported. | [optional] + +### Return type + +[**\TalonOne\Client\Model\Import**](../Model/Import.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## importCoupons + +> \TalonOne\Client\Model\Import importCoupons($applicationId, $campaignId, $upFile) + +Import coupons + +Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. +$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. + +try { + $result = $apiInstance->importCoupons($applicationId, $campaignId, $upFile); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->importCoupons: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + **upFile** | **string**| The file with the information about the data that should be imported. | [optional] + +### Return type + +[**\TalonOne\Client\Model\Import**](../Model/Import.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## importLoyaltyCards + +> \TalonOne\Client\Model\Import importLoyaltyCards($loyaltyProgramId, $upFile) + +Import loyalty cards + +Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. try { - $result = $apiInstance->getWebhooks($applicationIds, $sort, $pageSize, $skip); + $result = $apiInstance->importLoyaltyCards($loyaltyProgramId, $upFile); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getWebhooks: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->importLoyaltyCards: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7062,14 +7514,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationIds** | **string**| Filter by one or more application IDs separated by a comma. | [optional] - **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] - **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **upFile** | **string**| The file with the information about the data that should be imported. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20033**](../Model/InlineResponse20033.md) +[**\TalonOne\Client\Model\Import**](../Model/Import.md) ### Authorization @@ -7077,7 +7527,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: multipart/form-data - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -7085,13 +7535,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## importAccountCollection +## importLoyaltyCustomersTiers -> \TalonOne\Client\Model\Import importAccountCollection($collectionId, $upFile) +> \TalonOne\Client\Model\Import importLoyaltyCustomersTiers($loyaltyProgramId, $upFile) -Import data in existing account-level collection +Import customers into loyalty tiers -Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. Example: ``` item Addidas Nike Asics ``` **Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection. +Upload a CSV file containing existing customers to be assigned to existing tiers. Send the file as multipart data. **Important:** This endpoint only works with loyalty programs with advanced tiers (with expiration and downgrade policy) feature enabled. The CSV file should contain the following columns: - `subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used. - `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned. - `tiername`: The name of an existing tier to assign to the customer. - `expirydate`: The expiration date of the tier. It should be a future date. About customer assignment to a tier: - If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import. - If the customer is already in a tier, the customer is assigned to match the new information provided in the CSV file. - If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv subledgerid,customerprofileid,tiername,expirydate SUB1,alexa,Gold,2024-03-21T07:32:14Z ,george,Silver,2025-04-16T21:12:37Z SUB2,avocado,Bronze,2026-05-03T11:47:01Z ``` ### Example @@ -7117,14 +7567,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. $upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. try { - $result = $apiInstance->importAccountCollection($collectionId, $upFile); + $result = $apiInstance->importLoyaltyCustomersTiers($loyaltyProgramId, $upFile); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->importAccountCollection: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->importLoyaltyCustomersTiers: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7134,7 +7584,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **upFile** | **string**| The file with the information about the data that should be imported. | [optional] ### Return type @@ -7155,13 +7605,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## importAllowedList +## importLoyaltyPoints -> \TalonOne\Client\Model\Import importAllowedList($attributeId, $upFile) +> \TalonOne\Client\Model\Import importLoyaltyPoints($loyaltyProgramId, $upFile) -Import allowed values for attribute +Import loyalty points -Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item` (required): the values in your allowed list, for example a list of SKU's. An allowed list is limited to 500,000 items. Example: ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ``` +Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the loyalty program type, you can import the points into a given customer profile or into a given _active_ loyalty card. The CSV file contains the following columns: - `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date. **Note**: It must be an RFC3339 timestamp string or string `immediate`. Empty or missing values are considered `immediate`. - `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date. **Note**: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** For existing customer profiles and loyalty cards, the imported points are added to any previous active or pending points, depending on the value provided for `startdate`. If `startdate` matches the current date, the imported points are _active_. If it is later, the points are _pending_ until the date provided for `startdate` is reached. **Note:** We recommend limiting your file size to 500MB. **Example for profile-based programs:** ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` **Example for card-based programs:** ```text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` ### Example @@ -7187,14 +7637,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$attributeId = 56; // int | The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. $upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. try { - $result = $apiInstance->importAllowedList($attributeId, $upFile); + $result = $apiInstance->importLoyaltyPoints($loyaltyProgramId, $upFile); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->importAllowedList: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->importLoyaltyPoints: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7204,7 +7654,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **attributeId** | **int**| The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. | + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **upFile** | **string**| The file with the information about the data that should be imported. | [optional] ### Return type @@ -7225,13 +7675,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## importCollection +## importPoolGiveaways -> \TalonOne\Client\Model\Import importCollection($applicationId, $campaignId, $collectionId, $upFile) +> \TalonOne\Client\Model\Import importPoolGiveaways($poolId, $upFile) -Import data in existing collection +Import giveaway codes into a giveaway pool -Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. Example: ``` item Addidas Nike Asics ``` **Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection. +Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains the following columns: - `code` (required): the code of your giveaway, for instance, a gift card redemption code. - `startdate`: the start date in RFC3339 of the code redemption period. - `enddate`: the last date in RFC3339 of the code redemption period. - `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"provider\": \"myPartnerCompany\"}\"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the time zone of your choice. The values are converted to UTC internally by Talon.One. **Note:** - We recommend limiting your file size to 500MB. - You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. **Example:** ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ``` ### Example @@ -7257,16 +7707,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$poolId = 56; // int | The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. $upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. try { - $result = $apiInstance->importCollection($applicationId, $campaignId, $collectionId, $upFile); + $result = $apiInstance->importPoolGiveaways($poolId, $upFile); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->importCollection: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->importPoolGiveaways: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7276,9 +7724,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **poolId** | **int**| The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. | **upFile** | **string**| The file with the information about the data that should be imported. | [optional] ### Return type @@ -7299,13 +7745,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## importCoupons +## importReferrals -> \TalonOne\Client\Model\Import importCoupons($applicationId, $campaignId, $upFile) +> \TalonOne\Client\Model\Import importReferrals($applicationId, $campaignId, $upFile) -Import coupons +Import referrals -Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A json object describing _custom_ referral attribute names and their values. Double the double-quotes in the object. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated to the coupon entity, set it with `\"{\"\"category\"\": \"\"10_off\"\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). +Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A JSON object describing _custom_ referral attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) endpoint to create the customer profiles. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` ### Example @@ -7336,10 +7782,10 @@ $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon $upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. try { - $result = $apiInstance->importCoupons($applicationId, $campaignId, $upFile); + $result = $apiInstance->importReferrals($applicationId, $campaignId, $upFile); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->importCoupons: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->importReferrals: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7371,13 +7817,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## importLoyaltyCards +## listAccountCollections -> \TalonOne\Client\Model\Import importLoyaltyCards($loyaltyProgramId, $upFile) +> \TalonOne\Client\Model\InlineResponse20016 listAccountCollections($pageSize, $skip, $sort, $withTotalResultSize, $name) -Import loyalty cards +List collections in account -Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` +List account-level collections in the account. ### Example @@ -7403,14 +7849,17 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. -$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | The number of items to skip when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. +$name = 'name_example'; // string | Filter by collection name. try { - $result = $apiInstance->importLoyaltyCards($loyaltyProgramId, $upFile); + $result = $apiInstance->listAccountCollections($pageSize, $skip, $sort, $withTotalResultSize, $name); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->importLoyaltyCards: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->listAccountCollections: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7420,12 +7869,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | - **upFile** | **string**| The file with the information about the data that should be imported. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **name** | **string**| Filter by collection name. | [optional] ### Return type -[**\TalonOne\Client\Model\Import**](../Model/Import.md) +[**\TalonOne\Client\Model\InlineResponse20016**](../Model/InlineResponse20016.md) ### Authorization @@ -7433,7 +7885,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: multipart/form-data +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -7441,13 +7893,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## importLoyaltyPoints +## listCatalogItems -> \TalonOne\Client\Model\Import importLoyaltyPoints($loyaltyProgramId, $upFile) +> \TalonOne\Client\Model\InlineResponse20033 listCatalogItems($catalogId, $pageSize, $skip, $withTotalResultSize, $sku) -Import loyalty points +List items in a catalog -Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the loyalty program type, you can import the points into a given customer profile or into a given _active_ loyalty card. The CSV file contains the following columns: - `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate`: The earliest date when the points can be redeemed. On this date and until the expiration date, the points are `active`. - `expirydate`: The latest date when the points can be redeemed. After this date, the points are `expired`. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** For existing customer profiles and loyalty cards, the imported points are added to any previous active or pending points, depending on the value provided for `startdate`. If `startdate` matches the current date, the imported points are _active_. If it is later, the points are _pending_ until the date provided for `startdate` is reached. **Note:** We recommend limiting your file size to 500MB. **Example for profile-based programs:** ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` **Example for card-based programs:** ```text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` +Return a paginated list of cart items in the given catalog. ### Example @@ -7473,14 +7925,17 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. -$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. +$catalogId = 56; // int | The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | The number of items to skip when paging through large result sets. +$withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. +$sku = 'sku_example'; // string | The SKU of the item. try { - $result = $apiInstance->importLoyaltyPoints($loyaltyProgramId, $upFile); + $result = $apiInstance->listCatalogItems($catalogId, $pageSize, $skip, $withTotalResultSize, $sku); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->importLoyaltyPoints: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->listCatalogItems: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7490,12 +7945,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | - **upFile** | **string**| The file with the information about the data that should be imported. | [optional] + **catalogId** | **int**| The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] + **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **sku** | **string**| The SKU of the item. | [optional] ### Return type -[**\TalonOne\Client\Model\Import**](../Model/Import.md) +[**\TalonOne\Client\Model\InlineResponse20033**](../Model/InlineResponse20033.md) ### Authorization @@ -7503,7 +7961,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: multipart/form-data +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -7511,13 +7969,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## importPoolGiveaways +## listCollections -> \TalonOne\Client\Model\Import importPoolGiveaways($poolId, $upFile) +> \TalonOne\Client\Model\InlineResponse20018 listCollections($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name) -Import giveaway codes into a giveaway pool +List collections in campaign -Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains the following columns: - `code` (required): the code of your giveaway, for instance, a gift card redemption code. - `startdate`: the start date in RFC3339 of the code redemption period. - `enddate`: the last date in RFC3339 of the code redemption period. - `attributes`: A json object describing _custom_ giveaway attribute names and their values. Double the double-quotes in the object. For example, if you [created a custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated to the giveaway entity, set it with `\"{\"\"provider\"\": \"\"myPartnerCompany\"\"}\"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ``` +List collections in a given campaign. ### Example @@ -7543,14 +8001,19 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$poolId = 56; // int | The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. -$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | The number of items to skip when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. +$name = 'name_example'; // string | Filter by collection name. try { - $result = $apiInstance->importPoolGiveaways($poolId, $upFile); + $result = $apiInstance->listCollections($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->importPoolGiveaways: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->listCollections: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7560,12 +8023,17 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **poolId** | **int**| The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. | - **upFile** | **string**| The file with the information about the data that should be imported. | [optional] + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **name** | **string**| Filter by collection name. | [optional] ### Return type -[**\TalonOne\Client\Model\Import**](../Model/Import.md) +[**\TalonOne\Client\Model\InlineResponse20018**](../Model/InlineResponse20018.md) ### Authorization @@ -7573,7 +8041,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: multipart/form-data +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -7581,13 +8049,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## importReferrals +## listCollectionsInApplication -> \TalonOne\Client\Model\Import importReferrals($applicationId, $campaignId, $upFile) +> \TalonOne\Client\Model\InlineResponse20018 listCollectionsInApplication($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name) -Import referrals +List collections in Application -Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A json object describing _custom_ referral attribute names and their values. Double the double-quotes in the object. For example, if you [created a custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated to the referral entity, set it with `\"{\"\"category\"\": \"\"10_off\"\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` +List campaign-level collections from all campaigns in a given Application. ### Example @@ -7614,14 +8082,17 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | The number of items to skip when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. +$name = 'name_example'; // string | Filter by collection name. try { - $result = $apiInstance->importReferrals($applicationId, $campaignId, $upFile); + $result = $apiInstance->listCollectionsInApplication($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->importReferrals: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->listCollectionsInApplication: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7632,12 +8103,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **upFile** | **string**| The file with the information about the data that should be imported. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **name** | **string**| Filter by collection name. | [optional] ### Return type -[**\TalonOne\Client\Model\Import**](../Model/Import.md) +[**\TalonOne\Client\Model\InlineResponse20018**](../Model/InlineResponse20018.md) ### Authorization @@ -7645,7 +8119,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: multipart/form-data +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -7653,13 +8127,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## listAccountCollections +## listStores -> \TalonOne\Client\Model\InlineResponse20015 listAccountCollections($pageSize, $skip, $sort, $withTotalResultSize, $name) +> \TalonOne\Client\Model\InlineResponse20043 listStores($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $campaignId, $name, $integrationId) -List collections in account +List stores -List collections in account. +List all stores for a specific Application. ### Example @@ -7685,17 +8159,20 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. -$name = 'name_example'; // string | Filter by the name of the Collection. +$campaignId = 3.4; // float | Filter results by campaign. +$name = 'name_example'; // string | The name of the store. +$integrationId = 'integrationId_example'; // string | The integration ID of the store. try { - $result = $apiInstance->listAccountCollections($pageSize, $skip, $sort, $withTotalResultSize, $name); + $result = $apiInstance->listStores($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $campaignId, $name, $integrationId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->listAccountCollections: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->listStores: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7705,15 +8182,18 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] - **name** | **string**| Filter by the name of the Collection. | [optional] + **campaignId** | **float**| Filter results by campaign. | [optional] + **name** | **string**| The name of the store. | [optional] + **integrationId** | **string**| The integration ID of the store. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20015**](../Model/InlineResponse20015.md) +[**\TalonOne\Client\Model\InlineResponse20043**](../Model/InlineResponse20043.md) ### Authorization @@ -7729,13 +8209,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## listCollections +## notificationActivation -> \TalonOne\Client\Model\InlineResponse20017 listCollections($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name) +> notificationActivation($notificationId, $body) -List collections +Activate or deactivate notification -List collections in the campaign. +Activate or deactivate the given notification. When `enabled` is false, updates will no longer be sent for the given notification. ### Example @@ -7761,19 +8241,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. -$withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. -$name = 'name_example'; // string | Filter by the name of the Collection. +$notificationId = 56; // int | The ID of the notification. Get it with the appropriate _List notifications_ endpoint. +$body = new \TalonOne\Client\Model\NotificationActivation(); // \TalonOne\Client\Model\NotificationActivation | body try { - $result = $apiInstance->listCollections($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); - print_r($result); + $apiInstance->notificationActivation($notificationId, $body); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->listCollections: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->notificationActivation: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7783,17 +8257,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] - **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] - **name** | **string**| Filter by the name of the Collection. | [optional] + **notificationId** | **int**| The ID of the notification. Get it with the appropriate _List notifications_ endpoint. | + **body** | [**\TalonOne\Client\Model\NotificationActivation**](../Model/NotificationActivation.md)| body | ### Return type -[**\TalonOne\Client\Model\InlineResponse20017**](../Model/InlineResponse20017.md) +void (empty response body) ### Authorization @@ -7801,21 +8270,21 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -## listCollectionsInApplication +## postAddedDeductedPointsNotification -> \TalonOne\Client\Model\InlineResponse20017 listCollectionsInApplication($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name) +> \TalonOne\Client\Model\BaseNotification postAddedDeductedPointsNotification($loyaltyProgramId, $body) -List collections in application +Create notification about added or deducted loyalty points -List collections from all campaigns in the Application. +Create a notification about added or deducted loyalty points in a given profile-based loyalty program. A notification for added or deducted loyalty points is different from regular webhooks in that it is loyalty program-scoped and has a predefined payload. For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-loyalty-notifications). ### Example @@ -7841,18 +8310,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. -$withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. -$name = 'name_example'; // string | Filter by the name of the Collection. +$loyaltyProgramId = 56; // int | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$body = new \TalonOne\Client\Model\NewBaseNotification(); // \TalonOne\Client\Model\NewBaseNotification | body try { - $result = $apiInstance->listCollectionsInApplication($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + $result = $apiInstance->postAddedDeductedPointsNotification($loyaltyProgramId, $body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->listCollectionsInApplication: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->postAddedDeductedPointsNotification: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7862,16 +8327,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] - **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] - **name** | **string**| Filter by the name of the Collection. | [optional] + **loyaltyProgramId** | **int**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **body** | [**\TalonOne\Client\Model\NewBaseNotification**](../Model/NewBaseNotification.md)| body | ### Return type -[**\TalonOne\Client\Model\InlineResponse20017**](../Model/InlineResponse20017.md) +[**\TalonOne\Client\Model\BaseNotification**](../Model/BaseNotification.md) ### Authorization @@ -7879,7 +8340,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -7887,13 +8348,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## postAddedDeductedPointsNotification +## postCatalogsStrikethroughNotification -> \TalonOne\Client\Model\BaseNotification postAddedDeductedPointsNotification($loyaltyProgramId, $body) +> \TalonOne\Client\Model\BaseNotification postCatalogsStrikethroughNotification($applicationId, $body) -Create notification about added or deducted loyalty points +Create strikethrough notification -Create a notification about added or deducted loyalty points in a given profile-based loyalty program. A notification for added or deducted loyalty points is different from regular webhooks in that it is loyalty program-scoped and has a predefined payload. For more information, see [Managing notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-notifications). +Create a notification for the in the given Application. For more information, see [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications). See the [payload](https://docs.talon.one/outbound-notifications) you will receive. ### Example @@ -7919,14 +8380,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $body = new \TalonOne\Client\Model\NewBaseNotification(); // \TalonOne\Client\Model\NewBaseNotification | body try { - $result = $apiInstance->postAddedDeductedPointsNotification($loyaltyProgramId, $body); + $result = $apiInstance->postCatalogsStrikethroughNotification($applicationId, $body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->postAddedDeductedPointsNotification: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->postCatalogsStrikethroughNotification: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -7936,7 +8397,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **body** | [**\TalonOne\Client\Model\NewBaseNotification**](../Model/NewBaseNotification.md)| body | ### Return type @@ -7957,13 +8418,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## postCatalogsStrikethroughNotification +## postPendingPointsNotification -> \TalonOne\Client\Model\BaseNotification postCatalogsStrikethroughNotification($applicationId, $body) +> \TalonOne\Client\Model\BaseNotification postPendingPointsNotification($loyaltyProgramId, $body) -Create strikethrough notification +Create notification about pending loyalty points -Create a notification for the in the given Application. For more information, see [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications). See the [payload](https://docs.talon.one/outbound-notifications) you will receive. +Create a notification about pending loyalty points for a given profile-based loyalty program. For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-loyalty-notifications). ### Example @@ -7989,14 +8450,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$loyaltyProgramId = 56; // int | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. $body = new \TalonOne\Client\Model\NewBaseNotification(); // \TalonOne\Client\Model\NewBaseNotification | body try { - $result = $apiInstance->postCatalogsStrikethroughNotification($applicationId, $body); + $result = $apiInstance->postPendingPointsNotification($loyaltyProgramId, $body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->postCatalogsStrikethroughNotification: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->postPendingPointsNotification: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -8006,7 +8467,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **loyaltyProgramId** | **int**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **body** | [**\TalonOne\Client\Model\NewBaseNotification**](../Model/NewBaseNotification.md)| body | ### Return type @@ -8033,7 +8494,7 @@ Name | Type | Description | Notes Deduct points from customer profile -Deduct points from the specified loyalty program and specified customer profile. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. +Deduct points from the specified loyalty program and specified customer profile. **Important:** - Only active points can be deducted. - Only pending points are rolled back when a session is cancelled or reopened. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. ### Example @@ -8168,11 +8629,11 @@ Name | Type | Description | Notes ## searchCouponsAdvancedApplicationWideWithoutTotalCount -> \TalonOne\Client\Model\InlineResponse2008 searchCouponsAdvancedApplicationWideWithoutTotalCount($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState) +> \TalonOne\Client\Model\InlineResponse2009 searchCouponsAdvancedApplicationWideWithoutTotalCount($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState) List coupons that match the given attributes (without total count) -List the coupons whose attributes match the query criteria in all **active** campaigns of the given Application. The match is successful if all the attributes of the request are found in a coupon, even if the coupon has more attributes that are not present on the request. **Note:** The total count is not included in the response. +List the coupons whose attributes match the query criteria in all the campaigns of the given Application. The match is successful if all the attributes of the request are found in a coupon, even if the coupon has more attributes that are not present on the request. **Note:** The total count is not included in the response. ### Example @@ -8201,7 +8662,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $body = new \stdClass; // object | body $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $value = 'value_example'; // string | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. $createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @@ -8231,7 +8692,7 @@ Name | Type | Description | Notes **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **body** | **object**| body | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **value** | **string**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. | [optional] **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] @@ -8246,7 +8707,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse2008**](../Model/InlineResponse2008.md) +[**\TalonOne\Client\Model\InlineResponse2009**](../Model/InlineResponse2009.md) ### Authorization @@ -8264,7 +8725,7 @@ Name | Type | Description | Notes ## searchCouponsAdvancedWithoutTotalCount -> \TalonOne\Client\Model\InlineResponse2008 searchCouponsAdvancedWithoutTotalCount($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId) +> \TalonOne\Client\Model\InlineResponse2009 searchCouponsAdvancedWithoutTotalCount($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId) List coupons that match the given attributes in campaign (without total count) @@ -8298,7 +8759,7 @@ $applicationId = 56; // int | The ID of the Application. It is displayed in your $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. $body = new \stdClass; // object | body $pageSize = 1000; // int | The number of items in this response. -$skip = 56; // int | Skips the given number of items when paging through large result sets. +$skip = 56; // int | The number of items to skip when paging through large result sets. $sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $value = 'value_example'; // string | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. $createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. @@ -8328,7 +8789,7 @@ Name | Type | Description | Notes **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | **body** | **object**| body | **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **skip** | **int**| The number of items to skip when paging through large result sets. | [optional] **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **value** | **string**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. | [optional] **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] @@ -8342,7 +8803,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse2008**](../Model/InlineResponse2008.md) +[**\TalonOne\Client\Model\InlineResponse2009**](../Model/InlineResponse2009.md) ### Authorization @@ -8435,7 +8896,7 @@ void (empty response body) Update account-level collection -Edit the description of the account-level collection and enable or disable the collection in the specified Applications. +Edit the description of a given account-level collection and enable or disable the collection in the specified Applications. ### Example @@ -8461,7 +8922,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. $body = new \TalonOne\Client\Model\UpdateCollection(); // \TalonOne\Client\Model\UpdateCollection | body try { @@ -8478,7 +8939,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. | **body** | [**\TalonOne\Client\Model\UpdateCollection**](../Model/UpdateCollection.md)| body | ### Return type @@ -8505,7 +8966,7 @@ Name | Type | Description | Notes Update additional cost -Updates an existing additional cost. Once created, the only property of an additional cost that can be changed is the title (human readable description). This restriction is in place to prevent accidentally breaking live integrations. +Updates an existing additional cost. Once created, the only property of an additional cost that cannot be changed is the `name` property (or **API name** in the Campaign Manager). This restriction is in place to prevent accidentally breaking live integrations. ### Example @@ -8715,9 +9176,9 @@ Name | Type | Description | Notes > \TalonOne\Client\Model\Collection updateCollection($applicationId, $campaignId, $collectionId, $body) -Update collection description +Update campaign-level collection's description -Edit the description of the collection. +Edit the description of a given campaign-level collection. ### Example @@ -8745,7 +9206,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. $body = new \TalonOne\Client\Model\UpdateCampaignCollection(); // \TalonOne\Client\Model\UpdateCampaignCollection | body try { @@ -8764,7 +9225,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. | **body** | [**\TalonOne\Client\Model\UpdateCampaignCollection**](../Model/UpdateCampaignCollection.md)| body | ### Return type @@ -8865,7 +9326,7 @@ Name | Type | Description | Notes Update coupons -Update all coupons, or a specific batch of coupons, in a campaign. You can find the `batchId` in the **Coupons** view of your Application in the Campaign Manager, or you can use [List coupons](#operation/getCouponsWithoutTotalCount).

Important

To update a specific coupon, use [Update coupon](#operation/updateCoupon). +Update all coupons, or a specific batch of coupons in the given campaign. You can find the `batchId` in the **Coupons** view of your Application in the Campaign Manager, or you can use [List coupons](#operation/getCouponsWithoutTotalCount).

Important

To update a specific coupon, use [Update coupon](#operation/updateCoupon). ### Example @@ -9002,13 +9463,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## updateNotificationWebhook +## updateReferral -> \TalonOne\Client\Model\NotificationWebhook updateNotificationWebhook($applicationId, $notificationWebhookId, $body) +> \TalonOne\Client\Model\Referral updateReferral($applicationId, $campaignId, $referralId, $body) -Update notification about campaign-related changes +Update referral -Update the given [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). **Tip:** You can review the payload you will receive in the [specs](https://docs.talon.one/outbound-notifications#/paths/campaign_edited/post). +Update the specified referral. ### Example @@ -9035,14 +9496,15 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$notificationWebhookId = 56; // int | The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. -$body = new \TalonOne\Client\Model\NewNotificationWebhook(); // \TalonOne\Client\Model\NewNotificationWebhook | body +$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. +$referralId = 'referralId_example'; // string | The ID of the referral code. +$body = new \TalonOne\Client\Model\UpdateReferral(); // \TalonOne\Client\Model\UpdateReferral | body try { - $result = $apiInstance->updateNotificationWebhook($applicationId, $notificationWebhookId, $body); + $result = $apiInstance->updateReferral($applicationId, $campaignId, $referralId, $body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->updateNotificationWebhook: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->updateReferral: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -9053,12 +9515,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **notificationWebhookId** | **int**| The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. | - **body** | [**\TalonOne\Client\Model\NewNotificationWebhook**](../Model/NewNotificationWebhook.md)| body | + **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + **referralId** | **string**| The ID of the referral code. | + **body** | [**\TalonOne\Client\Model\UpdateReferral**](../Model/UpdateReferral.md)| body | ### Return type -[**\TalonOne\Client\Model\NotificationWebhook**](../Model/NotificationWebhook.md) +[**\TalonOne\Client\Model\Referral**](../Model/Referral.md) ### Authorization @@ -9074,13 +9537,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## updateReferral +## updateStore -> \TalonOne\Client\Model\Referral updateReferral($applicationId, $campaignId, $referralId, $body) +> \TalonOne\Client\Model\Store updateStore($applicationId, $storeId, $body) -Update referral +Update store -Update the specified referral. +Update store details for a specific store ID. ### Example @@ -9107,15 +9570,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$referralId = 'referralId_example'; // string | The ID of the referral code. -$body = new \TalonOne\Client\Model\UpdateReferral(); // \TalonOne\Client\Model\UpdateReferral | body +$storeId = 'storeId_example'; // string | The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. +$body = new \TalonOne\Client\Model\NewStore(); // \TalonOne\Client\Model\NewStore | body try { - $result = $apiInstance->updateReferral($applicationId, $campaignId, $referralId, $body); + $result = $apiInstance->updateStore($applicationId, $storeId, $body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->updateReferral: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->updateStore: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -9126,13 +9588,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **referralId** | **string**| The ID of the referral code. | - **body** | [**\TalonOne\Client\Model\UpdateReferral**](../Model/UpdateReferral.md)| body | + **storeId** | **string**| The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. | + **body** | [**\TalonOne\Client\Model\NewStore**](../Model/NewStore.md)| body | ### Return type -[**\TalonOne\Client\Model\Referral**](../Model/Referral.md) +[**\TalonOne\Client\Model\Store**](../Model/Store.md) ### Authorization diff --git a/docs/Model/AccountAnalytics.md b/docs/Model/AccountAnalytics.md index ae1ecf0c..86a41677 100644 --- a/docs/Model/AccountAnalytics.md +++ b/docs/Model/AccountAnalytics.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **webhooks** | **int** | Total number of webhooks in the account. | **loyaltyPrograms** | **int** | Total number of all loyalty programs in the account. | **liveLoyaltyPrograms** | **int** | Total number of live loyalty programs in the account. | +**lastUpdatedAt** | [**\DateTime**](\DateTime.md) | The point in time when the analytics numbers were updated last. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AccountDashboardStatisticCampaigns.md b/docs/Model/AccountDashboardStatisticCampaigns.md index 24a993d6..4690bd50 100644 --- a/docs/Model/AccountDashboardStatisticCampaigns.md +++ b/docs/Model/AccountDashboardStatisticCampaigns.md @@ -5,7 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **live** | **int** | Number of campaigns that are active and live (across all Applications). | -**endingSoon** | **int** | Campaigns with a schedule ending in 7 days or with only 10% of budget left. | +**endingSoon** | **int** | Campaigns scheduled to expire sometime in the next 7 days. | +**lowOnBudget** | **int** | Campaigns with less than 10% of budget left. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AddLoyaltyPoints.md b/docs/Model/AddLoyaltyPoints.md index b482898e..561b0434 100644 --- a/docs/Model/AddLoyaltyPoints.md +++ b/docs/Model/AddLoyaltyPoints.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **points** | **float** | Amount of loyalty points. | **name** | **string** | Name / reason for the point addition. | [optional] -**validityDuration** | **string** | The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks and months. Signifies the end of the day, week, or month. If passed, `validUntil` should be omitted. | [optional] +**validityDuration** | **string** | The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. If passed, `validUntil` should be omitted. | [optional] **validUntil** | [**\DateTime**](\DateTime.md) | Date and time when points should expire. The value should be provided in RFC 3339 format. If passed, `validityDuration` should be omitted. | [optional] -**pendingDuration** | **string** | The amount of time before the points are considered valid. The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks and months. Signifies the end of the day, week, or month. | [optional] +**pendingDuration** | **string** | The amount of time before the points are considered valid. The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] **pendingUntil** | [**\DateTime**](\DateTime.md) | Date and time after the points are considered valid. The value should be provided in RFC 3339 format. If passed, `pendingDuration` should be omitted. | [optional] **subledgerId** | **string** | ID of the subledger the points are added to. If there is no existing subledger with this ID, the subledger is created automatically. | [optional] **applicationId** | **int** | ID of the Application that is connected to the loyalty program. It is displayed in your Talon.One deployment URL. | [optional] diff --git a/docs/Model/AddLoyaltyPointsEffectProps.md b/docs/Model/AddLoyaltyPointsEffectProps.md index fc4f50dd..217b26ed 100644 --- a/docs/Model/AddLoyaltyPointsEffectProps.md +++ b/docs/Model/AddLoyaltyPointsEffectProps.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **expiryDate** | [**\DateTime**](\DateTime.md) | Date after which points will expire. | [optional] **transactionUUID** | **string** | The identifier of this addition in the loyalty ledger. | **cartItemPosition** | **float** | The index of the item in the cart items list on which the loyal points addition should be applied. | [optional] -**cartItemSubPosition** | **float** | The sub position is triggered when application flattening is enabled. It indicates to which item the loyalty points addition applies, for cart items with `quantity` > 1. | [optional] +**cartItemSubPosition** | **float** | For cart items with `quantity` > 1, the sub position indicates to which item the loyalty points addition is applied. | [optional] **cardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | [optional] **bundleIndex** | **int** | The position of the bundle in a list of item bundles created from the same bundle definition. | [optional] **bundleName** | **string** | The name of the bundle definition. | [optional] diff --git a/docs/Model/AddToAudienceEffectProps.md b/docs/Model/AddToAudienceEffectProps.md new file mode 100644 index 00000000..9c1fd945 --- /dev/null +++ b/docs/Model/AddToAudienceEffectProps.md @@ -0,0 +1,14 @@ +# # AddToAudienceEffectProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audienceId** | **int** | The internal ID of the audience. | [optional] +**audienceName** | **string** | The name of the audience. | [optional] +**profileIntegrationId** | **string** | The ID of the customer profile in the third-party integration platform. | [optional] +**profileId** | **int** | The internal ID of the customer profile. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/AdditionalCampaignProperties.md b/docs/Model/AdditionalCampaignProperties.md new file mode 100644 index 00000000..3b6dcb47 --- /dev/null +++ b/docs/Model/AdditionalCampaignProperties.md @@ -0,0 +1,31 @@ +# # AdditionalCampaignProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**budgets** | [**\TalonOne\Client\Model\CampaignBudget[]**](CampaignBudget.md) | A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. | +**couponRedemptionCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign. | [optional] +**referralRedemptionCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign. | [optional] +**discountCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign. | [optional] +**discountEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of times discounts were redeemed in this campaign. | [optional] +**couponCreationCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of coupons created by rules in this campaign. | [optional] +**customEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of custom effects triggered by rules in this campaign. | [optional] +**referralCreationCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of referrals created by rules in this campaign. | [optional] +**addFreeItemEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign. | [optional] +**awardedGiveawaysCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of giveaways awarded by rules in this campaign. | [optional] +**createdLoyaltyPointsCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points created by rules in this campaign. | [optional] +**createdLoyaltyPointsEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point creation effects triggered by rules in this campaign. | [optional] +**redeemedLoyaltyPointsCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points redeemed by rules in this campaign. | [optional] +**redeemedLoyaltyPointsEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point redemption effects triggered by rules in this campaign. | [optional] +**callApiEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of webhooks triggered by rules in this campaign. | [optional] +**reservecouponEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of reserve coupon effects triggered by rules in this campaign. | [optional] +**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received by this campaign. | [optional] +**updated** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent update to the campaign's property. Updates to external entities used in this campaign are **not** registered by this property, such as collection or coupon updates. | [optional] +**createdBy** | **string** | Name of the user who created this campaign if available. | [optional] +**updatedBy** | **string** | Name of the user who last updated this campaign if available. | [optional] +**templateId** | **int** | The ID of the Campaign Template this Campaign was created from. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/Application.md b/docs/Model/Application.md index a7074249..85bc8215 100644 --- a/docs/Model/Application.md +++ b/docs/Model/Application.md @@ -15,15 +15,14 @@ Name | Type | Description | Notes **caseSensitivity** | **string** | The case sensitivity behavior to check coupon codes in the campaigns of this Application. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Default limits for campaigns created in this application. | [optional] -**campaignPriority** | **string** | Default [priority](https://docs.talon.one/docs/product/applications/setting-up-campaign-priorities) for campaigns created in this Application. | [optional] [default to 'universal'] -**exclusiveCampaignsStrategy** | **string** | The strategy used when choosing exclusive campaigns for evaluation. | [optional] [default to 'listOrder'] **defaultDiscountScope** | **string** | The default scope to apply `setDiscount` effects on if no scope was provided with the effect. | [optional] **enableCascadingDiscounts** | **bool** | Indicates if discounts should cascade for this Application. | [optional] -**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). | [optional] +**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. | [optional] **attributesSettings** | [**\TalonOne\Client\Model\AttributesSettings**](AttributesSettings.md) | | [optional] **sandbox** | **bool** | Indicates if this is a live or sandbox Application. | [optional] **enablePartialDiscounts** | **bool** | Indicates if this Application supports partial discounts. | [optional] **defaultDiscountAdditionalCostPerItemScope** | **string** | The default scope to apply `setDiscountPerItem` effects on if no scope was provided with the effect. | [optional] +**defaultEvaluationGroupId** | **int** | The ID of the default campaign evaluation group to which new campaigns will be added unless a different group is selected when creating the campaign. | [optional] **loyaltyPrograms** | [**\TalonOne\Client\Model\LoyaltyProgram[]**](LoyaltyProgram.md) | An array containing all the loyalty programs to which this application is subscribed. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApplicationCustomer.md b/docs/Model/ApplicationCustomer.md index 889f9e4f..b62fd66b 100644 --- a/docs/Model/ApplicationCustomer.md +++ b/docs/Model/ApplicationCustomer.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **totalSales** | **float** | The total amount of money spent by the customer **before** discounts are applied. The total sales amount excludes the following: - Cancelled or reopened sessions. - Returned items. | **loyaltyMemberships** | [**\TalonOne\Client\Model\LoyaltyMembership[]**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional] **audienceMemberships** | [**\TalonOne\Client\Model\AudienceMembership[]**](AudienceMembership.md) | The audiences the customer belongs to. | [optional] -**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. | +**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the Rule Engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. | **sandbox** | **bool** | Shows whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). | [optional] **advocateIntegrationId** | **string** | The Integration ID of the Customer Profile that referred this Customer in the Application. | [optional] diff --git a/docs/Model/ApplicationEvent.md b/docs/Model/ApplicationEvent.md index eebec9fe..557e2278 100644 --- a/docs/Model/ApplicationEvent.md +++ b/docs/Model/ApplicationEvent.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | **profileId** | **int** | The globally unique Talon.One ID of the customer that created this entity. | [optional] +**storeId** | **int** | The ID of the store. | [optional] +**storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | [optional] **sessionId** | **int** | The globally unique Talon.One ID of the session that contains this event. | [optional] **type** | **string** | A string representing the event. Must not be a reserved event name. | **attributes** | [**object**](.md) | Additional JSON serialized data associated with the event. | diff --git a/docs/Model/ApplicationNotification.md b/docs/Model/ApplicationNotification.md index 04996e31..9827d026 100644 --- a/docs/Model/ApplicationNotification.md +++ b/docs/Model/ApplicationNotification.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event** | **string** | Event type. It can be one of the following: ['campaign_priorities_changed'] | +**event** | **string** | Event type. It can be one of the following: ['campaign_evaluation_tree_changed'] | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApplicationSession.md b/docs/Model/ApplicationSession.md index bf72efad..e3b98789 100644 --- a/docs/Model/ApplicationSession.md +++ b/docs/Model/ApplicationSession.md @@ -6,13 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Internal ID of this entity. | **created** | [**\DateTime**](\DateTime.md) | The time this entity was created. The time this entity was created. | +**integrationId** | **string** | The integration ID set by your integration layer. | +**storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | [optional] **applicationId** | **int** | The ID of the application that owns this entity. | **profileId** | **int** | The globally unique Talon.One ID of the customer that created this entity. | [optional] -**integrationId** | **string** | The integration ID set by your integration layer. | **profileintegrationid** | **string** | Integration ID of the customer for the session. | [optional] **coupon** | **string** | Any coupon code entered. | **referral** | **string** | Any referral code entered. | -**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). | +**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). | **cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | Serialized JSON representation. | **discounts** | **map[string,float]** | **API V1 only.** A map of labeled discount values, in the same currency as the session. If you are using the V2 endpoints, refer to the `totalDiscounts` property instead. | **totalDiscounts** | **float** | The total sum of the discounts applied to this session. | diff --git a/docs/Model/ApplicationStoreEntity.md b/docs/Model/ApplicationStoreEntity.md new file mode 100644 index 00000000..4ad84a06 --- /dev/null +++ b/docs/Model/ApplicationStoreEntity.md @@ -0,0 +1,11 @@ +# # ApplicationStoreEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**storeId** | **int** | The ID of the store. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/AudienceCustomer.md b/docs/Model/AudienceCustomer.md index e6134238..90e52d54 100644 --- a/docs/Model/AudienceCustomer.md +++ b/docs/Model/AudienceCustomer.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **totalSales** | **float** | The total amount of money spent by the customer **before** discounts are applied. The total sales amount excludes the following: - Cancelled or reopened sessions. - Returned items. | **loyaltyMemberships** | [**\TalonOne\Client\Model\LoyaltyMembership[]**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional] **audienceMemberships** | [**\TalonOne\Client\Model\AudienceMembership[]**](AudienceMembership.md) | The audiences the customer belongs to. | [optional] -**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. | +**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the Rule Engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. | **sandbox** | **bool** | Shows whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). | [optional] **connectedApplicationsIds** | **int[]** | A list of the IDs of the Applications that are connected to this customer profile. | [optional] **connectedAudiences** | **int[]** | A list of the IDs of the audiences that are connected to this customer profile. | [optional] diff --git a/docs/Model/BaseCampaign.md b/docs/Model/BaseCampaign.md new file mode 100644 index 00000000..ed364eb3 --- /dev/null +++ b/docs/Model/BaseCampaign.md @@ -0,0 +1,26 @@ +# # BaseCampaign + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | A user-facing name for this campaign. | +**description** | **string** | A detailed description of the campaign. | [optional] +**startTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become active. | [optional] +**endTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become inactive. | [optional] +**attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] +**state** | **string** | A disabled or archived campaign is not evaluated for rules or coupons. | [default to 'enabled'] +**activeRulesetId** | **int** | [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] +**tags** | **string[]** | A list of tags for the campaign. | +**features** | **string[]** | The features enabled in this campaign. | +**couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. | +**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] +**evaluationGroupId** | **int** | The ID of the campaign evaluation group the campaign belongs to. | [optional] +**type** | **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [optional] [default to 'advanced'] +**linkedStoreIds** | **int[]** | A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/BaseCampaignForNotification.md b/docs/Model/BaseCampaignForNotification.md new file mode 100644 index 00000000..6ef55f29 --- /dev/null +++ b/docs/Model/BaseCampaignForNotification.md @@ -0,0 +1,26 @@ +# # BaseCampaignForNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | A user-facing name for this campaign. | +**description** | **string** | A detailed description of the campaign. | [optional] +**startTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become active. | [optional] +**endTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become inactive. | [optional] +**attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] +**state** | **string** | A disabled or archived campaign is not evaluated for rules or coupons. | [default to 'enabled'] +**activeRulesetId** | **int** | [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] +**tags** | **string[]** | A list of tags for the campaign. | +**features** | **string[]** | The features enabled in this campaign. | +**couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. | +**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] +**evaluationGroupId** | **int** | The ID of the campaign evaluation group the campaign belongs to. | [optional] +**type** | **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [optional] [default to 'advanced'] +**linkedStoreIds** | **int[]** | A list of store IDs that are linked to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/BaseLoyaltyProgram.md b/docs/Model/BaseLoyaltyProgram.md index 574abf65..5b5e497b 100644 --- a/docs/Model/BaseLoyaltyProgram.md +++ b/docs/Model/BaseLoyaltyProgram.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **allowSubledger** | **bool** | Indicates if this program supports subledgers inside the program. | [optional] **usersPerCardLimit** | **int** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] **sandbox** | **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | [optional] +**tiersExpireIn** | **string** | The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] +**tiersDowngradePolicy** | **string** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BaseNotification.md b/docs/Model/BaseNotification.md index ce1b9bb1..50fbe2a0 100644 --- a/docs/Model/BaseNotification.md +++ b/docs/Model/BaseNotification.md @@ -5,8 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **policy** | [**object**](.md) | | +**enabled** | **bool** | Indicates whether the notification is activated. | [optional] [default to true] **webhook** | [**\TalonOne\Client\Model\BaseNotificationWebhook**](BaseNotificationWebhook.md) | | **id** | **int** | Unique ID for this entity. | +**type** | **string** | The notification type. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BaseNotificationEntity.md b/docs/Model/BaseNotificationEntity.md index 1bc4cb9d..83f5014c 100644 --- a/docs/Model/BaseNotificationEntity.md +++ b/docs/Model/BaseNotificationEntity.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **policy** | [**object**](.md) | | +**enabled** | **bool** | Indicates whether the notification is activated. | [optional] [default to true] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BaseNotificationWebhook.md b/docs/Model/BaseNotificationWebhook.md index cd162a0c..9d5b3143 100644 --- a/docs/Model/BaseNotificationWebhook.md +++ b/docs/Model/BaseNotificationWebhook.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **url** | **string** | API URL for the given webhook-based notification. | **headers** | **string[]** | List of API HTTP headers for the given webhook-based notification. | +**enabled** | **bool** | Indicates whether the notification is activated. | [optional] [default to true] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BulkOperationOnCampaigns.md b/docs/Model/BulkOperationOnCampaigns.md new file mode 100644 index 00000000..04994148 --- /dev/null +++ b/docs/Model/BulkOperationOnCampaigns.md @@ -0,0 +1,12 @@ +# # BulkOperationOnCampaigns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operation** | **string** | The operation to perform on the specified campaign IDs. | +**campaignIds** | **int[]** | The list of campaign IDs on which the operation will be performed. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/Campaign.md b/docs/Model/Campaign.md index 720b2ffa..16a9c86e 100644 --- a/docs/Model/Campaign.md +++ b/docs/Model/Campaign.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **name** | **string** | A user-facing name for this campaign. | **description** | **string** | A detailed description of the campaign. | **startTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become active. | [optional] -**endTime** | [**\DateTime**](\DateTime.md) | Timestamp the campaign will become inactive. | [optional] +**endTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become inactive. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] **state** | **string** | A disabled or archived campaign is not evaluated for rules or coupons. | [default to 'enabled'] **activeRulesetId** | **int** | [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] @@ -21,21 +21,25 @@ Name | Type | Description | Notes **referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. | **campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] -**couponRedemptionCount** | **int** | Number of coupons redeemed in the campaign. | [optional] -**referralRedemptionCount** | **int** | Number of referral codes redeemed in the campaign. | [optional] -**discountCount** | **float** | Total amount of discounts redeemed in the campaign. | [optional] -**discountEffectCount** | **int** | Total number of times discounts were redeemed in this campaign. | [optional] -**couponCreationCount** | **int** | Total number of coupons created by rules in this campaign. | [optional] -**customEffectCount** | **int** | Total number of custom effects triggered by rules in this campaign. | [optional] -**referralCreationCount** | **int** | Total number of referrals created by rules in this campaign. | [optional] -**addFreeItemEffectCount** | **int** | Total number of times triggering add free item effext is allowed in this campaign. | [optional] -**awardedGiveawaysCount** | **int** | Total number of giveaways awarded by rules in this campaign. | [optional] -**createdLoyaltyPointsCount** | **float** | Total number of loyalty points created by rules in this campaign. | [optional] -**createdLoyaltyPointsEffectCount** | **int** | Total number of loyalty point creation effects triggered by rules in this campaign. | [optional] -**redeemedLoyaltyPointsCount** | **float** | Total number of loyalty points redeemed by rules in this campaign. | [optional] -**redeemedLoyaltyPointsEffectCount** | **int** | Total number of loyalty point redemption effects triggered by rules in this campaign. | [optional] -**callApiEffectCount** | **int** | Total number of webhook triggered by rules in this campaign. | [optional] -**reservecouponEffectCount** | **int** | Total number of reserve coupon effects triggered by rules in this campaign. | [optional] +**evaluationGroupId** | **int** | The ID of the campaign evaluation group the campaign belongs to. | [optional] +**type** | **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [default to 'advanced'] +**linkedStoreIds** | **int[]** | A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] +**budgets** | [**\TalonOne\Client\Model\CampaignBudget[]**](CampaignBudget.md) | A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. | +**couponRedemptionCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign. | [optional] +**referralRedemptionCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign. | [optional] +**discountCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign. | [optional] +**discountEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of times discounts were redeemed in this campaign. | [optional] +**couponCreationCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of coupons created by rules in this campaign. | [optional] +**customEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of custom effects triggered by rules in this campaign. | [optional] +**referralCreationCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of referrals created by rules in this campaign. | [optional] +**addFreeItemEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign. | [optional] +**awardedGiveawaysCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of giveaways awarded by rules in this campaign. | [optional] +**createdLoyaltyPointsCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points created by rules in this campaign. | [optional] +**createdLoyaltyPointsEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point creation effects triggered by rules in this campaign. | [optional] +**redeemedLoyaltyPointsCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points redeemed by rules in this campaign. | [optional] +**redeemedLoyaltyPointsEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point redemption effects triggered by rules in this campaign. | [optional] +**callApiEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of webhooks triggered by rules in this campaign. | [optional] +**reservecouponEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of reserve coupon effects triggered by rules in this campaign. | [optional] **lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received by this campaign. | [optional] **updated** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent update to the campaign's property. Updates to external entities used in this campaign are **not** registered by this property, such as collection or coupon updates. | [optional] **createdBy** | **string** | Name of the user who created this campaign if available. | [optional] diff --git a/docs/Model/CampaignBudget.md b/docs/Model/CampaignBudget.md new file mode 100644 index 00000000..36e9a05e --- /dev/null +++ b/docs/Model/CampaignBudget.md @@ -0,0 +1,13 @@ +# # CampaignBudget + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **string** | The limitable action to which this limit applies. For example: - `setDiscount` - `setDiscountEffect` - `redeemCoupon` - `createCoupon` | +**limit** | **float** | The value to set for the limit. | +**counter** | **float** | The number of occurrences of the limited action in the context of the campaign. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CampaignCopy.md b/docs/Model/CampaignCopy.md index e88270e8..bd5da707 100644 --- a/docs/Model/CampaignCopy.md +++ b/docs/Model/CampaignCopy.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **startTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become active. | [optional] **endTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become inactive. | [optional] **tags** | **string[]** | A list of tags for the campaign. | [optional] +**evaluationGroupId** | **int** | The ID of the campaign evaluation group the campaign belongs to. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignCreatedNotification.md b/docs/Model/CampaignCreatedNotification.md index 0f16e04d..ba390449 100644 --- a/docs/Model/CampaignCreatedNotification.md +++ b/docs/Model/CampaignCreatedNotification.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**campaign** | [**Campaign**](Campaign.md) | | +**campaign** | [**\TalonOne\Client\Model\CampaignStateNotification**](CampaignStateNotification.md) | | **ruleset** | [**\TalonOne\Client\Model\Ruleset**](Ruleset.md) | | [optional] -**priority** | [**\TalonOne\Client\Model\PriorityPosition**](PriorityPosition.md) | | +**evaluationPosition** | [**\TalonOne\Client\Model\CampaignEvaluationPosition**](CampaignEvaluationPosition.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignDeletedNotification.md b/docs/Model/CampaignDeletedNotification.md index 8ad96511..1207c06c 100644 --- a/docs/Model/CampaignDeletedNotification.md +++ b/docs/Model/CampaignDeletedNotification.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**campaign** | [**Campaign**](Campaign.md) | | +**campaign** | [**\TalonOne\Client\Model\CampaignStateNotification**](CampaignStateNotification.md) | | **deletedAt** | [**\DateTime**](\DateTime.md) | Time when the campaign was deleted. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignEditedNotification.md b/docs/Model/CampaignEditedNotification.md index 81c97510..920d14f9 100644 --- a/docs/Model/CampaignEditedNotification.md +++ b/docs/Model/CampaignEditedNotification.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**campaign** | [**Campaign**](Campaign.md) | | -**oldCampaign** | [**Campaign**](Campaign.md) | | +**campaign** | [**\TalonOne\Client\Model\CampaignStateNotification**](CampaignStateNotification.md) | | +**oldCampaign** | [**\TalonOne\Client\Model\CampaignStateNotification**](CampaignStateNotification.md) | | **ruleset** | [**\TalonOne\Client\Model\Ruleset**](Ruleset.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignEvaluationGroup.md b/docs/Model/CampaignEvaluationGroup.md new file mode 100644 index 00000000..8244ee2d --- /dev/null +++ b/docs/Model/CampaignEvaluationGroup.md @@ -0,0 +1,18 @@ +# # CampaignEvaluationGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**applicationId** | **int** | The ID of the application that owns this entity. | +**name** | **string** | The name of the campaign evaluation group. | +**parentId** | **int** | The ID of the parent group that contains the campaign evaluation group. | +**description** | **string** | A description of the campaign evaluation group. | [optional] +**evaluationMode** | **string** | The mode by which campaigns in the campaign evaluation group are evaluated. | +**evaluationScope** | **string** | The evaluation scope of the campaign evaluation group. | +**locked** | **bool** | An indicator of whether the campaign evaluation group is locked for modification. | +**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CampaignEvaluationPosition.md b/docs/Model/CampaignEvaluationPosition.md new file mode 100644 index 00000000..cc56b589 --- /dev/null +++ b/docs/Model/CampaignEvaluationPosition.md @@ -0,0 +1,13 @@ +# # CampaignEvaluationPosition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**groupId** | **int** | The ID of the campaign evaluation group the campaign belongs to. | +**groupName** | **string** | The name of the campaign evaluation group the campaign belongs to. | +**position** | **int** | The position of the campaign node in its parent group. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CampaignEvaluationTreeChangedNotification.md b/docs/Model/CampaignEvaluationTreeChangedNotification.md new file mode 100644 index 00000000..c620f3c8 --- /dev/null +++ b/docs/Model/CampaignEvaluationTreeChangedNotification.md @@ -0,0 +1,13 @@ +# # CampaignEvaluationTreeChangedNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**applicationId** | **int** | The ID of the Application whose campaign evaluation tree changed. | +**oldEvaluationTree** | [**\TalonOne\Client\Model\CampaignSet**](CampaignSet.md) | | [optional] +**evaluationTree** | [**\TalonOne\Client\Model\CampaignSet**](CampaignSet.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CampaignForNotification.md b/docs/Model/CampaignForNotification.md new file mode 100644 index 00000000..0554f3ab --- /dev/null +++ b/docs/Model/CampaignForNotification.md @@ -0,0 +1,51 @@ +# # CampaignForNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Unique ID for this entity. | +**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**applicationId** | **int** | The ID of the application that owns this entity. | +**userId** | **int** | The ID of the user associated with this entity. | +**name** | **string** | A user-facing name for this campaign. | +**description** | **string** | A detailed description of the campaign. | +**startTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become active. | [optional] +**endTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become inactive. | [optional] +**attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] +**state** | **string** | A disabled or archived campaign is not evaluated for rules or coupons. | [default to 'enabled'] +**activeRulesetId** | **int** | [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] +**tags** | **string[]** | A list of tags for the campaign. | +**features** | **string[]** | The features enabled in this campaign. | +**couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. | +**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] +**evaluationGroupId** | **int** | The ID of the campaign evaluation group the campaign belongs to. | [optional] +**type** | **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [default to 'advanced'] +**linkedStoreIds** | **int[]** | A list of store IDs that are linked to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] +**budgets** | [**\TalonOne\Client\Model\CampaignBudget[]**](CampaignBudget.md) | A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. | +**couponRedemptionCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign. | [optional] +**referralRedemptionCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign. | [optional] +**discountCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign. | [optional] +**discountEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of times discounts were redeemed in this campaign. | [optional] +**couponCreationCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of coupons created by rules in this campaign. | [optional] +**customEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of custom effects triggered by rules in this campaign. | [optional] +**referralCreationCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of referrals created by rules in this campaign. | [optional] +**addFreeItemEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign. | [optional] +**awardedGiveawaysCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of giveaways awarded by rules in this campaign. | [optional] +**createdLoyaltyPointsCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points created by rules in this campaign. | [optional] +**createdLoyaltyPointsEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point creation effects triggered by rules in this campaign. | [optional] +**redeemedLoyaltyPointsCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points redeemed by rules in this campaign. | [optional] +**redeemedLoyaltyPointsEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point redemption effects triggered by rules in this campaign. | [optional] +**callApiEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of webhooks triggered by rules in this campaign. | [optional] +**reservecouponEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of reserve coupon effects triggered by rules in this campaign. | [optional] +**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received by this campaign. | [optional] +**updated** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent update to the campaign's property. Updates to external entities used in this campaign are **not** registered by this property, such as collection or coupon updates. | [optional] +**createdBy** | **string** | Name of the user who created this campaign if available. | [optional] +**updatedBy** | **string** | Name of the user who last updated this campaign if available. | [optional] +**templateId** | **int** | The ID of the Campaign Template this Campaign was created from. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CampaignGroup.md b/docs/Model/CampaignGroup.md index 87bd9128..d82c3c6b 100644 --- a/docs/Model/CampaignGroup.md +++ b/docs/Model/CampaignGroup.md @@ -8,10 +8,10 @@ Name | Type | Description | Notes **created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **accountId** | **int** | The ID of the account that owns this entity. | -**name** | **string** | The name of this campaign group. | -**description** | **string** | A longer description of the campaign group. | [optional] -**subscribedApplicationsIds** | **int[]** | A list of the IDs of the applications that this campaign group is enabled for. | [optional] -**campaignIds** | **int[]** | A list of the IDs of the campaigns that this campaign group owns. | [optional] +**name** | **string** | The name of this campaign access group. | +**description** | **string** | A longer description of the campaign access group. | [optional] +**subscribedApplicationsIds** | **int[]** | A list of IDs of the Applications that this campaign access group is enabled for. | [optional] +**campaignIds** | **int[]** | A list of IDs of the campaigns that are part of the campaign access group. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignNotificationPolicy.md b/docs/Model/CampaignNotificationPolicy.md new file mode 100644 index 00000000..408a15fb --- /dev/null +++ b/docs/Model/CampaignNotificationPolicy.md @@ -0,0 +1,11 @@ +# # CampaignNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Notification name. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CampaignRulesetChangedNotification.md b/docs/Model/CampaignRulesetChangedNotification.md index 12e2601d..135352e3 100644 --- a/docs/Model/CampaignRulesetChangedNotification.md +++ b/docs/Model/CampaignRulesetChangedNotification.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**campaign** | [**Campaign**](Campaign.md) | | +**campaign** | [**\TalonOne\Client\Model\CampaignStateNotification**](CampaignStateNotification.md) | | **oldRuleset** | [**\TalonOne\Client\Model\Ruleset**](Ruleset.md) | | [optional] **ruleset** | [**\TalonOne\Client\Model\Ruleset**](Ruleset.md) | | [optional] diff --git a/docs/Model/CampaignSet.md b/docs/Model/CampaignSet.md index 371c02b7..9c071186 100644 --- a/docs/Model/CampaignSet.md +++ b/docs/Model/CampaignSet.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Internal ID of this entity. | -**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | +**id** | **int** | Internal ID of this entity. | **version** | **int** | Version of the campaign set. | **set** | [**\TalonOne\Client\Model\CampaignSetBranchNode**](CampaignSetBranchNode.md) | | **updatedBy** | **string** | Name of the user who last updated this campaign set, if available. | [optional] diff --git a/docs/Model/CampaignSetBranchNode.md b/docs/Model/CampaignSetBranchNode.md index e3f753fe..96ed7f05 100644 --- a/docs/Model/CampaignSetBranchNode.md +++ b/docs/Model/CampaignSetBranchNode.md @@ -5,9 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **string** | Indicates the node type. | -**name** | **string** | Name of the set | -**operator** | **string** | How does the set operates on its elements. | +**name** | **string** | Name of the set. | +**operator** | **string** | An indicator of how the set operates on its elements. | **elements** | [**\TalonOne\Client\Model\CampaignSetNode[]**](CampaignSetNode.md) | Child elements of this set. | +**groupId** | **int** | The ID of the campaign set. | +**locked** | **bool** | An indicator of whether the campaign set is locked for modification. | +**description** | **string** | A description of the campaign set. | [optional] +**evaluationMode** | **string** | The mode by which campaigns in the campaign evaluation group are evaluated. | +**evaluationScope** | **string** | The evaluation scope of the campaign evaluation group. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignStateChangedNotification.md b/docs/Model/CampaignStateChangedNotification.md index a513b60a..a791f6a1 100644 --- a/docs/Model/CampaignStateChangedNotification.md +++ b/docs/Model/CampaignStateChangedNotification.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**campaign** | [**\TalonOne\Client\Model\Campaign**](Campaign.md) | | +**campaign** | [**\TalonOne\Client\Model\CampaignForNotification**](CampaignForNotification.md) | | **oldState** | **string** | The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] | **newState** | **string** | The campaign's new state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] | **ruleset** | [**\TalonOne\Client\Model\Ruleset**](Ruleset.md) | | [optional] diff --git a/docs/Model/CampaignStateNotification.md b/docs/Model/CampaignStateNotification.md new file mode 100644 index 00000000..1494655a --- /dev/null +++ b/docs/Model/CampaignStateNotification.md @@ -0,0 +1,52 @@ +# # CampaignStateNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Unique ID for this entity. | +**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**applicationId** | **int** | The ID of the application that owns this entity. | +**userId** | **int** | The ID of the user associated with this entity. | +**name** | **string** | A user-facing name for this campaign. | +**description** | **string** | A detailed description of the campaign. | +**startTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become active. | [optional] +**endTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become inactive. | [optional] +**attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] +**state** | **string** | A disabled or archived campaign is not evaluated for rules or coupons. | [default to 'enabled'] +**activeRulesetId** | **int** | [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] +**tags** | **string[]** | A list of tags for the campaign. | +**features** | **string[]** | The features enabled in this campaign. | +**couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] +**limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. | +**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] +**evaluationGroupId** | **int** | The ID of the campaign evaluation group the campaign belongs to. | [optional] +**type** | **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [default to 'advanced'] +**linkedStoreIds** | **int[]** | A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] +**budgets** | [**\TalonOne\Client\Model\CampaignBudget[]**](CampaignBudget.md) | A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. | +**couponRedemptionCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign. | [optional] +**referralRedemptionCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign. | [optional] +**discountCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign. | [optional] +**discountEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of times discounts were redeemed in this campaign. | [optional] +**couponCreationCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of coupons created by rules in this campaign. | [optional] +**customEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of custom effects triggered by rules in this campaign. | [optional] +**referralCreationCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of referrals created by rules in this campaign. | [optional] +**addFreeItemEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign. | [optional] +**awardedGiveawaysCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of giveaways awarded by rules in this campaign. | [optional] +**createdLoyaltyPointsCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points created by rules in this campaign. | [optional] +**createdLoyaltyPointsEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point creation effects triggered by rules in this campaign. | [optional] +**redeemedLoyaltyPointsCount** | **float** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points redeemed by rules in this campaign. | [optional] +**redeemedLoyaltyPointsEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point redemption effects triggered by rules in this campaign. | [optional] +**callApiEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of webhooks triggered by rules in this campaign. | [optional] +**reservecouponEffectCount** | **int** | This property is **deprecated**. The count should be available under *budgets* property. Total number of reserve coupon effects triggered by rules in this campaign. | [optional] +**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received by this campaign. | [optional] +**updated** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent update to the campaign's property. Updates to external entities used in this campaign are **not** registered by this property, such as collection or coupon updates. | [optional] +**createdBy** | **string** | Name of the user who created this campaign if available. | [optional] +**updatedBy** | **string** | Name of the user who last updated this campaign if available. | [optional] +**templateId** | **int** | The ID of the Campaign Template this Campaign was created from. | [optional] +**frontendState** | **string** | A campaign state described exactly as in the Campaign Manager. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CampaignTemplate.md b/docs/Model/CampaignTemplate.md index 20d2b50c..ee2f319c 100644 --- a/docs/Model/CampaignTemplate.md +++ b/docs/Model/CampaignTemplate.md @@ -24,6 +24,7 @@ Name | Type | Description | Notes **applicationsIds** | **int[]** | A list of IDs of the Applications that are subscribed to this campaign template. | **campaignCollections** | [**\TalonOne\Client\Model\CampaignTemplateCollection[]**](CampaignTemplateCollection.md) | The campaign collections from the blueprint campaign for the template. | [optional] **defaultCampaignGroupId** | **int** | The default campaign group ID. | [optional] +**campaignType** | **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [default to 'advanced'] **updated** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent update to the campaign template or any of its elements. | [optional] **updatedBy** | **string** | Name of the user who last updated this campaign template, if available. | [optional] **validApplicationIds** | **int[]** | The IDs of the Applications that are related to this entity. | diff --git a/docs/Model/CardLedgerPointsEntryIntegrationAPI.md b/docs/Model/CardLedgerPointsEntryIntegrationAPI.md new file mode 100644 index 00000000..7bfee946 --- /dev/null +++ b/docs/Model/CardLedgerPointsEntryIntegrationAPI.md @@ -0,0 +1,20 @@ +# # CardLedgerPointsEntryIntegrationAPI + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the transaction that adds loyalty points. | +**created** | [**\DateTime**](\DateTime.md) | Date and time the loyalty card points were added. | +**programId** | **int** | ID of the loyalty program. | +**customerProfileID** | **string** | Integration ID of the customer profile linked to the card. | [optional] +**customerSessionId** | **string** | ID of the customer session where points were added. | [optional] +**name** | **string** | Name or reason of the transaction that adds loyalty points. | +**startDate** | **string** | When points become active. Possible values: - `immediate`: Points are active immediately. - `timestamp value`: Points become active at a given date and time. | +**expiryDate** | **string** | Date when points expire. Possible values are: - `unlimited`: Points have no expiration date. - `timestamp value`: Points expire on the given date and time. | +**subledgerId** | **string** | ID of the subledger. | +**amount** | **float** | Amount of loyalty points added in the transaction. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CartItem.md b/docs/Model/CartItem.md index caebb05a..8f4047c8 100644 --- a/docs/Model/CartItem.md +++ b/docs/Model/CartItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | Name of item. | [optional] **sku** | **string** | Stock keeping unit of item. | -**quantity** | **int** | Quantity of item. **Important:** If you enabled [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening), the quantity is always one and the same cart item might receive multiple per-item discounts. Ensure you can process multiple discounts on one cart item correctly. | +**quantity** | **int** | Number of units of this item. Due to [cart item flattening](https://docs.talon.one/docs/product/rules/understanding-cart-item-flattening), if you provide a quantity greater than 1, the item will be split in as many items as the provided quantity. This will impact the number of **per-item** effects triggered from your campaigns. | **returnedQuantity** | **int** | Number of returned items, calculated internally based on returns of this item. | [optional] **remainingQuantity** | **int** | Remaining quantity of the item, calculated internally based on returns of this item. | [optional] **price** | **float** | Price of the item in the currency defined by your Application. This field is required if this item is not part of a [catalog](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). If it is part of a catalog, setting a price here overrides the price from the catalog. | [optional] @@ -18,7 +18,7 @@ Name | Type | Description | Notes **position** | **float** | Position of the Cart Item in the Cart (calculated internally). | [optional] **attributes** | [**object**](.md) | Use this property to set a value for the attributes of your choice. [Attributes](https://docs.talon.one/docs/dev/concepts/attributes) represent any information to attach to this cart item. Custom _cart item_ attributes must be created in the Campaign Manager before you set them with this property. | [optional] **additionalCosts** | [**map[string,\TalonOne\Client\Model\AdditionalCost]**](AdditionalCost.md) | Use this property to set a value for the additional costs of this item, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). | [optional] -**catalogItemID** | **int** | The [catalog item ID](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs/#synchronizing-cart-item-catalogs). | [optional] +**catalogItemID** | **int** | The [catalog item ID](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs/#synchronizing-a-cart-item-catalog). | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Coupon.md b/docs/Model/Coupon.md index 0f6011a3..02b50234 100644 --- a/docs/Model/Coupon.md +++ b/docs/Model/Coupon.md @@ -25,6 +25,7 @@ Name | Type | Description | Notes **reservation** | **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] **batchId** | **string** | The id of the batch the coupon belongs to. | [optional] **isReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] +**implicitlyReserved** | **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateTemplateCampaign.md b/docs/Model/CreateTemplateCampaign.md index 92b0afa7..4b5a8550 100644 --- a/docs/Model/CreateTemplateCampaign.md +++ b/docs/Model/CreateTemplateCampaign.md @@ -10,8 +10,10 @@ Name | Type | Description | Notes **campaignAttributesOverrides** | [**object**](.md) | Custom Campaign Attributes. If the Campaign Template defines the same values, they will be overridden. | [optional] **templateParamValues** | [**\TalonOne\Client\Model\Binding[]**](Binding.md) | Actual values to replace the template placeholder values in the Ruleset bindings. Values for all Template Parameters must be provided. | [optional] **limitOverrides** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Limits for this Campaign. If the Campaign Template or Application define default values for the same limits, they will be overridden. | [optional] -**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] +**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups) this campaign belongs to. | [optional] **tags** | **string[]** | A list of tags for the campaign. If the campaign template has tags, they will be overridden by this list. | [optional] +**evaluationGroupId** | **int** | The ID of the campaign evaluation group the campaign belongs to. | [optional] +**linkedStoreIds** | **int[]** | A list of store IDs that are linked to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CustomEffectProps.md b/docs/Model/CustomEffectProps.md index 997b4f27..c5bde2b2 100644 --- a/docs/Model/CustomEffectProps.md +++ b/docs/Model/CustomEffectProps.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **effectId** | **int** | The ID of the custom effect that was triggered. | **name** | **string** | The type of the custom effect. | **cartItemPosition** | **float** | The index of the item in the cart item list to which the custom effect is applied. | [optional] -**cartItemSubPosition** | **float** | When cart item flattening is enabled, the sub position indicates to which item unit the custom effect is applied, for cart items with quantity > 1. | [optional] +**cartItemSubPosition** | **float** | For cart items with quantity > 1, the sub position indicates to which item unit the custom effect is applied. | [optional] **bundleIndex** | **int** | The position of the bundle in a list of item bundles created from the same bundle definition. | [optional] **bundleName** | **string** | The name of the bundle definition. | [optional] **payload** | [**object**](.md) | The JSON payload of the custom effect. | diff --git a/docs/Model/CustomerProfile.md b/docs/Model/CustomerProfile.md index 4fa4f884..9fb38081 100644 --- a/docs/Model/CustomerProfile.md +++ b/docs/Model/CustomerProfile.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **totalSales** | **float** | The total amount of money spent by the customer **before** discounts are applied. The total sales amount excludes the following: - Cancelled or reopened sessions. - Returned items. | **loyaltyMemberships** | [**\TalonOne\Client\Model\LoyaltyMembership[]**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional] **audienceMemberships** | [**\TalonOne\Client\Model\AudienceMembership[]**](AudienceMembership.md) | The audiences the customer belongs to. | [optional] -**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. | +**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the Rule Engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. | **sandbox** | **bool** | Shows whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CustomerProfileIntegrationResponseV2.md b/docs/Model/CustomerProfileIntegrationResponseV2.md new file mode 100644 index 00000000..fb90bf69 --- /dev/null +++ b/docs/Model/CustomerProfileIntegrationResponseV2.md @@ -0,0 +1,19 @@ +# # CustomerProfileIntegrationResponseV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customerProfile** | [**\TalonOne\Client\Model\CustomerProfile**](CustomerProfile.md) | | [optional] +**event** | [**\TalonOne\Client\Model\Event**](Event.md) | | [optional] +**loyalty** | [**\TalonOne\Client\Model\Loyalty**](Loyalty.md) | | [optional] +**triggeredCampaigns** | [**\TalonOne\Client\Model\Campaign[]**](Campaign.md) | | [optional] +**ruleFailureReasons** | [**\TalonOne\Client\Model\RuleFailureReason[]**](RuleFailureReason.md) | | [optional] +**awardedGiveaways** | [**\TalonOne\Client\Model\Giveaway[]**](Giveaway.md) | | [optional] +**effects** | [**\TalonOne\Client\Model\Effect[]**](Effect.md) | The effects generated by the rules in your running campaigns. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | +**createdCoupons** | [**\TalonOne\Client\Model\Coupon[]**](Coupon.md) | | +**createdReferrals** | [**\TalonOne\Client\Model\Referral[]**](Referral.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CustomerSession.md b/docs/Model/CustomerSession.md index 2e8fb826..764bd429 100644 --- a/docs/Model/CustomerSession.md +++ b/docs/Model/CustomerSession.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | **coupon** | **string** | Any coupon code entered. | **referral** | **string** | Any referral code entered. | -**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). | [default to 'open'] +**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). | [default to 'open'] **cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | Serialized JSON representation. | **identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). | [optional] **total** | **float** | The total sum of the cart in one session. | diff --git a/docs/Model/CustomerSessionV2.md b/docs/Model/CustomerSessionV2.md index 477d0a7c..aa90e2b7 100644 --- a/docs/Model/CustomerSessionV2.md +++ b/docs/Model/CustomerSessionV2.md @@ -9,19 +9,20 @@ Name | Type | Description | Notes **integrationId** | **string** | The integration ID set by your integration layer. | **applicationId** | **int** | The ID of the application that owns this entity. | **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | +**storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | [optional] **evaluableCampaignIds** | **int[]** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] **couponCodes** | **string[]** | Any coupon codes entered. **Important**: If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. | [optional] **referralCode** | **string** | Any referral code entered. **Important**: If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. | [optional] **loyaltyCards** | **string[]** | Any loyalty cards used. | [optional] -**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). | [default to 'open'] -**cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | The items to add to this sessions. - If cart item flattening is disabled: **Do not exceed 1000 items** (regardless of their `quantity`) per request. - If cart item flattening is enabled: **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. | +**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). | [default to 'open'] +**cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | The items to add to this session. **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. | **additionalCosts** | [**map[string,\TalonOne\Client\Model\AdditionalCost]**](AdditionalCost.md) | Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). | [optional] **identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). | [optional] **attributes** | [**object**](.md) | Use this property to set a value for the attributes of your choice. Attributes represent any information to attach to your session, like the shipping city. You can use [built-in attributes](https://docs.talon.one/docs/dev/concepts/attributes#built-in-attributes) or [custom ones](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes). Custom attributes must be created in the Campaign Manager before you set them with this property. | **firstSession** | **bool** | Indicates whether this is the first session for the customer's profile. Will always be true for anonymous sessions. | -**total** | **float** | The total sum of cart-items, as well as additional costs, before any discounts applied. | -**cartItemTotal** | **float** | The total sum of cart-items before any discounts applied. | -**additionalCostTotal** | **float** | The total sum of additional costs before any discounts applied. | +**total** | **float** | The total value of cart items and additional costs in the session, before any discounts are applied. | +**cartItemTotal** | **float** | The total value of cart items, before any discounts are applied. | +**additionalCostTotal** | **float** | The total value of additional costs, before any discounts are applied. | **updated** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received on this session. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Effect.md b/docs/Model/Effect.md index 6b9c9a34..1c8a1042 100644 --- a/docs/Model/Effect.md +++ b/docs/Model/Effect.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **effectType** | **string** | The type of effect that was triggered. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | **triggeredByCoupon** | **int** | The ID of the coupon that was being evaluated when this effect was triggered. | [optional] **triggeredForCatalogItem** | **int** | The ID of the catalog item that was being evaluated when this effect was triggered. | [optional] +**conditionIndex** | **int** | The index of the condition that was triggered. | [optional] **props** | [**object**](.md) | The properties of the effect. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EffectEntity.md b/docs/Model/EffectEntity.md index 6885ae3c..c5c4abb3 100644 --- a/docs/Model/EffectEntity.md +++ b/docs/Model/EffectEntity.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **effectType** | **string** | The type of effect that was triggered. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | **triggeredByCoupon** | **int** | The ID of the coupon that was being evaluated when this effect was triggered. | [optional] **triggeredForCatalogItem** | **int** | The ID of the catalog item that was being evaluated when this effect was triggered. | [optional] +**conditionIndex** | **int** | The index of the condition that was triggered. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Event.md b/docs/Model/Event.md index 78e97a76..d435ff6e 100644 --- a/docs/Model/Event.md +++ b/docs/Model/Event.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] +**storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | [optional] **type** | **string** | A string representing the event. Must not be a reserved event name. | **attributes** | [**object**](.md) | Arbitrary additional JSON data associated with the event. | **sessionId** | **string** | The ID of the session that this event occurred in. | [optional] diff --git a/docs/Model/EventV2.md b/docs/Model/EventV2.md index 76e42f09..040f8a3c 100644 --- a/docs/Model/EventV2.md +++ b/docs/Model/EventV2.md @@ -5,9 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] +**storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | [optional] **evaluableCampaignIds** | **int[]** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] -**type** | **string** | A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event) of type `event` in the Campaign Manager. | -**attributes** | [**object**](.md) | Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-custom-attributes). | [optional] +**type** | **string** | A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) of type `event` in the Campaign Manager. | +**attributes** | [**object**](.md) | Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-a-custom-attribute). | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IdentifiableEntity.md b/docs/Model/IdentifiableEntity.md new file mode 100644 index 00000000..7c2ec8fd --- /dev/null +++ b/docs/Model/IdentifiableEntity.md @@ -0,0 +1,11 @@ +# # IdentifiableEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/InlineResponse20010.md b/docs/Model/InlineResponse20010.md index 41cdbbec..9799edf9 100644 --- a/docs/Model/InlineResponse20010.md +++ b/docs/Model/InlineResponse20010.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\CampaignTemplate[]**](CampaignTemplate.md) | | +**data** | [**\TalonOne\Client\Model\Referral[]**](Referral.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20011.md b/docs/Model/InlineResponse20011.md index fc96adde..bdff1d38 100644 --- a/docs/Model/InlineResponse20011.md +++ b/docs/Model/InlineResponse20011.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\LoyaltyProgram[]**](LoyaltyProgram.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\CampaignTemplate[]**](CampaignTemplate.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20012.md b/docs/Model/InlineResponse20012.md index b729534c..7a8a8084 100644 --- a/docs/Model/InlineResponse20012.md +++ b/docs/Model/InlineResponse20012.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\LoyaltyProgramTransaction[]**](LoyaltyProgramTransaction.md) | | +**totalResultSize** | **int** | | +**data** | [**\TalonOne\Client\Model\LoyaltyProgram[]**](LoyaltyProgram.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20013.md b/docs/Model/InlineResponse20013.md index 39879f94..d542b9d1 100644 --- a/docs/Model/InlineResponse20013.md +++ b/docs/Model/InlineResponse20013.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\LoyaltyCard[]**](LoyaltyCard.md) | | +**data** | [**\TalonOne\Client\Model\LoyaltyProgramTransaction[]**](LoyaltyProgramTransaction.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20014.md b/docs/Model/InlineResponse20014.md index 3626ed85..036160dc 100644 --- a/docs/Model/InlineResponse20014.md +++ b/docs/Model/InlineResponse20014.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | true means there is more data in the source collection to request.. | -**data** | [**\TalonOne\Client\Model\CardLedgerTransactionLogEntry[]**](CardLedgerTransactionLogEntry.md) | List of loyalty card transaction logs. | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\LoyaltyCard[]**](LoyaltyCard.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20015.md b/docs/Model/InlineResponse20015.md index 530285f8..0da1d3b9 100644 --- a/docs/Model/InlineResponse20015.md +++ b/docs/Model/InlineResponse20015.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | [optional] -**totalResultSize** | **int** | | [optional] -**data** | [**\TalonOne\Client\Model\CollectionWithoutPayload[]**](CollectionWithoutPayload.md) | | +**hasMore** | **bool** | true means there is more data in the source collection to request.. | +**data** | [**\TalonOne\Client\Model\CardLedgerTransactionLogEntry[]**](CardLedgerTransactionLogEntry.md) | List of loyalty card transaction logs. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20016.md b/docs/Model/InlineResponse20016.md index 6ec3e58b..70520c98 100644 --- a/docs/Model/InlineResponse20016.md +++ b/docs/Model/InlineResponse20016.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\CollectionItem[]**](CollectionItem.md) | | +**hasMore** | **bool** | | [optional] +**totalResultSize** | **int** | | [optional] +**data** | [**\TalonOne\Client\Model\CollectionWithoutPayload[]**](CollectionWithoutPayload.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20017.md b/docs/Model/InlineResponse20017.md index 2dd30d74..7dabbbf7 100644 --- a/docs/Model/InlineResponse20017.md +++ b/docs/Model/InlineResponse20017.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | [optional] -**totalResultSize** | **int** | | [optional] -**data** | [**\TalonOne\Client\Model\Collection[]**](Collection.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\CollectionItem[]**](CollectionItem.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20018.md b/docs/Model/InlineResponse20018.md index 7d061e06..3401df7b 100644 --- a/docs/Model/InlineResponse20018.md +++ b/docs/Model/InlineResponse20018.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\AccessLogEntry[]**](AccessLogEntry.md) | | +**hasMore** | **bool** | | [optional] +**totalResultSize** | **int** | | [optional] +**data** | [**\TalonOne\Client\Model\Collection[]**](Collection.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20019.md b/docs/Model/InlineResponse20019.md index 75225bb0..72ae13d7 100644 --- a/docs/Model/InlineResponse20019.md +++ b/docs/Model/InlineResponse20019.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | +**hasMore** | **bool** | | **data** | [**\TalonOne\Client\Model\AccessLogEntry[]**](AccessLogEntry.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20020.md b/docs/Model/InlineResponse20020.md index 8b27c316..9764caed 100644 --- a/docs/Model/InlineResponse20020.md +++ b/docs/Model/InlineResponse20020.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\CampaignAnalytics[]**](CampaignAnalytics.md) | | +**data** | [**\TalonOne\Client\Model\AccessLogEntry[]**](AccessLogEntry.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20021.md b/docs/Model/InlineResponse20021.md index 05275f88..d51754e4 100644 --- a/docs/Model/InlineResponse20021.md +++ b/docs/Model/InlineResponse20021.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | [optional] -**hasMore** | **bool** | | [optional] -**data** | [**\TalonOne\Client\Model\ApplicationCustomer[]**](ApplicationCustomer.md) | | +**totalResultSize** | **int** | | +**data** | [**\TalonOne\Client\Model\CampaignAnalytics[]**](CampaignAnalytics.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20022.md b/docs/Model/InlineResponse20022.md index 28ace40b..32f2d478 100644 --- a/docs/Model/InlineResponse20022.md +++ b/docs/Model/InlineResponse20022.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | [optional] **totalResultSize** | **int** | | [optional] +**hasMore** | **bool** | | [optional] **data** | [**\TalonOne\Client\Model\ApplicationCustomer[]**](ApplicationCustomer.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20023.md b/docs/Model/InlineResponse20023.md index c9df127a..097715b8 100644 --- a/docs/Model/InlineResponse20023.md +++ b/docs/Model/InlineResponse20023.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | [optional] **totalResultSize** | **int** | | [optional] -**data** | [**\TalonOne\Client\Model\CustomerProfile[]**](CustomerProfile.md) | | +**data** | [**\TalonOne\Client\Model\ApplicationCustomer[]**](ApplicationCustomer.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20024.md b/docs/Model/InlineResponse20024.md index a7ff7486..4ff34dc5 100644 --- a/docs/Model/InlineResponse20024.md +++ b/docs/Model/InlineResponse20024.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | +**hasMore** | **bool** | | [optional] +**totalResultSize** | **int** | | [optional] **data** | [**\TalonOne\Client\Model\CustomerProfile[]**](CustomerProfile.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20025.md b/docs/Model/InlineResponse20025.md index de58dfdd..3359016c 100644 --- a/docs/Model/InlineResponse20025.md +++ b/docs/Model/InlineResponse20025.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\CustomerActivityReport[]**](CustomerActivityReport.md) | | +**data** | [**\TalonOne\Client\Model\CustomerProfile[]**](CustomerProfile.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20026.md b/docs/Model/InlineResponse20026.md index a3858d11..d157e2f2 100644 --- a/docs/Model/InlineResponse20026.md +++ b/docs/Model/InlineResponse20026.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | [optional] -**data** | [**\TalonOne\Client\Model\ApplicationSession[]**](ApplicationSession.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\CustomerActivityReport[]**](CustomerActivityReport.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20027.md b/docs/Model/InlineResponse20027.md index 513ccef8..930f881a 100644 --- a/docs/Model/InlineResponse20027.md +++ b/docs/Model/InlineResponse20027.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\ApplicationEvent[]**](ApplicationEvent.md) | | +**hasMore** | **bool** | | [optional] +**data** | [**\TalonOne\Client\Model\ApplicationSession[]**](ApplicationSession.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20028.md b/docs/Model/InlineResponse20028.md index c515043d..6ad7849f 100644 --- a/docs/Model/InlineResponse20028.md +++ b/docs/Model/InlineResponse20028.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | **string[]** | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\ApplicationEvent[]**](ApplicationEvent.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20029.md b/docs/Model/InlineResponse20029.md index 7372c29a..4cc32aaa 100644 --- a/docs/Model/InlineResponse20029.md +++ b/docs/Model/InlineResponse20029.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | [optional] -**totalResultSize** | **int** | | [optional] -**data** | [**\TalonOne\Client\Model\Audience[]**](Audience.md) | | +**totalResultSize** | **int** | | +**data** | **string[]** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2003.md b/docs/Model/InlineResponse2003.md index 5ce408da..1d451767 100644 --- a/docs/Model/InlineResponse2003.md +++ b/docs/Model/InlineResponse2003.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Application[]**](Application.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\CardLedgerPointsEntryIntegrationAPI[]**](CardLedgerPointsEntryIntegrationAPI.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20030.md b/docs/Model/InlineResponse20030.md index 588e5446..f6e0db39 100644 --- a/docs/Model/InlineResponse20030.md +++ b/docs/Model/InlineResponse20030.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | [optional] **totalResultSize** | **int** | | [optional] -**data** | [**\TalonOne\Client\Model\ApplicationReferee[]**](ApplicationReferee.md) | | +**data** | [**\TalonOne\Client\Model\Audience[]**](Audience.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20031.md b/docs/Model/InlineResponse20031.md index bd2a8bca..74d00846 100644 --- a/docs/Model/InlineResponse20031.md +++ b/docs/Model/InlineResponse20031.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Attribute[]**](Attribute.md) | | +**hasMore** | **bool** | | [optional] +**totalResultSize** | **int** | | [optional] +**data** | [**\TalonOne\Client\Model\ApplicationReferee[]**](ApplicationReferee.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20032.md b/docs/Model/InlineResponse20032.md index e7e6e303..54a19ebd 100644 --- a/docs/Model/InlineResponse20032.md +++ b/docs/Model/InlineResponse20032.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\AccountAdditionalCost[]**](AccountAdditionalCost.md) | | +**data** | [**\TalonOne\Client\Model\Attribute[]**](Attribute.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20033.md b/docs/Model/InlineResponse20033.md index c85e6088..cfd5afbf 100644 --- a/docs/Model/InlineResponse20033.md +++ b/docs/Model/InlineResponse20033.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Webhook[]**](Webhook.md) | | +**hasMore** | **bool** | | [optional] +**totalResultSize** | **int** | | [optional] +**data** | [**\TalonOne\Client\Model\CatalogItem[]**](CatalogItem.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20034.md b/docs/Model/InlineResponse20034.md index 0f92f492..8aed2290 100644 --- a/docs/Model/InlineResponse20034.md +++ b/docs/Model/InlineResponse20034.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\WebhookActivationLogEntry[]**](WebhookActivationLogEntry.md) | | +**data** | [**\TalonOne\Client\Model\AccountAdditionalCost[]**](AccountAdditionalCost.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20035.md b/docs/Model/InlineResponse20035.md index 08f13f5c..9996d46a 100644 --- a/docs/Model/InlineResponse20035.md +++ b/docs/Model/InlineResponse20035.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\WebhookLogEntry[]**](WebhookLogEntry.md) | | +**data** | [**\TalonOne\Client\Model\WebhookWithOutgoingIntegrationDetails[]**](WebhookWithOutgoingIntegrationDetails.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20036.md b/docs/Model/InlineResponse20036.md index 3269ad1a..141d4a46 100644 --- a/docs/Model/InlineResponse20036.md +++ b/docs/Model/InlineResponse20036.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\EventType[]**](EventType.md) | | +**data** | [**\TalonOne\Client\Model\WebhookActivationLogEntry[]**](WebhookActivationLogEntry.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20037.md b/docs/Model/InlineResponse20037.md index 744a5ca4..3026f284 100644 --- a/docs/Model/InlineResponse20037.md +++ b/docs/Model/InlineResponse20037.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\User[]**](User.md) | | +**data** | [**\TalonOne\Client\Model\WebhookLogEntry[]**](WebhookLogEntry.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20038.md b/docs/Model/InlineResponse20038.md index b7ac2174..52de6530 100644 --- a/docs/Model/InlineResponse20038.md +++ b/docs/Model/InlineResponse20038.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | [optional] -**hasMore** | **bool** | | [optional] -**data** | [**\TalonOne\Client\Model\Change[]**](Change.md) | | +**totalResultSize** | **int** | | +**data** | [**\TalonOne\Client\Model\EventType[]**](EventType.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20039.md b/docs/Model/InlineResponse20039.md index 15f7193c..8a093c31 100644 --- a/docs/Model/InlineResponse20039.md +++ b/docs/Model/InlineResponse20039.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Export[]**](Export.md) | | +**data** | [**\TalonOne\Client\Model\User[]**](User.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2004.md b/docs/Model/InlineResponse2004.md index b7e3da74..551649df 100644 --- a/docs/Model/InlineResponse2004.md +++ b/docs/Model/InlineResponse2004.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Campaign[]**](Campaign.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\LedgerPointsEntryIntegrationAPI[]**](LedgerPointsEntryIntegrationAPI.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20040.md b/docs/Model/InlineResponse20040.md index f1b5502b..2083defe 100644 --- a/docs/Model/InlineResponse20040.md +++ b/docs/Model/InlineResponse20040.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Role[]**](Role.md) | | +**totalResultSize** | **int** | | [optional] +**hasMore** | **bool** | | [optional] +**data** | [**\TalonOne\Client\Model\Change[]**](Change.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20041.md b/docs/Model/InlineResponse20041.md new file mode 100644 index 00000000..27c06408 --- /dev/null +++ b/docs/Model/InlineResponse20041.md @@ -0,0 +1,12 @@ +# # InlineResponse20041 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**totalResultSize** | **int** | | +**data** | [**\TalonOne\Client\Model\Export[]**](Export.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/InlineResponse20042.md b/docs/Model/InlineResponse20042.md new file mode 100644 index 00000000..3b3fd294 --- /dev/null +++ b/docs/Model/InlineResponse20042.md @@ -0,0 +1,12 @@ +# # InlineResponse20042 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**totalResultSize** | **int** | | +**data** | [**\TalonOne\Client\Model\Role[]**](Role.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/InlineResponse20043.md b/docs/Model/InlineResponse20043.md new file mode 100644 index 00000000..f68086e0 --- /dev/null +++ b/docs/Model/InlineResponse20043.md @@ -0,0 +1,13 @@ +# # InlineResponse20043 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hasMore** | **bool** | | [optional] +**totalResultSize** | **int** | | [optional] +**data** | [**\TalonOne\Client\Model\Store[]**](Store.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/InlineResponse2005.md b/docs/Model/InlineResponse2005.md index 7571af27..ea71ff71 100644 --- a/docs/Model/InlineResponse2005.md +++ b/docs/Model/InlineResponse2005.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\NotificationWebhook[]**](NotificationWebhook.md) | | +**data** | [**\TalonOne\Client\Model\Application[]**](Application.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2006.md b/docs/Model/InlineResponse2006.md index cf9f04ec..31e9c936 100644 --- a/docs/Model/InlineResponse2006.md +++ b/docs/Model/InlineResponse2006.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Ruleset[]**](Ruleset.md) | | +**data** | [**\TalonOne\Client\Model\Campaign[]**](Campaign.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2007.md b/docs/Model/InlineResponse2007.md index 3e5529b0..99f20cc1 100644 --- a/docs/Model/InlineResponse2007.md +++ b/docs/Model/InlineResponse2007.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Coupon[]**](Coupon.md) | | +**data** | [**\TalonOne\Client\Model\Ruleset[]**](Ruleset.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2008.md b/docs/Model/InlineResponse2008.md index 327b486d..85f93a44 100644 --- a/docs/Model/InlineResponse2008.md +++ b/docs/Model/InlineResponse2008.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | +**totalResultSize** | **int** | | **data** | [**\TalonOne\Client\Model\Coupon[]**](Coupon.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2009.md b/docs/Model/InlineResponse2009.md index b12fadd3..55bbf265 100644 --- a/docs/Model/InlineResponse2009.md +++ b/docs/Model/InlineResponse2009.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\Referral[]**](Referral.md) | | +**data** | [**\TalonOne\Client\Model\Coupon[]**](Coupon.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IntegrationCoupon.md b/docs/Model/IntegrationCoupon.md index 152ebaf9..cc638e17 100644 --- a/docs/Model/IntegrationCoupon.md +++ b/docs/Model/IntegrationCoupon.md @@ -25,6 +25,7 @@ Name | Type | Description | Notes **reservation** | **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] **batchId** | **string** | The id of the batch the coupon belongs to. | [optional] **isReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] +**implicitlyReserved** | **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] **profileRedemptionCount** | **int** | The number of times the coupon was redeemed by the profile. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IntegrationEvent.md b/docs/Model/IntegrationEvent.md index c857ddfa..01c57ca2 100644 --- a/docs/Model/IntegrationEvent.md +++ b/docs/Model/IntegrationEvent.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] +**storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | [optional] **type** | **string** | A string representing the event. Must not be a reserved event name. | **attributes** | [**object**](.md) | Arbitrary additional JSON data associated with the event. | diff --git a/docs/Model/IntegrationEventV2Request.md b/docs/Model/IntegrationEventV2Request.md index c1c2fab5..b7e2f529 100644 --- a/docs/Model/IntegrationEventV2Request.md +++ b/docs/Model/IntegrationEventV2Request.md @@ -5,9 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] +**storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | [optional] **evaluableCampaignIds** | **int[]** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] -**type** | **string** | A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event) of type `event` in the Campaign Manager. | -**attributes** | [**object**](.md) | Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-custom-attributes). | [optional] +**type** | **string** | A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) of type `event` in the Campaign Manager. | +**attributes** | [**object**](.md) | Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-a-custom-attribute). | [optional] **responseContent** | **string[]** | Optional list of requested information to be present on the response related to the tracking custom event. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IntegrationRequest.md b/docs/Model/IntegrationRequest.md index 403a628a..0a47eb6c 100644 --- a/docs/Model/IntegrationRequest.md +++ b/docs/Model/IntegrationRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **customerSession** | [**\TalonOne\Client\Model\NewCustomerSessionV2**](NewCustomerSessionV2.md) | | -**responseContent** | **string[]** | Extends the response with the chosen data entities. Use this property to get as much data as you need in one _Update customer session_ request instead of sending extra requests to other endpoints. | [optional] +**responseContent** | **string[]** | Extends the response with the chosen data entities. Use this property to get as much data as you need in one _Update customer session_ request instead of sending extra requests to other endpoints. **Note:** To retrieve loyalty card details, your request must include a loyalty card ID. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IntegrationStoreEntity.md b/docs/Model/IntegrationStoreEntity.md new file mode 100644 index 00000000..1513aa33 --- /dev/null +++ b/docs/Model/IntegrationStoreEntity.md @@ -0,0 +1,11 @@ +# # IntegrationStoreEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/InventoryCoupon.md b/docs/Model/InventoryCoupon.md index fe394333..94adf216 100644 --- a/docs/Model/InventoryCoupon.md +++ b/docs/Model/InventoryCoupon.md @@ -25,6 +25,7 @@ Name | Type | Description | Notes **reservation** | **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] **batchId** | **string** | The id of the batch the coupon belongs to. | [optional] **isReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] +**implicitlyReserved** | **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] **profileRedemptionCount** | **int** | The number of times the coupon was redeemed by the profile. | **state** | **string** | Can be: - `active`: The coupon can be used. It is a reserved coupon that is neither pending, used nor expired, and has a non-exhausted limit counter. - `used`: The coupon has been redeemed and cannot be used again. It is not pending and has reached its redemption limit or was redeemed by the profile before expiration. - `expired`: The coupon was never redeemed and it is now expired. It is non-pending, non-active and non-used by the profile. - `pending`: The coupon will be usable in the future. - `disabled`: The coupon is part of a non-active campaign. | diff --git a/docs/Model/LedgerPointsEntryIntegrationAPI.md b/docs/Model/LedgerPointsEntryIntegrationAPI.md new file mode 100644 index 00000000..fd23e16c --- /dev/null +++ b/docs/Model/LedgerPointsEntryIntegrationAPI.md @@ -0,0 +1,19 @@ +# # LedgerPointsEntryIntegrationAPI + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the transaction that adds loyalty points. | +**created** | [**\DateTime**](\DateTime.md) | Date and time the loyalty points were added. | +**programId** | **int** | ID of the loyalty program. | +**customerSessionId** | **string** | ID of the customer session where points were added. | [optional] +**name** | **string** | Name or reason of the transaction that adds loyalty points. | +**startDate** | **string** | When points become active. Possible values: - `immediate`: Points are active immediately. - `timestamp value`: Points become active at a given date and time. | +**expiryDate** | **string** | Date when points expire. Possible values are: - `unlimited`: Points have no expiration date. - `timestamp value`: Points expire on the given date and time. | +**subledgerId** | **string** | ID of the subledger. | +**amount** | **float** | Amount of loyalty points added in the transaction. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/LoyaltyProgram.md b/docs/Model/LoyaltyProgram.md index 4f76244e..e5404a3e 100644 --- a/docs/Model/LoyaltyProgram.md +++ b/docs/Model/LoyaltyProgram.md @@ -14,11 +14,15 @@ Name | Type | Description | Notes **allowSubledger** | **bool** | Indicates if this program supports subledgers inside the program. | **usersPerCardLimit** | **int** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] **sandbox** | **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | +**tiersExpireIn** | **string** | The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] +**tiersDowngradePolicy** | **string** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] **accountID** | **int** | The ID of the Talon.One account that owns this program. | **name** | **string** | The internal name for the Loyalty Program. This is an immutable value. | **tiers** | [**\TalonOne\Client\Model\LoyaltyTier[]**](LoyaltyTier.md) | The tiers in this loyalty program. | [optional] **timezone** | **string** | A string containing an IANA timezone descriptor. | **cardBased** | **bool** | Defines the type of loyalty program: - `true`: the program is a card-based. - `false`: the program is profile-based. | [default to false] +**canUpdateTiers** | **bool** | `True` if the tier definitions can be updated. | [optional] [default to false] +**canUpgradeToAdvancedTiers** | **bool** | `True` if the program can be upgraded to use the `tiersExpireIn` and `tiersDowngradePolicy` properties. | [optional] [default to false] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoyaltyProgramSubledgers.md b/docs/Model/LoyaltyProgramSubledgers.md new file mode 100644 index 00000000..54ffebd6 --- /dev/null +++ b/docs/Model/LoyaltyProgramSubledgers.md @@ -0,0 +1,12 @@ +# # LoyaltyProgramSubledgers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loyaltyProgramId** | **int** | The internal ID of the loyalty program. | +**subledgerIds** | **string[]** | The list of subledger IDs. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/LoyaltyProgramTransaction.md b/docs/Model/LoyaltyProgramTransaction.md index 3bea8061..ef6cb1fb 100644 --- a/docs/Model/LoyaltyProgramTransaction.md +++ b/docs/Model/LoyaltyProgramTransaction.md @@ -17,8 +17,8 @@ Name | Type | Description | Notes **subledgerId** | **string** | ID of the subledger. | **customerSessionId** | **string** | ID of the customer session where the transaction occurred. | [optional] **importId** | **int** | ID of the import where the transaction occurred. | [optional] -**userId** | **int** | ID of the user who manually added or deducted points. Applies only for manual transactions. | [optional] -**userEmail** | **string** | The email of the user who manually added or deducted points. Applies only for manual transactions. | [optional] +**userId** | **int** | ID of the user who manually added or deducted points. Applies only to manual transactions. | [optional] +**userEmail** | **string** | The email of the Campaign Manager account that manually added or deducted points. Applies only to manual transactions. | [optional] **rulesetId** | **int** | ID of the ruleset containing the rule that triggered the effect. Applies only for transactions that resulted from a customer session. | [optional] **ruleName** | **string** | Name of the rule that triggered the effect. Applies only for transactions that resulted from a customer session. | [optional] diff --git a/docs/Model/NewApplication.md b/docs/Model/NewApplication.md index b8dc2736..4e9081cf 100644 --- a/docs/Model/NewApplication.md +++ b/docs/Model/NewApplication.md @@ -11,11 +11,9 @@ Name | Type | Description | Notes **caseSensitivity** | **string** | The case sensitivity behavior to check coupon codes in the campaigns of this Application. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Default limits for campaigns created in this application. | [optional] -**campaignPriority** | **string** | Default [priority](https://docs.talon.one/docs/product/applications/setting-up-campaign-priorities) for campaigns created in this Application. | [optional] [default to 'universal'] -**exclusiveCampaignsStrategy** | **string** | The strategy used when choosing exclusive campaigns for evaluation. | [optional] [default to 'listOrder'] **defaultDiscountScope** | **string** | The default scope to apply `setDiscount` effects on if no scope was provided with the effect. | [optional] **enableCascadingDiscounts** | **bool** | Indicates if discounts should cascade for this Application. | [optional] -**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). | [optional] +**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. | [optional] **attributesSettings** | [**\TalonOne\Client\Model\AttributesSettings**](AttributesSettings.md) | | [optional] **sandbox** | **bool** | Indicates if this is a live or sandbox Application. | [optional] **enablePartialDiscounts** | **bool** | Indicates if this Application supports partial discounts. | [optional] diff --git a/docs/Model/NewBaseNotification.md b/docs/Model/NewBaseNotification.md index 3a883d98..6f324fbc 100644 --- a/docs/Model/NewBaseNotification.md +++ b/docs/Model/NewBaseNotification.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **policy** | [**object**](.md) | | +**enabled** | **bool** | Indicates whether the notification is activated. | [optional] [default to true] **webhook** | [**\TalonOne\Client\Model\NewNotificationWebhook**](NewNotificationWebhook.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewCampaign.md b/docs/Model/NewCampaign.md index 2cecae69..9f14cd4b 100644 --- a/docs/Model/NewCampaign.md +++ b/docs/Model/NewCampaign.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **name** | **string** | A user-facing name for this campaign. | **description** | **string** | A detailed description of the campaign. | [optional] **startTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become active. | [optional] -**endTime** | [**\DateTime**](\DateTime.md) | Timestamp the campaign will become inactive. | [optional] +**endTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become inactive. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] **state** | **string** | A disabled or archived campaign is not evaluated for rules or coupons. | [default to 'enabled'] **activeRulesetId** | **int** | [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] @@ -17,6 +17,9 @@ Name | Type | Description | Notes **referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. | **campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] +**evaluationGroupId** | **int** | The ID of the campaign evaluation group the campaign belongs to. | [optional] +**type** | **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [optional] [default to 'advanced'] +**linkedStoreIds** | **int[]** | A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewCampaignEvaluationGroup.md b/docs/Model/NewCampaignEvaluationGroup.md new file mode 100644 index 00000000..a6571df5 --- /dev/null +++ b/docs/Model/NewCampaignEvaluationGroup.md @@ -0,0 +1,16 @@ +# # NewCampaignEvaluationGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the campaign evaluation group. | +**parentId** | **int** | The ID of the parent group that contains the campaign evaluation group. | +**description** | **string** | A description of the campaign evaluation group. | [optional] +**evaluationMode** | **string** | The mode by which campaigns in the campaign evaluation group are evaluated. | +**evaluationScope** | **string** | The evaluation scope of the campaign evaluation group. | +**locked** | **bool** | An indicator of whether the campaign evaluation group is locked for modification. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/NewCampaignGroup.md b/docs/Model/NewCampaignGroup.md index 982b9487..778a11a5 100644 --- a/docs/Model/NewCampaignGroup.md +++ b/docs/Model/NewCampaignGroup.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | The name of this campaign group. | -**description** | **string** | A longer description of the campaign group. | [optional] -**subscribedApplicationsIds** | **int[]** | A list of the IDs of the applications that this campaign group is enabled for. | [optional] -**campaignIds** | **int[]** | A list of the IDs of the campaigns that this campaign group owns. | [optional] +**name** | **string** | The name of this campaign access group. | +**description** | **string** | A longer description of the campaign access group. | [optional] +**subscribedApplicationsIds** | **int[]** | A list of IDs of the Applications that this campaign access group is enabled for. | [optional] +**campaignIds** | **int[]** | A list of IDs of the campaigns that are part of the campaign access group. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewCampaignTemplate.md b/docs/Model/NewCampaignTemplate.md index 38d2a513..b81a4b44 100644 --- a/docs/Model/NewCampaignTemplate.md +++ b/docs/Model/NewCampaignTemplate.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **templateParams** | [**\TalonOne\Client\Model\CampaignTemplateParams[]**](CampaignTemplateParams.md) | Fields which can be used to replace values in a rule. | [optional] **campaignCollections** | [**\TalonOne\Client\Model\CampaignTemplateCollection[]**](CampaignTemplateCollection.md) | The campaign collections from the blueprint campaign for the template. | [optional] **defaultCampaignGroupId** | **int** | The default campaign group ID. | [optional] +**campaignType** | **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [default to 'advanced'] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewCoupons.md b/docs/Model/NewCoupons.md index 341dd0d3..9d1501bb 100644 --- a/docs/Model/NewCoupons.md +++ b/docs/Model/NewCoupons.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **validCharacters** | **string[]** | List of characters used to generate the random parts of a code. By default, the list of characters is equivalent to the `[A-Z, 0-9]` regular expression. | [optional] **couponPattern** | **string** | The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. | [optional] **isReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] +**implicitlyReserved** | **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewCustomerSession.md b/docs/Model/NewCustomerSession.md index dfc5c1f4..aa73d21d 100644 --- a/docs/Model/NewCustomerSession.md +++ b/docs/Model/NewCustomerSession.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] **coupon** | **string** | Any coupon code entered. | [optional] **referral** | **string** | Any referral code entered. | [optional] -**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). | [optional] [default to 'open'] +**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). | [optional] [default to 'open'] **cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | Serialized JSON representation. | [optional] **identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). | [optional] **total** | **float** | The total sum of the cart in one session. | [optional] diff --git a/docs/Model/NewCustomerSessionV2.md b/docs/Model/NewCustomerSessionV2.md index eaaec907..0e17f63e 100644 --- a/docs/Model/NewCustomerSessionV2.md +++ b/docs/Model/NewCustomerSessionV2.md @@ -5,12 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] +**storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | [optional] **evaluableCampaignIds** | **int[]** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] **couponCodes** | **string[]** | Any coupon codes entered. **Important**: If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. | [optional] **referralCode** | **string** | Any referral code entered. **Important**: If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. | [optional] **loyaltyCards** | **string[]** | Any loyalty cards used. | [optional] -**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). | [optional] [default to 'open'] -**cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | The items to add to this sessions. - If cart item flattening is disabled: **Do not exceed 1000 items** (regardless of their `quantity`) per request. - If cart item flattening is enabled: **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. | [optional] +**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). | [optional] [default to 'open'] +**cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | The items to add to this session. **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. | [optional] **additionalCosts** | [**map[string,\TalonOne\Client\Model\AdditionalCost]**](AdditionalCost.md) | Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). | [optional] **identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). | [optional] **attributes** | [**object**](.md) | Use this property to set a value for the attributes of your choice. Attributes represent any information to attach to your session, like the shipping city. You can use [built-in attributes](https://docs.talon.one/docs/dev/concepts/attributes#built-in-attributes) or [custom ones](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes). Custom attributes must be created in the Campaign Manager before you set them with this property. | [optional] diff --git a/docs/Model/NewEvent.md b/docs/Model/NewEvent.md index 4c0034a6..899d99e0 100644 --- a/docs/Model/NewEvent.md +++ b/docs/Model/NewEvent.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] +**storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | [optional] **type** | **string** | A string representing the event. Must not be a reserved event name. | **attributes** | [**object**](.md) | Arbitrary additional JSON data associated with the event. | **sessionId** | **string** | The ID of the session that this event occurred in. | diff --git a/docs/Model/NewInvitation.md b/docs/Model/NewInvitation.md index 27c3c961..ed5666e9 100644 --- a/docs/Model/NewInvitation.md +++ b/docs/Model/NewInvitation.md @@ -6,8 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | Name of the user being invited. | [optional] **email** | **string** | | -**acl** | **string** | The `Access Control List` json defining the role of the user. This represents the access control on the user level. Use one of the following: - normal user: `{\"Role\": 0}` - admin: `{\"Role\": 127}` | -**roles** | **int[]** | An array of roleIDs to assign the new user to. | [optional] +**acl** | **string** | The `Access Control List` json defining the role of the user. This represents the access control on the user level. Use one of the following: - normal user: `{\"Role\": 0}` - admin: `{\"Role\": 127}` | [optional] +**isAdmin** | **bool** | An indication of whether the user has admin permissions. We recommend using this flag over using the `acl` with value `{\"Role\": 127}`. | [optional] +**roles** | **int[]** | An array of role IDs to assign to the new user. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewLoyaltyProgram.md b/docs/Model/NewLoyaltyProgram.md index 8df8ddcd..5594bcd6 100644 --- a/docs/Model/NewLoyaltyProgram.md +++ b/docs/Model/NewLoyaltyProgram.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **allowSubledger** | **bool** | Indicates if this program supports subledgers inside the program. | **usersPerCardLimit** | **int** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] **sandbox** | **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | +**tiersExpireIn** | **string** | The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] +**tiersDowngradePolicy** | **string** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] **name** | **string** | The internal name for the Loyalty Program. This is an immutable value. | **tiers** | [**\TalonOne\Client\Model\NewLoyaltyTier[]**](NewLoyaltyTier.md) | The tiers in this loyalty program. | [optional] **timezone** | **string** | A string containing an IANA timezone descriptor. | diff --git a/docs/Model/NewNotificationWebhook.md b/docs/Model/NewNotificationWebhook.md index f53eb3ff..7f8fceb7 100644 --- a/docs/Model/NewNotificationWebhook.md +++ b/docs/Model/NewNotificationWebhook.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **url** | **string** | API URL for the given webhook-based notification. | **headers** | **string[]** | List of API HTTP headers for the given webhook-based notification. | +**enabled** | **bool** | Indicates whether the notification is activated. | [optional] [default to true] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewRoleV2.md b/docs/Model/NewRoleV2.md new file mode 100644 index 00000000..22ba6355 --- /dev/null +++ b/docs/Model/NewRoleV2.md @@ -0,0 +1,14 @@ +# # NewRoleV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the role. | +**description** | **string** | Description of the role. | +**permissions** | [**\TalonOne\Client\Model\RoleV2Permissions**](RoleV2Permissions.md) | | [optional] +**members** | **int[]** | A list of user identifiers the role is assigned to. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/NewStore.md b/docs/Model/NewStore.md new file mode 100644 index 00000000..39db527d --- /dev/null +++ b/docs/Model/NewStore.md @@ -0,0 +1,14 @@ +# # NewStore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the store. | +**description** | **string** | The description of the store. | +**attributes** | [**object**](.md) | The attributes of the store. | [optional] +**integrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/NotificationActivation.md b/docs/Model/NotificationActivation.md new file mode 100644 index 00000000..9f5284d9 --- /dev/null +++ b/docs/Model/NotificationActivation.md @@ -0,0 +1,11 @@ +# # NotificationActivation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Indicates whether the notification is activated. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/OneTimeCode.md b/docs/Model/OneTimeCode.md new file mode 100644 index 00000000..f7fde373 --- /dev/null +++ b/docs/Model/OneTimeCode.md @@ -0,0 +1,14 @@ +# # OneTimeCode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userId** | **int** | The ID of the user. | +**accountId** | **int** | The ID of the account. | +**token** | **string** | The two-factor authentication token created during sign-in. This token is used to ensure that the correct user is trying to sign in with a given one-time security code. | +**code** | **string** | The one-time security code used for signing in. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/OutgoingIntegrationCleverTapPolicy.md b/docs/Model/OutgoingIntegrationCleverTapPolicy.md new file mode 100644 index 00000000..27e179d5 --- /dev/null +++ b/docs/Model/OutgoingIntegrationCleverTapPolicy.md @@ -0,0 +1,13 @@ +# # OutgoingIntegrationCleverTapPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**baseUrl** | **string** | The base URL that is based on the region key of your CleverTap account. | +**accountId** | **string** | The CleverTap Project ID. | +**passcode** | **string** | The CleverTap Project passcode. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/OutgoingIntegrationConfiguration.md b/docs/Model/OutgoingIntegrationConfiguration.md index 00b5769a..ed25b49f 100644 --- a/docs/Model/OutgoingIntegrationConfiguration.md +++ b/docs/Model/OutgoingIntegrationConfiguration.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **int** | Unique ID for this entity. | **accountId** | **int** | The ID of the account to which this configuration belongs. | **typeId** | **int** | The outgoing integration type ID. | -**policy** | [**object**](.md) | | +**policy** | [**object**](.md) | The outgoing integration policy specific to each integration type. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OutgoingIntegrationIterablePolicy.md b/docs/Model/OutgoingIntegrationIterablePolicy.md new file mode 100644 index 00000000..f4fa7385 --- /dev/null +++ b/docs/Model/OutgoingIntegrationIterablePolicy.md @@ -0,0 +1,12 @@ +# # OutgoingIntegrationIterablePolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**baseUrl** | **string** | The base URL that is based on the region key of your Iterable account. | +**apiKey** | **string** | The API key generated from your Iterable account. See [Iterable API Key Guide](https://support.iterable.com/hc/en-us/articles/360043464871-API-Keys-) | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/OutgoingIntegrationMoEngagePolicy.md b/docs/Model/OutgoingIntegrationMoEngagePolicy.md new file mode 100644 index 00000000..c9723fd2 --- /dev/null +++ b/docs/Model/OutgoingIntegrationMoEngagePolicy.md @@ -0,0 +1,14 @@ +# # OutgoingIntegrationMoEngagePolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**baseUrl** | **string** | The base URL of your MoEngage deployment, containing the MoEngage data center number (represented by `0X`). | +**appId** | **string** | MoEngage APP ID. See [MoEngage Developer Guide](https://developers.moengage.com/hc/en-us/articles/4404674776724-Overview). | +**dataApiId** | **string** | MoEngage DATA API ID. See [MoEngage Developer Guide](https://developers.moengage.com/hc/en-us/articles/4404674776724-Overview). | +**dataApiKey** | **string** | MoEngage DATA API Key. See [MoEngage Developer Guide](https://developers.moengage.com/hc/en-us/articles/4404674776724-Overview). | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/OutgoingIntegrationTemplate.md b/docs/Model/OutgoingIntegrationTemplate.md new file mode 100644 index 00000000..e6818547 --- /dev/null +++ b/docs/Model/OutgoingIntegrationTemplate.md @@ -0,0 +1,18 @@ +# # OutgoingIntegrationTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Unique ID for this entity. | +**integrationType** | **int** | Unique ID of outgoing integration type. | +**title** | **string** | The title of the integration template. | +**description** | **string** | The description of the specific outgoing integration template. | +**payload** | **string** | The API payload (supports templating using parameters) for this integration template. | +**method** | **string** | API method for this webhook. | +**relativeUrl** | **string** | The relative URL corresponding to each integration template. | +**headers** | **string[]** | The list of HTTP headers for this integration template. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/OutgoingIntegrationTemplateWithConfigurationDetails.md b/docs/Model/OutgoingIntegrationTemplateWithConfigurationDetails.md new file mode 100644 index 00000000..51a577f9 --- /dev/null +++ b/docs/Model/OutgoingIntegrationTemplateWithConfigurationDetails.md @@ -0,0 +1,19 @@ +# # OutgoingIntegrationTemplateWithConfigurationDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Unique ID for this entity. | +**integrationType** | **int** | Unique ID of outgoing integration type. | +**title** | **string** | The title of the integration template. | +**description** | **string** | The description of the specific outgoing integration template. | +**payload** | **string** | The API payload (supports templating using parameters) for this integration template. | +**method** | **string** | API method for this webhook. | +**relativeUrl** | **string** | The relative URL corresponding to each integration template. | +**headers** | **string[]** | The list of HTTP headers for this integration template. | +**policy** | [**object**](.md) | The outgoing integration policy specific to each integration type. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/OutgoingIntegrationTemplates.md b/docs/Model/OutgoingIntegrationTemplates.md new file mode 100644 index 00000000..81a4c04d --- /dev/null +++ b/docs/Model/OutgoingIntegrationTemplates.md @@ -0,0 +1,11 @@ +# # OutgoingIntegrationTemplates + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\TalonOne\Client\Model\OutgoingIntegrationTemplate[]**](OutgoingIntegrationTemplate.md) | The list of templates for a given outgoing integration type. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/PendingPointsNotificationPolicy.md b/docs/Model/PendingPointsNotificationPolicy.md new file mode 100644 index 00000000..beece647 --- /dev/null +++ b/docs/Model/PendingPointsNotificationPolicy.md @@ -0,0 +1,11 @@ +# # PendingPointsNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Notification name. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/RemoveFromAudienceEffectProps.md b/docs/Model/RemoveFromAudienceEffectProps.md new file mode 100644 index 00000000..fff809cd --- /dev/null +++ b/docs/Model/RemoveFromAudienceEffectProps.md @@ -0,0 +1,14 @@ +# # RemoveFromAudienceEffectProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audienceId** | **int** | The internal ID of the audience. | [optional] +**audienceName** | **string** | The name of the audience. | [optional] +**profileIntegrationId** | **string** | The ID of the customer profile in the third-party integration platform. | [optional] +**profileId** | **int** | The internal ID of the customer profile. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/ReturnedCartItem.md b/docs/Model/ReturnedCartItem.md index 4ad09f80..0137e005 100644 --- a/docs/Model/ReturnedCartItem.md +++ b/docs/Model/ReturnedCartItem.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **position** | **int** | The index of the cart item in the provided customer session's `cartItems` property. | -**quantity** | **int** | Number of cart items to return. It is only available when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. If cart item flattening is disabled, the cart item can only be returned in its entirety. | [optional] +**quantity** | **int** | Number of cart items to return. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Role.md b/docs/Model/Role.md index b5ed5b06..be5baf96 100644 --- a/docs/Model/Role.md +++ b/docs/Model/Role.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **accountId** | **int** | The ID of the account that owns this entity. | -**campaignGroupID** | **int** | The ID of the [Campaign Group](https://docs.talon.one/docs/product/account/managing-campaign-groups) this role was created for. | [optional] +**campaignGroupID** | **int** | The ID of the [Campaign Group](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups) this role was created for. | [optional] **name** | **string** | Name of the role. | **description** | **string** | Description of the role. | [optional] **members** | **int[]** | A list of user identifiers assigned to this role. | [optional] diff --git a/docs/Model/RoleAssign.md b/docs/Model/RoleAssign.md index 8292d4a4..26c6a910 100644 --- a/docs/Model/RoleAssign.md +++ b/docs/Model/RoleAssign.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**users** | **int[]** | An array of userIDs. | -**roles** | **int[]** | An array of roleIDs. | +**users** | **int[]** | An array of user IDs. | +**roles** | **int[]** | An array of role IDs. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RoleV2.md b/docs/Model/RoleV2.md index 973806eb..8eb21884 100644 --- a/docs/Model/RoleV2.md +++ b/docs/Model/RoleV2.md @@ -4,11 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | +**accountId** | **int** | The ID of the account that owns this entity. | **name** | **string** | Name of the role. | [optional] **description** | **string** | Description of the role. | [optional] -**isAdmin** | **bool** | Indicates whether the role grants admin permissions. | [optional] **permissions** | [**\TalonOne\Client\Model\RoleV2Permissions**](RoleV2Permissions.md) | | [optional] -**members** | **int[]** | An array of user identifiers. | [optional] +**members** | **int[]** | A list of user identifiers the role is assigned to. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RoleV2ApplicationDetails.md b/docs/Model/RoleV2ApplicationDetails.md index 3cbc003d..b422c136 100644 --- a/docs/Model/RoleV2ApplicationDetails.md +++ b/docs/Model/RoleV2ApplicationDetails.md @@ -4,9 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**application** | **string** | Name of the Application-level permission set. | [optional] -**campaign** | **string** | Name of the campaign-level permission set. | [optional] -**draftCampaign** | **string** | Name of the draft campaign-level permission set. | [optional] +**application** | **string** | Name of the Application-related permission set for the given Application. | [optional] +**campaign** | **string** | Name of the campaign-related permission set for the given Application. | [optional] +**draftCampaign** | **string** | Name of the draft campaign-related permission set for the given Application. | [optional] +**tools** | **string** | Name of the tools-related permission set. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RoleV2Base.md b/docs/Model/RoleV2Base.md new file mode 100644 index 00000000..2b542e8a --- /dev/null +++ b/docs/Model/RoleV2Base.md @@ -0,0 +1,14 @@ +# # RoleV2Base + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the role. | [optional] +**description** | **string** | Description of the role. | [optional] +**permissions** | [**\TalonOne\Client\Model\RoleV2Permissions**](RoleV2Permissions.md) | | [optional] +**members** | **int[]** | A list of user identifiers the role is assigned to. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/RoleV2PermissionSet.md b/docs/Model/RoleV2PermissionSet.md index 2fe263e4..4bac571e 100644 --- a/docs/Model/RoleV2PermissionSet.md +++ b/docs/Model/RoleV2PermissionSet.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | Name of the permission set. | -**operationIds** | **string[]** | | +**logicalOperations** | **string[]** | List of logical operations in the permission set. Each logical operation must be shown under the `x-permission` tag on an endpoint level. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RoleV2Permissions.md b/docs/Model/RoleV2Permissions.md index 248ac1e8..97d31a53 100644 --- a/docs/Model/RoleV2Permissions.md +++ b/docs/Model/RoleV2Permissions.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**permissionSets** | [**\TalonOne\Client\Model\RoleV2PermissionSet[]**](RoleV2PermissionSet.md) | List of grouped operation IDs to use as a reference in the roles section. Each group of operation IDs has a name. | [optional] -**roles** | [**\TalonOne\Client\Model\RoleV2PermissionsRoles**](RoleV2PermissionsRoles.md) | | [optional] +**permissionSets** | [**\TalonOne\Client\Model\RoleV2PermissionSet[]**](RoleV2PermissionSet.md) | List of grouped logical operations to use as a reference in the roles section. Each group of logical operations has a name. | [optional] +**roles** | [**\TalonOne\Client\Model\RoleV2RolesGroup**](RoleV2RolesGroup.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RoleV2RolesGroup.md b/docs/Model/RoleV2RolesGroup.md new file mode 100644 index 00000000..dfbd1aff --- /dev/null +++ b/docs/Model/RoleV2RolesGroup.md @@ -0,0 +1,13 @@ +# # RoleV2RolesGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**applications** | [**map[string,\TalonOne\Client\Model\RoleV2ApplicationDetails]**](RoleV2ApplicationDetails.md) | A map of the link between the Application, campaign, or draft campaign-related permission set and the Application ID the permissions apply to. | [optional] +**loyaltyPrograms** | **map[string,string]** | A map of the link between the loyalty program-related permission set and the Application ID the permissions apply to. | [optional] +**campaignAccessGroups** | **map[string,string]** | A map of the link between the campaign access group-related permission set and the Application ID the permissions apply to. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/RollbackAddedLoyaltyPointsEffectProps.md b/docs/Model/RollbackAddedLoyaltyPointsEffectProps.md index b2e44ad3..c5dc308c 100644 --- a/docs/Model/RollbackAddedLoyaltyPointsEffectProps.md +++ b/docs/Model/RollbackAddedLoyaltyPointsEffectProps.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **recipientIntegrationId** | **string** | The user for whom these points were originally added. | **transactionUUID** | **string** | The identifier of 'deduction' entry added to the ledger as the `addLoyaltyPoints` effect is rolled back. | **cartItemPosition** | **float** | The index of the item in the cart items for which the loyalty points were rolled back. | [optional] -**cartItemSubPosition** | **float** | The sub-position is returned when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. It indicates to which item the loyalty points were rolled back, for cart items with `quantity` > 1. | [optional] +**cartItemSubPosition** | **float** | For cart items with `quantity` > 1, the sub-position indicates to which item the loyalty points were rolled back. | [optional] **cardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RollbackDiscountEffectProps.md b/docs/Model/RollbackDiscountEffectProps.md index 8388a258..acfc940c 100644 --- a/docs/Model/RollbackDiscountEffectProps.md +++ b/docs/Model/RollbackDiscountEffectProps.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **name** | **string** | The name of the \"setDiscount\" effect that was rolled back. | **value** | **float** | The value of the discount that was rolled back. | **cartItemPosition** | **float** | The index of the item in the cart items for which the discount was rolled back. | [optional] -**cartItemSubPosition** | **float** | The index of the item unit in its line item. It is only used for cart items with `quantity` > 1 and is only returned when cart item flattening is enabled. | [optional] +**cartItemSubPosition** | **float** | For cart items with `quantity` > 1, the subposition returns the index of the item unit in its line item. | [optional] **additionalCostId** | **int** | The ID of the additional cost that was rolled back. | [optional] **additionalCost** | **string** | The name of the additional cost that was rolled back. | [optional] **scope** | **string** | The scope of the rolled back discount - For a discount per session, it can be one of `cartItems`, `additionalCosts` or `sessionTotal` - For a discount per item, it can be one of `price`, `additionalCosts` or `itemTotal` | [optional] diff --git a/docs/Model/SSOConfig.md b/docs/Model/SSOConfig.md new file mode 100644 index 00000000..07d3bc40 --- /dev/null +++ b/docs/Model/SSOConfig.md @@ -0,0 +1,11 @@ +# # SSOConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enforced** | **bool** | An indication of whether single sign-on is enforced for the account. When enforced, users cannot use their email and password to sign in to Talon.One. It is not possible to change this to `false` after it is set to `true`. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/SetDiscountPerAdditionalCostPerItemEffectProps.md b/docs/Model/SetDiscountPerAdditionalCostPerItemEffectProps.md index 83235e4c..1f39d183 100644 --- a/docs/Model/SetDiscountPerAdditionalCostPerItemEffectProps.md +++ b/docs/Model/SetDiscountPerAdditionalCostPerItemEffectProps.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **additionalCostId** | **int** | The ID of the additional cost. | **value** | **float** | The total monetary value of the discount. | **position** | **float** | The index of the item in the cart item list containing the additional cost to be discounted. | -**subPosition** | **float** | Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. | [optional] +**subPosition** | **float** | For cart items with `quantity` > 1, the sub position indicates which item the discount applies to. | [optional] **additionalCost** | **string** | The name of the additional cost. | **desiredValue** | **float** | Only with [partial discounts enabled](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#partial-discounts). Represents the monetary value of the discount to be applied to additional discount without considering budget limitations. | [optional] diff --git a/docs/Model/SetDiscountPerItemEffectProps.md b/docs/Model/SetDiscountPerItemEffectProps.md index 242b925d..1c565be4 100644 --- a/docs/Model/SetDiscountPerItemEffectProps.md +++ b/docs/Model/SetDiscountPerItemEffectProps.md @@ -7,13 +7,15 @@ Name | Type | Description | Notes **name** | **string** | The name of the discount. Contains a hashtag character indicating the index of the position of the item the discount applies to. It is identical to the value of the `position` property. | **value** | **float** | The total monetary value of the discount. | **position** | **float** | The index of the item in the cart items list on which this discount should be applied. | -**subPosition** | **float** | Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. | [optional] +**subPosition** | **float** | For cart items with `quantity` > 1, the sub position indicates which item the discount applies to. | [optional] **desiredValue** | **float** | The original value of the discount. | [optional] **scope** | **string** | The scope of the discount: - `additionalCosts`: The discount applies to all the additional costs of the item. - `itemTotal`: The discount applies to the price of the item + the additional costs of the item. - `price`: The discount applies to the price of the item. | [optional] **totalDiscount** | **float** | The total discount given if this effect is a result of a prorated discount. | [optional] **desiredTotalDiscount** | **float** | The original total discount to give if this effect is a result of a prorated discount. | [optional] **bundleIndex** | **int** | The position of the bundle in a list of item bundles created from the same bundle definition. | [optional] **bundleName** | **string** | The name of the bundle definition. | [optional] +**targetedItemPosition** | **float** | The index of the targeted bundle item on which the applied discount is based. | [optional] +**targetedItemSubPosition** | **float** | The sub-position of the targeted bundle item on which the applied discount is based. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Store.md b/docs/Model/Store.md new file mode 100644 index 00000000..18e3229d --- /dev/null +++ b/docs/Model/Store.md @@ -0,0 +1,19 @@ +# # Store + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. The time this entity was created. | +**name** | **string** | The name of the store. | +**description** | **string** | The description of the store. | +**attributes** | [**object**](.md) | The attributes of the store. | [optional] +**integrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | +**applicationId** | **int** | The ID of the application that owns this entity. | +**updated** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent update on this entity. | +**linkedCampaignIds** | **int[]** | A list of IDs of the campaigns that are linked with current store. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/Tier.md b/docs/Model/Tier.md index 0b912c8c..3aa9e115 100644 --- a/docs/Model/Tier.md +++ b/docs/Model/Tier.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | The internal ID of the tier. | **name** | **string** | The name of the tier. | +**expiryDate** | [**\DateTime**](\DateTime.md) | Date when tier level expires in the RFC3339 format (in the Loyalty Program's timezone). | [optional] +**downgradePolicy** | **string** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TierDowngradeNotificationPolicy.md b/docs/Model/TierDowngradeNotificationPolicy.md new file mode 100644 index 00000000..42b85e19 --- /dev/null +++ b/docs/Model/TierDowngradeNotificationPolicy.md @@ -0,0 +1,11 @@ +# # TierDowngradeNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the notification. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/TierUpgradeNotificationPolicy.md b/docs/Model/TierUpgradeNotificationPolicy.md new file mode 100644 index 00000000..b1d80017 --- /dev/null +++ b/docs/Model/TierUpgradeNotificationPolicy.md @@ -0,0 +1,11 @@ +# # TierUpgradeNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Notification name. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/TierWillDowngradeNotificationPolicy.md b/docs/Model/TierWillDowngradeNotificationPolicy.md new file mode 100644 index 00000000..fa9639b7 --- /dev/null +++ b/docs/Model/TierWillDowngradeNotificationPolicy.md @@ -0,0 +1,12 @@ +# # TierWillDowngradeNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the notification. | +**triggers** | [**\TalonOne\Client\Model\TierWillDowngradeNotificationTrigger[]**](TierWillDowngradeNotificationTrigger.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/TierWillDowngradeNotificationTrigger.md b/docs/Model/TierWillDowngradeNotificationTrigger.md new file mode 100644 index 00000000..6698a06f --- /dev/null +++ b/docs/Model/TierWillDowngradeNotificationTrigger.md @@ -0,0 +1,12 @@ +# # TierWillDowngradeNotificationTrigger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **int** | The amount of period. | +**period** | **string** | Notification period indicated by a letter; \"w\" means week, \"d\" means day. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/TrackEventV2Response.md b/docs/Model/TrackEventV2Response.md new file mode 100644 index 00000000..da16eda4 --- /dev/null +++ b/docs/Model/TrackEventV2Response.md @@ -0,0 +1,19 @@ +# # TrackEventV2Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customerProfile** | [**\TalonOne\Client\Model\CustomerProfile**](CustomerProfile.md) | | [optional] +**event** | [**\TalonOne\Client\Model\Event**](Event.md) | | [optional] +**loyalty** | [**\TalonOne\Client\Model\Loyalty**](Loyalty.md) | | [optional] +**triggeredCampaigns** | [**\TalonOne\Client\Model\Campaign[]**](Campaign.md) | | [optional] +**ruleFailureReasons** | [**\TalonOne\Client\Model\RuleFailureReason[]**](RuleFailureReason.md) | | [optional] +**awardedGiveaways** | [**\TalonOne\Client\Model\Giveaway[]**](Giveaway.md) | | [optional] +**effects** | [**\TalonOne\Client\Model\Effect[]**](Effect.md) | The effects generated by the rules in your running campaigns. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | +**createdCoupons** | [**\TalonOne\Client\Model\Coupon[]**](Coupon.md) | | +**createdReferrals** | [**\TalonOne\Client\Model\Referral[]**](Referral.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/TwoFAConfig.md b/docs/Model/TwoFAConfig.md new file mode 100644 index 00000000..b4d887f3 --- /dev/null +++ b/docs/Model/TwoFAConfig.md @@ -0,0 +1,12 @@ +# # TwoFAConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | An indication of whether two-factor authentication is enabled for the account. | +**requireEverySignIn** | **bool** | Can be `true` or `false`. - `true`: Two-factor authentication is required each time a user signs in to their Talon.One account. - `false`: Two-factor authentication is only required when a user signs in to their Talon.One account on a new device, and every 30 days after that. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/UpdateApplication.md b/docs/Model/UpdateApplication.md index 283c9242..35d08a2d 100644 --- a/docs/Model/UpdateApplication.md +++ b/docs/Model/UpdateApplication.md @@ -11,15 +11,14 @@ Name | Type | Description | Notes **caseSensitivity** | **string** | The case sensitivity behavior to check coupon codes in the campaigns of this Application. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Default limits for campaigns created in this application. | [optional] -**campaignPriority** | **string** | Default [priority](https://docs.talon.one/docs/product/applications/setting-up-campaign-priorities) for campaigns created in this Application. | [optional] [default to 'universal'] -**exclusiveCampaignsStrategy** | **string** | The strategy used when choosing exclusive campaigns for evaluation. | [optional] [default to 'listOrder'] **defaultDiscountScope** | **string** | The default scope to apply `setDiscount` effects on if no scope was provided with the effect. | [optional] **enableCascadingDiscounts** | **bool** | Indicates if discounts should cascade for this Application. | [optional] -**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). | [optional] +**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. | [optional] **attributesSettings** | [**\TalonOne\Client\Model\AttributesSettings**](AttributesSettings.md) | | [optional] **sandbox** | **bool** | Indicates if this is a live or sandbox Application. | [optional] **enablePartialDiscounts** | **bool** | Indicates if this Application supports partial discounts. | [optional] **defaultDiscountAdditionalCostPerItemScope** | **string** | The default scope to apply `setDiscountPerItem` effects on if no scope was provided with the effect. | [optional] +**defaultEvaluationGroupId** | **int** | The ID of the default campaign evaluation group to which new campaigns will be added unless a different group is selected when creating the campaign. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateCampaign.md b/docs/Model/UpdateCampaign.md index a9c4a160..5ee4a464 100644 --- a/docs/Model/UpdateCampaign.md +++ b/docs/Model/UpdateCampaign.md @@ -10,13 +10,16 @@ Name | Type | Description | Notes **endTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become inactive. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] **state** | **string** | A disabled or archived campaign is not evaluated for rules or coupons. | [optional] [default to 'enabled'] -**activeRulesetId** | **int** | ID of Ruleset this campaign applies on customer session evaluation. | [optional] +**activeRulesetId** | **int** | [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] **tags** | **string[]** | A list of tags for the campaign. | **features** | **string[]** | A list of features for the campaign. | **couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | The set of limits that will operate for this campaign. | -**campaignGroups** | **int[]** | The IDs of the campaign groups that own this entity. | [optional] +**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups) this campaign belongs to. | [optional] +**evaluationGroupId** | **int** | The ID of the campaign evaluation group the campaign belongs to. | [optional] +**type** | **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [optional] [default to 'advanced'] +**linkedStoreIds** | **int[]** | A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateCampaignEvaluationGroup.md b/docs/Model/UpdateCampaignEvaluationGroup.md new file mode 100644 index 00000000..a3a461cc --- /dev/null +++ b/docs/Model/UpdateCampaignEvaluationGroup.md @@ -0,0 +1,16 @@ +# # UpdateCampaignEvaluationGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the campaign evaluation group. | +**parentId** | **int** | The ID of the parent group that contains the campaign evaluation group. | +**description** | **string** | A description of the campaign evaluation group. | [optional] +**evaluationMode** | **string** | The mode by which campaigns in the campaign evaluation group are evaluated. | +**evaluationScope** | **string** | The evaluation scope of the campaign evaluation group. | +**locked** | **bool** | An indicator of whether the campaign evaluation group is locked for modification. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/UpdateCampaignGroup.md b/docs/Model/UpdateCampaignGroup.md index 2c62bf1a..9b030161 100644 --- a/docs/Model/UpdateCampaignGroup.md +++ b/docs/Model/UpdateCampaignGroup.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | The name of this campaign group. | -**description** | **string** | A longer description of the campaign group. | [optional] -**subscribedApplicationsIds** | **int[]** | A list of the IDs of the applications that this campaign group is enabled for. | [optional] -**campaignIds** | **int[]** | A list of the IDs of the campaigns that this campaign group owns. | [optional] +**name** | **string** | The name of this campaign access group. | +**description** | **string** | A longer description of the campaign access group. | [optional] +**subscribedApplicationsIds** | **int[]** | A list of IDs of the Applications that this campaign access group is enabled for. | [optional] +**campaignIds** | **int[]** | A list of IDs of the campaigns that are part of the campaign access group. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateCampaignTemplate.md b/docs/Model/UpdateCampaignTemplate.md index b41656e2..e1b42370 100644 --- a/docs/Model/UpdateCampaignTemplate.md +++ b/docs/Model/UpdateCampaignTemplate.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **applicationsIds** | **int[]** | A list of IDs of the Applications that are subscribed to this campaign template. | **campaignCollections** | [**\TalonOne\Client\Model\CampaignTemplateCollection[]**](CampaignTemplateCollection.md) | The campaign collections from the blueprint campaign for the template. | [optional] **defaultCampaignGroupId** | **int** | The default campaign group ID. | [optional] +**campaignType** | **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [optional] [default to 'advanced'] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateCoupon.md b/docs/Model/UpdateCoupon.md index a03621e3..a542e1b2 100644 --- a/docs/Model/UpdateCoupon.md +++ b/docs/Model/UpdateCoupon.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **recipientIntegrationId** | **string** | The integration ID for this coupon's beneficiary's profile. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this item. | [optional] **isReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] +**implicitlyReserved** | **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateCouponBatch.md b/docs/Model/UpdateCouponBatch.md index 470bb7e4..62694762 100644 --- a/docs/Model/UpdateCouponBatch.md +++ b/docs/Model/UpdateCouponBatch.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **reservationLimit** | **int** | The number of reservations that can be made with this coupon code. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] **expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] -**attributes** | [**object**](.md) | Arbitrary properties associated with this item. | [optional] -**batchID** | **string** | The id of the batch the coupon belongs to. | [optional] +**attributes** | [**object**](.md) | Optional property to set the value of custom coupon attributes. They are defined in the Campaign Manager, see [Managing attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes). Coupon attributes can also be set to _mandatory_ in your Application [settings](https://docs.talon.one/docs/product/applications/using-attributes#making-attributes-mandatory). If your Application uses mandatory attributes, you must use this property to set their value. | [optional] +**batchID** | **string** | The ID of the batch the coupon(s) belong to. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateLoyaltyProgram.md b/docs/Model/UpdateLoyaltyProgram.md index b0d7fbfe..ad58f0ce 100644 --- a/docs/Model/UpdateLoyaltyProgram.md +++ b/docs/Model/UpdateLoyaltyProgram.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **allowSubledger** | **bool** | Indicates if this program supports subledgers inside the program. | [optional] **usersPerCardLimit** | **int** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] **sandbox** | **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | [optional] +**tiersExpireIn** | **string** | The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] +**tiersDowngradePolicy** | **string** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] **tiers** | [**\TalonOne\Client\Model\NewLoyaltyTier[]**](NewLoyaltyTier.md) | The tiers in this loyalty program. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateStore.md b/docs/Model/UpdateStore.md new file mode 100644 index 00000000..232e1aac --- /dev/null +++ b/docs/Model/UpdateStore.md @@ -0,0 +1,13 @@ +# # UpdateStore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the store. | +**description** | **string** | The description of the store. | +**attributes** | [**object**](.md) | The attributes of the store. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/UpdateUser.md b/docs/Model/UpdateUser.md index 7b38ae95..a9429797 100644 --- a/docs/Model/UpdateUser.md +++ b/docs/Model/UpdateUser.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **state** | **string** | New state (\"deactivated\" or \"active\") for the user. Only usable by admins for the user. | [optional] **roles** | **int[]** | List of roles to assign to the user. | [optional] **applicationNotificationSubscriptions** | [**object**](.md) | | [optional] +**isAdmin** | **bool** | An indication of whether the user has admin permissions. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/User.md b/docs/Model/User.md index d01ff1fe..981936a8 100644 --- a/docs/Model/User.md +++ b/docs/Model/User.md @@ -17,6 +17,9 @@ Name | Type | Description | Notes **roles** | **int[]** | Contains a list of all roles the user is a member of. | [optional] **applicationNotificationSubscriptions** | [**object**](.md) | | [optional] **authMethod** | **string** | The Authentication method for this user. | [optional] +**isAdmin** | **bool** | An indication of whether the user has admin permissions. | [optional] +**lastSignedIn** | [**\DateTime**](\DateTime.md) | Date and time when the user last signed in to Talon.One. | [optional] +**lastAccessed** | [**\DateTime**](\DateTime.md) | Date and time of the user's last activity after signing in to Talon.One. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookWithOutgoingIntegrationDetails.md b/docs/Model/WebhookWithOutgoingIntegrationDetails.md new file mode 100644 index 00000000..d1c0d790 --- /dev/null +++ b/docs/Model/WebhookWithOutgoingIntegrationDetails.md @@ -0,0 +1,24 @@ +# # WebhookWithOutgoingIntegrationDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | +**applicationIds** | **int[]** | The IDs of the Applications that are related to this entity. The IDs of the Applications that are related to this entity. | +**title** | **string** | Name or title for this webhook. | +**verb** | **string** | API method for this webhook. | +**url** | **string** | API URL (supports templating using parameters) for this webhook. | +**headers** | **string[]** | List of API HTTP headers for this webhook. | +**payload** | **string** | API payload (supports templating using parameters) for this webhook. | [optional] +**params** | [**\TalonOne\Client\Model\TemplateArgDef[]**](TemplateArgDef.md) | Array of template argument definitions. | +**enabled** | **bool** | Enables or disables webhook from showing in the Rule Builder. | +**outgoingIntegrationTemplateId** | **int** | Identifier of the outgoing integration template. | [optional] +**outgoingIntegrationTypeId** | **int** | Identifier of the outgoing integration type. | [optional] +**outgoingIntegrationTypeName** | **string** | Name of the outgoing integration. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/lib/Api/IntegrationApi.php b/lib/Api/IntegrationApi.php index 6a882b72..f5f95d76 100644 --- a/lib/Api/IntegrationApi.php +++ b/lib/Api/IntegrationApi.php @@ -2211,7 +2211,7 @@ protected function deleteCouponReservationRequest($couponValue, $body) * * Delete customer's personal data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2227,7 +2227,7 @@ public function deleteCustomerData($integrationId) * * Delete customer's personal data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2295,7 +2295,7 @@ public function deleteCustomerDataWithHttpInfo($integrationId) * * Delete customer's personal data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2315,7 +2315,7 @@ function ($response) { * * Delete customer's personal data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2351,7 +2351,7 @@ function ($exception) { /** * Create request for operation 'deleteCustomerData' * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2457,7 +2457,7 @@ protected function deleteCustomerDataRequest($integrationId) * * List customer data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param bool $profile Set to `true` to include customer profile information in the response. (optional) * @param bool $referrals Set to `true` to include referral information in the response. (optional) * @param bool $coupons Set to `true` to include coupon information in the response. (optional) @@ -2479,7 +2479,7 @@ public function getCustomerInventory($integrationId, $profile = null, $referrals * * List customer data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param bool $profile Set to `true` to include customer profile information in the response. (optional) * @param bool $referrals Set to `true` to include referral information in the response. (optional) * @param bool $coupons Set to `true` to include coupon information in the response. (optional) @@ -2612,7 +2612,7 @@ public function getCustomerInventoryWithHttpInfo($integrationId, $profile = null * * List customer data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param bool $profile Set to `true` to include customer profile information in the response. (optional) * @param bool $referrals Set to `true` to include referral information in the response. (optional) * @param bool $coupons Set to `true` to include coupon information in the response. (optional) @@ -2637,7 +2637,7 @@ function ($response) { * * List customer data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param bool $profile Set to `true` to include customer profile information in the response. (optional) * @param bool $referrals Set to `true` to include referral information in the response. (optional) * @param bool $coupons Set to `true` to include coupon information in the response. (optional) @@ -2689,7 +2689,7 @@ function ($exception) { /** * Create request for operation 'getCustomerInventory' * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param bool $profile Set to `true` to include customer profile information in the response. (optional) * @param bool $referrals Set to `true` to include referral information in the response. (optional) * @param bool $coupons Set to `true` to include coupon information in the response. (optional) @@ -3153,9 +3153,9 @@ protected function getCustomerSessionRequest($customerSessionId) * * Get customer's loyalty points * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3172,9 +3172,9 @@ public function getLoyaltyBalances($loyaltyProgramId, $integrationId, $endDate = * * Get customer's loyalty points * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3322,9 +3322,9 @@ public function getLoyaltyBalancesWithHttpInfo($loyaltyProgramId, $integrationId * * Get customer's loyalty points * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3344,9 +3344,9 @@ function ($response) { * * Get customer's loyalty points * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3393,9 +3393,9 @@ function ($exception) { /** * Create request for operation 'getLoyaltyBalances' * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -3524,7 +3524,7 @@ protected function getLoyaltyBalancesRequest($loyaltyProgramId, $integrationId, * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3543,7 +3543,7 @@ public function getLoyaltyCardBalances($loyaltyProgramId, $loyaltyCardId, $endDa * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3693,7 +3693,7 @@ public function getLoyaltyCardBalancesWithHttpInfo($loyaltyProgramId, $loyaltyCa * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3715,7 +3715,7 @@ function ($response) { * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3764,7 +3764,7 @@ function ($exception) { * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -3891,48 +3891,46 @@ protected function getLoyaltyCardBalancesRequest($loyaltyProgramId, $loyaltyCard } /** - * Operation getLoyaltyCardTransactions + * Operation getLoyaltyCardPoints * - * List card's transactions + * List card's unused loyalty points * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $status Filter points based on their status. (optional, default to 'active') * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2001|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse2003|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getLoyaltyCardTransactions($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) + public function getLoyaltyCardPoints($loyaltyProgramId, $loyaltyCardId, $status = 'active', $subledgerId = null, $pageSize = 50, $skip = null) { - list($response) = $this->getLoyaltyCardTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + list($response) = $this->getLoyaltyCardPointsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $status, $subledgerId, $pageSize, $skip); return $response; } /** - * Operation getLoyaltyCardTransactionsWithHttpInfo + * Operation getLoyaltyCardPointsWithHttpInfo * - * List card's transactions + * List card's unused loyalty points * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $status Filter points based on their status. (optional, default to 'active') * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2001|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2003|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyCardTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) + public function getLoyaltyCardPointsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $status = 'active', $subledgerId = null, $pageSize = 50, $skip = null) { - $request = $this->getLoyaltyCardTransactionsRequest($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + $request = $this->getLoyaltyCardPointsRequest($loyaltyProgramId, $loyaltyCardId, $status, $subledgerId, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -3965,14 +3963,14 @@ public function getLoyaltyCardTransactionsWithHttpInfo($loyaltyProgramId, $loyal $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2001' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2003' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2001', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2003', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -4014,7 +4012,7 @@ public function getLoyaltyCardTransactionsWithHttpInfo($loyaltyProgramId, $loyal ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2001'; + $returnType = '\TalonOne\Client\Model\InlineResponse2003'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -4033,7 +4031,7 @@ public function getLoyaltyCardTransactionsWithHttpInfo($loyaltyProgramId, $loyal case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2001', + '\TalonOne\Client\Model\InlineResponse2003', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4068,24 +4066,23 @@ public function getLoyaltyCardTransactionsWithHttpInfo($loyaltyProgramId, $loyal } /** - * Operation getLoyaltyCardTransactionsAsync + * Operation getLoyaltyCardPointsAsync * - * List card's transactions + * List card's unused loyalty points * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $status Filter points based on their status. (optional, default to 'active') * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyCardTransactionsAsync($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) + public function getLoyaltyCardPointsAsync($loyaltyProgramId, $loyaltyCardId, $status = 'active', $subledgerId = null, $pageSize = 50, $skip = null) { - return $this->getLoyaltyCardTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip) + return $this->getLoyaltyCardPointsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $status, $subledgerId, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -4094,25 +4091,24 @@ function ($response) { } /** - * Operation getLoyaltyCardTransactionsAsyncWithHttpInfo + * Operation getLoyaltyCardPointsAsyncWithHttpInfo * - * List card's transactions + * List card's unused loyalty points * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $status Filter points based on their status. (optional, default to 'active') * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyCardTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) + public function getLoyaltyCardPointsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $status = 'active', $subledgerId = null, $pageSize = 50, $skip = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2001'; - $request = $this->getLoyaltyCardTransactionsRequest($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\InlineResponse2003'; + $request = $this->getLoyaltyCardPointsRequest($loyaltyProgramId, $loyaltyCardId, $status, $subledgerId, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4149,52 +4145,58 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyCardTransactions' + * Create request for operation 'getLoyaltyCardPoints' * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $status Filter points based on their status. (optional, default to 'active') * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyCardTransactionsRequest($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) + protected function getLoyaltyCardPointsRequest($loyaltyProgramId, $loyaltyCardId, $status = 'active', $subledgerId = null, $pageSize = 50, $skip = null) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCardTransactions' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCardPoints' ); } // verify the required parameter 'loyaltyCardId' is set if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyCardId when calling getLoyaltyCardTransactions' + 'Missing the required parameter $loyaltyCardId when calling getLoyaltyCardPoints' ); } if (strlen($loyaltyCardId) > 108) { - throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling IntegrationApi.getLoyaltyCardTransactions, must be smaller than or equal to 108.'); + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling IntegrationApi.getLoyaltyCardPoints, must be smaller than or equal to 108.'); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyCardTransactions, must be smaller than or equal to 1000.'); + if ($pageSize !== null && $pageSize > 50) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyCardPoints, must be smaller than or equal to 50.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyCardTransactions, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyCardPoints, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transactions'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/points'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($status)) { + $status = ObjectSerializer::serializeCollection($status, '', true); + } + if ($status !== null) { + $queryParams['status'] = $status; + } // query params if (is_array($subledgerId)) { $subledgerId = ObjectSerializer::serializeCollection($subledgerId, '', true); @@ -4203,20 +4205,6 @@ protected function getLoyaltyCardTransactionsRequest($loyaltyProgramId, $loyalty $queryParams['subledgerId'] = $subledgerId; } // query params - if (is_array($startDate)) { - $startDate = ObjectSerializer::serializeCollection($startDate, '', true); - } - if ($startDate !== null) { - $queryParams['startDate'] = $startDate; - } - // query params - if (is_array($endDate)) { - $endDate = ObjectSerializer::serializeCollection($endDate, '', true); - } - if ($endDate !== null) { - $queryParams['endDate'] = $endDate; - } - // query params if (is_array($pageSize)) { $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); } @@ -4319,48 +4307,50 @@ protected function getLoyaltyCardTransactionsRequest($loyaltyProgramId, $loyalty } /** - * Operation getLoyaltyProgramProfileTransactions + * Operation getLoyaltyCardTransactions * - * List customer's loyalty transactions + * List card's transactions * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 50) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2002|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse2001|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getLoyaltyProgramProfileTransactions($loyaltyProgramId, $integrationId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + public function getLoyaltyCardTransactions($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $loyaltyTransactionType = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) { - list($response) = $this->getLoyaltyProgramProfileTransactionsWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + list($response) = $this->getLoyaltyCardTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip); return $response; } /** - * Operation getLoyaltyProgramProfileTransactionsWithHttpInfo + * Operation getLoyaltyCardTransactionsWithHttpInfo * - * List customer's loyalty transactions + * List card's transactions * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 50) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2002|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2001|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyProgramProfileTransactionsWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + public function getLoyaltyCardTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $loyaltyTransactionType = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) { - $request = $this->getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + $request = $this->getLoyaltyCardTransactionsRequest($loyaltyProgramId, $loyaltyCardId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -4393,14 +4383,14 @@ public function getLoyaltyProgramProfileTransactionsWithHttpInfo($loyaltyProgram $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2002' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2001' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2002', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2001', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -4442,7 +4432,7 @@ public function getLoyaltyProgramProfileTransactionsWithHttpInfo($loyaltyProgram ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2002'; + $returnType = '\TalonOne\Client\Model\InlineResponse2001'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -4461,7 +4451,7 @@ public function getLoyaltyProgramProfileTransactionsWithHttpInfo($loyaltyProgram case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2002', + '\TalonOne\Client\Model\InlineResponse2001', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4496,24 +4486,25 @@ public function getLoyaltyProgramProfileTransactionsWithHttpInfo($loyaltyProgram } /** - * Operation getLoyaltyProgramProfileTransactionsAsync + * Operation getLoyaltyCardTransactionsAsync * - * List customer's loyalty transactions + * List card's transactions * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 50) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramProfileTransactionsAsync($loyaltyProgramId, $integrationId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + public function getLoyaltyCardTransactionsAsync($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $loyaltyTransactionType = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) { - return $this->getLoyaltyProgramProfileTransactionsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip) + return $this->getLoyaltyCardTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -4522,25 +4513,26 @@ function ($response) { } /** - * Operation getLoyaltyProgramProfileTransactionsAsyncWithHttpInfo + * Operation getLoyaltyCardTransactionsAsyncWithHttpInfo * - * List customer's loyalty transactions + * List card's transactions * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 50) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramProfileTransactionsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + public function getLoyaltyCardTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $loyaltyTransactionType = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2002'; - $request = $this->getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\InlineResponse2001'; + $request = $this->getLoyaltyCardTransactionsRequest($loyaltyProgramId, $loyaltyCardId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4577,42 +4569,47 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyProgramProfileTransactions' + * Create request for operation 'getLoyaltyCardTransactions' * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 50) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId, $integrationId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + protected function getLoyaltyCardTransactionsRequest($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $loyaltyTransactionType = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyProgramProfileTransactions' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCardTransactions' ); } - // verify the required parameter 'integrationId' is set - if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $integrationId when calling getLoyaltyProgramProfileTransactions' + 'Missing the required parameter $loyaltyCardId when calling getLoyaltyCardTransactions' ); } - if ($pageSize !== null && $pageSize > 50) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyProgramProfileTransactions, must be smaller than or equal to 50.'); + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling IntegrationApi.getLoyaltyCardTransactions, must be smaller than or equal to 108.'); + } + + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyCardTransactions, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyProgramProfileTransactions, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyCardTransactions, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transactions'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4627,6 +4624,13 @@ protected function getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId $queryParams['subledgerId'] = $subledgerId; } // query params + if (is_array($loyaltyTransactionType)) { + $loyaltyTransactionType = ObjectSerializer::serializeCollection($loyaltyTransactionType, '', true); + } + if ($loyaltyTransactionType !== null) { + $queryParams['loyaltyTransactionType'] = $loyaltyTransactionType; + } + // query params if (is_array($startDate)) { $startDate = ObjectSerializer::serializeCollection($startDate, '', true); } @@ -4665,10 +4669,10 @@ protected function getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId ); } // path params - if ($integrationId !== null) { + if ($loyaltyCardId !== null) { $resourcePath = str_replace( - '{' . 'integrationId' . '}', - ObjectSerializer::toPathValue($integrationId), + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), $resourcePath ); } @@ -4743,36 +4747,46 @@ protected function getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId } /** - * Operation getReservedCustomers + * Operation getLoyaltyProgramProfilePoints * - * List customers that have this coupon reserved + * List customer's unused loyalty points * - * @param string $couponValue The code of the coupon. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $status Filter points based on their status. (optional, default to 'active') + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse200|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse2004|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getReservedCustomers($couponValue) + public function getLoyaltyProgramProfilePoints($loyaltyProgramId, $integrationId, $status = 'active', $subledgerId = null, $pageSize = 50, $skip = null) { - list($response) = $this->getReservedCustomersWithHttpInfo($couponValue); + list($response) = $this->getLoyaltyProgramProfilePointsWithHttpInfo($loyaltyProgramId, $integrationId, $status, $subledgerId, $pageSize, $skip); return $response; } /** - * Operation getReservedCustomersWithHttpInfo + * Operation getLoyaltyProgramProfilePointsWithHttpInfo * - * List customers that have this coupon reserved + * List customer's unused loyalty points * - * @param string $couponValue The code of the coupon. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $status Filter points based on their status. (optional, default to 'active') + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse200|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2004|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getReservedCustomersWithHttpInfo($couponValue) + public function getLoyaltyProgramProfilePointsWithHttpInfo($loyaltyProgramId, $integrationId, $status = 'active', $subledgerId = null, $pageSize = 50, $skip = null) { - $request = $this->getReservedCustomersRequest($couponValue); + $request = $this->getLoyaltyProgramProfilePointsRequest($loyaltyProgramId, $integrationId, $status, $subledgerId, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -4805,14 +4819,14 @@ public function getReservedCustomersWithHttpInfo($couponValue) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse200' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2004' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse200', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2004', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -4854,7 +4868,7 @@ public function getReservedCustomersWithHttpInfo($couponValue) ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse200'; + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -4873,7 +4887,7 @@ public function getReservedCustomersWithHttpInfo($couponValue) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse200', + '\TalonOne\Client\Model\InlineResponse2004', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4908,18 +4922,23 @@ public function getReservedCustomersWithHttpInfo($couponValue) } /** - * Operation getReservedCustomersAsync + * Operation getLoyaltyProgramProfilePointsAsync * - * List customers that have this coupon reserved + * List customer's unused loyalty points * - * @param string $couponValue The code of the coupon. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $status Filter points based on their status. (optional, default to 'active') + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getReservedCustomersAsync($couponValue) + public function getLoyaltyProgramProfilePointsAsync($loyaltyProgramId, $integrationId, $status = 'active', $subledgerId = null, $pageSize = 50, $skip = null) { - return $this->getReservedCustomersAsyncWithHttpInfo($couponValue) + return $this->getLoyaltyProgramProfilePointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $status, $subledgerId, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -4928,19 +4947,24 @@ function ($response) { } /** - * Operation getReservedCustomersAsyncWithHttpInfo + * Operation getLoyaltyProgramProfilePointsAsyncWithHttpInfo * - * List customers that have this coupon reserved + * List customer's unused loyalty points * - * @param string $couponValue The code of the coupon. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $status Filter points based on their status. (optional, default to 'active') + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getReservedCustomersAsyncWithHttpInfo($couponValue) + public function getLoyaltyProgramProfilePointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $status = 'active', $subledgerId = null, $pageSize = 50, $skip = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse200'; - $request = $this->getReservedCustomersRequest($couponValue); + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; + $request = $this->getLoyaltyProgramProfilePointsRequest($loyaltyProgramId, $integrationId, $status, $subledgerId, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4977,36 +5001,90 @@ function ($exception) { } /** - * Create request for operation 'getReservedCustomers' + * Create request for operation 'getLoyaltyProgramProfilePoints' * - * @param string $couponValue The code of the coupon. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $status Filter points based on their status. (optional, default to 'active') + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getReservedCustomersRequest($couponValue) + protected function getLoyaltyProgramProfilePointsRequest($loyaltyProgramId, $integrationId, $status = 'active', $subledgerId = null, $pageSize = 50, $skip = null) { - // verify the required parameter 'couponValue' is set - if ($couponValue === null || (is_array($couponValue) && count($couponValue) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $couponValue when calling getReservedCustomers' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyProgramProfilePoints' + ); + } + // verify the required parameter 'integrationId' is set + if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $integrationId when calling getLoyaltyProgramProfilePoints' ); } + if ($pageSize !== null && $pageSize > 50) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyProgramProfilePoints, must be smaller than or equal to 50.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyProgramProfilePoints, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/coupon_reservations/customerprofiles/{couponValue}'; + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/points'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($status)) { + $status = ObjectSerializer::serializeCollection($status, '', true); + } + if ($status !== null) { + $queryParams['status'] = $status; + } + // query params + if (is_array($subledgerId)) { + $subledgerId = ObjectSerializer::serializeCollection($subledgerId, '', true); + } + if ($subledgerId !== null) { + $queryParams['subledgerId'] = $subledgerId; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } // path params - if ($couponValue !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'couponValue' . '}', - ObjectSerializer::toPathValue($couponValue), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($integrationId !== null) { + $resourcePath = str_replace( + '{' . 'integrationId' . '}', + ObjectSerializer::toPathValue($integrationId), $resourcePath ); } @@ -5081,40 +5159,50 @@ protected function getReservedCustomersRequest($couponValue) } /** - * Operation linkLoyaltyCardToProfile - * - * Link customer profile to card + * Operation getLoyaltyProgramProfileTransactions * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) + * List customer's loyalty transactions * - * @throws \TalonOne\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\InlineResponse2002|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function linkLoyaltyCardToProfile($loyaltyProgramId, $loyaltyCardId, $body) + public function getLoyaltyProgramProfileTransactions($loyaltyProgramId, $integrationId, $subledgerId = null, $loyaltyTransactionType = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - list($response) = $this->linkLoyaltyCardToProfileWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body); + list($response) = $this->getLoyaltyProgramProfileTransactionsWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip); return $response; } /** - * Operation linkLoyaltyCardToProfileWithHttpInfo + * Operation getLoyaltyProgramProfileTransactionsWithHttpInfo * - * Link customer profile to card + * List customer's loyalty transactions * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2002|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function linkLoyaltyCardToProfileWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + public function getLoyaltyProgramProfileTransactionsWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId = null, $loyaltyTransactionType = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - $request = $this->linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCardId, $body); + $request = $this->getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId, $integrationId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -5147,14 +5235,14 @@ public function linkLoyaltyCardToProfileWithHttpInfo($loyaltyProgramId, $loyalty $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\LoyaltyCard' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2002' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyCard', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2002', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -5196,7 +5284,7 @@ public function linkLoyaltyCardToProfileWithHttpInfo($loyaltyProgramId, $loyalty ]; } - $returnType = '\TalonOne\Client\Model\LoyaltyCard'; + $returnType = '\TalonOne\Client\Model\InlineResponse2002'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -5215,7 +5303,7 @@ public function linkLoyaltyCardToProfileWithHttpInfo($loyaltyProgramId, $loyalty case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\LoyaltyCard', + '\TalonOne\Client\Model\InlineResponse2002', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -5250,20 +5338,25 @@ public function linkLoyaltyCardToProfileWithHttpInfo($loyaltyProgramId, $loyalty } /** - * Operation linkLoyaltyCardToProfileAsync + * Operation getLoyaltyProgramProfileTransactionsAsync * - * Link customer profile to card + * List customer's loyalty transactions * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function linkLoyaltyCardToProfileAsync($loyaltyProgramId, $loyaltyCardId, $body) + public function getLoyaltyProgramProfileTransactionsAsync($loyaltyProgramId, $integrationId, $subledgerId = null, $loyaltyTransactionType = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - return $this->linkLoyaltyCardToProfileAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + return $this->getLoyaltyProgramProfileTransactionsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -5272,21 +5365,26 @@ function ($response) { } /** - * Operation linkLoyaltyCardToProfileAsyncWithHttpInfo + * Operation getLoyaltyProgramProfileTransactionsAsyncWithHttpInfo * - * Link customer profile to card + * List customer's loyalty transactions * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function linkLoyaltyCardToProfileAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + public function getLoyaltyProgramProfileTransactionsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId = null, $loyaltyTransactionType = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - $returnType = '\TalonOne\Client\Model\LoyaltyCard'; - $request = $this->linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCardId, $body); + $returnType = '\TalonOne\Client\Model\InlineResponse2002'; + $request = $this->getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId, $integrationId, $subledgerId, $loyaltyTransactionType, $startDate, $endDate, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5323,47 +5421,91 @@ function ($exception) { } /** - * Create request for operation 'linkLoyaltyCardToProfile' + * Create request for operation 'getLoyaltyProgramProfileTransactions' * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCardId, $body) + protected function getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId, $integrationId, $subledgerId = null, $loyaltyTransactionType = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling linkLoyaltyCardToProfile' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyProgramProfileTransactions' ); } - // verify the required parameter 'loyaltyCardId' is set - if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { + // verify the required parameter 'integrationId' is set + if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyCardId when calling linkLoyaltyCardToProfile' + 'Missing the required parameter $integrationId when calling getLoyaltyProgramProfileTransactions' ); } - if (strlen($loyaltyCardId) > 108) { - throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling IntegrationApi.linkLoyaltyCardToProfile, must be smaller than or equal to 108.'); + if ($pageSize !== null && $pageSize > 50) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyProgramProfileTransactions, must be smaller than or equal to 50.'); } - - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling linkLoyaltyCardToProfile' - ); + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyProgramProfileTransactions, must be bigger than or equal to 1.'); } - $resourcePath = '/v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile'; + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($subledgerId)) { + $subledgerId = ObjectSerializer::serializeCollection($subledgerId, '', true); + } + if ($subledgerId !== null) { + $queryParams['subledgerId'] = $subledgerId; + } + // query params + if (is_array($loyaltyTransactionType)) { + $loyaltyTransactionType = ObjectSerializer::serializeCollection($loyaltyTransactionType, '', true); + } + if ($loyaltyTransactionType !== null) { + $queryParams['loyaltyTransactionType'] = $loyaltyTransactionType; + } + // query params + if (is_array($startDate)) { + $startDate = ObjectSerializer::serializeCollection($startDate, '', true); + } + if ($startDate !== null) { + $queryParams['startDate'] = $startDate; + } + // query params + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + } + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } // path params @@ -5375,19 +5517,16 @@ protected function linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCa ); } // path params - if ($loyaltyCardId !== null) { + if ($integrationId !== null) { $resourcePath = str_replace( - '{' . 'loyaltyCardId' . '}', - ObjectSerializer::toPathValue($loyaltyCardId), + '{' . 'integrationId' . '}', + ObjectSerializer::toPathValue($integrationId), $resourcePath ); } // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -5396,7 +5535,7 @@ protected function linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCa } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -5448,7 +5587,7 @@ protected function linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCa $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -5456,36 +5595,36 @@ protected function linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCa } /** - * Operation reopenCustomerSession + * Operation getReservedCustomers * - * Reopen customer session + * List customers that have this coupon reserved * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param string $couponValue The code of the coupon. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\ReopenSessionResponse|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse200|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function reopenCustomerSession($customerSessionId) + public function getReservedCustomers($couponValue) { - list($response) = $this->reopenCustomerSessionWithHttpInfo($customerSessionId); + list($response) = $this->getReservedCustomersWithHttpInfo($couponValue); return $response; } /** - * Operation reopenCustomerSessionWithHttpInfo + * Operation getReservedCustomersWithHttpInfo * - * Reopen customer session + * List customers that have this coupon reserved * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param string $couponValue The code of the coupon. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\ReopenSessionResponse|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse200|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function reopenCustomerSessionWithHttpInfo($customerSessionId) + public function getReservedCustomersWithHttpInfo($couponValue) { - $request = $this->reopenCustomerSessionRequest($customerSessionId); + $request = $this->getReservedCustomersRequest($couponValue); try { $options = $this->createHttpClientOption(); @@ -5518,26 +5657,26 @@ public function reopenCustomerSessionWithHttpInfo($customerSessionId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\ReopenSessionResponse' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse200' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ReopenSessionResponse', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse200', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\TalonOne\Client\Model\ErrorResponse' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -5548,6 +5687,18 @@ public function reopenCustomerSessionWithHttpInfo($customerSessionId) $content = (string) $responseBody; } + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + return [ ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), @@ -5555,7 +5706,7 @@ public function reopenCustomerSessionWithHttpInfo($customerSessionId) ]; } - $returnType = '\TalonOne\Client\Model\ReopenSessionResponse'; + $returnType = '\TalonOne\Client\Model\InlineResponse200'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -5574,7 +5725,7 @@ public function reopenCustomerSessionWithHttpInfo($customerSessionId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ReopenSessionResponse', + '\TalonOne\Client\Model\InlineResponse200', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -5582,7 +5733,7 @@ public function reopenCustomerSessionWithHttpInfo($customerSessionId) case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponse', + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -5595,24 +5746,32 @@ public function reopenCustomerSessionWithHttpInfo($customerSessionId) ); $e->setResponseObject($data); break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation reopenCustomerSessionAsync + * Operation getReservedCustomersAsync * - * Reopen customer session + * List customers that have this coupon reserved * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param string $couponValue The code of the coupon. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function reopenCustomerSessionAsync($customerSessionId) + public function getReservedCustomersAsync($couponValue) { - return $this->reopenCustomerSessionAsyncWithHttpInfo($customerSessionId) + return $this->getReservedCustomersAsyncWithHttpInfo($couponValue) ->then( function ($response) { return $response[0]; @@ -5621,19 +5780,19 @@ function ($response) { } /** - * Operation reopenCustomerSessionAsyncWithHttpInfo + * Operation getReservedCustomersAsyncWithHttpInfo * - * Reopen customer session + * List customers that have this coupon reserved * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param string $couponValue The code of the coupon. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function reopenCustomerSessionAsyncWithHttpInfo($customerSessionId) + public function getReservedCustomersAsyncWithHttpInfo($couponValue) { - $returnType = '\TalonOne\Client\Model\ReopenSessionResponse'; - $request = $this->reopenCustomerSessionRequest($customerSessionId); + $returnType = '\TalonOne\Client\Model\InlineResponse200'; + $request = $this->getReservedCustomersRequest($couponValue); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5670,23 +5829,23 @@ function ($exception) { } /** - * Create request for operation 'reopenCustomerSession' + * Create request for operation 'getReservedCustomers' * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param string $couponValue The code of the coupon. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function reopenCustomerSessionRequest($customerSessionId) + protected function getReservedCustomersRequest($couponValue) { - // verify the required parameter 'customerSessionId' is set - if ($customerSessionId === null || (is_array($customerSessionId) && count($customerSessionId) === 0)) { + // verify the required parameter 'couponValue' is set + if ($couponValue === null || (is_array($couponValue) && count($couponValue) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $customerSessionId when calling reopenCustomerSession' + 'Missing the required parameter $couponValue when calling getReservedCustomers' ); } - $resourcePath = '/v2/customer_sessions/{customerSessionId}/reopen'; + $resourcePath = '/v1/coupon_reservations/customerprofiles/{couponValue}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -5696,10 +5855,10 @@ protected function reopenCustomerSessionRequest($customerSessionId) // path params - if ($customerSessionId !== null) { + if ($couponValue !== null) { $resourcePath = str_replace( - '{' . 'customerSessionId' . '}', - ObjectSerializer::toPathValue($customerSessionId), + '{' . 'couponValue' . '}', + ObjectSerializer::toPathValue($couponValue), $resourcePath ); } @@ -5766,7 +5925,7 @@ protected function reopenCustomerSessionRequest($customerSessionId) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -5774,40 +5933,411 @@ protected function reopenCustomerSessionRequest($customerSessionId) } /** - * Operation returnCartItems + * Operation linkLoyaltyCardToProfile * - * Return cart items + * Link customer profile to card + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function linkLoyaltyCardToProfile($loyaltyProgramId, $loyaltyCardId, $body) + { + list($response) = $this->linkLoyaltyCardToProfileWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body); + return $response; + } + + /** + * Operation linkLoyaltyCardToProfileWithHttpInfo + * + * Link customer profile to card + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function linkLoyaltyCardToProfileWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + { + $request = $this->linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCardId, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\LoyaltyCard' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyCard', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\LoyaltyCard'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\LoyaltyCard', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation linkLoyaltyCardToProfileAsync + * + * Link customer profile to card + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function linkLoyaltyCardToProfileAsync($loyaltyProgramId, $loyaltyCardId, $body) + { + return $this->linkLoyaltyCardToProfileAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation linkLoyaltyCardToProfileAsyncWithHttpInfo + * + * Link customer profile to card + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function linkLoyaltyCardToProfileAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + { + $returnType = '\TalonOne\Client\Model\LoyaltyCard'; + $request = $this->linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCardId, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'linkLoyaltyCardToProfile' + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCardId, $body) + { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling linkLoyaltyCardToProfile' + ); + } + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyCardId when calling linkLoyaltyCardToProfile' + ); + } + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling IntegrationApi.linkLoyaltyCardToProfile, must be smaller than or equal to 108.'); + } + + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling linkLoyaltyCardToProfile' + ); + } + + $resourcePath = '/v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($loyaltyCardId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation reopenCustomerSession + * + * Reopen customer session * * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) - * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\IntegrationStateV2|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\ReopenSessionResponse|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function returnCartItems($customerSessionId, $body, $dry = null) + public function reopenCustomerSession($customerSessionId) { - list($response) = $this->returnCartItemsWithHttpInfo($customerSessionId, $body, $dry); + list($response) = $this->reopenCustomerSessionWithHttpInfo($customerSessionId); return $response; } /** - * Operation returnCartItemsWithHttpInfo + * Operation reopenCustomerSessionWithHttpInfo * - * Return cart items + * Reopen customer session * * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) - * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\IntegrationStateV2|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\ReopenSessionResponse|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function returnCartItemsWithHttpInfo($customerSessionId, $body, $dry = null) + public function reopenCustomerSessionWithHttpInfo($customerSessionId) { - $request = $this->returnCartItemsRequest($customerSessionId, $body, $dry); + $request = $this->reopenCustomerSessionRequest($customerSessionId); try { $options = $this->createHttpClientOption(); @@ -5840,14 +6370,14 @@ public function returnCartItemsWithHttpInfo($customerSessionId, $body, $dry = nu $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\IntegrationStateV2' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ReopenSessionResponse' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\IntegrationStateV2', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ReopenSessionResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -5877,7 +6407,7 @@ public function returnCartItemsWithHttpInfo($customerSessionId, $body, $dry = nu ]; } - $returnType = '\TalonOne\Client\Model\IntegrationStateV2'; + $returnType = '\TalonOne\Client\Model\ReopenSessionResponse'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -5896,7 +6426,7 @@ public function returnCartItemsWithHttpInfo($customerSessionId, $body, $dry = nu case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\IntegrationStateV2', + '\TalonOne\Client\Model\ReopenSessionResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -5923,20 +6453,18 @@ public function returnCartItemsWithHttpInfo($customerSessionId, $body, $dry = nu } /** - * Operation returnCartItemsAsync + * Operation reopenCustomerSessionAsync * - * Return cart items + * Reopen customer session * * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) - * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function returnCartItemsAsync($customerSessionId, $body, $dry = null) + public function reopenCustomerSessionAsync($customerSessionId) { - return $this->returnCartItemsAsyncWithHttpInfo($customerSessionId, $body, $dry) + return $this->reopenCustomerSessionAsyncWithHttpInfo($customerSessionId) ->then( function ($response) { return $response[0]; @@ -5945,21 +6473,19 @@ function ($response) { } /** - * Operation returnCartItemsAsyncWithHttpInfo + * Operation reopenCustomerSessionAsyncWithHttpInfo * - * Return cart items + * Reopen customer session * * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) - * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function returnCartItemsAsyncWithHttpInfo($customerSessionId, $body, $dry = null) + public function reopenCustomerSessionAsyncWithHttpInfo($customerSessionId) { - $returnType = '\TalonOne\Client\Model\IntegrationStateV2'; - $request = $this->returnCartItemsRequest($customerSessionId, $body, $dry); + $returnType = '\TalonOne\Client\Model\ReopenSessionResponse'; + $request = $this->reopenCustomerSessionRequest($customerSessionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5996,44 +6522,29 @@ function ($exception) { } /** - * Create request for operation 'returnCartItems' + * Create request for operation 'reopenCustomerSession' * * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) - * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function returnCartItemsRequest($customerSessionId, $body, $dry = null) + protected function reopenCustomerSessionRequest($customerSessionId) { // verify the required parameter 'customerSessionId' is set - if ($customerSessionId === null || (is_array($customerSessionId) && count($customerSessionId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $customerSessionId when calling returnCartItems' - ); - } - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { + if ($customerSessionId === null || (is_array($customerSessionId) && count($customerSessionId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling returnCartItems' + 'Missing the required parameter $customerSessionId when calling reopenCustomerSession' ); } - $resourcePath = '/v2/customer_sessions/{customerSessionId}/returns'; + $resourcePath = '/v2/customer_sessions/{customerSessionId}/reopen'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($dry)) { - $dry = ObjectSerializer::serializeCollection($dry, '', true); - } - if ($dry !== null) { - $queryParams['dry'] = $dry; - } // path params @@ -6047,9 +6558,6 @@ protected function returnCartItemsRequest($customerSessionId, $body, $dry = null // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -6058,7 +6566,7 @@ protected function returnCartItemsRequest($customerSessionId, $body, $dry = null } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -6110,7 +6618,7 @@ protected function returnCartItemsRequest($customerSessionId, $body, $dry = null $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -6118,38 +6626,40 @@ protected function returnCartItemsRequest($customerSessionId, $body, $dry = null } /** - * Operation syncCatalog + * Operation returnCartItems * - * Sync cart item catalog + * Return cart items * - * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) - * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Catalog|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\IntegrationStateV2|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function syncCatalog($catalogId, $body) + public function returnCartItems($customerSessionId, $body, $dry = null) { - list($response) = $this->syncCatalogWithHttpInfo($catalogId, $body); + list($response) = $this->returnCartItemsWithHttpInfo($customerSessionId, $body, $dry); return $response; } /** - * Operation syncCatalogWithHttpInfo + * Operation returnCartItemsWithHttpInfo * - * Sync cart item catalog + * Return cart items * - * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) - * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Catalog|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\IntegrationStateV2|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function syncCatalogWithHttpInfo($catalogId, $body) + public function returnCartItemsWithHttpInfo($customerSessionId, $body, $dry = null) { - $request = $this->syncCatalogRequest($catalogId, $body); + $request = $this->returnCartItemsRequest($customerSessionId, $body, $dry); try { $options = $this->createHttpClientOption(); @@ -6182,14 +6692,14 @@ public function syncCatalogWithHttpInfo($catalogId, $body) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Catalog' === '\SplFileObject') { + if ('\TalonOne\Client\Model\IntegrationStateV2' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Catalog', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\IntegrationStateV2', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -6212,18 +6722,6 @@ public function syncCatalogWithHttpInfo($catalogId, $body) $content = (string) $responseBody; } - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - return [ ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), @@ -6231,7 +6729,7 @@ public function syncCatalogWithHttpInfo($catalogId, $body) ]; } - $returnType = '\TalonOne\Client\Model\Catalog'; + $returnType = '\TalonOne\Client\Model\IntegrationStateV2'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -6250,7 +6748,7 @@ public function syncCatalogWithHttpInfo($catalogId, $body) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Catalog', + '\TalonOne\Client\Model\IntegrationStateV2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -6271,33 +6769,26 @@ public function syncCatalogWithHttpInfo($catalogId, $body) ); $e->setResponseObject($data); break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation syncCatalogAsync + * Operation returnCartItemsAsync * - * Sync cart item catalog + * Return cart items * - * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) - * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function syncCatalogAsync($catalogId, $body) + public function returnCartItemsAsync($customerSessionId, $body, $dry = null) { - return $this->syncCatalogAsyncWithHttpInfo($catalogId, $body) + return $this->returnCartItemsAsyncWithHttpInfo($customerSessionId, $body, $dry) ->then( function ($response) { return $response[0]; @@ -6306,20 +6797,21 @@ function ($response) { } /** - * Operation syncCatalogAsyncWithHttpInfo + * Operation returnCartItemsAsyncWithHttpInfo * - * Sync cart item catalog + * Return cart items * - * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) - * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function syncCatalogAsyncWithHttpInfo($catalogId, $body) + public function returnCartItemsAsyncWithHttpInfo($customerSessionId, $body, $dry = null) { - $returnType = '\TalonOne\Client\Model\Catalog'; - $request = $this->syncCatalogRequest($catalogId, $body); + $returnType = '\TalonOne\Client\Model\IntegrationStateV2'; + $request = $this->returnCartItemsRequest($customerSessionId, $body, $dry); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6356,43 +6848,51 @@ function ($exception) { } /** - * Create request for operation 'syncCatalog' + * Create request for operation 'returnCartItems' * - * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) - * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function syncCatalogRequest($catalogId, $body) + protected function returnCartItemsRequest($customerSessionId, $body, $dry = null) { - // verify the required parameter 'catalogId' is set - if ($catalogId === null || (is_array($catalogId) && count($catalogId) === 0)) { + // verify the required parameter 'customerSessionId' is set + if ($customerSessionId === null || (is_array($customerSessionId) && count($customerSessionId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $catalogId when calling syncCatalog' + 'Missing the required parameter $customerSessionId when calling returnCartItems' ); } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling syncCatalog' + 'Missing the required parameter $body when calling returnCartItems' ); } - $resourcePath = '/v1/catalogs/{catalogId}/sync'; + $resourcePath = '/v2/customer_sessions/{customerSessionId}/returns'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($dry)) { + $dry = ObjectSerializer::serializeCollection($dry, '', true); + } + if ($dry !== null) { + $queryParams['dry'] = $dry; + } // path params - if ($catalogId !== null) { + if ($customerSessionId !== null) { $resourcePath = str_replace( - '{' . 'catalogId' . '}', - ObjectSerializer::toPathValue($catalogId), + '{' . 'customerSessionId' . '}', + ObjectSerializer::toPathValue($customerSessionId), $resourcePath ); } @@ -6462,7 +6962,7 @@ protected function syncCatalogRequest($catalogId, $body) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -6470,38 +6970,38 @@ protected function syncCatalogRequest($catalogId, $body) } /** - * Operation trackEvent + * Operation syncCatalog * - * Track event + * Sync cart item catalog * - * @param \TalonOne\Client\Model\NewEvent $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\IntegrationState|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|object + * @return \TalonOne\Client\Model\Catalog|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function trackEvent($body, $dry = null) + public function syncCatalog($catalogId, $body) { - list($response) = $this->trackEventWithHttpInfo($body, $dry); + list($response) = $this->syncCatalogWithHttpInfo($catalogId, $body); return $response; } /** - * Operation trackEventWithHttpInfo + * Operation syncCatalogWithHttpInfo * - * Track event + * Sync cart item catalog * - * @param \TalonOne\Client\Model\NewEvent $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\IntegrationState|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|object, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Catalog|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function trackEventWithHttpInfo($body, $dry = null) + public function syncCatalogWithHttpInfo($catalogId, $body) { - $request = $this->trackEventRequest($body, $dry); + $request = $this->syncCatalogRequest($catalogId, $body); try { $options = $this->createHttpClientOption(); @@ -6533,15 +7033,15 @@ public function trackEventWithHttpInfo($body, $dry = null) $responseBody = $response->getBody(); switch($statusCode) { - case 201: - if ('\TalonOne\Client\Model\IntegrationState' === '\SplFileObject') { + case 200: + if ('\TalonOne\Client\Model\Catalog' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\IntegrationState', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Catalog', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -6569,21 +7069,21 @@ public function trackEventWithHttpInfo($body, $dry = null) $response->getStatusCode(), $response->getHeaders() ]; - case 409: - if ('object' === '\SplFileObject') { + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\IntegrationState'; + $returnType = '\TalonOne\Client\Model\Catalog'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -6599,10 +7099,10 @@ public function trackEventWithHttpInfo($body, $dry = null) } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\IntegrationState', + '\TalonOne\Client\Model\Catalog', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -6623,10 +7123,10 @@ public function trackEventWithHttpInfo($body, $dry = null) ); $e->setResponseObject($data); break; - case 409: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -6637,19 +7137,19 @@ public function trackEventWithHttpInfo($body, $dry = null) } /** - * Operation trackEventAsync + * Operation syncCatalogAsync * - * Track event + * Sync cart item catalog * - * @param \TalonOne\Client\Model\NewEvent $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function trackEventAsync($body, $dry = null) + public function syncCatalogAsync($catalogId, $body) { - return $this->trackEventAsyncWithHttpInfo($body, $dry) + return $this->syncCatalogAsyncWithHttpInfo($catalogId, $body) ->then( function ($response) { return $response[0]; @@ -6658,20 +7158,20 @@ function ($response) { } /** - * Operation trackEventAsyncWithHttpInfo + * Operation syncCatalogAsyncWithHttpInfo * - * Track event + * Sync cart item catalog * - * @param \TalonOne\Client\Model\NewEvent $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function trackEventAsyncWithHttpInfo($body, $dry = null) + public function syncCatalogAsyncWithHttpInfo($catalogId, $body) { - $returnType = '\TalonOne\Client\Model\IntegrationState'; - $request = $this->trackEventRequest($body, $dry); + $returnType = '\TalonOne\Client\Model\Catalog'; + $request = $this->syncCatalogRequest($catalogId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6708,39 +7208,46 @@ function ($exception) { } /** - * Create request for operation 'trackEvent' + * Create request for operation 'syncCatalog' * - * @param \TalonOne\Client\Model\NewEvent $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function trackEventRequest($body, $dry = null) + protected function syncCatalogRequest($catalogId, $body) { + // verify the required parameter 'catalogId' is set + if ($catalogId === null || (is_array($catalogId) && count($catalogId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $catalogId when calling syncCatalog' + ); + } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling trackEvent' + 'Missing the required parameter $body when calling syncCatalog' ); } - $resourcePath = '/v1/events'; + $resourcePath = '/v1/catalogs/{catalogId}/sync'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($dry)) { - $dry = ObjectSerializer::serializeCollection($dry, '', true); - } - if ($dry !== null) { - $queryParams['dry'] = $dry; - } + // path params + if ($catalogId !== null) { + $resourcePath = str_replace( + '{' . 'catalogId' . '}', + ObjectSerializer::toPathValue($catalogId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -6807,7 +7314,7 @@ protected function trackEventRequest($body, $dry = null) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -6817,7 +7324,7 @@ protected function trackEventRequest($body, $dry = null) /** * Operation trackEventV2 * - * Track event V2 + * Track event * * @param \TalonOne\Client\Model\IntegrationEventV2Request $body body (required) * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') @@ -6825,7 +7332,7 @@ protected function trackEventRequest($body, $dry = null) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\IntegrationStateV2|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\TrackEventV2Response|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|object */ public function trackEventV2($body, $silent = 'yes', $dry = null) { @@ -6836,7 +7343,7 @@ public function trackEventV2($body, $silent = 'yes', $dry = null) /** * Operation trackEventV2WithHttpInfo * - * Track event V2 + * Track event * * @param \TalonOne\Client\Model\IntegrationEventV2Request $body body (required) * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') @@ -6844,7 +7351,7 @@ public function trackEventV2($body, $silent = 'yes', $dry = null) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\IntegrationStateV2|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\TrackEventV2Response|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|object, HTTP status code, HTTP response headers (array of strings) */ public function trackEventV2WithHttpInfo($body, $silent = 'yes', $dry = null) { @@ -6881,14 +7388,14 @@ public function trackEventV2WithHttpInfo($body, $silent = 'yes', $dry = null) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\IntegrationStateV2' === '\SplFileObject') { + if ('\TalonOne\Client\Model\TrackEventV2Response' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\IntegrationStateV2', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\TrackEventV2Response', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -6916,9 +7423,21 @@ public function trackEventV2WithHttpInfo($body, $silent = 'yes', $dry = null) $response->getStatusCode(), $response->getHeaders() ]; + case 409: + if ('object' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $response->getStatusCode(), + $response->getHeaders() + ]; } - $returnType = '\TalonOne\Client\Model\IntegrationStateV2'; + $returnType = '\TalonOne\Client\Model\TrackEventV2Response'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -6937,7 +7456,7 @@ public function trackEventV2WithHttpInfo($body, $silent = 'yes', $dry = null) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\IntegrationStateV2', + '\TalonOne\Client\Model\TrackEventV2Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -6958,6 +7477,14 @@ public function trackEventV2WithHttpInfo($body, $silent = 'yes', $dry = null) ); $e->setResponseObject($data); break; + case 409: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } @@ -6966,7 +7493,7 @@ public function trackEventV2WithHttpInfo($body, $silent = 'yes', $dry = null) /** * Operation trackEventV2Async * - * Track event V2 + * Track event * * @param \TalonOne\Client\Model\IntegrationEventV2Request $body body (required) * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') @@ -6988,7 +7515,7 @@ function ($response) { /** * Operation trackEventV2AsyncWithHttpInfo * - * Track event V2 + * Track event * * @param \TalonOne\Client\Model\IntegrationEventV2Request $body body (required) * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') @@ -6999,7 +7526,7 @@ function ($response) { */ public function trackEventV2AsyncWithHttpInfo($body, $silent = 'yes', $dry = null) { - $returnType = '\TalonOne\Client\Model\IntegrationStateV2'; + $returnType = '\TalonOne\Client\Model\TrackEventV2Response'; $request = $this->trackEventV2Request($body, $silent, $dry); return $this->client @@ -8004,7 +8531,7 @@ protected function updateCustomerProfileAudiencesRequest($body) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\IntegrationStateV2|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|object + * @return \TalonOne\Client\Model\CustomerProfileIntegrationResponseV2|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|object */ public function updateCustomerProfileV2($integrationId, $body, $runRuleEngine = false, $dry = null) { @@ -8024,7 +8551,7 @@ public function updateCustomerProfileV2($integrationId, $body, $runRuleEngine = * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\IntegrationStateV2|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|object, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\CustomerProfileIntegrationResponseV2|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|object, HTTP status code, HTTP response headers (array of strings) */ public function updateCustomerProfileV2WithHttpInfo($integrationId, $body, $runRuleEngine = false, $dry = null) { @@ -8061,14 +8588,14 @@ public function updateCustomerProfileV2WithHttpInfo($integrationId, $body, $runR $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\IntegrationStateV2' === '\SplFileObject') { + if ('\TalonOne\Client\Model\CustomerProfileIntegrationResponseV2' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\IntegrationStateV2', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerProfileIntegrationResponseV2', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -8110,7 +8637,7 @@ public function updateCustomerProfileV2WithHttpInfo($integrationId, $body, $runR ]; } - $returnType = '\TalonOne\Client\Model\IntegrationStateV2'; + $returnType = '\TalonOne\Client\Model\CustomerProfileIntegrationResponseV2'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -8129,7 +8656,7 @@ public function updateCustomerProfileV2WithHttpInfo($integrationId, $body, $runR case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\IntegrationStateV2', + '\TalonOne\Client\Model\CustomerProfileIntegrationResponseV2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -8201,7 +8728,7 @@ function ($response) { */ public function updateCustomerProfileV2AsyncWithHttpInfo($integrationId, $body, $runRuleEngine = false, $dry = null) { - $returnType = '\TalonOne\Client\Model\IntegrationStateV2'; + $returnType = '\TalonOne\Client\Model\CustomerProfileIntegrationResponseV2'; $request = $this->updateCustomerProfileV2Request($integrationId, $body, $runRuleEngine, $dry); return $this->client @@ -8700,7 +9227,7 @@ protected function updateCustomerProfilesV2Request($body, $silent = 'yes') * * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * @param \TalonOne\Client\Model\IntegrationRequest $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -8719,7 +9246,7 @@ public function updateCustomerSessionV2($customerSessionId, $body, $dry = null) * * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * @param \TalonOne\Client\Model\IntegrationRequest $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -8869,7 +9396,7 @@ public function updateCustomerSessionV2WithHttpInfo($customerSessionId, $body, $ * * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * @param \TalonOne\Client\Model\IntegrationRequest $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -8891,7 +9418,7 @@ function ($response) { * * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * @param \TalonOne\Client\Model\IntegrationRequest $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -8940,7 +9467,7 @@ function ($exception) { * * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * @param \TalonOne\Client\Model\IntegrationRequest $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request diff --git a/lib/Api/ManagementApi.php b/lib/Api/ManagementApi.php index 666b19b4..ebdba1be 100644 --- a/lib/Api/ManagementApi.php +++ b/lib/Api/ManagementApi.php @@ -714,7 +714,7 @@ protected function addLoyaltyPointsRequest($loyaltyProgramId, $integrationId, $b * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2004 + * @return \TalonOne\Client\Model\InlineResponse2006 */ public function copyCampaignToApplications($applicationId, $campaignId, $body) { @@ -733,7 +733,7 @@ public function copyCampaignToApplications($applicationId, $campaignId, $body) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) */ public function copyCampaignToApplicationsWithHttpInfo($applicationId, $campaignId, $body) { @@ -770,20 +770,20 @@ public function copyCampaignToApplicationsWithHttpInfo($applicationId, $campaign $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2004' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2006' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2004', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2006', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2004'; + $returnType = '\TalonOne\Client\Model\InlineResponse2006'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -802,7 +802,7 @@ public function copyCampaignToApplicationsWithHttpInfo($applicationId, $campaign case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2004', + '\TalonOne\Client\Model\InlineResponse2006', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -848,7 +848,7 @@ function ($response) { */ public function copyCampaignToApplicationsAsyncWithHttpInfo($applicationId, $campaignId, $body) { - $returnType = '\TalonOne\Client\Model\InlineResponse2004'; + $returnType = '\TalonOne\Client\Model\InlineResponse2006'; $request = $this->copyCampaignToApplicationsRequest($applicationId, $campaignId, $body); return $this->client @@ -2213,7 +2213,7 @@ protected function createCampaignFromTemplateRequest($applicationId, $body) /** * Operation createCollection * - * Create collection + * Create campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) @@ -2232,7 +2232,7 @@ public function createCollection($applicationId, $campaignId, $body) /** * Operation createCollectionWithHttpInfo * - * Create collection + * Create campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) @@ -2322,7 +2322,7 @@ public function createCollectionWithHttpInfo($applicationId, $campaignId, $body) /** * Operation createCollectionAsync * - * Create collection + * Create campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) @@ -2344,7 +2344,7 @@ function ($response) { /** * Operation createCollectionAsyncWithHttpInfo * - * Create collection + * Create campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) @@ -2538,7 +2538,7 @@ protected function createCollectionRequest($applicationId, $campaignId, $body) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2007 + * @return \TalonOne\Client\Model\InlineResponse2008 */ public function createCoupons($applicationId, $campaignId, $body, $silent = 'yes') { @@ -2558,7 +2558,7 @@ public function createCoupons($applicationId, $campaignId, $body, $silent = 'yes * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) */ public function createCouponsWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') { @@ -2595,20 +2595,20 @@ public function createCouponsWithHttpInfo($applicationId, $campaignId, $body, $s $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2007' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2008' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2007', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2008', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2007'; + $returnType = '\TalonOne\Client\Model\InlineResponse2008'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -2627,7 +2627,7 @@ public function createCouponsWithHttpInfo($applicationId, $campaignId, $body, $s case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2007', + '\TalonOne\Client\Model\InlineResponse2008', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2675,7 +2675,7 @@ function ($response) { */ public function createCouponsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') { - $returnType = '\TalonOne\Client\Model\InlineResponse2007'; + $returnType = '\TalonOne\Client\Model\InlineResponse2008'; $request = $this->createCouponsRequest($applicationId, $campaignId, $body, $silent); return $this->client @@ -3182,7 +3182,7 @@ protected function createCouponsAsyncRequest($applicationId, $campaignId, $body) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2007 + * @return \TalonOne\Client\Model\InlineResponse2008 */ public function createCouponsForMultipleRecipients($applicationId, $campaignId, $body, $silent = 'yes') { @@ -3202,7 +3202,7 @@ public function createCouponsForMultipleRecipients($applicationId, $campaignId, * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) */ public function createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') { @@ -3239,20 +3239,20 @@ public function createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $ $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2007' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2008' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2007', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2008', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2007'; + $returnType = '\TalonOne\Client\Model\InlineResponse2008'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -3271,7 +3271,7 @@ public function createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2007', + '\TalonOne\Client\Model\InlineResponse2008', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3319,7 +3319,7 @@ function ($response) { */ public function createCouponsForMultipleRecipientsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') { - $returnType = '\TalonOne\Client\Model\InlineResponse2007'; + $returnType = '\TalonOne\Client\Model\InlineResponse2008'; $request = $this->createCouponsForMultipleRecipientsRequest($applicationId, $campaignId, $body, $silent); return $this->client @@ -3499,38 +3499,36 @@ protected function createCouponsForMultipleRecipientsRequest($applicationId, $ca } /** - * Operation createNotificationWebhook + * Operation createPasswordRecoveryEmail * - * Create notification about campaign-related changes + * Request a password reset * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\NotificationWebhook + * @return \TalonOne\Client\Model\NewPasswordEmail */ - public function createNotificationWebhook($applicationId, $body) + public function createPasswordRecoveryEmail($body) { - list($response) = $this->createNotificationWebhookWithHttpInfo($applicationId, $body); + list($response) = $this->createPasswordRecoveryEmailWithHttpInfo($body); return $response; } /** - * Operation createNotificationWebhookWithHttpInfo + * Operation createPasswordRecoveryEmailWithHttpInfo * - * Create notification about campaign-related changes + * Request a password reset * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\NotificationWebhook, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\NewPasswordEmail, HTTP status code, HTTP response headers (array of strings) */ - public function createNotificationWebhookWithHttpInfo($applicationId, $body) + public function createPasswordRecoveryEmailWithHttpInfo($body) { - $request = $this->createNotificationWebhookRequest($applicationId, $body); + $request = $this->createPasswordRecoveryEmailRequest($body); try { $options = $this->createHttpClientOption(); @@ -3562,21 +3560,21 @@ public function createNotificationWebhookWithHttpInfo($applicationId, $body) $responseBody = $response->getBody(); switch($statusCode) { - case 201: - if ('\TalonOne\Client\Model\NotificationWebhook' === '\SplFileObject') { + case 204: + if ('\TalonOne\Client\Model\NewPasswordEmail' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\NotificationWebhook', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\NewPasswordEmail', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\NotificationWebhook'; + $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -3592,10 +3590,10 @@ public function createNotificationWebhookWithHttpInfo($applicationId, $body) } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 204: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\NotificationWebhook', + '\TalonOne\Client\Model\NewPasswordEmail', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3606,19 +3604,18 @@ public function createNotificationWebhookWithHttpInfo($applicationId, $body) } /** - * Operation createNotificationWebhookAsync + * Operation createPasswordRecoveryEmailAsync * - * Create notification about campaign-related changes + * Request a password reset * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createNotificationWebhookAsync($applicationId, $body) + public function createPasswordRecoveryEmailAsync($body) { - return $this->createNotificationWebhookAsyncWithHttpInfo($applicationId, $body) + return $this->createPasswordRecoveryEmailAsyncWithHttpInfo($body) ->then( function ($response) { return $response[0]; @@ -3627,20 +3624,19 @@ function ($response) { } /** - * Operation createNotificationWebhookAsyncWithHttpInfo + * Operation createPasswordRecoveryEmailAsyncWithHttpInfo * - * Create notification about campaign-related changes + * Request a password reset * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createNotificationWebhookAsyncWithHttpInfo($applicationId, $body) + public function createPasswordRecoveryEmailAsyncWithHttpInfo($body) { - $returnType = '\TalonOne\Client\Model\NotificationWebhook'; - $request = $this->createNotificationWebhookRequest($applicationId, $body); + $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; + $request = $this->createPasswordRecoveryEmailRequest($body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3677,30 +3673,23 @@ function ($exception) { } /** - * Create request for operation 'createNotificationWebhook' + * Create request for operation 'createPasswordRecoveryEmail' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createNotificationWebhookRequest($applicationId, $body) + protected function createPasswordRecoveryEmailRequest($body) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling createNotificationWebhook' - ); - } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling createNotificationWebhook' + 'Missing the required parameter $body when calling createPasswordRecoveryEmail' ); } - $resourcePath = '/v1/applications/{applicationId}/notification_webhooks'; + $resourcePath = '/v1/password_recovery_emails'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3709,14 +3698,6 @@ protected function createNotificationWebhookRequest($applicationId, $body) - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -3796,36 +3777,36 @@ protected function createNotificationWebhookRequest($applicationId, $body) } /** - * Operation createPasswordRecoveryEmail + * Operation createSession * - * Request a password reset + * Create session * - * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) + * @param \TalonOne\Client\Model\LoginParams $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\NewPasswordEmail + * @return \TalonOne\Client\Model\Session */ - public function createPasswordRecoveryEmail($body) + public function createSession($body) { - list($response) = $this->createPasswordRecoveryEmailWithHttpInfo($body); + list($response) = $this->createSessionWithHttpInfo($body); return $response; } /** - * Operation createPasswordRecoveryEmailWithHttpInfo + * Operation createSessionWithHttpInfo * - * Request a password reset + * Create session * - * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) + * @param \TalonOne\Client\Model\LoginParams $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\NewPasswordEmail, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Session, HTTP status code, HTTP response headers (array of strings) */ - public function createPasswordRecoveryEmailWithHttpInfo($body) + public function createSessionWithHttpInfo($body) { - $request = $this->createPasswordRecoveryEmailRequest($body); + $request = $this->createSessionRequest($body); try { $options = $this->createHttpClientOption(); @@ -3857,21 +3838,21 @@ public function createPasswordRecoveryEmailWithHttpInfo($body) $responseBody = $response->getBody(); switch($statusCode) { - case 204: - if ('\TalonOne\Client\Model\NewPasswordEmail' === '\SplFileObject') { + case 201: + if ('\TalonOne\Client\Model\Session' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\NewPasswordEmail', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Session', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; + $returnType = '\TalonOne\Client\Model\Session'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -3887,10 +3868,10 @@ public function createPasswordRecoveryEmailWithHttpInfo($body) } catch (ApiException $e) { switch ($e->getCode()) { - case 204: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\NewPasswordEmail', + '\TalonOne\Client\Model\Session', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3901,18 +3882,18 @@ public function createPasswordRecoveryEmailWithHttpInfo($body) } /** - * Operation createPasswordRecoveryEmailAsync + * Operation createSessionAsync * - * Request a password reset + * Create session * - * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) + * @param \TalonOne\Client\Model\LoginParams $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createPasswordRecoveryEmailAsync($body) + public function createSessionAsync($body) { - return $this->createPasswordRecoveryEmailAsyncWithHttpInfo($body) + return $this->createSessionAsyncWithHttpInfo($body) ->then( function ($response) { return $response[0]; @@ -3921,19 +3902,19 @@ function ($response) { } /** - * Operation createPasswordRecoveryEmailAsyncWithHttpInfo + * Operation createSessionAsyncWithHttpInfo * - * Request a password reset + * Create session * - * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) + * @param \TalonOne\Client\Model\LoginParams $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createPasswordRecoveryEmailAsyncWithHttpInfo($body) + public function createSessionAsyncWithHttpInfo($body) { - $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; - $request = $this->createPasswordRecoveryEmailRequest($body); + $returnType = '\TalonOne\Client\Model\Session'; + $request = $this->createSessionRequest($body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3970,23 +3951,23 @@ function ($exception) { } /** - * Create request for operation 'createPasswordRecoveryEmail' + * Create request for operation 'createSession' * - * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) + * @param \TalonOne\Client\Model\LoginParams $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createPasswordRecoveryEmailRequest($body) + protected function createSessionRequest($body) { // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling createPasswordRecoveryEmail' + 'Missing the required parameter $body when calling createSession' ); } - $resourcePath = '/v1/password_recovery_emails'; + $resourcePath = '/v1/sessions'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4074,36 +4055,38 @@ protected function createPasswordRecoveryEmailRequest($body) } /** - * Operation createSession + * Operation createStore * - * Create session + * Create store * - * @param \TalonOne\Client\Model\LoginParams $body body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewStore $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Session + * @return \TalonOne\Client\Model\Store|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function createSession($body) + public function createStore($applicationId, $body) { - list($response) = $this->createSessionWithHttpInfo($body); + list($response) = $this->createStoreWithHttpInfo($applicationId, $body); return $response; } /** - * Operation createSessionWithHttpInfo + * Operation createStoreWithHttpInfo * - * Create session + * Create store * - * @param \TalonOne\Client\Model\LoginParams $body body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewStore $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Session, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Store|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function createSessionWithHttpInfo($body) + public function createStoreWithHttpInfo($applicationId, $body) { - $request = $this->createSessionRequest($body); + $request = $this->createStoreRequest($applicationId, $body); try { $options = $this->createHttpClientOption(); @@ -4136,20 +4119,44 @@ public function createSessionWithHttpInfo($body) $responseBody = $response->getBody(); switch($statusCode) { case 201: - if ('\TalonOne\Client\Model\Session' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Store' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Session', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Store', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 409: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Session'; + $returnType = '\TalonOne\Client\Model\Store'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -4168,7 +4175,23 @@ public function createSessionWithHttpInfo($body) case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Session', + '\TalonOne\Client\Model\Store', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 409: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4179,18 +4202,19 @@ public function createSessionWithHttpInfo($body) } /** - * Operation createSessionAsync + * Operation createStoreAsync * - * Create session + * Create store * - * @param \TalonOne\Client\Model\LoginParams $body body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewStore $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSessionAsync($body) + public function createStoreAsync($applicationId, $body) { - return $this->createSessionAsyncWithHttpInfo($body) + return $this->createStoreAsyncWithHttpInfo($applicationId, $body) ->then( function ($response) { return $response[0]; @@ -4199,19 +4223,20 @@ function ($response) { } /** - * Operation createSessionAsyncWithHttpInfo + * Operation createStoreAsyncWithHttpInfo * - * Create session + * Create store * - * @param \TalonOne\Client\Model\LoginParams $body body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewStore $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSessionAsyncWithHttpInfo($body) + public function createStoreAsyncWithHttpInfo($applicationId, $body) { - $returnType = '\TalonOne\Client\Model\Session'; - $request = $this->createSessionRequest($body); + $returnType = '\TalonOne\Client\Model\Store'; + $request = $this->createStoreRequest($applicationId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4248,23 +4273,30 @@ function ($exception) { } /** - * Create request for operation 'createSession' + * Create request for operation 'createStore' * - * @param \TalonOne\Client\Model\LoginParams $body body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewStore $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createSessionRequest($body) + protected function createStoreRequest($applicationId, $body) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling createStore' + ); + } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling createSession' + 'Missing the required parameter $body when calling createStore' ); } - $resourcePath = '/v1/sessions'; + $resourcePath = '/v1/applications/{applicationId}/stores'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4273,6 +4305,14 @@ protected function createSessionRequest($body) + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -4652,7 +4692,7 @@ protected function deductLoyaltyCardPointsRequest($loyaltyProgramId, $loyaltyCar * * Delete account-level collection * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4668,7 +4708,7 @@ public function deleteAccountCollection($collectionId) * * Delete account-level collection * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4728,7 +4768,7 @@ public function deleteAccountCollectionWithHttpInfo($collectionId) * * Delete account-level collection * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4748,7 +4788,7 @@ function ($response) { * * Delete account-level collection * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4784,7 +4824,7 @@ function ($exception) { /** * Create request for operation 'deleteAccountCollection' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -5147,11 +5187,11 @@ protected function deleteCampaignRequest($applicationId, $campaignId) /** * Operation deleteCollection * - * Delete collection + * Delete campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5165,11 +5205,11 @@ public function deleteCollection($applicationId, $campaignId, $collectionId) /** * Operation deleteCollectionWithHttpInfo * - * Delete collection + * Delete campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5227,11 +5267,11 @@ public function deleteCollectionWithHttpInfo($applicationId, $campaignId, $colle /** * Operation deleteCollectionAsync * - * Delete collection + * Delete campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5249,11 +5289,11 @@ function ($response) { /** * Operation deleteCollectionAsyncWithHttpInfo * - * Delete collection + * Delete campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5291,7 +5331,7 @@ function ($exception) { * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -6383,37 +6423,39 @@ protected function deleteLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId) } /** - * Operation deleteNotificationWebhook + * Operation deleteReferral * - * Delete notification about campaign-related changes + * Delete referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $referralId The ID of the referral code. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteNotificationWebhook($applicationId, $notificationWebhookId) + public function deleteReferral($applicationId, $campaignId, $referralId) { - $this->deleteNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId); + $this->deleteReferralWithHttpInfo($applicationId, $campaignId, $referralId); } /** - * Operation deleteNotificationWebhookWithHttpInfo + * Operation deleteReferralWithHttpInfo * - * Delete notification about campaign-related changes + * Delete referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $referralId The ID of the referral code. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId) + public function deleteReferralWithHttpInfo($applicationId, $campaignId, $referralId) { - $request = $this->deleteNotificationWebhookRequest($applicationId, $notificationWebhookId); + $request = $this->deleteReferralRequest($applicationId, $campaignId, $referralId); try { $options = $this->createHttpClientOption(); @@ -6453,19 +6495,20 @@ public function deleteNotificationWebhookWithHttpInfo($applicationId, $notificat } /** - * Operation deleteNotificationWebhookAsync + * Operation deleteReferralAsync * - * Delete notification about campaign-related changes + * Delete referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $referralId The ID of the referral code. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteNotificationWebhookAsync($applicationId, $notificationWebhookId) + public function deleteReferralAsync($applicationId, $campaignId, $referralId) { - return $this->deleteNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) + return $this->deleteReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId) ->then( function ($response) { return $response[0]; @@ -6474,20 +6517,21 @@ function ($response) { } /** - * Operation deleteNotificationWebhookAsyncWithHttpInfo + * Operation deleteReferralAsyncWithHttpInfo * - * Delete notification about campaign-related changes + * Delete referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $referralId The ID of the referral code. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) + public function deleteReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId) { $returnType = ''; - $request = $this->deleteNotificationWebhookRequest($applicationId, $notificationWebhookId); + $request = $this->deleteReferralRequest($applicationId, $campaignId, $referralId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6513,30 +6557,37 @@ function ($exception) { } /** - * Create request for operation 'deleteNotificationWebhook' + * Create request for operation 'deleteReferral' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $referralId The ID of the referral code. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteNotificationWebhookRequest($applicationId, $notificationWebhookId) + protected function deleteReferralRequest($applicationId, $campaignId, $referralId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling deleteNotificationWebhook' + 'Missing the required parameter $applicationId when calling deleteReferral' ); } - // verify the required parameter 'notificationWebhookId' is set - if ($notificationWebhookId === null || (is_array($notificationWebhookId) && count($notificationWebhookId) === 0)) { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $notificationWebhookId when calling deleteNotificationWebhook' + 'Missing the required parameter $campaignId when calling deleteReferral' + ); + } + // verify the required parameter 'referralId' is set + if ($referralId === null || (is_array($referralId) && count($referralId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $referralId when calling deleteReferral' ); } - $resourcePath = '/v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6554,10 +6605,18 @@ protected function deleteNotificationWebhookRequest($applicationId, $notificatio ); } // path params - if ($notificationWebhookId !== null) { + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + // path params + if ($referralId !== null) { $resourcePath = str_replace( - '{' . 'notificationWebhookId' . '}', - ObjectSerializer::toPathValue($notificationWebhookId), + '{' . 'referralId' . '}', + ObjectSerializer::toPathValue($referralId), $resourcePath ); } @@ -6637,39 +6696,37 @@ protected function deleteNotificationWebhookRequest($applicationId, $notificatio } /** - * Operation deleteReferral + * Operation deleteStore * - * Delete referral + * Delete store * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code. (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteReferral($applicationId, $campaignId, $referralId) + public function deleteStore($applicationId, $storeId) { - $this->deleteReferralWithHttpInfo($applicationId, $campaignId, $referralId); + $this->deleteStoreWithHttpInfo($applicationId, $storeId); } /** - * Operation deleteReferralWithHttpInfo + * Operation deleteStoreWithHttpInfo * - * Delete referral + * Delete store * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code. (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteReferralWithHttpInfo($applicationId, $campaignId, $referralId) + public function deleteStoreWithHttpInfo($applicationId, $storeId) { - $request = $this->deleteReferralRequest($applicationId, $campaignId, $referralId); + $request = $this->deleteStoreRequest($applicationId, $storeId); try { $options = $this->createHttpClientOption(); @@ -6703,26 +6760,33 @@ public function deleteReferralWithHttpInfo($applicationId, $campaignId, $referra } catch (ApiException $e) { switch ($e->getCode()) { + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation deleteReferralAsync + * Operation deleteStoreAsync * - * Delete referral + * Delete store * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code. (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteReferralAsync($applicationId, $campaignId, $referralId) + public function deleteStoreAsync($applicationId, $storeId) { - return $this->deleteReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId) + return $this->deleteStoreAsyncWithHttpInfo($applicationId, $storeId) ->then( function ($response) { return $response[0]; @@ -6731,21 +6795,20 @@ function ($response) { } /** - * Operation deleteReferralAsyncWithHttpInfo + * Operation deleteStoreAsyncWithHttpInfo * - * Delete referral + * Delete store * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code. (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId) + public function deleteStoreAsyncWithHttpInfo($applicationId, $storeId) { $returnType = ''; - $request = $this->deleteReferralRequest($applicationId, $campaignId, $referralId); + $request = $this->deleteStoreRequest($applicationId, $storeId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6771,37 +6834,30 @@ function ($exception) { } /** - * Create request for operation 'deleteReferral' + * Create request for operation 'deleteStore' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code. (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteReferralRequest($applicationId, $campaignId, $referralId) + protected function deleteStoreRequest($applicationId, $storeId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling deleteReferral' - ); - } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling deleteReferral' + 'Missing the required parameter $applicationId when calling deleteStore' ); } - // verify the required parameter 'referralId' is set - if ($referralId === null || (is_array($referralId) && count($referralId) === 0)) { + // verify the required parameter 'storeId' is set + if ($storeId === null || (is_array($storeId) && count($storeId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $referralId when calling deleteReferral' + 'Missing the required parameter $storeId when calling deleteStore' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}'; + $resourcePath = '/v1/applications/{applicationId}/stores/{storeId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6819,18 +6875,10 @@ protected function deleteReferralRequest($applicationId, $campaignId, $referralI ); } // path params - if ($campaignId !== null) { + if ($storeId !== null) { $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); - } - // path params - if ($referralId !== null) { - $resourcePath = str_replace( - '{' . 'referralId' . '}', - ObjectSerializer::toPathValue($referralId), + '{' . 'storeId' . '}', + ObjectSerializer::toPathValue($storeId), $resourcePath ); } @@ -6840,11 +6888,11 @@ protected function deleteReferralRequest($applicationId, $campaignId, $referralI if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - [] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - [], + ['application/json'], [] ); } @@ -7130,7 +7178,7 @@ protected function destroySessionRequest() * * Export account-level collection's items * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7147,7 +7195,7 @@ public function exportAccountCollectionItems($collectionId) * * Export account-level collection's items * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7275,7 +7323,7 @@ public function exportAccountCollectionItemsWithHttpInfo($collectionId) * * Export account-level collection's items * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7295,7 +7343,7 @@ function ($response) { * * Export account-level collection's items * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7342,7 +7390,7 @@ function ($exception) { /** * Create request for operation 'exportAccountCollectionItems' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -7451,11 +7499,11 @@ protected function exportAccountCollectionItemsRequest($collectionId) /** * Operation exportCollectionItems * - * Export a collection's items + * Export campaign-level collection's items * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7470,11 +7518,11 @@ public function exportCollectionItems($applicationId, $campaignId, $collectionId /** * Operation exportCollectionItemsWithHttpInfo * - * Export a collection's items + * Export campaign-level collection's items * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7600,11 +7648,11 @@ public function exportCollectionItemsWithHttpInfo($applicationId, $campaignId, $ /** * Operation exportCollectionItemsAsync * - * Export a collection's items + * Export campaign-level collection's items * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7622,11 +7670,11 @@ function ($response) { /** * Operation exportCollectionItemsAsyncWithHttpInfo * - * Export a collection's items + * Export campaign-level collection's items * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7675,7 +7723,7 @@ function ($exception) { * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -7823,19 +7871,20 @@ protected function exportCollectionItemsRequest($applicationId, $campaignId, $co * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field. (optional) * @param string $batchId Filter results by batches of coupons (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code. (optional, default to false) * @param string $dateFormat Determines the format of dates in the export document. (optional) * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param bool $valuesOnly Filter results to only return the coupon codes (`value` column) without the associated coupon data. (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return string */ - public function exportCoupons($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null) + public function exportCoupons($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null, $valuesOnly = false) { - list($response) = $this->exportCouponsWithHttpInfo($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); + list($response) = $this->exportCouponsWithHttpInfo($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState, $valuesOnly); return $response; } @@ -7853,19 +7902,20 @@ public function exportCoupons($applicationId, $campaignId = null, $sort = null, * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field. (optional) * @param string $batchId Filter results by batches of coupons (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code. (optional, default to false) * @param string $dateFormat Determines the format of dates in the export document. (optional) * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param bool $valuesOnly Filter results to only return the coupon codes (`value` column) without the associated coupon data. (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function exportCouponsWithHttpInfo($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null) + public function exportCouponsWithHttpInfo($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null, $valuesOnly = false) { - $request = $this->exportCouponsRequest($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); + $request = $this->exportCouponsRequest($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState, $valuesOnly); try { $options = $this->createHttpClientOption(); @@ -7954,18 +8004,19 @@ public function exportCouponsWithHttpInfo($applicationId, $campaignId = null, $s * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field. (optional) * @param string $batchId Filter results by batches of coupons (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code. (optional, default to false) * @param string $dateFormat Determines the format of dates in the export document. (optional) * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param bool $valuesOnly Filter results to only return the coupon codes (`value` column) without the associated coupon data. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportCouponsAsync($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null) + public function exportCouponsAsync($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null, $valuesOnly = false) { - return $this->exportCouponsAsyncWithHttpInfo($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState) + return $this->exportCouponsAsyncWithHttpInfo($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState, $valuesOnly) ->then( function ($response) { return $response[0]; @@ -7987,19 +8038,20 @@ function ($response) { * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field. (optional) * @param string $batchId Filter results by batches of coupons (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code. (optional, default to false) * @param string $dateFormat Determines the format of dates in the export document. (optional) * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param bool $valuesOnly Filter results to only return the coupon codes (`value` column) without the associated coupon data. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportCouponsAsyncWithHttpInfo($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null) + public function exportCouponsAsyncWithHttpInfo($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null, $valuesOnly = false) { $returnType = 'string'; - $request = $this->exportCouponsRequest($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); + $request = $this->exportCouponsRequest($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState, $valuesOnly); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8047,16 +8099,17 @@ function ($exception) { * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field. (optional) * @param string $batchId Filter results by batches of coupons (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code. (optional, default to false) * @param string $dateFormat Determines the format of dates in the export document. (optional) * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param bool $valuesOnly Filter results to only return the coupon codes (`value` column) without the associated coupon data. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportCouponsRequest($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null) + protected function exportCouponsRequest($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null, $valuesOnly = false) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { @@ -8163,6 +8216,13 @@ protected function exportCouponsRequest($applicationId, $campaignId = null, $sor if ($campaignState !== null) { $queryParams['campaignState'] = $campaignState; } + // query params + if (is_array($valuesOnly)) { + $valuesOnly = ObjectSerializer::serializeCollection($valuesOnly, '', true); + } + if ($valuesOnly !== null) { + $queryParams['valuesOnly'] = $valuesOnly; + } // path params @@ -8592,44 +8652,40 @@ protected function exportCustomerSessionsRequest($applicationId, $createdBefore } /** - * Operation exportEffects + * Operation exportCustomersTiers * - * Export triggered effects + * Export customers' tier data * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string[] $subledgerIds An array of subledgers IDs to filter the export by. (optional) + * @param string[] $tierNames An array of tier names to filter the export by. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return string */ - public function exportEffects($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + public function exportCustomersTiers($loyaltyProgramId, $subledgerIds = null, $tierNames = null) { - list($response) = $this->exportEffectsWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); + list($response) = $this->exportCustomersTiersWithHttpInfo($loyaltyProgramId, $subledgerIds, $tierNames); return $response; } /** - * Operation exportEffectsWithHttpInfo + * Operation exportCustomersTiersWithHttpInfo * - * Export triggered effects + * Export customers' tier data * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string[] $subledgerIds An array of subledgers IDs to filter the export by. (optional) + * @param string[] $tierNames An array of tier names to filter the export by. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function exportEffectsWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + public function exportCustomersTiersWithHttpInfo($loyaltyProgramId, $subledgerIds = null, $tierNames = null) { - $request = $this->exportEffectsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); + $request = $this->exportCustomersTiersRequest($loyaltyProgramId, $subledgerIds, $tierNames); try { $options = $this->createHttpClientOption(); @@ -8705,22 +8761,20 @@ public function exportEffectsWithHttpInfo($applicationId, $campaignId = null, $c } /** - * Operation exportEffectsAsync + * Operation exportCustomersTiersAsync * - * Export triggered effects + * Export customers' tier data * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string[] $subledgerIds An array of subledgers IDs to filter the export by. (optional) + * @param string[] $tierNames An array of tier names to filter the export by. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportEffectsAsync($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + public function exportCustomersTiersAsync($loyaltyProgramId, $subledgerIds = null, $tierNames = null) { - return $this->exportEffectsAsyncWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat) + return $this->exportCustomersTiersAsyncWithHttpInfo($loyaltyProgramId, $subledgerIds, $tierNames) ->then( function ($response) { return $response[0]; @@ -8729,23 +8783,21 @@ function ($response) { } /** - * Operation exportEffectsAsyncWithHttpInfo + * Operation exportCustomersTiersAsyncWithHttpInfo * - * Export triggered effects + * Export customers' tier data * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string[] $subledgerIds An array of subledgers IDs to filter the export by. (optional) + * @param string[] $tierNames An array of tier names to filter the export by. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportEffectsAsyncWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + public function exportCustomersTiersAsyncWithHttpInfo($loyaltyProgramId, $subledgerIds = null, $tierNames = null) { $returnType = 'string'; - $request = $this->exportEffectsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); + $request = $this->exportCustomersTiersRequest($loyaltyProgramId, $subledgerIds, $tierNames); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8782,27 +8834,25 @@ function ($exception) { } /** - * Create request for operation 'exportEffects' + * Create request for operation 'exportCustomersTiers' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string[] $subledgerIds An array of subledgers IDs to filter the export by. (optional) + * @param string[] $tierNames An array of tier names to filter the export by. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportEffectsRequest($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + protected function exportCustomersTiersRequest($loyaltyProgramId, $subledgerIds = null, $tierNames = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling exportEffects' + 'Missing the required parameter $loyaltyProgramId when calling exportCustomersTiers' ); } - $resourcePath = '/v1/applications/{applicationId}/export_effects'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/export_customers_tiers'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8810,40 +8860,26 @@ protected function exportEffectsRequest($applicationId, $campaignId = null, $cre $multipart = false; // query params - if (is_array($campaignId)) { - $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); - } - if ($campaignId !== null) { - $queryParams['campaignId'] = $campaignId; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + if (is_array($subledgerIds)) { + $subledgerIds = ObjectSerializer::serializeCollection($subledgerIds, 'form', true); } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; + if ($subledgerIds !== null) { + $queryParams['subledgerIds'] = $subledgerIds; } // query params - if (is_array($dateFormat)) { - $dateFormat = ObjectSerializer::serializeCollection($dateFormat, '', true); + if (is_array($tierNames)) { + $tierNames = ObjectSerializer::serializeCollection($tierNames, 'form', true); } - if ($dateFormat !== null) { - $queryParams['dateFormat'] = $dateFormat; + if ($tierNames !== null) { + $queryParams['tierNames'] = $tierNames; } // path params - if ($applicationId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } @@ -8923,38 +8959,44 @@ protected function exportEffectsRequest($applicationId, $campaignId = null, $cre } /** - * Operation exportLoyaltyBalance + * Operation exportEffects * - * Export customer loyalty balance to CSV + * Export triggered effects * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return string */ - public function exportLoyaltyBalance($loyaltyProgramId, $endDate = null) + public function exportEffects($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) { - list($response) = $this->exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId, $endDate); + list($response) = $this->exportEffectsWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); return $response; } /** - * Operation exportLoyaltyBalanceWithHttpInfo + * Operation exportEffectsWithHttpInfo * - * Export customer loyalty balance to CSV + * Export triggered effects * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId, $endDate = null) + public function exportEffectsWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) { - $request = $this->exportLoyaltyBalanceRequest($loyaltyProgramId, $endDate); + $request = $this->exportEffectsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); try { $options = $this->createHttpClientOption(); @@ -8998,30 +9040,6 @@ public function exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId, $endDate = n $response->getStatusCode(), $response->getHeaders() ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; } $returnType = 'string'; @@ -9048,41 +9066,28 @@ public function exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId, $endDate = n ); $e->setResponseObject($data); break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation exportLoyaltyBalanceAsync + * Operation exportEffectsAsync * - * Export customer loyalty balance to CSV + * Export triggered effects * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyBalanceAsync($loyaltyProgramId, $endDate = null) + public function exportEffectsAsync($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) { - return $this->exportLoyaltyBalanceAsyncWithHttpInfo($loyaltyProgramId, $endDate) + return $this->exportEffectsAsyncWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat) ->then( function ($response) { return $response[0]; @@ -9091,20 +9096,23 @@ function ($response) { } /** - * Operation exportLoyaltyBalanceAsyncWithHttpInfo + * Operation exportEffectsAsyncWithHttpInfo * - * Export customer loyalty balance to CSV + * Export triggered effects * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyBalanceAsyncWithHttpInfo($loyaltyProgramId, $endDate = null) + public function exportEffectsAsyncWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) { $returnType = 'string'; - $request = $this->exportLoyaltyBalanceRequest($loyaltyProgramId, $endDate); + $request = $this->exportEffectsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9141,24 +9149,27 @@ function ($exception) { } /** - * Create request for operation 'exportLoyaltyBalance' + * Create request for operation 'exportEffects' * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportLoyaltyBalanceRequest($loyaltyProgramId, $endDate = null) + protected function exportEffectsRequest($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) { - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyBalance' + 'Missing the required parameter $applicationId when calling exportEffects' ); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance'; + $resourcePath = '/v1/applications/{applicationId}/export_effects'; $formParams = []; $queryParams = []; $headerParams = []; @@ -9166,19 +9177,40 @@ protected function exportLoyaltyBalanceRequest($loyaltyProgramId, $endDate = nul $multipart = false; // query params - if (is_array($endDate)) { - $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + if (is_array($campaignId)) { + $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); } - if ($endDate !== null) { - $queryParams['endDate'] = $endDate; + if ($campaignId !== null) { + $queryParams['campaignId'] = $campaignId; + } + // query params + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + } + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; + } + // query params + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); + } + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } + // query params + if (is_array($dateFormat)) { + $dateFormat = ObjectSerializer::serializeCollection($dateFormat, '', true); + } + if ($dateFormat !== null) { + $queryParams['dateFormat'] = $dateFormat; } // path params - if ($loyaltyProgramId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } @@ -9258,38 +9290,38 @@ protected function exportLoyaltyBalanceRequest($loyaltyProgramId, $endDate = nul } /** - * Operation exportLoyaltyBalances + * Operation exportLoyaltyBalance * - * Export customer loyalty balances + * Export customer loyalty balance to CSV * * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function exportLoyaltyBalances($loyaltyProgramId, $endDate = null) + public function exportLoyaltyBalance($loyaltyProgramId, $endDate = null) { - list($response) = $this->exportLoyaltyBalancesWithHttpInfo($loyaltyProgramId, $endDate); + list($response) = $this->exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId, $endDate); return $response; } /** - * Operation exportLoyaltyBalancesWithHttpInfo + * Operation exportLoyaltyBalanceWithHttpInfo * - * Export customer loyalty balances + * Export customer loyalty balance to CSV * * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function exportLoyaltyBalancesWithHttpInfo($loyaltyProgramId, $endDate = null) + public function exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId, $endDate = null) { - $request = $this->exportLoyaltyBalancesRequest($loyaltyProgramId, $endDate); + $request = $this->exportLoyaltyBalanceRequest($loyaltyProgramId, $endDate); try { $options = $this->createHttpClientOption(); @@ -9405,19 +9437,19 @@ public function exportLoyaltyBalancesWithHttpInfo($loyaltyProgramId, $endDate = } /** - * Operation exportLoyaltyBalancesAsync + * Operation exportLoyaltyBalanceAsync * - * Export customer loyalty balances + * Export customer loyalty balance to CSV * * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyBalancesAsync($loyaltyProgramId, $endDate = null) + public function exportLoyaltyBalanceAsync($loyaltyProgramId, $endDate = null) { - return $this->exportLoyaltyBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate) + return $this->exportLoyaltyBalanceAsyncWithHttpInfo($loyaltyProgramId, $endDate) ->then( function ($response) { return $response[0]; @@ -9426,20 +9458,20 @@ function ($response) { } /** - * Operation exportLoyaltyBalancesAsyncWithHttpInfo + * Operation exportLoyaltyBalanceAsyncWithHttpInfo * - * Export customer loyalty balances + * Export customer loyalty balance to CSV * * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate = null) + public function exportLoyaltyBalanceAsyncWithHttpInfo($loyaltyProgramId, $endDate = null) { $returnType = 'string'; - $request = $this->exportLoyaltyBalancesRequest($loyaltyProgramId, $endDate); + $request = $this->exportLoyaltyBalanceRequest($loyaltyProgramId, $endDate); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9476,24 +9508,24 @@ function ($exception) { } /** - * Create request for operation 'exportLoyaltyBalances' + * Create request for operation 'exportLoyaltyBalance' * * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportLoyaltyBalancesRequest($loyaltyProgramId, $endDate = null) + protected function exportLoyaltyBalanceRequest($loyaltyProgramId, $endDate = null) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyBalances' + 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyBalance' ); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance'; $formParams = []; $queryParams = []; $headerParams = []; @@ -9593,38 +9625,38 @@ protected function exportLoyaltyBalancesRequest($loyaltyProgramId, $endDate = nu } /** - * Operation exportLoyaltyCardBalances + * Operation exportLoyaltyBalances * - * Export all card transaction logs + * Export customer loyalty balances * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function exportLoyaltyCardBalances($loyaltyProgramId, $endDate = null) + public function exportLoyaltyBalances($loyaltyProgramId, $endDate = null) { - list($response) = $this->exportLoyaltyCardBalancesWithHttpInfo($loyaltyProgramId, $endDate); + list($response) = $this->exportLoyaltyBalancesWithHttpInfo($loyaltyProgramId, $endDate); return $response; } /** - * Operation exportLoyaltyCardBalancesWithHttpInfo + * Operation exportLoyaltyBalancesWithHttpInfo * - * Export all card transaction logs + * Export customer loyalty balances * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function exportLoyaltyCardBalancesWithHttpInfo($loyaltyProgramId, $endDate = null) + public function exportLoyaltyBalancesWithHttpInfo($loyaltyProgramId, $endDate = null) { - $request = $this->exportLoyaltyCardBalancesRequest($loyaltyProgramId, $endDate); + $request = $this->exportLoyaltyBalancesRequest($loyaltyProgramId, $endDate); try { $options = $this->createHttpClientOption(); @@ -9740,19 +9772,19 @@ public function exportLoyaltyCardBalancesWithHttpInfo($loyaltyProgramId, $endDat } /** - * Operation exportLoyaltyCardBalancesAsync + * Operation exportLoyaltyBalancesAsync * - * Export all card transaction logs + * Export customer loyalty balances * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyCardBalancesAsync($loyaltyProgramId, $endDate = null) + public function exportLoyaltyBalancesAsync($loyaltyProgramId, $endDate = null) { - return $this->exportLoyaltyCardBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate) + return $this->exportLoyaltyBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate) ->then( function ($response) { return $response[0]; @@ -9761,20 +9793,20 @@ function ($response) { } /** - * Operation exportLoyaltyCardBalancesAsyncWithHttpInfo + * Operation exportLoyaltyBalancesAsyncWithHttpInfo * - * Export all card transaction logs + * Export customer loyalty balances * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyCardBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate = null) + public function exportLoyaltyBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate = null) { $returnType = 'string'; - $request = $this->exportLoyaltyCardBalancesRequest($loyaltyProgramId, $endDate); + $request = $this->exportLoyaltyBalancesRequest($loyaltyProgramId, $endDate); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9811,24 +9843,24 @@ function ($exception) { } /** - * Create request for operation 'exportLoyaltyCardBalances' + * Create request for operation 'exportLoyaltyBalances' * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportLoyaltyCardBalancesRequest($loyaltyProgramId, $endDate = null) + protected function exportLoyaltyBalancesRequest($loyaltyProgramId, $endDate = null) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyCardBalances' + 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyBalances' ); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/export_card_balances'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances'; $formParams = []; $queryParams = []; $headerParams = []; @@ -9928,44 +9960,38 @@ protected function exportLoyaltyCardBalancesRequest($loyaltyProgramId, $endDate } /** - * Operation exportLoyaltyCardLedger + * Operation exportLoyaltyCardBalances * - * Export card's ledger log + * Export all card transaction logs * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function exportLoyaltyCardLedger($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) + public function exportLoyaltyCardBalances($loyaltyProgramId, $endDate = null) { - list($response) = $this->exportLoyaltyCardLedgerWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat); + list($response) = $this->exportLoyaltyCardBalancesWithHttpInfo($loyaltyProgramId, $endDate); return $response; } /** - * Operation exportLoyaltyCardLedgerWithHttpInfo + * Operation exportLoyaltyCardBalancesWithHttpInfo * - * Export card's ledger log + * Export all card transaction logs * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function exportLoyaltyCardLedgerWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) + public function exportLoyaltyCardBalancesWithHttpInfo($loyaltyProgramId, $endDate = null) { - $request = $this->exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat); + $request = $this->exportLoyaltyCardBalancesRequest($loyaltyProgramId, $endDate); try { $options = $this->createHttpClientOption(); @@ -10009,7 +10035,7 @@ public function exportLoyaltyCardLedgerWithHttpInfo($loyaltyProgramId, $loyaltyC $response->getStatusCode(), $response->getHeaders() ]; - case 401: + case 400: if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { @@ -10021,7 +10047,7 @@ public function exportLoyaltyCardLedgerWithHttpInfo($loyaltyProgramId, $loyaltyC $response->getStatusCode(), $response->getHeaders() ]; - case 404: + case 401: if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { @@ -10059,7 +10085,7 @@ public function exportLoyaltyCardLedgerWithHttpInfo($loyaltyProgramId, $loyaltyC ); $e->setResponseObject($data); break; - case 401: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\TalonOne\Client\Model\ErrorResponseWithStatus', @@ -10067,7 +10093,7 @@ public function exportLoyaltyCardLedgerWithHttpInfo($loyaltyProgramId, $loyaltyC ); $e->setResponseObject($data); break; - case 404: + case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\TalonOne\Client\Model\ErrorResponseWithStatus', @@ -10081,22 +10107,19 @@ public function exportLoyaltyCardLedgerWithHttpInfo($loyaltyProgramId, $loyaltyC } /** - * Operation exportLoyaltyCardLedgerAsync + * Operation exportLoyaltyCardBalancesAsync * - * Export card's ledger log + * Export all card transaction logs * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyCardLedgerAsync($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) + public function exportLoyaltyCardBalancesAsync($loyaltyProgramId, $endDate = null) { - return $this->exportLoyaltyCardLedgerAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat) + return $this->exportLoyaltyCardBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate) ->then( function ($response) { return $response[0]; @@ -10105,23 +10128,20 @@ function ($response) { } /** - * Operation exportLoyaltyCardLedgerAsyncWithHttpInfo + * Operation exportLoyaltyCardBalancesAsyncWithHttpInfo * - * Export card's ledger log + * Export all card transaction logs * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyCardLedgerAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) + public function exportLoyaltyCardBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate = null) { $returnType = 'string'; - $request = $this->exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat); + $request = $this->exportLoyaltyCardBalancesRequest($loyaltyProgramId, $endDate); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10158,49 +10178,24 @@ function ($exception) { } /** - * Create request for operation 'exportLoyaltyCardLedger' + * Create request for operation 'exportLoyaltyCardBalances' * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param \DateTime $endDate Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) + protected function exportLoyaltyCardBalancesRequest($loyaltyProgramId, $endDate = null) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyCardLedger' - ); - } - // verify the required parameter 'loyaltyCardId' is set - if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyCardId when calling exportLoyaltyCardLedger' - ); - } - if (strlen($loyaltyCardId) > 108) { - throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.exportLoyaltyCardLedger, must be smaller than or equal to 108.'); - } - - // verify the required parameter 'rangeStart' is set - if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling exportLoyaltyCardLedger' - ); - } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling exportLoyaltyCardLedger' + 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyCardBalances' ); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/export_card_balances'; $formParams = []; $queryParams = []; $headerParams = []; @@ -10208,25 +10203,11 @@ protected function exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCar $multipart = false; // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); - } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; - } - // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); - } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; - } - // query params - if (is_array($dateFormat)) { - $dateFormat = ObjectSerializer::serializeCollection($dateFormat, '', true); + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); } - if ($dateFormat !== null) { - $queryParams['dateFormat'] = $dateFormat; + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; } @@ -10238,14 +10219,6 @@ protected function exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCar $resourcePath ); } - // path params - if ($loyaltyCardId !== null) { - $resourcePath = str_replace( - '{' . 'loyaltyCardId' . '}', - ObjectSerializer::toPathValue($loyaltyCardId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -10322,44 +10295,44 @@ protected function exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCar } /** - * Operation exportLoyaltyLedger + * Operation exportLoyaltyCardLedger * - * Export customer's transaction logs + * Export card's ledger log * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return string + * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function exportLoyaltyLedger($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) + public function exportLoyaltyCardLedger($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) { - list($response) = $this->exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); + list($response) = $this->exportLoyaltyCardLedgerWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat); return $response; } /** - * Operation exportLoyaltyLedgerWithHttpInfo + * Operation exportLoyaltyCardLedgerWithHttpInfo * - * Export customer's transaction logs + * Export card's ledger log * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of string, HTTP status code, HTTP response headers (array of strings) + * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) + public function exportLoyaltyCardLedgerWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) { - $request = $this->exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); + $request = $this->exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat); try { $options = $this->createHttpClientOption(); @@ -10403,6 +10376,30 @@ public function exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $loyalty $response->getStatusCode(), $response->getHeaders() ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; } $returnType = 'string'; @@ -10429,28 +10426,44 @@ public function exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $loyalty ); $e->setResponseObject($data); break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation exportLoyaltyLedgerAsync + * Operation exportLoyaltyCardLedgerAsync * - * Export customer's transaction logs + * Export card's ledger log * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyLedgerAsync($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) + public function exportLoyaltyCardLedgerAsync($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) { - return $this->exportLoyaltyLedgerAsyncWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat) + return $this->exportLoyaltyCardLedgerAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat) ->then( function ($response) { return $response[0]; @@ -10459,23 +10472,23 @@ function ($response) { } /** - * Operation exportLoyaltyLedgerAsyncWithHttpInfo + * Operation exportLoyaltyCardLedgerAsyncWithHttpInfo * - * Export customer's transaction logs + * Export card's ledger log * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyLedgerAsyncWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) + public function exportLoyaltyCardLedgerAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) { $returnType = 'string'; - $request = $this->exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); + $request = $this->exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10512,45 +10525,49 @@ function ($exception) { } /** - * Create request for operation 'exportLoyaltyLedger' + * Create request for operation 'exportLoyaltyCardLedger' * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) + protected function exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) { - // verify the required parameter 'rangeStart' is set - if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling exportLoyaltyLedger' + 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyCardLedger' ); } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling exportLoyaltyLedger' + 'Missing the required parameter $loyaltyCardId when calling exportLoyaltyCardLedger' ); } - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.exportLoyaltyCardLedger, must be smaller than or equal to 108.'); + } + + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyLedger' + 'Missing the required parameter $rangeStart when calling exportLoyaltyCardLedger' ); } - // verify the required parameter 'integrationId' is set - if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $integrationId when calling exportLoyaltyLedger' + 'Missing the required parameter $rangeEnd when calling exportLoyaltyCardLedger' ); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log'; $formParams = []; $queryParams = []; $headerParams = []; @@ -10589,10 +10606,10 @@ protected function exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyPr ); } // path params - if ($integrationId !== null) { + if ($loyaltyCardId !== null) { $resourcePath = str_replace( - '{' . 'integrationId' . '}', - ObjectSerializer::toPathValue($integrationId), + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), $resourcePath ); } @@ -10672,50 +10689,44 @@ protected function exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyPr } /** - * Operation exportReferrals + * Operation exportLoyaltyLedger * - * Export referrals + * Export customer's transaction logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) - * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) - * @param string $batchId Filter results by batches of referrals (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return string */ - public function exportReferrals($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) + public function exportLoyaltyLedger($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) { - list($response) = $this->exportReferralsWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); + list($response) = $this->exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); return $response; } /** - * Operation exportReferralsWithHttpInfo + * Operation exportLoyaltyLedgerWithHttpInfo * - * Export referrals + * Export customer's transaction logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) - * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) - * @param string $batchId Filter results by batches of referrals (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function exportReferralsWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) + public function exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) { - $request = $this->exportReferralsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); + $request = $this->exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); try { $options = $this->createHttpClientOption(); @@ -10791,25 +10802,22 @@ public function exportReferralsWithHttpInfo($applicationId, $campaignId = null, } /** - * Operation exportReferralsAsync + * Operation exportLoyaltyLedgerAsync * - * Export referrals + * Export customer's transaction logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) - * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) - * @param string $batchId Filter results by batches of referrals (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportReferralsAsync($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) + public function exportLoyaltyLedgerAsync($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) { - return $this->exportReferralsAsyncWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat) + return $this->exportLoyaltyLedgerAsyncWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat) ->then( function ($response) { return $response[0]; @@ -10818,26 +10826,23 @@ function ($response) { } /** - * Operation exportReferralsAsyncWithHttpInfo + * Operation exportLoyaltyLedgerAsyncWithHttpInfo * - * Export referrals + * Export customer's transaction logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) - * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) - * @param string $batchId Filter results by batches of referrals (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportReferralsAsyncWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) + public function exportLoyaltyLedgerAsyncWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) { $returnType = 'string'; - $request = $this->exportReferralsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); + $request = $this->exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10874,30 +10879,45 @@ function ($exception) { } /** - * Create request for operation 'exportReferrals' + * Create request for operation 'exportLoyaltyLedger' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) - * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) - * @param string $batchId Filter results by batches of referrals (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportReferralsRequest($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) + protected function exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling exportReferrals' + 'Missing the required parameter $rangeStart when calling exportLoyaltyLedger' + ); + } + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeEnd when calling exportLoyaltyLedger' + ); + } + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyLedger' + ); + } + // verify the required parameter 'integrationId' is set + if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $integrationId when calling exportLoyaltyLedger' ); } - $resourcePath = '/v1/applications/{applicationId}/export_referrals'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log'; $formParams = []; $queryParams = []; $headerParams = []; @@ -10905,46 +10925,18 @@ protected function exportReferralsRequest($applicationId, $campaignId = null, $c $multipart = false; // query params - if (is_array($campaignId)) { - $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); - } - if ($campaignId !== null) { - $queryParams['campaignId'] = $campaignId; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } - // query params - if (is_array($valid)) { - $valid = ObjectSerializer::serializeCollection($valid, '', true); - } - if ($valid !== null) { - $queryParams['valid'] = $valid; - } - // query params - if (is_array($usable)) { - $usable = ObjectSerializer::serializeCollection($usable, '', true); + if (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); } - if ($usable !== null) { - $queryParams['usable'] = $usable; + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; } // query params - if (is_array($batchId)) { - $batchId = ObjectSerializer::serializeCollection($batchId, '', true); + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); } - if ($batchId !== null) { - $queryParams['batchId'] = $batchId; + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; } // query params if (is_array($dateFormat)) { @@ -10956,10 +10948,18 @@ protected function exportReferralsRequest($applicationId, $campaignId = null, $c // path params - if ($applicationId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($integrationId !== null) { + $resourcePath = str_replace( + '{' . 'integrationId' . '}', + ObjectSerializer::toPathValue($integrationId), $resourcePath ); } @@ -11039,52 +11039,40 @@ protected function exportReferralsRequest($applicationId, $campaignId = null, $c } /** - * Operation getAccessLogsWithoutTotalCount + * Operation exportPoolGiveaways * - * Get access logs for Application + * Export giveaway codes of a giveaway pool * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) + * @param \DateTime $createdBefore Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdAfter Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20018 + * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getAccessLogsWithoutTotalCount($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) + public function exportPoolGiveaways($poolId, $createdBefore = null, $createdAfter = null) { - list($response) = $this->getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + list($response) = $this->exportPoolGiveawaysWithHttpInfo($poolId, $createdBefore, $createdAfter); return $response; } /** - * Operation getAccessLogsWithoutTotalCountWithHttpInfo + * Operation exportPoolGiveawaysWithHttpInfo * - * Get access logs for Application + * Export giveaway codes of a giveaway pool * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) + * @param \DateTime $createdBefore Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdAfter Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20018, HTTP status code, HTTP response headers (array of strings) + * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) + public function exportPoolGiveawaysWithHttpInfo($poolId, $createdBefore = null, $createdAfter = null) { - $request = $this->getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + $request = $this->exportPoolGiveawaysRequest($poolId, $createdBefore, $createdAfter); try { $options = $this->createHttpClientOption(); @@ -11117,20 +11105,32 @@ public function getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rang $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20018' === '\SplFileObject') { + if ('string' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20018', []), + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20018'; + $returnType = 'string'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -11149,7 +11149,15 @@ public function getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rang case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20018', + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -11160,26 +11168,20 @@ public function getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rang } /** - * Operation getAccessLogsWithoutTotalCountAsync + * Operation exportPoolGiveawaysAsync * - * Get access logs for Application + * Export giveaway codes of a giveaway pool * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) + * @param \DateTime $createdBefore Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdAfter Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccessLogsWithoutTotalCountAsync($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) + public function exportPoolGiveawaysAsync($poolId, $createdBefore = null, $createdAfter = null) { - return $this->getAccessLogsWithoutTotalCountAsyncWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) + return $this->exportPoolGiveawaysAsyncWithHttpInfo($poolId, $createdBefore, $createdAfter) ->then( function ($response) { return $response[0]; @@ -11188,27 +11190,21 @@ function ($response) { } /** - * Operation getAccessLogsWithoutTotalCountAsyncWithHttpInfo + * Operation exportPoolGiveawaysAsyncWithHttpInfo * - * Get access logs for Application + * Export giveaway codes of a giveaway pool * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) + * @param \DateTime $createdBefore Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdAfter Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccessLogsWithoutTotalCountAsyncWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) + public function exportPoolGiveawaysAsyncWithHttpInfo($poolId, $createdBefore = null, $createdAfter = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20018'; - $request = $this->getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + $returnType = 'string'; + $request = $this->exportPoolGiveawaysRequest($poolId, $createdBefore, $createdAfter); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11245,50 +11241,25 @@ function ($exception) { } /** - * Create request for operation 'getAccessLogsWithoutTotalCount' + * Create request for operation 'exportPoolGiveaways' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) + * @param \DateTime $createdBefore Timestamp that filters the results to only contain giveaways created before this date. Must be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdAfter Timestamp that filters the results to only contain giveaways created after this date. Must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) + protected function exportPoolGiveawaysRequest($poolId, $createdBefore = null, $createdAfter = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getAccessLogsWithoutTotalCount' - ); - } - // verify the required parameter 'rangeStart' is set - if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling getAccessLogsWithoutTotalCount' - ); - } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + // verify the required parameter 'poolId' is set + if ($poolId === null || (is_array($poolId) && count($poolId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling getAccessLogsWithoutTotalCount' + 'Missing the required parameter $poolId when calling exportPoolGiveaways' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAccessLogsWithoutTotalCount, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAccessLogsWithoutTotalCount, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/applications/{applicationId}/access_logs/no_total'; + $resourcePath = '/v1/giveaways/pools/{poolId}/export'; $formParams = []; $queryParams = []; $headerParams = []; @@ -11296,68 +11267,26 @@ protected function getAccessLogsWithoutTotalCountRequest($applicationId, $rangeS $multipart = false; // query params - if (is_array($path)) { - $path = ObjectSerializer::serializeCollection($path, '', true); - } - if ($path !== null) { - $queryParams['path'] = $path; - } - // query params - if (is_array($method)) { - $method = ObjectSerializer::serializeCollection($method, '', true); - } - if ($method !== null) { - $queryParams['method'] = $method; - } - // query params - if (is_array($status)) { - $status = ObjectSerializer::serializeCollection($status, '', true); - } - if ($status !== null) { - $queryParams['status'] = $status; - } - // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); - } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; - } - // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); - } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; - } - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); } - if ($skip !== null) { - $queryParams['skip'] = $skip; + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; } // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); } - if ($sort !== null) { - $queryParams['sort'] = $sort; + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; } // path params - if ($applicationId !== null) { + if ($poolId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'poolId' . '}', + ObjectSerializer::toPathValue($poolId), $resourcePath ); } @@ -11367,11 +11296,11 @@ protected function getAccessLogsWithoutTotalCountRequest($applicationId, $rangeS if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + ['application/csv'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json'], + ['application/csv'], [] ); } @@ -11437,36 +11366,50 @@ protected function getAccessLogsWithoutTotalCountRequest($applicationId, $rangeS } /** - * Operation getAccount + * Operation exportReferrals * - * Get account details + * Export referrals * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) + * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) + * @param string $batchId Filter results by batches of referrals (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Account + * @return string */ - public function getAccount($accountId) + public function exportReferrals($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) { - list($response) = $this->getAccountWithHttpInfo($accountId); + list($response) = $this->exportReferralsWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); return $response; } /** - * Operation getAccountWithHttpInfo + * Operation exportReferralsWithHttpInfo * - * Get account details + * Export referrals * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) + * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) + * @param string $batchId Filter results by batches of referrals (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Account, HTTP status code, HTTP response headers (array of strings) + * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function getAccountWithHttpInfo($accountId) + public function exportReferralsWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) { - $request = $this->getAccountRequest($accountId); + $request = $this->exportReferralsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); try { $options = $this->createHttpClientOption(); @@ -11499,20 +11442,20 @@ public function getAccountWithHttpInfo($accountId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Account' === '\SplFileObject') { + if ('string' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Account', []), + ObjectSerializer::deserialize($content, 'string', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Account'; + $returnType = 'string'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -11531,7 +11474,7 @@ public function getAccountWithHttpInfo($accountId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Account', + 'string', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -11542,18 +11485,25 @@ public function getAccountWithHttpInfo($accountId) } /** - * Operation getAccountAsync + * Operation exportReferralsAsync * - * Get account details + * Export referrals * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) + * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) + * @param string $batchId Filter results by batches of referrals (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountAsync($accountId) + public function exportReferralsAsync($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) { - return $this->getAccountAsyncWithHttpInfo($accountId) + return $this->exportReferralsAsyncWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat) ->then( function ($response) { return $response[0]; @@ -11562,19 +11512,26 @@ function ($response) { } /** - * Operation getAccountAsyncWithHttpInfo + * Operation exportReferralsAsyncWithHttpInfo * - * Get account details + * Export referrals * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) + * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) + * @param string $batchId Filter results by batches of referrals (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountAsyncWithHttpInfo($accountId) + public function exportReferralsAsyncWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) { - $returnType = '\TalonOne\Client\Model\Account'; - $request = $this->getAccountRequest($accountId); + $returnType = 'string'; + $request = $this->exportReferralsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11611,36 +11568,92 @@ function ($exception) { } /** - * Create request for operation 'getAccount' + * Create request for operation 'exportReferrals' * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) + * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) + * @param string $batchId Filter results by batches of referrals (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAccountRequest($accountId) + protected function exportReferralsRequest($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) { - // verify the required parameter 'accountId' is set - if ($accountId === null || (is_array($accountId) && count($accountId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $accountId when calling getAccount' + 'Missing the required parameter $applicationId when calling exportReferrals' ); } - $resourcePath = '/v1/accounts/{accountId}'; + $resourcePath = '/v1/applications/{applicationId}/export_referrals'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($campaignId)) { + $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); + } + if ($campaignId !== null) { + $queryParams['campaignId'] = $campaignId; + } + // query params + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + } + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; + } + // query params + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); + } + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } + // query params + if (is_array($valid)) { + $valid = ObjectSerializer::serializeCollection($valid, '', true); + } + if ($valid !== null) { + $queryParams['valid'] = $valid; + } + // query params + if (is_array($usable)) { + $usable = ObjectSerializer::serializeCollection($usable, '', true); + } + if ($usable !== null) { + $queryParams['usable'] = $usable; + } + // query params + if (is_array($batchId)) { + $batchId = ObjectSerializer::serializeCollection($batchId, '', true); + } + if ($batchId !== null) { + $queryParams['batchId'] = $batchId; + } + // query params + if (is_array($dateFormat)) { + $dateFormat = ObjectSerializer::serializeCollection($dateFormat, '', true); + } + if ($dateFormat !== null) { + $queryParams['dateFormat'] = $dateFormat; + } // path params - if ($accountId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'accountId' . '}', - ObjectSerializer::toPathValue($accountId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } @@ -11650,11 +11663,11 @@ protected function getAccountRequest($accountId) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + ['application/csv'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json'], + ['application/csv'], [] ); } @@ -11720,36 +11733,52 @@ protected function getAccountRequest($accountId) } /** - * Operation getAccountAnalytics + * Operation getAccessLogsWithoutTotalCount * - * Get account analytics + * Get access logs for Application * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\AccountAnalytics + * @return \TalonOne\Client\Model\InlineResponse20019 */ - public function getAccountAnalytics($accountId) + public function getAccessLogsWithoutTotalCount($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getAccountAnalyticsWithHttpInfo($accountId); + list($response) = $this->getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); return $response; } /** - * Operation getAccountAnalyticsWithHttpInfo + * Operation getAccessLogsWithoutTotalCountWithHttpInfo * - * Get account analytics + * Get access logs for Application * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\AccountAnalytics, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20019, HTTP status code, HTTP response headers (array of strings) */ - public function getAccountAnalyticsWithHttpInfo($accountId) + public function getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getAccountAnalyticsRequest($accountId); + $request = $this->getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -11782,20 +11811,20 @@ public function getAccountAnalyticsWithHttpInfo($accountId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\AccountAnalytics' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20019' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\AccountAnalytics', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20019', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\AccountAnalytics'; + $returnType = '\TalonOne\Client\Model\InlineResponse20019'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -11814,7 +11843,7 @@ public function getAccountAnalyticsWithHttpInfo($accountId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\AccountAnalytics', + '\TalonOne\Client\Model\InlineResponse20019', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -11825,18 +11854,26 @@ public function getAccountAnalyticsWithHttpInfo($accountId) } /** - * Operation getAccountAnalyticsAsync + * Operation getAccessLogsWithoutTotalCountAsync * - * Get account analytics + * Get access logs for Application * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountAnalyticsAsync($accountId) + public function getAccessLogsWithoutTotalCountAsync($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - return $this->getAccountAnalyticsAsyncWithHttpInfo($accountId) + return $this->getAccessLogsWithoutTotalCountAsyncWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -11845,19 +11882,27 @@ function ($response) { } /** - * Operation getAccountAnalyticsAsyncWithHttpInfo + * Operation getAccessLogsWithoutTotalCountAsyncWithHttpInfo * - * Get account analytics + * Get access logs for Application * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountAnalyticsAsyncWithHttpInfo($accountId) + public function getAccessLogsWithoutTotalCountAsyncWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\AccountAnalytics'; - $request = $this->getAccountAnalyticsRequest($accountId); + $returnType = '\TalonOne\Client\Model\InlineResponse20019'; + $request = $this->getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11894,68 +11939,151 @@ function ($exception) { } /** - * Create request for operation 'getAccountAnalytics' + * Create request for operation 'getAccessLogsWithoutTotalCount' * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAccountAnalyticsRequest($accountId) + protected function getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - // verify the required parameter 'accountId' is set - if ($accountId === null || (is_array($accountId) && count($accountId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $accountId when calling getAccountAnalytics' + 'Missing the required parameter $applicationId when calling getAccessLogsWithoutTotalCount' + ); + } + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeStart when calling getAccessLogsWithoutTotalCount' + ); + } + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeEnd when calling getAccessLogsWithoutTotalCount' ); } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAccessLogsWithoutTotalCount, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAccessLogsWithoutTotalCount, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/accounts/{accountId}/analytics'; + + $resourcePath = '/v1/applications/{applicationId}/access_logs/no_total'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - - - // path params - if ($accountId !== null) { - $resourcePath = str_replace( - '{' . 'accountId' . '}', - ObjectSerializer::toPathValue($accountId), - $resourcePath - ); + // query params + if (is_array($path)) { + $path = ObjectSerializer::serializeCollection($path, '', true); } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); + if ($path !== null) { + $queryParams['path'] = $path; } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); - } else { - $httpBody = $_tempBody; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, + // query params + if (is_array($method)) { + $method = ObjectSerializer::serializeCollection($method, '', true); + } + if ($method !== null) { + $queryParams['method'] = $method; + } + // query params + if (is_array($status)) { + $status = ObjectSerializer::serializeCollection($status, '', true); + } + if ($status !== null) { + $queryParams['status'] = $status; + } + // query params + if (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); + } + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; + } + // query params + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + } + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, 'contents' => $formParamValue ]; } @@ -12003,36 +12131,36 @@ protected function getAccountAnalyticsRequest($accountId) } /** - * Operation getAccountCollection + * Operation getAccount * - * Get account-level collection + * Get account details * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\Account */ - public function getAccountCollection($collectionId) + public function getAccount($accountId) { - list($response) = $this->getAccountCollectionWithHttpInfo($collectionId); + list($response) = $this->getAccountWithHttpInfo($accountId); return $response; } /** - * Operation getAccountCollectionWithHttpInfo + * Operation getAccountWithHttpInfo * - * Get account-level collection + * Get account details * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Account, HTTP status code, HTTP response headers (array of strings) */ - public function getAccountCollectionWithHttpInfo($collectionId) + public function getAccountWithHttpInfo($accountId) { - $request = $this->getAccountCollectionRequest($collectionId); + $request = $this->getAccountRequest($accountId); try { $options = $this->createHttpClientOption(); @@ -12065,32 +12193,20 @@ public function getAccountCollectionWithHttpInfo($collectionId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Account' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Account', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Collection'; + $returnType = '\TalonOne\Client\Model\Account'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -12109,15 +12225,7 @@ public function getAccountCollectionWithHttpInfo($collectionId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Collection', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\Account', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -12128,18 +12236,18 @@ public function getAccountCollectionWithHttpInfo($collectionId) } /** - * Operation getAccountCollectionAsync + * Operation getAccountAsync * - * Get account-level collection + * Get account details * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountCollectionAsync($collectionId) + public function getAccountAsync($accountId) { - return $this->getAccountCollectionAsyncWithHttpInfo($collectionId) + return $this->getAccountAsyncWithHttpInfo($accountId) ->then( function ($response) { return $response[0]; @@ -12148,19 +12256,19 @@ function ($response) { } /** - * Operation getAccountCollectionAsyncWithHttpInfo + * Operation getAccountAsyncWithHttpInfo * - * Get account-level collection + * Get account details * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountCollectionAsyncWithHttpInfo($collectionId) + public function getAccountAsyncWithHttpInfo($accountId) { - $returnType = '\TalonOne\Client\Model\Collection'; - $request = $this->getAccountCollectionRequest($collectionId); + $returnType = '\TalonOne\Client\Model\Account'; + $request = $this->getAccountRequest($accountId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12197,23 +12305,23 @@ function ($exception) { } /** - * Create request for operation 'getAccountCollection' + * Create request for operation 'getAccount' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAccountCollectionRequest($collectionId) + protected function getAccountRequest($accountId) { - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + // verify the required parameter 'accountId' is set + if ($accountId === null || (is_array($accountId) && count($accountId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling getAccountCollection' + 'Missing the required parameter $accountId when calling getAccount' ); } - $resourcePath = '/v1/collections/{collectionId}'; + $resourcePath = '/v1/accounts/{accountId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -12223,10 +12331,10 @@ protected function getAccountCollectionRequest($collectionId) // path params - if ($collectionId !== null) { + if ($accountId !== null) { $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), + '{' . 'accountId' . '}', + ObjectSerializer::toPathValue($accountId), $resourcePath ); } @@ -12306,36 +12414,36 @@ protected function getAccountCollectionRequest($collectionId) } /** - * Operation getAdditionalCost + * Operation getAccountAnalytics * - * Get additional cost + * Get account analytics * - * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\AccountAdditionalCost + * @return \TalonOne\Client\Model\AccountAnalytics */ - public function getAdditionalCost($additionalCostId) + public function getAccountAnalytics($accountId) { - list($response) = $this->getAdditionalCostWithHttpInfo($additionalCostId); + list($response) = $this->getAccountAnalyticsWithHttpInfo($accountId); return $response; } /** - * Operation getAdditionalCostWithHttpInfo + * Operation getAccountAnalyticsWithHttpInfo * - * Get additional cost + * Get account analytics * - * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\AccountAdditionalCost, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\AccountAnalytics, HTTP status code, HTTP response headers (array of strings) */ - public function getAdditionalCostWithHttpInfo($additionalCostId) + public function getAccountAnalyticsWithHttpInfo($accountId) { - $request = $this->getAdditionalCostRequest($additionalCostId); + $request = $this->getAccountAnalyticsRequest($accountId); try { $options = $this->createHttpClientOption(); @@ -12368,20 +12476,20 @@ public function getAdditionalCostWithHttpInfo($additionalCostId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\AccountAdditionalCost' === '\SplFileObject') { + if ('\TalonOne\Client\Model\AccountAnalytics' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\AccountAdditionalCost', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\AccountAnalytics', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; + $returnType = '\TalonOne\Client\Model\AccountAnalytics'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -12400,7 +12508,7 @@ public function getAdditionalCostWithHttpInfo($additionalCostId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\AccountAdditionalCost', + '\TalonOne\Client\Model\AccountAnalytics', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -12411,18 +12519,18 @@ public function getAdditionalCostWithHttpInfo($additionalCostId) } /** - * Operation getAdditionalCostAsync + * Operation getAccountAnalyticsAsync * - * Get additional cost + * Get account analytics * - * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAdditionalCostAsync($additionalCostId) + public function getAccountAnalyticsAsync($accountId) { - return $this->getAdditionalCostAsyncWithHttpInfo($additionalCostId) + return $this->getAccountAnalyticsAsyncWithHttpInfo($accountId) ->then( function ($response) { return $response[0]; @@ -12431,19 +12539,19 @@ function ($response) { } /** - * Operation getAdditionalCostAsyncWithHttpInfo + * Operation getAccountAnalyticsAsyncWithHttpInfo * - * Get additional cost + * Get account analytics * - * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAdditionalCostAsyncWithHttpInfo($additionalCostId) + public function getAccountAnalyticsAsyncWithHttpInfo($accountId) { - $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; - $request = $this->getAdditionalCostRequest($additionalCostId); + $returnType = '\TalonOne\Client\Model\AccountAnalytics'; + $request = $this->getAccountAnalyticsRequest($accountId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12480,23 +12588,23 @@ function ($exception) { } /** - * Create request for operation 'getAdditionalCost' + * Create request for operation 'getAccountAnalytics' * - * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAdditionalCostRequest($additionalCostId) + protected function getAccountAnalyticsRequest($accountId) { - // verify the required parameter 'additionalCostId' is set - if ($additionalCostId === null || (is_array($additionalCostId) && count($additionalCostId) === 0)) { + // verify the required parameter 'accountId' is set + if ($accountId === null || (is_array($accountId) && count($accountId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $additionalCostId when calling getAdditionalCost' + 'Missing the required parameter $accountId when calling getAccountAnalytics' ); } - $resourcePath = '/v1/additional_costs/{additionalCostId}'; + $resourcePath = '/v1/accounts/{accountId}/analytics'; $formParams = []; $queryParams = []; $headerParams = []; @@ -12506,10 +12614,10 @@ protected function getAdditionalCostRequest($additionalCostId) // path params - if ($additionalCostId !== null) { + if ($accountId !== null) { $resourcePath = str_replace( - '{' . 'additionalCostId' . '}', - ObjectSerializer::toPathValue($additionalCostId), + '{' . 'accountId' . '}', + ObjectSerializer::toPathValue($accountId), $resourcePath ); } @@ -12589,40 +12697,36 @@ protected function getAdditionalCostRequest($additionalCostId) } /** - * Operation getAdditionalCosts + * Operation getAccountCollection * - * List additional costs + * Get account-level collection * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20032 + * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getAdditionalCosts($pageSize = 1000, $skip = null, $sort = null) + public function getAccountCollection($collectionId) { - list($response) = $this->getAdditionalCostsWithHttpInfo($pageSize, $skip, $sort); + list($response) = $this->getAccountCollectionWithHttpInfo($collectionId); return $response; } /** - * Operation getAdditionalCostsWithHttpInfo + * Operation getAccountCollectionWithHttpInfo * - * List additional costs + * Get account-level collection * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20032, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getAdditionalCostsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) + public function getAccountCollectionWithHttpInfo($collectionId) { - $request = $this->getAdditionalCostsRequest($pageSize, $skip, $sort); + $request = $this->getAccountCollectionRequest($collectionId); try { $options = $this->createHttpClientOption(); @@ -12655,20 +12759,32 @@ public function getAdditionalCostsWithHttpInfo($pageSize = 1000, $skip = null, $ $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20032' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20032', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20032'; + $returnType = '\TalonOne\Client\Model\Collection'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -12687,7 +12803,15 @@ public function getAdditionalCostsWithHttpInfo($pageSize = 1000, $skip = null, $ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20032', + '\TalonOne\Client\Model\Collection', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -12698,20 +12822,18 @@ public function getAdditionalCostsWithHttpInfo($pageSize = 1000, $skip = null, $ } /** - * Operation getAdditionalCostsAsync + * Operation getAccountCollectionAsync * - * List additional costs + * Get account-level collection * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAdditionalCostsAsync($pageSize = 1000, $skip = null, $sort = null) + public function getAccountCollectionAsync($collectionId) { - return $this->getAdditionalCostsAsyncWithHttpInfo($pageSize, $skip, $sort) + return $this->getAccountCollectionAsyncWithHttpInfo($collectionId) ->then( function ($response) { return $response[0]; @@ -12720,21 +12842,19 @@ function ($response) { } /** - * Operation getAdditionalCostsAsyncWithHttpInfo + * Operation getAccountCollectionAsyncWithHttpInfo * - * List additional costs + * Get account-level collection * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAdditionalCostsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) + public function getAccountCollectionAsyncWithHttpInfo($collectionId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20032'; - $request = $this->getAdditionalCostsRequest($pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\Collection'; + $request = $this->getAccountCollectionRequest($collectionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12771,55 +12891,39 @@ function ($exception) { } /** - * Create request for operation 'getAdditionalCosts' + * Create request for operation 'getAccountCollection' * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAdditionalCostsRequest($pageSize = 1000, $skip = null, $sort = null) + protected function getAccountCollectionRequest($collectionId) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAdditionalCosts, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAdditionalCosts, must be bigger than or equal to 1.'); + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collectionId when calling getAccountCollection' + ); } - - $resourcePath = '/v1/additional_costs'; + $resourcePath = '/v1/collections/{collectionId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } + // path params + if ($collectionId !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -12896,50 +13000,36 @@ protected function getAdditionalCostsRequest($pageSize = 1000, $skip = null, $so } /** - * Operation getAllAccessLogs + * Operation getAdditionalCost * - * List access logs + * Get additional cost * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20019 + * @return \TalonOne\Client\Model\AccountAdditionalCost */ - public function getAllAccessLogs($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) + public function getAdditionalCost($additionalCostId) { - list($response) = $this->getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + list($response) = $this->getAdditionalCostWithHttpInfo($additionalCostId); return $response; } /** - * Operation getAllAccessLogsWithHttpInfo + * Operation getAdditionalCostWithHttpInfo * - * List access logs + * Get additional cost * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20019, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\AccountAdditionalCost, HTTP status code, HTTP response headers (array of strings) */ - public function getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) + public function getAdditionalCostWithHttpInfo($additionalCostId) { - $request = $this->getAllAccessLogsRequest($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + $request = $this->getAdditionalCostRequest($additionalCostId); try { $options = $this->createHttpClientOption(); @@ -12972,20 +13062,20 @@ public function getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path = nul $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20019' === '\SplFileObject') { + if ('\TalonOne\Client\Model\AccountAdditionalCost' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20019', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\AccountAdditionalCost', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20019'; + $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -13004,7 +13094,7 @@ public function getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20019', + '\TalonOne\Client\Model\AccountAdditionalCost', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -13015,25 +13105,18 @@ public function getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path = nul } /** - * Operation getAllAccessLogsAsync + * Operation getAdditionalCostAsync * - * List access logs + * Get additional cost * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAccessLogsAsync($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) + public function getAdditionalCostAsync($additionalCostId) { - return $this->getAllAccessLogsAsyncWithHttpInfo($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) + return $this->getAdditionalCostAsyncWithHttpInfo($additionalCostId) ->then( function ($response) { return $response[0]; @@ -13042,26 +13125,19 @@ function ($response) { } /** - * Operation getAllAccessLogsAsyncWithHttpInfo + * Operation getAdditionalCostAsyncWithHttpInfo * - * List access logs + * Get additional cost * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAccessLogsAsyncWithHttpInfo($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) + public function getAdditionalCostAsyncWithHttpInfo($additionalCostId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20019'; - $request = $this->getAllAccessLogsRequest($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; + $request = $this->getAdditionalCostRequest($additionalCostId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13098,107 +13174,39 @@ function ($exception) { } /** - * Create request for operation 'getAllAccessLogs' + * Create request for operation 'getAdditionalCost' * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAllAccessLogsRequest($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) + protected function getAdditionalCostRequest($additionalCostId) { - // verify the required parameter 'rangeStart' is set - if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling getAllAccessLogs' - ); - } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + // verify the required parameter 'additionalCostId' is set + if ($additionalCostId === null || (is_array($additionalCostId) && count($additionalCostId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling getAllAccessLogs' + 'Missing the required parameter $additionalCostId when calling getAdditionalCost' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAllAccessLogs, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAllAccessLogs, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/access_logs'; + $resourcePath = '/v1/additional_costs/{additionalCostId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); - } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; - } - // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); - } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; - } - // query params - if (is_array($path)) { - $path = ObjectSerializer::serializeCollection($path, '', true); - } - if ($path !== null) { - $queryParams['path'] = $path; - } - // query params - if (is_array($method)) { - $method = ObjectSerializer::serializeCollection($method, '', true); - } - if ($method !== null) { - $queryParams['method'] = $method; - } - // query params - if (is_array($status)) { - $status = ObjectSerializer::serializeCollection($status, '', true); - } - if ($status !== null) { - $queryParams['status'] = $status; - } - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } + // path params + if ($additionalCostId !== null) { + $resourcePath = str_replace( + '{' . 'additionalCostId' . '}', + ObjectSerializer::toPathValue($additionalCostId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -13275,34 +13283,40 @@ protected function getAllAccessLogsRequest($rangeStart, $rangeEnd, $path = null, } /** - * Operation getAllRoles + * Operation getAdditionalCosts * - * List roles + * List additional costs * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20040 + * @return \TalonOne\Client\Model\InlineResponse20034 */ - public function getAllRoles() + public function getAdditionalCosts($pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getAllRolesWithHttpInfo(); + list($response) = $this->getAdditionalCostsWithHttpInfo($pageSize, $skip, $sort); return $response; } /** - * Operation getAllRolesWithHttpInfo + * Operation getAdditionalCostsWithHttpInfo * - * List roles + * List additional costs * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20040, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20034, HTTP status code, HTTP response headers (array of strings) */ - public function getAllRolesWithHttpInfo() + public function getAdditionalCostsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getAllRolesRequest(); + $request = $this->getAdditionalCostsRequest($pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -13335,20 +13349,20 @@ public function getAllRolesWithHttpInfo() $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20040' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20034' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20040', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20034', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20040'; + $returnType = '\TalonOne\Client\Model\InlineResponse20034'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -13367,7 +13381,7 @@ public function getAllRolesWithHttpInfo() case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20040', + '\TalonOne\Client\Model\InlineResponse20034', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -13378,17 +13392,20 @@ public function getAllRolesWithHttpInfo() } /** - * Operation getAllRolesAsync + * Operation getAdditionalCostsAsync * - * List roles + * List additional costs * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllRolesAsync() + public function getAdditionalCostsAsync($pageSize = 1000, $skip = null, $sort = null) { - return $this->getAllRolesAsyncWithHttpInfo() + return $this->getAdditionalCostsAsyncWithHttpInfo($pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -13397,18 +13414,21 @@ function ($response) { } /** - * Operation getAllRolesAsyncWithHttpInfo + * Operation getAdditionalCostsAsyncWithHttpInfo * - * List roles + * List additional costs * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllRolesAsyncWithHttpInfo() + public function getAdditionalCostsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20040'; - $request = $this->getAllRolesRequest(); + $returnType = '\TalonOne\Client\Model\InlineResponse20034'; + $request = $this->getAdditionalCostsRequest($pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13445,22 +13465,53 @@ function ($exception) { } /** - * Create request for operation 'getAllRoles' + * Create request for operation 'getAdditionalCosts' * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAllRolesRequest() + protected function getAdditionalCostsRequest($pageSize = 1000, $skip = null, $sort = null) { + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAdditionalCosts, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAdditionalCosts, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/roles'; + + $resourcePath = '/v1/additional_costs'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } @@ -13539,36 +13590,50 @@ protected function getAllRolesRequest() } /** - * Operation getApplication + * Operation getAllAccessLogs * - * Get Application + * List access logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Application + * @return \TalonOne\Client\Model\InlineResponse20020 */ - public function getApplication($applicationId) + public function getAllAccessLogs($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getApplicationWithHttpInfo($applicationId); + list($response) = $this->getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); return $response; } /** - * Operation getApplicationWithHttpInfo + * Operation getAllAccessLogsWithHttpInfo * - * Get Application + * List access logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Application, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20020, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationWithHttpInfo($applicationId) + public function getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getApplicationRequest($applicationId); + $request = $this->getAllAccessLogsRequest($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -13601,20 +13666,20 @@ public function getApplicationWithHttpInfo($applicationId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Application' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20020' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Application', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20020', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Application'; + $returnType = '\TalonOne\Client\Model\InlineResponse20020'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -13633,7 +13698,7 @@ public function getApplicationWithHttpInfo($applicationId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Application', + '\TalonOne\Client\Model\InlineResponse20020', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -13644,18 +13709,25 @@ public function getApplicationWithHttpInfo($applicationId) } /** - * Operation getApplicationAsync + * Operation getAllAccessLogsAsync * - * Get Application + * List access logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationAsync($applicationId) + public function getAllAccessLogsAsync($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - return $this->getApplicationAsyncWithHttpInfo($applicationId) + return $this->getAllAccessLogsAsyncWithHttpInfo($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -13664,19 +13736,26 @@ function ($response) { } /** - * Operation getApplicationAsyncWithHttpInfo + * Operation getAllAccessLogsAsyncWithHttpInfo * - * Get Application + * List access logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationAsyncWithHttpInfo($applicationId) + public function getAllAccessLogsAsyncWithHttpInfo($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\Application'; - $request = $this->getApplicationRequest($applicationId); + $returnType = '\TalonOne\Client\Model\InlineResponse20020'; + $request = $this->getAllAccessLogsRequest($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13713,39 +13792,107 @@ function ($exception) { } /** - * Create request for operation 'getApplication' + * Create request for operation 'getAllAccessLogs' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationRequest($applicationId) + protected function getAllAccessLogsRequest($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplication' + 'Missing the required parameter $rangeStart when calling getAllAccessLogs' + ); + } + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeEnd when calling getAllAccessLogs' ); } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAllAccessLogs, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAllAccessLogs, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/applications/{applicationId}'; + + $resourcePath = '/v1/access_logs'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); + } + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; + } + // query params + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + } + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; + } + // query params + if (is_array($path)) { + $path = ObjectSerializer::serializeCollection($path, '', true); + } + if ($path !== null) { + $queryParams['path'] = $path; + } + // query params + if (is_array($method)) { + $method = ObjectSerializer::serializeCollection($method, '', true); + } + if ($method !== null) { + $queryParams['method'] = $method; + } + // query params + if (is_array($status)) { + $status = ObjectSerializer::serializeCollection($status, '', true); + } + if ($status !== null) { + $queryParams['status'] = $status; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -13822,36 +13969,34 @@ protected function getApplicationRequest($applicationId) } /** - * Operation getApplicationApiHealth + * Operation getAllRoles * - * Get Application health + * List roles * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\ApplicationApiHealth + * @return \TalonOne\Client\Model\InlineResponse20042 */ - public function getApplicationApiHealth($applicationId) + public function getAllRoles() { - list($response) = $this->getApplicationApiHealthWithHttpInfo($applicationId); + list($response) = $this->getAllRolesWithHttpInfo(); return $response; } /** - * Operation getApplicationApiHealthWithHttpInfo + * Operation getAllRolesWithHttpInfo * - * Get Application health + * List roles * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\ApplicationApiHealth, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20042, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationApiHealthWithHttpInfo($applicationId) + public function getAllRolesWithHttpInfo() { - $request = $this->getApplicationApiHealthRequest($applicationId); + $request = $this->getAllRolesRequest(); try { $options = $this->createHttpClientOption(); @@ -13884,20 +14029,20 @@ public function getApplicationApiHealthWithHttpInfo($applicationId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\ApplicationApiHealth' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20042' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ApplicationApiHealth', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20042', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\ApplicationApiHealth'; + $returnType = '\TalonOne\Client\Model\InlineResponse20042'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -13916,7 +14061,7 @@ public function getApplicationApiHealthWithHttpInfo($applicationId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ApplicationApiHealth', + '\TalonOne\Client\Model\InlineResponse20042', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -13927,18 +14072,17 @@ public function getApplicationApiHealthWithHttpInfo($applicationId) } /** - * Operation getApplicationApiHealthAsync + * Operation getAllRolesAsync * - * Get Application health + * List roles * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationApiHealthAsync($applicationId) + public function getAllRolesAsync() { - return $this->getApplicationApiHealthAsyncWithHttpInfo($applicationId) + return $this->getAllRolesAsyncWithHttpInfo() ->then( function ($response) { return $response[0]; @@ -13947,19 +14091,18 @@ function ($response) { } /** - * Operation getApplicationApiHealthAsyncWithHttpInfo + * Operation getAllRolesAsyncWithHttpInfo * - * Get Application health + * List roles * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationApiHealthAsyncWithHttpInfo($applicationId) + public function getAllRolesAsyncWithHttpInfo() { - $returnType = '\TalonOne\Client\Model\ApplicationApiHealth'; - $request = $this->getApplicationApiHealthRequest($applicationId); + $returnType = '\TalonOne\Client\Model\InlineResponse20042'; + $request = $this->getAllRolesRequest(); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13996,23 +14139,16 @@ function ($exception) { } /** - * Create request for operation 'getApplicationApiHealth' + * Create request for operation 'getAllRoles' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationApiHealthRequest($applicationId) + protected function getAllRolesRequest() { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationApiHealth' - ); - } - $resourcePath = '/v1/applications/{applicationId}/health_report'; + $resourcePath = '/v1/roles'; $formParams = []; $queryParams = []; $headerParams = []; @@ -14021,14 +14157,6 @@ protected function getApplicationApiHealthRequest($applicationId) - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -14105,38 +14233,36 @@ protected function getApplicationApiHealthRequest($applicationId) } /** - * Operation getApplicationCustomer + * Operation getApplication * - * Get application's customer + * Get Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\ApplicationCustomer + * @return \TalonOne\Client\Model\Application */ - public function getApplicationCustomer($applicationId, $customerId) + public function getApplication($applicationId) { - list($response) = $this->getApplicationCustomerWithHttpInfo($applicationId, $customerId); + list($response) = $this->getApplicationWithHttpInfo($applicationId); return $response; } /** - * Operation getApplicationCustomerWithHttpInfo + * Operation getApplicationWithHttpInfo * - * Get application's customer + * Get Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\ApplicationCustomer, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Application, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationCustomerWithHttpInfo($applicationId, $customerId) + public function getApplicationWithHttpInfo($applicationId) { - $request = $this->getApplicationCustomerRequest($applicationId, $customerId); + $request = $this->getApplicationRequest($applicationId); try { $options = $this->createHttpClientOption(); @@ -14169,20 +14295,20 @@ public function getApplicationCustomerWithHttpInfo($applicationId, $customerId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\ApplicationCustomer' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Application' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ApplicationCustomer', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Application', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; + $returnType = '\TalonOne\Client\Model\Application'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -14201,7 +14327,7 @@ public function getApplicationCustomerWithHttpInfo($applicationId, $customerId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ApplicationCustomer', + '\TalonOne\Client\Model\Application', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -14212,19 +14338,18 @@ public function getApplicationCustomerWithHttpInfo($applicationId, $customerId) } /** - * Operation getApplicationCustomerAsync + * Operation getApplicationAsync * - * Get application's customer + * Get Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomerAsync($applicationId, $customerId) + public function getApplicationAsync($applicationId) { - return $this->getApplicationCustomerAsyncWithHttpInfo($applicationId, $customerId) + return $this->getApplicationAsyncWithHttpInfo($applicationId) ->then( function ($response) { return $response[0]; @@ -14233,20 +14358,19 @@ function ($response) { } /** - * Operation getApplicationCustomerAsyncWithHttpInfo + * Operation getApplicationAsyncWithHttpInfo * - * Get application's customer + * Get Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomerAsyncWithHttpInfo($applicationId, $customerId) + public function getApplicationAsyncWithHttpInfo($applicationId) { - $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; - $request = $this->getApplicationCustomerRequest($applicationId, $customerId); + $returnType = '\TalonOne\Client\Model\Application'; + $request = $this->getApplicationRequest($applicationId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14283,30 +14407,23 @@ function ($exception) { } /** - * Create request for operation 'getApplicationCustomer' + * Create request for operation 'getApplication' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationCustomerRequest($applicationId, $customerId) + protected function getApplicationRequest($applicationId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationCustomer' - ); - } - // verify the required parameter 'customerId' is set - if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $customerId when calling getApplicationCustomer' + 'Missing the required parameter $applicationId when calling getApplication' ); } - $resourcePath = '/v1/applications/{applicationId}/customers/{customerId}'; + $resourcePath = '/v1/applications/{applicationId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -14323,14 +14440,6 @@ protected function getApplicationCustomerRequest($applicationId, $customerId) $resourcePath ); } - // path params - if ($customerId !== null) { - $resourcePath = str_replace( - '{' . 'customerId' . '}', - ObjectSerializer::toPathValue($customerId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -14407,46 +14516,36 @@ protected function getApplicationCustomerRequest($applicationId, $customerId) } /** - * Operation getApplicationCustomerFriends + * Operation getApplicationApiHealth * - * List friends referred by customer profile + * Get Application health * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId The Integration ID of the Advocate's Profile. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20030 + * @return \TalonOne\Client\Model\ApplicationApiHealth */ - public function getApplicationCustomerFriends($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) + public function getApplicationApiHealth($applicationId) { - list($response) = $this->getApplicationCustomerFriendsWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); + list($response) = $this->getApplicationApiHealthWithHttpInfo($applicationId); return $response; } /** - * Operation getApplicationCustomerFriendsWithHttpInfo + * Operation getApplicationApiHealthWithHttpInfo * - * List friends referred by customer profile + * Get Application health * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId The Integration ID of the Advocate's Profile. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20030, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\ApplicationApiHealth, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationCustomerFriendsWithHttpInfo($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) + public function getApplicationApiHealthWithHttpInfo($applicationId) { - $request = $this->getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); + $request = $this->getApplicationApiHealthRequest($applicationId); try { $options = $this->createHttpClientOption(); @@ -14479,20 +14578,20 @@ public function getApplicationCustomerFriendsWithHttpInfo($applicationId, $integ $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20030' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ApplicationApiHealth' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20030', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ApplicationApiHealth', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20030'; + $returnType = '\TalonOne\Client\Model\ApplicationApiHealth'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -14511,7 +14610,7 @@ public function getApplicationCustomerFriendsWithHttpInfo($applicationId, $integ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20030', + '\TalonOne\Client\Model\ApplicationApiHealth', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -14522,23 +14621,18 @@ public function getApplicationCustomerFriendsWithHttpInfo($applicationId, $integ } /** - * Operation getApplicationCustomerFriendsAsync + * Operation getApplicationApiHealthAsync * - * List friends referred by customer profile + * Get Application health * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId The Integration ID of the Advocate's Profile. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomerFriendsAsync($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) + public function getApplicationApiHealthAsync($applicationId) { - return $this->getApplicationCustomerFriendsAsyncWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize) + return $this->getApplicationApiHealthAsyncWithHttpInfo($applicationId) ->then( function ($response) { return $response[0]; @@ -14547,24 +14641,19 @@ function ($response) { } /** - * Operation getApplicationCustomerFriendsAsyncWithHttpInfo + * Operation getApplicationApiHealthAsyncWithHttpInfo * - * List friends referred by customer profile + * Get Application health * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId The Integration ID of the Advocate's Profile. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomerFriendsAsyncWithHttpInfo($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) + public function getApplicationApiHealthAsyncWithHttpInfo($applicationId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20030'; - $request = $this->getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); + $returnType = '\TalonOne\Client\Model\ApplicationApiHealth'; + $request = $this->getApplicationApiHealthRequest($applicationId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14601,75 +14690,29 @@ function ($exception) { } /** - * Create request for operation 'getApplicationCustomerFriends' + * Create request for operation 'getApplicationApiHealth' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId The Integration ID of the Advocate's Profile. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) + protected function getApplicationApiHealthRequest($applicationId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationCustomerFriends' - ); - } - // verify the required parameter 'integrationId' is set - if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $integrationId when calling getApplicationCustomerFriends' + 'Missing the required parameter $applicationId when calling getApplicationApiHealth' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomerFriends, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomerFriends, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/applications/{applicationId}/profile/{integrationId}/friends'; + $resourcePath = '/v1/applications/{applicationId}/health_report'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); - } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; - } // path params @@ -14680,14 +14723,6 @@ protected function getApplicationCustomerFriendsRequest($applicationId, $integra $resourcePath ); } - // path params - if ($integrationId !== null) { - $resourcePath = str_replace( - '{' . 'integrationId' . '}', - ObjectSerializer::toPathValue($integrationId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -14764,44 +14799,38 @@ protected function getApplicationCustomerFriendsRequest($applicationId, $integra } /** - * Operation getApplicationCustomers + * Operation getApplicationCustomer * - * List application's customers + * Get application's customer * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20021 + * @return \TalonOne\Client\Model\ApplicationCustomer */ - public function getApplicationCustomers($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) + public function getApplicationCustomer($applicationId, $customerId) { - list($response) = $this->getApplicationCustomersWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); + list($response) = $this->getApplicationCustomerWithHttpInfo($applicationId, $customerId); return $response; } /** - * Operation getApplicationCustomersWithHttpInfo + * Operation getApplicationCustomerWithHttpInfo * - * List application's customers + * Get application's customer * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20021, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\ApplicationCustomer, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationCustomersWithHttpInfo($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) + public function getApplicationCustomerWithHttpInfo($applicationId, $customerId) { - $request = $this->getApplicationCustomersRequest($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); + $request = $this->getApplicationCustomerRequest($applicationId, $customerId); try { $options = $this->createHttpClientOption(); @@ -14834,20 +14863,20 @@ public function getApplicationCustomersWithHttpInfo($applicationId, $integration $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20021' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ApplicationCustomer' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20021', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ApplicationCustomer', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20021'; + $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -14866,7 +14895,7 @@ public function getApplicationCustomersWithHttpInfo($applicationId, $integration case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20021', + '\TalonOne\Client\Model\ApplicationCustomer', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -14877,22 +14906,19 @@ public function getApplicationCustomersWithHttpInfo($applicationId, $integration } /** - * Operation getApplicationCustomersAsync + * Operation getApplicationCustomerAsync * - * List application's customers + * Get application's customer * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomersAsync($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) + public function getApplicationCustomerAsync($applicationId, $customerId) { - return $this->getApplicationCustomersAsyncWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize) + return $this->getApplicationCustomerAsyncWithHttpInfo($applicationId, $customerId) ->then( function ($response) { return $response[0]; @@ -14901,23 +14927,20 @@ function ($response) { } /** - * Operation getApplicationCustomersAsyncWithHttpInfo + * Operation getApplicationCustomerAsyncWithHttpInfo * - * List application's customers + * Get application's customer * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomersAsyncWithHttpInfo($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) + public function getApplicationCustomerAsyncWithHttpInfo($applicationId, $customerId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20021'; - $request = $this->getApplicationCustomersRequest($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); + $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; + $request = $this->getApplicationCustomerRequest($applicationId, $customerId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14954,68 +14977,36 @@ function ($exception) { } /** - * Create request for operation 'getApplicationCustomers' + * Create request for operation 'getApplicationCustomer' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationCustomersRequest($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) + protected function getApplicationCustomerRequest($applicationId, $customerId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationCustomers' + 'Missing the required parameter $applicationId when calling getApplicationCustomer' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomers, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomers, must be bigger than or equal to 1.'); + // verify the required parameter 'customerId' is set + if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $customerId when calling getApplicationCustomer' + ); } - - $resourcePath = '/v1/applications/{applicationId}/customers'; + $resourcePath = '/v1/applications/{applicationId}/customers/{customerId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($integrationId)) { - $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); - } - if ($integrationId !== null) { - $queryParams['integrationId'] = $integrationId; - } - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); - } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; - } // path params @@ -15026,6 +15017,14 @@ protected function getApplicationCustomersRequest($applicationId, $integrationId $resourcePath ); } + // path params + if ($customerId !== null) { + $resourcePath = str_replace( + '{' . 'customerId' . '}', + ObjectSerializer::toPathValue($customerId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -15102,44 +15101,46 @@ protected function getApplicationCustomersRequest($applicationId, $integrationId } /** - * Operation getApplicationCustomersByAttributes + * Operation getApplicationCustomerFriends * - * List application customers matching the given attributes + * List friends referred by customer profile * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param string $integrationId The Integration ID of the Advocate's Profile. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20022 + * @return \TalonOne\Client\Model\InlineResponse20031 */ - public function getApplicationCustomersByAttributes($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) + public function getApplicationCustomerFriends($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - list($response) = $this->getApplicationCustomersByAttributesWithHttpInfo($applicationId, $body, $pageSize, $skip, $withTotalResultSize); + list($response) = $this->getApplicationCustomerFriendsWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); return $response; } /** - * Operation getApplicationCustomersByAttributesWithHttpInfo + * Operation getApplicationCustomerFriendsWithHttpInfo * - * List application customers matching the given attributes + * List friends referred by customer profile * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param string $integrationId The Integration ID of the Advocate's Profile. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20022, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20031, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationCustomersByAttributesWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) + public function getApplicationCustomerFriendsWithHttpInfo($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - $request = $this->getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize, $skip, $withTotalResultSize); + $request = $this->getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); try { $options = $this->createHttpClientOption(); @@ -15172,20 +15173,20 @@ public function getApplicationCustomersByAttributesWithHttpInfo($applicationId, $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20022' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20031' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20022', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20031', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20022'; + $returnType = '\TalonOne\Client\Model\InlineResponse20031'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -15204,7 +15205,7 @@ public function getApplicationCustomersByAttributesWithHttpInfo($applicationId, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20022', + '\TalonOne\Client\Model\InlineResponse20031', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -15215,22 +15216,23 @@ public function getApplicationCustomersByAttributesWithHttpInfo($applicationId, } /** - * Operation getApplicationCustomersByAttributesAsync + * Operation getApplicationCustomerFriendsAsync * - * List application customers matching the given attributes + * List friends referred by customer profile * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param string $integrationId The Integration ID of the Advocate's Profile. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomersByAttributesAsync($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) + public function getApplicationCustomerFriendsAsync($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - return $this->getApplicationCustomersByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $withTotalResultSize) + return $this->getApplicationCustomerFriendsAsyncWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize) ->then( function ($response) { return $response[0]; @@ -15239,23 +15241,24 @@ function ($response) { } /** - * Operation getApplicationCustomersByAttributesAsyncWithHttpInfo + * Operation getApplicationCustomerFriendsAsyncWithHttpInfo * - * List application customers matching the given attributes + * List friends referred by customer profile * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param string $integrationId The Integration ID of the Advocate's Profile. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomersByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) + public function getApplicationCustomerFriendsAsyncWithHttpInfo($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20022'; - $request = $this->getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize, $skip, $withTotalResultSize); + $returnType = '\TalonOne\Client\Model\InlineResponse20031'; + $request = $this->getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15292,40 +15295,41 @@ function ($exception) { } /** - * Create request for operation 'getApplicationCustomersByAttributes' + * Create request for operation 'getApplicationCustomerFriends' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param string $integrationId The Integration ID of the Advocate's Profile. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) + protected function getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationCustomersByAttributes' + 'Missing the required parameter $applicationId when calling getApplicationCustomerFriends' ); } - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { + // verify the required parameter 'integrationId' is set + if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling getApplicationCustomersByAttributes' + 'Missing the required parameter $integrationId when calling getApplicationCustomerFriends' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomersByAttributes, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomerFriends, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomersByAttributes, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomerFriends, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/customer_search'; + $resourcePath = '/v1/applications/{applicationId}/profile/{integrationId}/friends'; $formParams = []; $queryParams = []; $headerParams = []; @@ -15347,6 +15351,13 @@ protected function getApplicationCustomersByAttributesRequest($applicationId, $b $queryParams['skip'] = $skip; } // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params if (is_array($withTotalResultSize)) { $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); } @@ -15363,12 +15374,17 @@ protected function getApplicationCustomersByAttributesRequest($applicationId, $b $resourcePath ); } + // path params + if ($integrationId !== null) { + $resourcePath = str_replace( + '{' . 'integrationId' . '}', + ObjectSerializer::toPathValue($integrationId), + $resourcePath + ); + } // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -15377,7 +15393,7 @@ protected function getApplicationCustomersByAttributesRequest($applicationId, $b } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -15434,7 +15450,7 @@ protected function getApplicationCustomersByAttributesRequest($applicationId, $b $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -15442,42 +15458,44 @@ protected function getApplicationCustomersByAttributesRequest($applicationId, $b } /** - * Operation getApplicationEventTypes + * Operation getApplicationCustomers * - * List Applications event types + * List application's customers * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20028 + * @return \TalonOne\Client\Model\InlineResponse20022 */ - public function getApplicationEventTypes($applicationId, $pageSize = 1000, $skip = null, $sort = null) + public function getApplicationCustomers($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - list($response) = $this->getApplicationEventTypesWithHttpInfo($applicationId, $pageSize, $skip, $sort); + list($response) = $this->getApplicationCustomersWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); return $response; } /** - * Operation getApplicationEventTypesWithHttpInfo + * Operation getApplicationCustomersWithHttpInfo * - * List Applications event types + * List application's customers * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20028, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20022, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationEventTypesWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null) + public function getApplicationCustomersWithHttpInfo($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - $request = $this->getApplicationEventTypesRequest($applicationId, $pageSize, $skip, $sort); + $request = $this->getApplicationCustomersRequest($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); try { $options = $this->createHttpClientOption(); @@ -15510,20 +15528,20 @@ public function getApplicationEventTypesWithHttpInfo($applicationId, $pageSize = $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20028' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20022' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20028', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20022', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20028'; + $returnType = '\TalonOne\Client\Model\InlineResponse20022'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -15542,7 +15560,7 @@ public function getApplicationEventTypesWithHttpInfo($applicationId, $pageSize = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20028', + '\TalonOne\Client\Model\InlineResponse20022', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -15553,21 +15571,22 @@ public function getApplicationEventTypesWithHttpInfo($applicationId, $pageSize = } /** - * Operation getApplicationEventTypesAsync + * Operation getApplicationCustomersAsync * - * List Applications event types + * List application's customers * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationEventTypesAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null) + public function getApplicationCustomersAsync($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - return $this->getApplicationEventTypesAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort) + return $this->getApplicationCustomersAsyncWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize) ->then( function ($response) { return $response[0]; @@ -15576,22 +15595,23 @@ function ($response) { } /** - * Operation getApplicationEventTypesAsyncWithHttpInfo + * Operation getApplicationCustomersAsyncWithHttpInfo * - * List Applications event types + * List application's customers * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationEventTypesAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null) + public function getApplicationCustomersAsyncWithHttpInfo($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20028'; - $request = $this->getApplicationEventTypesRequest($applicationId, $pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\InlineResponse20022'; + $request = $this->getApplicationCustomersRequest($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15628,39 +15648,47 @@ function ($exception) { } /** - * Create request for operation 'getApplicationEventTypes' + * Create request for operation 'getApplicationCustomers' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationEventTypesRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null) + protected function getApplicationCustomersRequest($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationEventTypes' + 'Missing the required parameter $applicationId when calling getApplicationCustomers' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventTypes, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomers, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventTypes, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomers, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/event_types'; + $resourcePath = '/v1/applications/{applicationId}/customers'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($integrationId)) { + $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); + } + if ($integrationId !== null) { + $queryParams['integrationId'] = $integrationId; + } // query params if (is_array($pageSize)) { $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); @@ -15676,11 +15704,11 @@ protected function getApplicationEventTypesRequest($applicationId, $pageSize = 1 $queryParams['skip'] = $skip; } // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); } - if ($sort !== null) { - $queryParams['sort'] = $sort; + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; } @@ -15768,64 +15796,44 @@ protected function getApplicationEventTypesRequest($applicationId, $pageSize = 1 } /** - * Operation getApplicationEventsWithoutTotalCount + * Operation getApplicationCustomersByAttributes * - * List Applications events + * List application customers matching the given attributes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $session Session integration ID filter for events. Must be exact match. (optional) - * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) - * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) - * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) - * @param string $couponCode Coupon code (optional) - * @param string $referralCode Referral code (optional) - * @param string $ruleQuery Rule name filter for events (optional) - * @param string $campaignQuery Campaign name filter for events (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20027 + * @return \TalonOne\Client\Model\InlineResponse20023 */ - public function getApplicationEventsWithoutTotalCount($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) + public function getApplicationCustomersByAttributes($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - list($response) = $this->getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); + list($response) = $this->getApplicationCustomersByAttributesWithHttpInfo($applicationId, $body, $pageSize, $skip, $withTotalResultSize); return $response; } /** - * Operation getApplicationEventsWithoutTotalCountWithHttpInfo + * Operation getApplicationCustomersByAttributesWithHttpInfo * - * List Applications events + * List application customers matching the given attributes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $session Session integration ID filter for events. Must be exact match. (optional) - * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) - * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) - * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) - * @param string $couponCode Coupon code (optional) - * @param string $referralCode Referral code (optional) - * @param string $ruleQuery Rule name filter for events (optional) - * @param string $campaignQuery Campaign name filter for events (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20027, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20023, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) + public function getApplicationCustomersByAttributesWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - $request = $this->getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); + $request = $this->getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize, $skip, $withTotalResultSize); try { $options = $this->createHttpClientOption(); @@ -15858,20 +15866,20 @@ public function getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20027' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20023' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20027', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20023', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20027'; + $returnType = '\TalonOne\Client\Model\InlineResponse20023'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -15890,7 +15898,7 @@ public function getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20027', + '\TalonOne\Client\Model\InlineResponse20023', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -15901,32 +15909,22 @@ public function getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId } /** - * Operation getApplicationEventsWithoutTotalCountAsync + * Operation getApplicationCustomersByAttributesAsync * - * List Applications events + * List application customers matching the given attributes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $session Session integration ID filter for events. Must be exact match. (optional) - * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) - * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) - * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) - * @param string $couponCode Coupon code (optional) - * @param string $referralCode Referral code (optional) - * @param string $ruleQuery Rule name filter for events (optional) - * @param string $campaignQuery Campaign name filter for events (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationEventsWithoutTotalCountAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) + public function getApplicationCustomersByAttributesAsync($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - return $this->getApplicationEventsWithoutTotalCountAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery) + return $this->getApplicationCustomersByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $withTotalResultSize) ->then( function ($response) { return $response[0]; @@ -15935,33 +15933,23 @@ function ($response) { } /** - * Operation getApplicationEventsWithoutTotalCountAsyncWithHttpInfo + * Operation getApplicationCustomersByAttributesAsyncWithHttpInfo * - * List Applications events + * List application customers matching the given attributes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $session Session integration ID filter for events. Must be exact match. (optional) - * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) - * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) - * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) - * @param string $couponCode Coupon code (optional) - * @param string $referralCode Referral code (optional) - * @param string $ruleQuery Rule name filter for events (optional) - * @param string $campaignQuery Campaign name filter for events (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationEventsWithoutTotalCountAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) + public function getApplicationCustomersByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20027'; - $request = $this->getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); + $returnType = '\TalonOne\Client\Model\InlineResponse20023'; + $request = $this->getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize, $skip, $withTotalResultSize); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15998,52 +15986,40 @@ function ($exception) { } /** - * Create request for operation 'getApplicationEventsWithoutTotalCount' + * Create request for operation 'getApplicationCustomersByAttributes' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $session Session integration ID filter for events. Must be exact match. (optional) - * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) - * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) - * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) - * @param string $couponCode Coupon code (optional) - * @param string $referralCode Referral code (optional) - * @param string $ruleQuery Rule name filter for events (optional) - * @param string $campaignQuery Campaign name filter for events (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) + protected function getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationEventsWithoutTotalCount' + 'Missing the required parameter $applicationId when calling getApplicationCustomersByAttributes' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling getApplicationCustomersByAttributes' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomersByAttributes, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 1.'); - } - - if ($customerName !== null && strlen($customerName) < 2) { - throw new \InvalidArgumentException('invalid length for "$customerName" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 2.'); - } - - if ($customerEmail !== null && strlen($customerEmail) < 2) { - throw new \InvalidArgumentException('invalid length for "$customerEmail" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 2.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomersByAttributes, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/events/no_total'; + $resourcePath = '/v1/applications/{applicationId}/customer_search'; $formParams = []; $queryParams = []; $headerParams = []; @@ -16065,88 +16041,11 @@ protected function getApplicationEventsWithoutTotalCountRequest($applicationId, $queryParams['skip'] = $skip; } // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($type)) { - $type = ObjectSerializer::serializeCollection($type, '', true); - } - if ($type !== null) { - $queryParams['type'] = $type; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } - // query params - if (is_array($session)) { - $session = ObjectSerializer::serializeCollection($session, '', true); - } - if ($session !== null) { - $queryParams['session'] = $session; - } - // query params - if (is_array($profile)) { - $profile = ObjectSerializer::serializeCollection($profile, '', true); - } - if ($profile !== null) { - $queryParams['profile'] = $profile; - } - // query params - if (is_array($customerName)) { - $customerName = ObjectSerializer::serializeCollection($customerName, '', true); - } - if ($customerName !== null) { - $queryParams['customerName'] = $customerName; - } - // query params - if (is_array($customerEmail)) { - $customerEmail = ObjectSerializer::serializeCollection($customerEmail, '', true); - } - if ($customerEmail !== null) { - $queryParams['customerEmail'] = $customerEmail; - } - // query params - if (is_array($couponCode)) { - $couponCode = ObjectSerializer::serializeCollection($couponCode, '', true); - } - if ($couponCode !== null) { - $queryParams['couponCode'] = $couponCode; - } - // query params - if (is_array($referralCode)) { - $referralCode = ObjectSerializer::serializeCollection($referralCode, '', true); - } - if ($referralCode !== null) { - $queryParams['referralCode'] = $referralCode; - } - // query params - if (is_array($ruleQuery)) { - $ruleQuery = ObjectSerializer::serializeCollection($ruleQuery, '', true); - } - if ($ruleQuery !== null) { - $queryParams['ruleQuery'] = $ruleQuery; - } - // query params - if (is_array($campaignQuery)) { - $campaignQuery = ObjectSerializer::serializeCollection($campaignQuery, '', true); + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); } - if ($campaignQuery !== null) { - $queryParams['campaignQuery'] = $campaignQuery; + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; } @@ -16161,6 +16060,9 @@ protected function getApplicationEventsWithoutTotalCountRequest($applicationId, // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -16169,7 +16071,7 @@ protected function getApplicationEventsWithoutTotalCountRequest($applicationId, } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -16226,7 +16128,7 @@ protected function getApplicationEventsWithoutTotalCountRequest($applicationId, $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -16234,38 +16136,42 @@ protected function getApplicationEventsWithoutTotalCountRequest($applicationId, } /** - * Operation getApplicationSession + * Operation getApplicationEventTypes * - * Get Application session + * List Applications event types * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\ApplicationSession + * @return \TalonOne\Client\Model\InlineResponse20029 */ - public function getApplicationSession($applicationId, $sessionId) + public function getApplicationEventTypes($applicationId, $pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getApplicationSessionWithHttpInfo($applicationId, $sessionId); + list($response) = $this->getApplicationEventTypesWithHttpInfo($applicationId, $pageSize, $skip, $sort); return $response; } /** - * Operation getApplicationSessionWithHttpInfo + * Operation getApplicationEventTypesWithHttpInfo * - * Get Application session + * List Applications event types * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\ApplicationSession, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20029, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationSessionWithHttpInfo($applicationId, $sessionId) + public function getApplicationEventTypesWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getApplicationSessionRequest($applicationId, $sessionId); + $request = $this->getApplicationEventTypesRequest($applicationId, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -16298,20 +16204,20 @@ public function getApplicationSessionWithHttpInfo($applicationId, $sessionId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\ApplicationSession' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20029' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ApplicationSession', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20029', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\ApplicationSession'; + $returnType = '\TalonOne\Client\Model\InlineResponse20029'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -16330,7 +16236,7 @@ public function getApplicationSessionWithHttpInfo($applicationId, $sessionId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ApplicationSession', + '\TalonOne\Client\Model\InlineResponse20029', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -16341,19 +16247,21 @@ public function getApplicationSessionWithHttpInfo($applicationId, $sessionId) } /** - * Operation getApplicationSessionAsync + * Operation getApplicationEventTypesAsync * - * Get Application session + * List Applications event types * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationSessionAsync($applicationId, $sessionId) + public function getApplicationEventTypesAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null) { - return $this->getApplicationSessionAsyncWithHttpInfo($applicationId, $sessionId) + return $this->getApplicationEventTypesAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -16362,20 +16270,22 @@ function ($response) { } /** - * Operation getApplicationSessionAsyncWithHttpInfo + * Operation getApplicationEventTypesAsyncWithHttpInfo * - * Get Application session + * List Applications event types * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationSessionAsyncWithHttpInfo($applicationId, $sessionId) + public function getApplicationEventTypesAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\ApplicationSession'; - $request = $this->getApplicationSessionRequest($applicationId, $sessionId); + $returnType = '\TalonOne\Client\Model\InlineResponse20029'; + $request = $this->getApplicationEventTypesRequest($applicationId, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16412,36 +16322,60 @@ function ($exception) { } /** - * Create request for operation 'getApplicationSession' + * Create request for operation 'getApplicationEventTypes' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationSessionRequest($applicationId, $sessionId) + protected function getApplicationEventTypesRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationSession' + 'Missing the required parameter $applicationId when calling getApplicationEventTypes' ); } - // verify the required parameter 'sessionId' is set - if ($sessionId === null || (is_array($sessionId) && count($sessionId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $sessionId when calling getApplicationSession' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventTypes, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventTypes, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/sessions/{sessionId}'; + + $resourcePath = '/v1/applications/{applicationId}/event_types'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } // path params @@ -16452,14 +16386,6 @@ protected function getApplicationSessionRequest($applicationId, $sessionId) $resourcePath ); } - // path params - if ($sessionId !== null) { - $resourcePath = str_replace( - '{' . 'sessionId' . '}', - ObjectSerializer::toPathValue($sessionId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -16536,56 +16462,64 @@ protected function getApplicationSessionRequest($applicationId, $sessionId) } /** - * Operation getApplicationSessions + * Operation getApplicationEventsWithoutTotalCount * - * List Application sessions + * List Applications events * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) - * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) - * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) - * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) + * @param string $session Session integration ID filter for events. Must be exact match. (optional) + * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) + * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) + * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) + * @param string $couponCode Coupon code (optional) + * @param string $referralCode Referral code (optional) + * @param string $ruleQuery Rule name filter for events (optional) + * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20026 + * @return \TalonOne\Client\Model\InlineResponse20028 */ - public function getApplicationSessions($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) + public function getApplicationEventsWithoutTotalCount($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) { - list($response) = $this->getApplicationSessionsWithHttpInfo($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); + list($response) = $this->getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); return $response; } /** - * Operation getApplicationSessionsWithHttpInfo + * Operation getApplicationEventsWithoutTotalCountWithHttpInfo * - * List Application sessions + * List Applications events * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) - * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) - * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) - * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) + * @param string $session Session integration ID filter for events. Must be exact match. (optional) + * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) + * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) + * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) + * @param string $couponCode Coupon code (optional) + * @param string $referralCode Referral code (optional) + * @param string $ruleQuery Rule name filter for events (optional) + * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20026, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20028, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationSessionsWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) + public function getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) { - $request = $this->getApplicationSessionsRequest($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); + $request = $this->getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); try { $options = $this->createHttpClientOption(); @@ -16618,20 +16552,20 @@ public function getApplicationSessionsWithHttpInfo($applicationId, $pageSize = 1 $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20026' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20028' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20026', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20028', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20026'; + $returnType = '\TalonOne\Client\Model\InlineResponse20028'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -16650,7 +16584,7 @@ public function getApplicationSessionsWithHttpInfo($applicationId, $pageSize = 1 case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20026', + '\TalonOne\Client\Model\InlineResponse20028', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -16661,28 +16595,32 @@ public function getApplicationSessionsWithHttpInfo($applicationId, $pageSize = 1 } /** - * Operation getApplicationSessionsAsync + * Operation getApplicationEventsWithoutTotalCountAsync * - * List Application sessions + * List Applications events * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) - * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) - * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) - * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) + * @param string $session Session integration ID filter for events. Must be exact match. (optional) + * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) + * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) + * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) + * @param string $couponCode Coupon code (optional) + * @param string $referralCode Referral code (optional) + * @param string $ruleQuery Rule name filter for events (optional) + * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationSessionsAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) + public function getApplicationEventsWithoutTotalCountAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) { - return $this->getApplicationSessionsAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId) + return $this->getApplicationEventsWithoutTotalCountAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery) ->then( function ($response) { return $response[0]; @@ -16691,29 +16629,33 @@ function ($response) { } /** - * Operation getApplicationSessionsAsyncWithHttpInfo + * Operation getApplicationEventsWithoutTotalCountAsyncWithHttpInfo * - * List Application sessions + * List Applications events * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) - * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) - * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) - * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) + * @param string $session Session integration ID filter for events. Must be exact match. (optional) + * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) + * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) + * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) + * @param string $couponCode Coupon code (optional) + * @param string $referralCode Referral code (optional) + * @param string $ruleQuery Rule name filter for events (optional) + * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationSessionsAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) + public function getApplicationEventsWithoutTotalCountAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20026'; - $request = $this->getApplicationSessionsRequest($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); + $returnType = '\TalonOne\Client\Model\InlineResponse20028'; + $request = $this->getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16750,40 +16692,52 @@ function ($exception) { } /** - * Create request for operation 'getApplicationSessions' + * Create request for operation 'getApplicationEventsWithoutTotalCount' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) - * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) - * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) - * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) + * @param string $session Session integration ID filter for events. Must be exact match. (optional) + * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) + * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) + * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) + * @param string $couponCode Coupon code (optional) + * @param string $referralCode Referral code (optional) + * @param string $ruleQuery Rule name filter for events (optional) + * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationSessionsRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) + protected function getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationSessions' + 'Missing the required parameter $applicationId when calling getApplicationEventsWithoutTotalCount' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationSessions, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationSessions, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 1.'); } + if ($customerName !== null && strlen($customerName) < 2) { + throw new \InvalidArgumentException('invalid length for "$customerName" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 2.'); + } - $resourcePath = '/v1/applications/{applicationId}/sessions'; + if ($customerEmail !== null && strlen($customerEmail) < 2) { + throw new \InvalidArgumentException('invalid length for "$customerEmail" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 2.'); + } + + + $resourcePath = '/v1/applications/{applicationId}/events/no_total'; $formParams = []; $queryParams = []; $headerParams = []; @@ -16812,18 +16766,11 @@ protected function getApplicationSessionsRequest($applicationId, $pageSize = 100 $queryParams['sort'] = $sort; } // query params - if (is_array($profile)) { - $profile = ObjectSerializer::serializeCollection($profile, '', true); - } - if ($profile !== null) { - $queryParams['profile'] = $profile; - } - // query params - if (is_array($state)) { - $state = ObjectSerializer::serializeCollection($state, '', true); + if (is_array($type)) { + $type = ObjectSerializer::serializeCollection($type, '', true); } - if ($state !== null) { - $queryParams['state'] = $state; + if ($type !== null) { + $queryParams['type'] = $type; } // query params if (is_array($createdBefore)) { @@ -16840,25 +16787,60 @@ protected function getApplicationSessionsRequest($applicationId, $pageSize = 100 $queryParams['createdAfter'] = $createdAfter; } // query params - if (is_array($coupon)) { - $coupon = ObjectSerializer::serializeCollection($coupon, '', true); + if (is_array($session)) { + $session = ObjectSerializer::serializeCollection($session, '', true); } - if ($coupon !== null) { - $queryParams['coupon'] = $coupon; + if ($session !== null) { + $queryParams['session'] = $session; } // query params - if (is_array($referral)) { - $referral = ObjectSerializer::serializeCollection($referral, '', true); + if (is_array($profile)) { + $profile = ObjectSerializer::serializeCollection($profile, '', true); } - if ($referral !== null) { - $queryParams['referral'] = $referral; + if ($profile !== null) { + $queryParams['profile'] = $profile; } // query params - if (is_array($integrationId)) { - $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); + if (is_array($customerName)) { + $customerName = ObjectSerializer::serializeCollection($customerName, '', true); } - if ($integrationId !== null) { - $queryParams['integrationId'] = $integrationId; + if ($customerName !== null) { + $queryParams['customerName'] = $customerName; + } + // query params + if (is_array($customerEmail)) { + $customerEmail = ObjectSerializer::serializeCollection($customerEmail, '', true); + } + if ($customerEmail !== null) { + $queryParams['customerEmail'] = $customerEmail; + } + // query params + if (is_array($couponCode)) { + $couponCode = ObjectSerializer::serializeCollection($couponCode, '', true); + } + if ($couponCode !== null) { + $queryParams['couponCode'] = $couponCode; + } + // query params + if (is_array($referralCode)) { + $referralCode = ObjectSerializer::serializeCollection($referralCode, '', true); + } + if ($referralCode !== null) { + $queryParams['referralCode'] = $referralCode; + } + // query params + if (is_array($ruleQuery)) { + $ruleQuery = ObjectSerializer::serializeCollection($ruleQuery, '', true); + } + if ($ruleQuery !== null) { + $queryParams['ruleQuery'] = $ruleQuery; + } + // query params + if (is_array($campaignQuery)) { + $campaignQuery = ObjectSerializer::serializeCollection($campaignQuery, '', true); + } + if ($campaignQuery !== null) { + $queryParams['campaignQuery'] = $campaignQuery; } @@ -16946,40 +16928,38 @@ protected function getApplicationSessionsRequest($applicationId, $pageSize = 100 } /** - * Operation getApplications + * Operation getApplicationSession * - * List Applications + * Get Application session * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2003 + * @return \TalonOne\Client\Model\ApplicationSession */ - public function getApplications($pageSize = 1000, $skip = null, $sort = null) + public function getApplicationSession($applicationId, $sessionId) { - list($response) = $this->getApplicationsWithHttpInfo($pageSize, $skip, $sort); + list($response) = $this->getApplicationSessionWithHttpInfo($applicationId, $sessionId); return $response; } /** - * Operation getApplicationsWithHttpInfo + * Operation getApplicationSessionWithHttpInfo * - * List Applications + * Get Application session * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2003, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\ApplicationSession, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) + public function getApplicationSessionWithHttpInfo($applicationId, $sessionId) { - $request = $this->getApplicationsRequest($pageSize, $skip, $sort); + $request = $this->getApplicationSessionRequest($applicationId, $sessionId); try { $options = $this->createHttpClientOption(); @@ -17012,20 +16992,20 @@ public function getApplicationsWithHttpInfo($pageSize = 1000, $skip = null, $sor $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2003' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ApplicationSession' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2003', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ApplicationSession', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2003'; + $returnType = '\TalonOne\Client\Model\ApplicationSession'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -17044,7 +17024,7 @@ public function getApplicationsWithHttpInfo($pageSize = 1000, $skip = null, $sor case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2003', + '\TalonOne\Client\Model\ApplicationSession', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -17055,20 +17035,19 @@ public function getApplicationsWithHttpInfo($pageSize = 1000, $skip = null, $sor } /** - * Operation getApplicationsAsync + * Operation getApplicationSessionAsync * - * List Applications + * Get Application session * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationsAsync($pageSize = 1000, $skip = null, $sort = null) + public function getApplicationSessionAsync($applicationId, $sessionId) { - return $this->getApplicationsAsyncWithHttpInfo($pageSize, $skip, $sort) + return $this->getApplicationSessionAsyncWithHttpInfo($applicationId, $sessionId) ->then( function ($response) { return $response[0]; @@ -17077,21 +17056,20 @@ function ($response) { } /** - * Operation getApplicationsAsyncWithHttpInfo + * Operation getApplicationSessionAsyncWithHttpInfo * - * List Applications + * Get Application session * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) + public function getApplicationSessionAsyncWithHttpInfo($applicationId, $sessionId) { - $returnType = '\TalonOne\Client\Model\InlineResponse2003'; - $request = $this->getApplicationsRequest($pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\ApplicationSession'; + $request = $this->getApplicationSessionRequest($applicationId, $sessionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17128,55 +17106,54 @@ function ($exception) { } /** - * Create request for operation 'getApplications' + * Create request for operation 'getApplicationSession' * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationsRequest($pageSize = 1000, $skip = null, $sort = null) + protected function getApplicationSessionRequest($applicationId, $sessionId) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplications, must be smaller than or equal to 1000.'); + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getApplicationSession' + ); } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplications, must be bigger than or equal to 1.'); + // verify the required parameter 'sessionId' is set + if ($sessionId === null || (is_array($sessionId) && count($sessionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $sessionId when calling getApplicationSession' + ); } - - $resourcePath = '/v1/applications'; + $resourcePath = '/v1/applications/{applicationId}/sessions/{sessionId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($sessionId !== null) { + $resourcePath = str_replace( + '{' . 'sessionId' . '}', + ObjectSerializer::toPathValue($sessionId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -17253,36 +17230,56 @@ protected function getApplicationsRequest($pageSize = 1000, $skip = null, $sort } /** - * Operation getAttribute + * Operation getApplicationSessions * - * Get custom attribute + * List Application sessions * - * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) + * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) + * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) + * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Attribute + * @return \TalonOne\Client\Model\InlineResponse20027 */ - public function getAttribute($attributeId) + public function getApplicationSessions($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) { - list($response) = $this->getAttributeWithHttpInfo($attributeId); + list($response) = $this->getApplicationSessionsWithHttpInfo($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); return $response; } /** - * Operation getAttributeWithHttpInfo + * Operation getApplicationSessionsWithHttpInfo * - * Get custom attribute + * List Application sessions * - * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) + * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) + * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) + * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Attribute, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20027, HTTP status code, HTTP response headers (array of strings) */ - public function getAttributeWithHttpInfo($attributeId) + public function getApplicationSessionsWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) { - $request = $this->getAttributeRequest($attributeId); + $request = $this->getApplicationSessionsRequest($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); try { $options = $this->createHttpClientOption(); @@ -17315,20 +17312,20 @@ public function getAttributeWithHttpInfo($attributeId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Attribute' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20027' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Attribute', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20027', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Attribute'; + $returnType = '\TalonOne\Client\Model\InlineResponse20027'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -17347,7 +17344,7 @@ public function getAttributeWithHttpInfo($attributeId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Attribute', + '\TalonOne\Client\Model\InlineResponse20027', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -17358,18 +17355,28 @@ public function getAttributeWithHttpInfo($attributeId) } /** - * Operation getAttributeAsync + * Operation getApplicationSessionsAsync * - * Get custom attribute + * List Application sessions * - * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) + * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) + * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) + * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAttributeAsync($attributeId) + public function getApplicationSessionsAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) { - return $this->getAttributeAsyncWithHttpInfo($attributeId) + return $this->getApplicationSessionsAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId) ->then( function ($response) { return $response[0]; @@ -17378,19 +17385,29 @@ function ($response) { } /** - * Operation getAttributeAsyncWithHttpInfo + * Operation getApplicationSessionsAsyncWithHttpInfo * - * Get custom attribute + * List Application sessions * - * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) + * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) + * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) + * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAttributeAsyncWithHttpInfo($attributeId) + public function getApplicationSessionsAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) { - $returnType = '\TalonOne\Client\Model\Attribute'; - $request = $this->getAttributeRequest($attributeId); + $returnType = '\TalonOne\Client\Model\InlineResponse20027'; + $request = $this->getApplicationSessionsRequest($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17427,36 +17444,123 @@ function ($exception) { } /** - * Create request for operation 'getAttribute' + * Create request for operation 'getApplicationSessions' * - * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) + * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) + * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) + * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAttributeRequest($attributeId) + protected function getApplicationSessionsRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) { - // verify the required parameter 'attributeId' is set - if ($attributeId === null || (is_array($attributeId) && count($attributeId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeId when calling getAttribute' + 'Missing the required parameter $applicationId when calling getApplicationSessions' ); } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationSessions, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationSessions, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/attributes/{attributeId}'; + + $resourcePath = '/v1/applications/{applicationId}/sessions'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($profile)) { + $profile = ObjectSerializer::serializeCollection($profile, '', true); + } + if ($profile !== null) { + $queryParams['profile'] = $profile; + } + // query params + if (is_array($state)) { + $state = ObjectSerializer::serializeCollection($state, '', true); + } + if ($state !== null) { + $queryParams['state'] = $state; + } + // query params + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + } + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; + } + // query params + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); + } + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } + // query params + if (is_array($coupon)) { + $coupon = ObjectSerializer::serializeCollection($coupon, '', true); + } + if ($coupon !== null) { + $queryParams['coupon'] = $coupon; + } + // query params + if (is_array($referral)) { + $referral = ObjectSerializer::serializeCollection($referral, '', true); + } + if ($referral !== null) { + $queryParams['referral'] = $referral; + } + // query params + if (is_array($integrationId)) { + $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); + } + if ($integrationId !== null) { + $queryParams['integrationId'] = $integrationId; + } // path params - if ($attributeId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'attributeId' . '}', - ObjectSerializer::toPathValue($attributeId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } @@ -17536,42 +17640,40 @@ protected function getAttributeRequest($attributeId) } /** - * Operation getAttributes + * Operation getApplications * - * List custom attributes + * List Applications * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20031 + * @return \TalonOne\Client\Model\InlineResponse2005 */ - public function getAttributes($pageSize = 1000, $skip = null, $sort = null, $entity = null) + public function getApplications($pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getAttributesWithHttpInfo($pageSize, $skip, $sort, $entity); + list($response) = $this->getApplicationsWithHttpInfo($pageSize, $skip, $sort); return $response; } /** - * Operation getAttributesWithHttpInfo + * Operation getApplicationsWithHttpInfo * - * List custom attributes + * List Applications * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20031, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2005, HTTP status code, HTTP response headers (array of strings) */ - public function getAttributesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $entity = null) + public function getApplicationsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getAttributesRequest($pageSize, $skip, $sort, $entity); + $request = $this->getApplicationsRequest($pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -17604,20 +17706,20 @@ public function getAttributesWithHttpInfo($pageSize = 1000, $skip = null, $sort $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20031' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2005' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20031', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2005', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20031'; + $returnType = '\TalonOne\Client\Model\InlineResponse2005'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -17636,7 +17738,7 @@ public function getAttributesWithHttpInfo($pageSize = 1000, $skip = null, $sort case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20031', + '\TalonOne\Client\Model\InlineResponse2005', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -17647,21 +17749,20 @@ public function getAttributesWithHttpInfo($pageSize = 1000, $skip = null, $sort } /** - * Operation getAttributesAsync + * Operation getApplicationsAsync * - * List custom attributes + * List Applications * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAttributesAsync($pageSize = 1000, $skip = null, $sort = null, $entity = null) + public function getApplicationsAsync($pageSize = 1000, $skip = null, $sort = null) { - return $this->getAttributesAsyncWithHttpInfo($pageSize, $skip, $sort, $entity) + return $this->getApplicationsAsyncWithHttpInfo($pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -17670,22 +17771,21 @@ function ($response) { } /** - * Operation getAttributesAsyncWithHttpInfo + * Operation getApplicationsAsyncWithHttpInfo * - * List custom attributes + * List Applications * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAttributesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $entity = null) + public function getApplicationsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20031'; - $request = $this->getAttributesRequest($pageSize, $skip, $sort, $entity); + $returnType = '\TalonOne\Client\Model\InlineResponse2005'; + $request = $this->getApplicationsRequest($pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17722,27 +17822,26 @@ function ($exception) { } /** - * Create request for operation 'getAttributes' + * Create request for operation 'getApplications' * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAttributesRequest($pageSize = 1000, $skip = null, $sort = null, $entity = null) + protected function getApplicationsRequest($pageSize = 1000, $skip = null, $sort = null) { if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAttributes, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplications, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAttributes, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplications, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/attributes'; + $resourcePath = '/v1/applications'; $formParams = []; $queryParams = []; $headerParams = []; @@ -17770,13 +17869,6 @@ protected function getAttributesRequest($pageSize = 1000, $skip = null, $sort = if ($sort !== null) { $queryParams['sort'] = $sort; } - // query params - if (is_array($entity)) { - $entity = ObjectSerializer::serializeCollection($entity, '', true); - } - if ($entity !== null) { - $queryParams['entity'] = $entity; - } @@ -17855,42 +17947,36 @@ protected function getAttributesRequest($pageSize = 1000, $skip = null, $sort = } /** - * Operation getAudiences + * Operation getAttribute * - * List audiences + * Get custom attribute * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20029 + * @return \TalonOne\Client\Model\Attribute */ - public function getAudiences($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) + public function getAttribute($attributeId) { - list($response) = $this->getAudiencesWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize); + list($response) = $this->getAttributeWithHttpInfo($attributeId); return $response; } /** - * Operation getAudiencesWithHttpInfo + * Operation getAttributeWithHttpInfo * - * List audiences + * Get custom attribute * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20029, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Attribute, HTTP status code, HTTP response headers (array of strings) */ - public function getAudiencesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) + public function getAttributeWithHttpInfo($attributeId) { - $request = $this->getAudiencesRequest($pageSize, $skip, $sort, $withTotalResultSize); + $request = $this->getAttributeRequest($attributeId); try { $options = $this->createHttpClientOption(); @@ -17923,20 +18009,20 @@ public function getAudiencesWithHttpInfo($pageSize = 1000, $skip = null, $sort = $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20029' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Attribute' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20029', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Attribute', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20029'; + $returnType = '\TalonOne\Client\Model\Attribute'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -17955,7 +18041,7 @@ public function getAudiencesWithHttpInfo($pageSize = 1000, $skip = null, $sort = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20029', + '\TalonOne\Client\Model\Attribute', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -17966,21 +18052,18 @@ public function getAudiencesWithHttpInfo($pageSize = 1000, $skip = null, $sort = } /** - * Operation getAudiencesAsync + * Operation getAttributeAsync * - * List audiences + * Get custom attribute * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAudiencesAsync($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) + public function getAttributeAsync($attributeId) { - return $this->getAudiencesAsyncWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize) + return $this->getAttributeAsyncWithHttpInfo($attributeId) ->then( function ($response) { return $response[0]; @@ -17989,22 +18072,19 @@ function ($response) { } /** - * Operation getAudiencesAsyncWithHttpInfo + * Operation getAttributeAsyncWithHttpInfo * - * List audiences + * Get custom attribute * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAudiencesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) + public function getAttributeAsyncWithHttpInfo($attributeId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20029'; - $request = $this->getAudiencesRequest($pageSize, $skip, $sort, $withTotalResultSize); + $returnType = '\TalonOne\Client\Model\Attribute'; + $request = $this->getAttributeRequest($attributeId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18041,63 +18121,39 @@ function ($exception) { } /** - * Create request for operation 'getAudiences' + * Create request for operation 'getAttribute' * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAudiencesRequest($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) + protected function getAttributeRequest($attributeId) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAudiences, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAudiences, must be bigger than or equal to 1.'); + // verify the required parameter 'attributeId' is set + if ($attributeId === null || (is_array($attributeId) && count($attributeId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeId when calling getAttribute' + ); } - - $resourcePath = '/v1/audiences'; + $resourcePath = '/v1/attributes/{attributeId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); - } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; - } + // path params + if ($attributeId !== null) { + $resourcePath = str_replace( + '{' . 'attributeId' . '}', + ObjectSerializer::toPathValue($attributeId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -18174,38 +18230,42 @@ protected function getAudiencesRequest($pageSize = 1000, $skip = null, $sort = n } /** - * Operation getCampaign + * Operation getAttributes * - * Get campaign + * List custom attributes * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Campaign + * @return \TalonOne\Client\Model\InlineResponse20032 */ - public function getCampaign($applicationId, $campaignId) + public function getAttributes($pageSize = 1000, $skip = null, $sort = null, $entity = null) { - list($response) = $this->getCampaignWithHttpInfo($applicationId, $campaignId); + list($response) = $this->getAttributesWithHttpInfo($pageSize, $skip, $sort, $entity); return $response; } /** - * Operation getCampaignWithHttpInfo + * Operation getAttributesWithHttpInfo * - * Get campaign + * List custom attributes * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Campaign, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20032, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignWithHttpInfo($applicationId, $campaignId) + public function getAttributesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $entity = null) { - $request = $this->getCampaignRequest($applicationId, $campaignId); + $request = $this->getAttributesRequest($pageSize, $skip, $sort, $entity); try { $options = $this->createHttpClientOption(); @@ -18238,20 +18298,20 @@ public function getCampaignWithHttpInfo($applicationId, $campaignId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Campaign' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20032' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Campaign', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20032', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Campaign'; + $returnType = '\TalonOne\Client\Model\InlineResponse20032'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -18270,7 +18330,7 @@ public function getCampaignWithHttpInfo($applicationId, $campaignId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Campaign', + '\TalonOne\Client\Model\InlineResponse20032', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -18281,19 +18341,21 @@ public function getCampaignWithHttpInfo($applicationId, $campaignId) } /** - * Operation getCampaignAsync + * Operation getAttributesAsync * - * Get campaign + * List custom attributes * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAsync($applicationId, $campaignId) + public function getAttributesAsync($pageSize = 1000, $skip = null, $sort = null, $entity = null) { - return $this->getCampaignAsyncWithHttpInfo($applicationId, $campaignId) + return $this->getAttributesAsyncWithHttpInfo($pageSize, $skip, $sort, $entity) ->then( function ($response) { return $response[0]; @@ -18302,20 +18364,22 @@ function ($response) { } /** - * Operation getCampaignAsyncWithHttpInfo + * Operation getAttributesAsyncWithHttpInfo * - * Get campaign + * List custom attributes * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAsyncWithHttpInfo($applicationId, $campaignId) + public function getAttributesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $entity = null) { - $returnType = '\TalonOne\Client\Model\Campaign'; - $request = $this->getCampaignRequest($applicationId, $campaignId); + $returnType = '\TalonOne\Client\Model\InlineResponse20032'; + $request = $this->getAttributesRequest($pageSize, $skip, $sort, $entity); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18352,54 +18416,63 @@ function ($exception) { } /** - * Create request for operation 'getCampaign' + * Create request for operation 'getAttributes' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCampaignRequest($applicationId, $campaignId) + protected function getAttributesRequest($pageSize = 1000, $skip = null, $sort = null, $entity = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCampaign' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAttributes, must be smaller than or equal to 1000.'); } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getCampaign' - ); + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAttributes, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}'; + + $resourcePath = '/v1/attributes'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - - - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); } - // path params - if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($entity)) { + $entity = ObjectSerializer::serializeCollection($entity, '', true); + } + if ($entity !== null) { + $queryParams['entity'] = $entity; + } + + // body params $_tempBody = null; @@ -18476,44 +18549,42 @@ protected function getCampaignRequest($applicationId, $campaignId) } /** - * Operation getCampaignAnalytics + * Operation getAudiences * - * Get analytics of campaigns + * List audiences * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $granularity The time interval between the results in the returned time-series. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20020 + * @return \TalonOne\Client\Model\InlineResponse20030 */ - public function getCampaignAnalytics($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getAudiences($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - list($response) = $this->getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); + list($response) = $this->getAudiencesWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize); return $response; } /** - * Operation getCampaignAnalyticsWithHttpInfo + * Operation getAudiencesWithHttpInfo * - * Get analytics of campaigns + * List audiences * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $granularity The time interval between the results in the returned time-series. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20020, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20030, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getAudiencesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); + $request = $this->getAudiencesRequest($pageSize, $skip, $sort, $withTotalResultSize); try { $options = $this->createHttpClientOption(); @@ -18546,20 +18617,20 @@ public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $r $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20020' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20030' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20020', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20030', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20020'; + $returnType = '\TalonOne\Client\Model\InlineResponse20030'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -18578,7 +18649,7 @@ public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $r case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20020', + '\TalonOne\Client\Model\InlineResponse20030', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -18589,22 +18660,21 @@ public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $r } /** - * Operation getCampaignAnalyticsAsync + * Operation getAudiencesAsync * - * Get analytics of campaigns + * List audiences * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $granularity The time interval between the results in the returned time-series. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAnalyticsAsync($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getAudiencesAsync($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - return $this->getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity) + return $this->getAudiencesAsyncWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize) ->then( function ($response) { return $response[0]; @@ -18613,23 +18683,22 @@ function ($response) { } /** - * Operation getCampaignAnalyticsAsyncWithHttpInfo + * Operation getAudiencesAsyncWithHttpInfo * - * Get analytics of campaigns + * List audiences * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $granularity The time interval between the results in the returned time-series. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getAudiencesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20020'; - $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); + $returnType = '\TalonOne\Client\Model\InlineResponse20030'; + $request = $this->getAudiencesRequest($pageSize, $skip, $sort, $withTotalResultSize); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18666,45 +18735,27 @@ function ($exception) { } /** - * Create request for operation 'getCampaignAnalytics' + * Create request for operation 'getAudiences' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param string $granularity The time interval between the results in the returned time-series. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + protected function getAudiencesRequest($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCampaignAnalytics' - ); - } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getCampaignAnalytics' - ); - } - // verify the required parameter 'rangeStart' is set - if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling getCampaignAnalytics' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAudiences, must be smaller than or equal to 1000.'); } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling getCampaignAnalytics' - ); + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAudiences, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/analytics'; + + $resourcePath = '/v1/audiences'; $formParams = []; $queryParams = []; $headerParams = []; @@ -18712,45 +18763,36 @@ protected function getCampaignAnalyticsRequest($applicationId, $campaignId, $ran $multipart = false; // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; } // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; + if ($skip !== null) { + $queryParams['skip'] = $skip; } // query params - if (is_array($granularity)) { - $granularity = ObjectSerializer::serializeCollection($granularity, '', true); + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); } - if ($granularity !== null) { - $queryParams['granularity'] = $granularity; + if ($sort !== null) { + $queryParams['sort'] = $sort; } - - - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); + // query params + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); } - // path params - if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; } + + // body params $_tempBody = null; @@ -18826,46 +18868,38 @@ protected function getCampaignAnalyticsRequest($applicationId, $campaignId, $ran } /** - * Operation getCampaignByAttributes + * Operation getCampaign * - * List campaigns that match the given attributes + * Get campaign * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CampaignSearch $body body (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2004 + * @return \TalonOne\Client\Model\Campaign */ - public function getCampaignByAttributes($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) + public function getCampaign($applicationId, $campaignId) { - list($response) = $this->getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState); + list($response) = $this->getCampaignWithHttpInfo($applicationId, $campaignId); return $response; } /** - * Operation getCampaignByAttributesWithHttpInfo + * Operation getCampaignWithHttpInfo * - * List campaigns that match the given attributes + * Get campaign * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CampaignSearch $body body (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Campaign, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) + public function getCampaignWithHttpInfo($applicationId, $campaignId) { - $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); + $request = $this->getCampaignRequest($applicationId, $campaignId); try { $options = $this->createHttpClientOption(); @@ -18898,20 +18932,20 @@ public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $page $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2004' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Campaign' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2004', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Campaign', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2004'; + $returnType = '\TalonOne\Client\Model\Campaign'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -18930,7 +18964,7 @@ public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $page case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2004', + '\TalonOne\Client\Model\Campaign', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -18941,23 +18975,19 @@ public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $page } /** - * Operation getCampaignByAttributesAsync + * Operation getCampaignAsync * - * List campaigns that match the given attributes + * Get campaign * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CampaignSearch $body body (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignByAttributesAsync($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) + public function getCampaignAsync($applicationId, $campaignId) { - return $this->getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState) + return $this->getCampaignAsyncWithHttpInfo($applicationId, $campaignId) ->then( function ($response) { return $response[0]; @@ -18966,24 +18996,20 @@ function ($response) { } /** - * Operation getCampaignByAttributesAsyncWithHttpInfo + * Operation getCampaignAsyncWithHttpInfo * - * List campaigns that match the given attributes + * Get campaign * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CampaignSearch $body body (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) + public function getCampaignAsyncWithHttpInfo($applicationId, $campaignId) { - $returnType = '\TalonOne\Client\Model\InlineResponse2004'; - $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); + $returnType = '\TalonOne\Client\Model\Campaign'; + $request = $this->getCampaignRequest($applicationId, $campaignId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19020,75 +19046,36 @@ function ($exception) { } /** - * Create request for operation 'getCampaignByAttributes' + * Create request for operation 'getCampaign' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CampaignSearch $body body (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCampaignByAttributesRequest($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) + protected function getCampaignRequest($applicationId, $campaignId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCampaignByAttributes' + 'Missing the required parameter $applicationId when calling getCampaign' ); } - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling getCampaignByAttributes' + 'Missing the required parameter $campaignId when calling getCampaign' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignByAttributes, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignByAttributes, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/applications/{applicationId}/campaigns_search'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($campaignState)) { - $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); - } - if ($campaignState !== null) { - $queryParams['campaignState'] = $campaignState; - } // path params @@ -19099,12 +19086,17 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi $resourcePath ); } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -19113,7 +19105,7 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -19170,7 +19162,7 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -19178,48 +19170,44 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi } /** - * Operation getCampaignTemplates + * Operation getCampaignAnalytics * - * List campaign templates + * Get analytics of campaigns * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $state Filter results by the state of the campaign template. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) - * @param int $userId Filter results by user ID. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $granularity The time interval between the results in the returned time-series. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20010 + * @return \TalonOne\Client\Model\InlineResponse20021 */ - public function getCampaignTemplates($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) + public function getCampaignAnalytics($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - list($response) = $this->getCampaignTemplatesWithHttpInfo($pageSize, $skip, $sort, $state, $name, $tags, $userId); + list($response) = $this->getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); return $response; } /** - * Operation getCampaignTemplatesWithHttpInfo + * Operation getCampaignAnalyticsWithHttpInfo * - * List campaign templates + * Get analytics of campaigns * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $state Filter results by the state of the campaign template. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) - * @param int $userId Filter results by user ID. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $granularity The time interval between the results in the returned time-series. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20010, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20021, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignTemplatesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) + public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - $request = $this->getCampaignTemplatesRequest($pageSize, $skip, $sort, $state, $name, $tags, $userId); + $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); try { $options = $this->createHttpClientOption(); @@ -19252,20 +19240,20 @@ public function getCampaignTemplatesWithHttpInfo($pageSize = 1000, $skip = null, $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20010' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20021' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20010', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20021', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20010'; + $returnType = '\TalonOne\Client\Model\InlineResponse20021'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -19284,7 +19272,7 @@ public function getCampaignTemplatesWithHttpInfo($pageSize = 1000, $skip = null, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20010', + '\TalonOne\Client\Model\InlineResponse20021', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -19295,24 +19283,22 @@ public function getCampaignTemplatesWithHttpInfo($pageSize = 1000, $skip = null, } /** - * Operation getCampaignTemplatesAsync + * Operation getCampaignAnalyticsAsync * - * List campaign templates + * Get analytics of campaigns * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $state Filter results by the state of the campaign template. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) - * @param int $userId Filter results by user ID. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $granularity The time interval between the results in the returned time-series. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignTemplatesAsync($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) + public function getCampaignAnalyticsAsync($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - return $this->getCampaignTemplatesAsyncWithHttpInfo($pageSize, $skip, $sort, $state, $name, $tags, $userId) + return $this->getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity) ->then( function ($response) { return $response[0]; @@ -19321,25 +19307,23 @@ function ($response) { } /** - * Operation getCampaignTemplatesAsyncWithHttpInfo + * Operation getCampaignAnalyticsAsyncWithHttpInfo * - * List campaign templates + * Get analytics of campaigns * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $state Filter results by the state of the campaign template. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) - * @param int $userId Filter results by user ID. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $granularity The time interval between the results in the returned time-series. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignTemplatesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) + public function getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20010'; - $request = $this->getCampaignTemplatesRequest($pageSize, $skip, $sort, $state, $name, $tags, $userId); + $returnType = '\TalonOne\Client\Model\InlineResponse20021'; + $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19376,30 +19360,45 @@ function ($exception) { } /** - * Create request for operation 'getCampaignTemplates' + * Create request for operation 'getCampaignAnalytics' * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $state Filter results by the state of the campaign template. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) - * @param int $userId Filter results by user ID. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $granularity The time interval between the results in the returned time-series. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCampaignTemplatesRequest($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) + protected function getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignTemplates, must be smaller than or equal to 1000.'); + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getCampaignAnalytics' + ); } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignTemplates, must be bigger than or equal to 1.'); + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling getCampaignAnalytics' + ); + } + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeStart when calling getCampaignAnalytics' + ); + } + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeEnd when calling getCampaignAnalytics' + ); } - - $resourcePath = '/v1/campaign_templates'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/analytics'; $formParams = []; $queryParams = []; $headerParams = []; @@ -19407,56 +19406,44 @@ protected function getCampaignTemplatesRequest($pageSize = 1000, $skip = null, $ $multipart = false; // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($state)) { - $state = ObjectSerializer::serializeCollection($state, '', true); - } - if ($state !== null) { - $queryParams['state'] = $state; - } - // query params - if (is_array($name)) { - $name = ObjectSerializer::serializeCollection($name, '', true); + if (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); } - if ($name !== null) { - $queryParams['name'] = $name; + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; } // query params - if (is_array($tags)) { - $tags = ObjectSerializer::serializeCollection($tags, '', true); + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); } - if ($tags !== null) { - $queryParams['tags'] = $tags; + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; } // query params - if (is_array($userId)) { - $userId = ObjectSerializer::serializeCollection($userId, '', true); + if (is_array($granularity)) { + $granularity = ObjectSerializer::serializeCollection($granularity, '', true); } - if ($userId !== null) { - $queryParams['userId'] = $userId; + if ($granularity !== null) { + $queryParams['granularity'] = $granularity; } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -19533,56 +19520,46 @@ protected function getCampaignTemplatesRequest($pageSize = 1000, $skip = null, $ } /** - * Operation getCampaigns + * Operation getCampaignByAttributes * - * List campaigns + * List campaigns that match the given attributes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CampaignSearch $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) - * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2004|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse2006 */ - public function getCampaigns($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) + public function getCampaignByAttributes($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) { - list($response) = $this->getCampaignsWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId); + list($response) = $this->getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState); return $response; } /** - * Operation getCampaignsWithHttpInfo + * Operation getCampaignByAttributesWithHttpInfo * - * List campaigns + * List campaigns that match the given attributes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CampaignSearch $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) - * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2004|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignsWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) + public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) { - $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId); + $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); try { $options = $this->createHttpClientOption(); @@ -19615,32 +19592,20 @@ public function getCampaignsWithHttpInfo($applicationId, $pageSize = 1000, $skip $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2004' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2004', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2006' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2006', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2004'; + $returnType = '\TalonOne\Client\Model\InlineResponse2006'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -19659,15 +19624,7 @@ public function getCampaignsWithHttpInfo($applicationId, $pageSize = 1000, $skip case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2004', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\InlineResponse2006', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -19678,28 +19635,23 @@ public function getCampaignsWithHttpInfo($applicationId, $pageSize = 1000, $skip } /** - * Operation getCampaignsAsync + * Operation getCampaignByAttributesAsync * - * List campaigns + * List campaigns that match the given attributes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CampaignSearch $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) - * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignsAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) + public function getCampaignByAttributesAsync($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) { - return $this->getCampaignsAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId) + return $this->getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState) ->then( function ($response) { return $response[0]; @@ -19708,29 +19660,24 @@ function ($response) { } /** - * Operation getCampaignsAsyncWithHttpInfo + * Operation getCampaignByAttributesAsyncWithHttpInfo * - * List campaigns + * List campaigns that match the given attributes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CampaignSearch $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) - * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignsAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) + public function getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2004'; - $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId); + $returnType = '\TalonOne\Client\Model\InlineResponse2006'; + $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19767,40 +19714,41 @@ function ($exception) { } /** - * Create request for operation 'getCampaigns' + * Create request for operation 'getCampaignByAttributes' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CampaignSearch $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) - * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCampaignsRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) + protected function getCampaignByAttributesRequest($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCampaigns' + 'Missing the required parameter $applicationId when calling getCampaignByAttributes' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling getCampaignByAttributes' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaigns, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignByAttributes, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaigns, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignByAttributes, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns'; + $resourcePath = '/v1/applications/{applicationId}/campaigns_search'; $formParams = []; $queryParams = []; $headerParams = []; @@ -19835,48 +19783,6 @@ protected function getCampaignsRequest($applicationId, $pageSize = 1000, $skip = if ($campaignState !== null) { $queryParams['campaignState'] = $campaignState; } - // query params - if (is_array($name)) { - $name = ObjectSerializer::serializeCollection($name, '', true); - } - if ($name !== null) { - $queryParams['name'] = $name; - } - // query params - if (is_array($tags)) { - $tags = ObjectSerializer::serializeCollection($tags, '', true); - } - if ($tags !== null) { - $queryParams['tags'] = $tags; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } - // query params - if (is_array($campaignGroupId)) { - $campaignGroupId = ObjectSerializer::serializeCollection($campaignGroupId, '', true); - } - if ($campaignGroupId !== null) { - $queryParams['campaignGroupId'] = $campaignGroupId; - } - // query params - if (is_array($templateId)) { - $templateId = ObjectSerializer::serializeCollection($templateId, '', true); - } - if ($templateId !== null) { - $queryParams['templateId'] = $templateId; - } // path params @@ -19890,6 +19796,9 @@ protected function getCampaignsRequest($applicationId, $pageSize = 1000, $skip = // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -19898,7 +19807,7 @@ protected function getCampaignsRequest($applicationId, $pageSize = 1000, $skip = } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -19955,7 +19864,7 @@ protected function getCampaignsRequest($applicationId, $pageSize = 1000, $skip = $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -19963,56 +19872,48 @@ protected function getCampaignsRequest($applicationId, $pageSize = 1000, $skip = } /** - * Operation getChanges + * Operation getCampaignTemplates * - * Get audit logs for an account + * List campaign templates * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param string $state Filter results by the state of the campaign template. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) * @param int $userId Filter results by user ID. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param int $managementKeyId Filter results that match the given management key ID. (optional) - * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20038 + * @return \TalonOne\Client\Model\InlineResponse20011 */ - public function getChanges($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) + public function getCampaignTemplates($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) { - list($response) = $this->getChangesWithHttpInfo($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld); + list($response) = $this->getCampaignTemplatesWithHttpInfo($pageSize, $skip, $sort, $state, $name, $tags, $userId); return $response; } /** - * Operation getChangesWithHttpInfo + * Operation getCampaignTemplatesWithHttpInfo * - * Get audit logs for an account + * List campaign templates * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param string $state Filter results by the state of the campaign template. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) * @param int $userId Filter results by user ID. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param int $managementKeyId Filter results that match the given management key ID. (optional) - * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20038, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20011, HTTP status code, HTTP response headers (array of strings) */ - public function getChangesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) + public function getCampaignTemplatesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) { - $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld); + $request = $this->getCampaignTemplatesRequest($pageSize, $skip, $sort, $state, $name, $tags, $userId); try { $options = $this->createHttpClientOption(); @@ -20045,20 +19946,20 @@ public function getChangesWithHttpInfo($pageSize = 1000, $skip = null, $sort = n $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20038' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20011' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20038', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20011', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20038'; + $returnType = '\TalonOne\Client\Model\InlineResponse20011'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -20077,7 +19978,7 @@ public function getChangesWithHttpInfo($pageSize = 1000, $skip = null, $sort = n case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20038', + '\TalonOne\Client\Model\InlineResponse20011', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -20088,28 +19989,24 @@ public function getChangesWithHttpInfo($pageSize = 1000, $skip = null, $sort = n } /** - * Operation getChangesAsync + * Operation getCampaignTemplatesAsync * - * Get audit logs for an account + * List campaign templates * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param string $state Filter results by the state of the campaign template. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) * @param int $userId Filter results by user ID. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param int $managementKeyId Filter results that match the given management key ID. (optional) - * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChangesAsync($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) + public function getCampaignTemplatesAsync($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) { - return $this->getChangesAsyncWithHttpInfo($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld) + return $this->getCampaignTemplatesAsyncWithHttpInfo($pageSize, $skip, $sort, $state, $name, $tags, $userId) ->then( function ($response) { return $response[0]; @@ -20118,29 +20015,25 @@ function ($response) { } /** - * Operation getChangesAsyncWithHttpInfo + * Operation getCampaignTemplatesAsyncWithHttpInfo * - * Get audit logs for an account + * List campaign templates * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param string $state Filter results by the state of the campaign template. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) * @param int $userId Filter results by user ID. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param int $managementKeyId Filter results that match the given management key ID. (optional) - * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChangesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) + public function getCampaignTemplatesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20038'; - $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld); + $returnType = '\TalonOne\Client\Model\InlineResponse20011'; + $request = $this->getCampaignTemplatesRequest($pageSize, $skip, $sort, $state, $name, $tags, $userId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -20177,34 +20070,30 @@ function ($exception) { } /** - * Create request for operation 'getChanges' + * Create request for operation 'getCampaignTemplates' * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param string $state Filter results by the state of the campaign template. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) * @param int $userId Filter results by user ID. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param int $managementKeyId Filter results that match the given management key ID. (optional) - * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getChangesRequest($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) + protected function getCampaignTemplatesRequest($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) { if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getChanges, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignTemplates, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getChanges, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignTemplates, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/changes'; + $resourcePath = '/v1/campaign_templates'; $formParams = []; $queryParams = []; $headerParams = []; @@ -20233,18 +20122,25 @@ protected function getChangesRequest($pageSize = 1000, $skip = null, $sort = nul $queryParams['sort'] = $sort; } // query params - if (is_array($applicationId)) { - $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); + if (is_array($state)) { + $state = ObjectSerializer::serializeCollection($state, '', true); } - if ($applicationId !== null) { - $queryParams['applicationId'] = $applicationId; + if ($state !== null) { + $queryParams['state'] = $state; } // query params - if (is_array($entityPath)) { - $entityPath = ObjectSerializer::serializeCollection($entityPath, '', true); + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); } - if ($entityPath !== null) { - $queryParams['entityPath'] = $entityPath; + if ($name !== null) { + $queryParams['name'] = $name; + } + // query params + if (is_array($tags)) { + $tags = ObjectSerializer::serializeCollection($tags, '', true); + } + if ($tags !== null) { + $queryParams['tags'] = $tags; } // query params if (is_array($userId)) { @@ -20253,41 +20149,6 @@ protected function getChangesRequest($pageSize = 1000, $skip = null, $sort = nul if ($userId !== null) { $queryParams['userId'] = $userId; } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } - // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); - } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; - } - // query params - if (is_array($managementKeyId)) { - $managementKeyId = ObjectSerializer::serializeCollection($managementKeyId, '', true); - } - if ($managementKeyId !== null) { - $queryParams['managementKeyId'] = $managementKeyId; - } - // query params - if (is_array($includeOld)) { - $includeOld = ObjectSerializer::serializeCollection($includeOld, '', true); - } - if ($includeOld !== null) { - $queryParams['includeOld'] = $includeOld; - } @@ -20366,40 +20227,58 @@ protected function getChangesRequest($pageSize = 1000, $skip = null, $sort = nul } /** - * Operation getCollection + * Operation getCampaigns * - * Get collection + * List campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign access group ID. (optional) + * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) + * @param int $storeId Filter results to campaigns linked to the specified store ID. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse2006|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getCollection($applicationId, $campaignId, $collectionId) + public function getCampaigns($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null, $storeId = null) { - list($response) = $this->getCollectionWithHttpInfo($applicationId, $campaignId, $collectionId); + list($response) = $this->getCampaignsWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId, $storeId); return $response; } /** - * Operation getCollectionWithHttpInfo + * Operation getCampaignsWithHttpInfo * - * Get collection + * List campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign access group ID. (optional) + * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) + * @param int $storeId Filter results to campaigns linked to the specified store ID. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2006|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getCollectionWithHttpInfo($applicationId, $campaignId, $collectionId) + public function getCampaignsWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null, $storeId = null) { - $request = $this->getCollectionRequest($applicationId, $campaignId, $collectionId); + $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId, $storeId); try { $options = $this->createHttpClientOption(); @@ -20432,18 +20311,18 @@ public function getCollectionWithHttpInfo($applicationId, $campaignId, $collecti $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2006' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2006', []), $response->getStatusCode(), $response->getHeaders() ]; - case 404: + case 400: if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { @@ -20457,7 +20336,7 @@ public function getCollectionWithHttpInfo($applicationId, $campaignId, $collecti ]; } - $returnType = '\TalonOne\Client\Model\Collection'; + $returnType = '\TalonOne\Client\Model\InlineResponse2006'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -20476,12 +20355,12 @@ public function getCollectionWithHttpInfo($applicationId, $campaignId, $collecti case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Collection', + '\TalonOne\Client\Model\InlineResponse2006', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\TalonOne\Client\Model\ErrorResponseWithStatus', @@ -20495,20 +20374,29 @@ public function getCollectionWithHttpInfo($applicationId, $campaignId, $collecti } /** - * Operation getCollectionAsync + * Operation getCampaignsAsync * - * Get collection + * List campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign access group ID. (optional) + * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) + * @param int $storeId Filter results to campaigns linked to the specified store ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCollectionAsync($applicationId, $campaignId, $collectionId) + public function getCampaignsAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null, $storeId = null) { - return $this->getCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) + return $this->getCampaignsAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId, $storeId) ->then( function ($response) { return $response[0]; @@ -20517,21 +20405,30 @@ function ($response) { } /** - * Operation getCollectionAsyncWithHttpInfo + * Operation getCampaignsAsyncWithHttpInfo * - * Get collection + * List campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign access group ID. (optional) + * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) + * @param int $storeId Filter results to campaigns linked to the specified store ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) + public function getCampaignsAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null, $storeId = null) { - $returnType = '\TalonOne\Client\Model\Collection'; - $request = $this->getCollectionRequest($applicationId, $campaignId, $collectionId); + $returnType = '\TalonOne\Client\Model\InlineResponse2006'; + $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId, $storeId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -20568,43 +20465,124 @@ function ($exception) { } /** - * Create request for operation 'getCollection' + * Create request for operation 'getCampaigns' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign access group ID. (optional) + * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) + * @param int $storeId Filter results to campaigns linked to the specified store ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCollectionRequest($applicationId, $campaignId, $collectionId) + protected function getCampaignsRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null, $storeId = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCollection' + 'Missing the required parameter $applicationId when calling getCampaigns' ); } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getCollection' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaigns, must be smaller than or equal to 1000.'); } - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling getCollection' - ); + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaigns, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}'; + + $resourcePath = '/v1/applications/{applicationId}/campaigns'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($campaignState)) { + $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); + } + if ($campaignState !== null) { + $queryParams['campaignState'] = $campaignState; + } + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); + } + if ($name !== null) { + $queryParams['name'] = $name; + } + // query params + if (is_array($tags)) { + $tags = ObjectSerializer::serializeCollection($tags, '', true); + } + if ($tags !== null) { + $queryParams['tags'] = $tags; + } + // query params + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + } + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; + } + // query params + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); + } + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } + // query params + if (is_array($campaignGroupId)) { + $campaignGroupId = ObjectSerializer::serializeCollection($campaignGroupId, '', true); + } + if ($campaignGroupId !== null) { + $queryParams['campaignGroupId'] = $campaignGroupId; + } + // query params + if (is_array($templateId)) { + $templateId = ObjectSerializer::serializeCollection($templateId, '', true); + } + if ($templateId !== null) { + $queryParams['templateId'] = $templateId; + } + // query params + if (is_array($storeId)) { + $storeId = ObjectSerializer::serializeCollection($storeId, '', true); + } + if ($storeId !== null) { + $queryParams['storeId'] = $storeId; + } // path params @@ -20615,22 +20593,6 @@ protected function getCollectionRequest($applicationId, $campaignId, $collection $resourcePath ); } - // path params - if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); - } - // path params - if ($collectionId !== null) { - $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -20707,40 +20669,56 @@ protected function getCollectionRequest($applicationId, $campaignId, $collection } /** - * Operation getCollectionItems + * Operation getChanges * - * Get collection items + * Get audit logs for an account * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId Filter results by user ID. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $managementKeyId Filter results that match the given management key ID. (optional) + * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20016|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse20040 */ - public function getCollectionItems($collectionId, $pageSize = 1000, $skip = null) + public function getChanges($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) { - list($response) = $this->getCollectionItemsWithHttpInfo($collectionId, $pageSize, $skip); + list($response) = $this->getChangesWithHttpInfo($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld); return $response; } /** - * Operation getCollectionItemsWithHttpInfo + * Operation getChangesWithHttpInfo * - * Get collection items + * Get audit logs for an account * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId Filter results by user ID. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $managementKeyId Filter results that match the given management key ID. (optional) + * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20016|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20040, HTTP status code, HTTP response headers (array of strings) */ - public function getCollectionItemsWithHttpInfo($collectionId, $pageSize = 1000, $skip = null) + public function getChangesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) { - $request = $this->getCollectionItemsRequest($collectionId, $pageSize, $skip); + $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld); try { $options = $this->createHttpClientOption(); @@ -20773,32 +20751,20 @@ public function getCollectionItemsWithHttpInfo($collectionId, $pageSize = 1000, $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20016' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20016', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20040' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20040', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20016'; + $returnType = '\TalonOne\Client\Model\InlineResponse20040'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -20817,15 +20783,7 @@ public function getCollectionItemsWithHttpInfo($collectionId, $pageSize = 1000, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20016', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\InlineResponse20040', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -20836,20 +20794,28 @@ public function getCollectionItemsWithHttpInfo($collectionId, $pageSize = 1000, } /** - * Operation getCollectionItemsAsync + * Operation getChangesAsync * - * Get collection items + * Get audit logs for an account * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId Filter results by user ID. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $managementKeyId Filter results that match the given management key ID. (optional) + * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCollectionItemsAsync($collectionId, $pageSize = 1000, $skip = null) + public function getChangesAsync($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) { - return $this->getCollectionItemsAsyncWithHttpInfo($collectionId, $pageSize, $skip) + return $this->getChangesAsyncWithHttpInfo($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld) ->then( function ($response) { return $response[0]; @@ -20858,21 +20824,29 @@ function ($response) { } /** - * Operation getCollectionItemsAsyncWithHttpInfo + * Operation getChangesAsyncWithHttpInfo * - * Get collection items + * Get audit logs for an account * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId Filter results by user ID. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $managementKeyId Filter results that match the given management key ID. (optional) + * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCollectionItemsAsyncWithHttpInfo($collectionId, $pageSize = 1000, $skip = null) + public function getChangesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20016'; - $request = $this->getCollectionItemsRequest($collectionId, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\InlineResponse20040'; + $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -20909,32 +20883,34 @@ function ($exception) { } /** - * Create request for operation 'getCollectionItems' + * Create request for operation 'getChanges' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId Filter results by user ID. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $managementKeyId Filter results that match the given management key ID. (optional) + * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCollectionItemsRequest($collectionId, $pageSize = 1000, $skip = null) + protected function getChangesRequest($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) { - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling getCollectionItems' - ); - } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCollectionItems, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getChanges, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCollectionItems, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getChanges, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/collections/{collectionId}/items'; + $resourcePath = '/v1/changes'; $formParams = []; $queryParams = []; $headerParams = []; @@ -20955,16 +20931,71 @@ protected function getCollectionItemsRequest($collectionId, $pageSize = 1000, $s if ($skip !== null) { $queryParams['skip'] = $skip; } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($applicationId)) { + $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); + } + if ($applicationId !== null) { + $queryParams['applicationId'] = $applicationId; + } + // query params + if (is_array($entityPath)) { + $entityPath = ObjectSerializer::serializeCollection($entityPath, '', true); + } + if ($entityPath !== null) { + $queryParams['entityPath'] = $entityPath; + } + // query params + if (is_array($userId)) { + $userId = ObjectSerializer::serializeCollection($userId, '', true); + } + if ($userId !== null) { + $queryParams['userId'] = $userId; + } + // query params + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + } + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; + } + // query params + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); + } + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } + // query params + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + } + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; + } + // query params + if (is_array($managementKeyId)) { + $managementKeyId = ObjectSerializer::serializeCollection($managementKeyId, '', true); + } + if ($managementKeyId !== null) { + $queryParams['managementKeyId'] = $managementKeyId; + } + // query params + if (is_array($includeOld)) { + $includeOld = ObjectSerializer::serializeCollection($includeOld, '', true); + } + if ($includeOld !== null) { + $queryParams['includeOld'] = $includeOld; + } - // path params - if ($collectionId !== null) { - $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -21041,62 +21072,40 @@ protected function getCollectionItemsRequest($collectionId, $pageSize = 1000, $s } /** - * Operation getCouponsWithoutTotalCount + * Operation getCollection * - * List coupons + * Get campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) - * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param string $batchId Filter results by batches of coupons (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2008 + * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getCouponsWithoutTotalCount($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) + public function getCollection($applicationId, $campaignId, $collectionId) { - list($response) = $this->getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); + list($response) = $this->getCollectionWithHttpInfo($applicationId, $campaignId, $collectionId); return $response; } /** - * Operation getCouponsWithoutTotalCountWithHttpInfo + * Operation getCollectionWithHttpInfo * - * List coupons + * Get campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) - * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param string $batchId Filter results by batches of coupons (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) + public function getCollectionWithHttpInfo($applicationId, $campaignId, $collectionId) { - $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); + $request = $this->getCollectionRequest($applicationId, $campaignId, $collectionId); try { $options = $this->createHttpClientOption(); @@ -21129,20 +21138,32 @@ public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaig $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2008' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2008', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), $response->getStatusCode(), $response->getHeaders() ]; - } - - $returnType = '\TalonOne\Client\Model\InlineResponse2008'; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Collection'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -21161,7 +21182,15 @@ public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaig case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2008', + '\TalonOne\Client\Model\Collection', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -21172,31 +21201,20 @@ public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaig } /** - * Operation getCouponsWithoutTotalCountAsync + * Operation getCollectionAsync * - * List coupons + * Get campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) - * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param string $batchId Filter results by batches of coupons (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCouponsWithoutTotalCountAsync($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) + public function getCollectionAsync($applicationId, $campaignId, $collectionId) { - return $this->getCouponsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch) + return $this->getCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) ->then( function ($response) { return $response[0]; @@ -21205,32 +21223,21 @@ function ($response) { } /** - * Operation getCouponsWithoutTotalCountAsyncWithHttpInfo + * Operation getCollectionAsyncWithHttpInfo * - * List coupons + * Get campaign-level collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) - * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param string $batchId Filter results by batches of coupons (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCouponsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) + public function getCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) { - $returnType = '\TalonOne\Client\Model\InlineResponse2008'; - $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); + $returnType = '\TalonOne\Client\Model\Collection'; + $request = $this->getCollectionRequest($applicationId, $campaignId, $collectionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -21267,139 +21274,43 @@ function ($exception) { } /** - * Create request for operation 'getCouponsWithoutTotalCount' + * Create request for operation 'getCollection' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) - * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param string $batchId Filter results by batches of coupons (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) + protected function getCollectionRequest($applicationId, $campaignId, $collectionId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCouponsWithoutTotalCount' + 'Missing the required parameter $applicationId when calling getCollection' ); } // verify the required parameter 'campaignId' is set if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getCouponsWithoutTotalCount' + 'Missing the required parameter $campaignId when calling getCollection' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCouponsWithoutTotalCount, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCouponsWithoutTotalCount, must be bigger than or equal to 1.'); + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collectionId when calling getCollection' + ); } - - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_total'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($value)) { - $value = ObjectSerializer::serializeCollection($value, '', true); - } - if ($value !== null) { - $queryParams['value'] = $value; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } - // query params - if (is_array($valid)) { - $valid = ObjectSerializer::serializeCollection($valid, '', true); - } - if ($valid !== null) { - $queryParams['valid'] = $valid; - } - // query params - if (is_array($usable)) { - $usable = ObjectSerializer::serializeCollection($usable, '', true); - } - if ($usable !== null) { - $queryParams['usable'] = $usable; - } - // query params - if (is_array($referralId)) { - $referralId = ObjectSerializer::serializeCollection($referralId, '', true); - } - if ($referralId !== null) { - $queryParams['referralId'] = $referralId; - } - // query params - if (is_array($recipientIntegrationId)) { - $recipientIntegrationId = ObjectSerializer::serializeCollection($recipientIntegrationId, '', true); - } - if ($recipientIntegrationId !== null) { - $queryParams['recipientIntegrationId'] = $recipientIntegrationId; - } - // query params - if (is_array($batchId)) { - $batchId = ObjectSerializer::serializeCollection($batchId, '', true); - } - if ($batchId !== null) { - $queryParams['batchId'] = $batchId; - } - // query params - if (is_array($exactMatch)) { - $exactMatch = ObjectSerializer::serializeCollection($exactMatch, '', true); - } - if ($exactMatch !== null) { - $queryParams['exactMatch'] = $exactMatch; - } // path params @@ -21418,6 +21329,14 @@ protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignI $resourcePath ); } + // path params + if ($collectionId !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -21494,46 +21413,40 @@ protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignI } /** - * Operation getCustomerActivityReport + * Operation getCollectionItems * - * Get customer's activity report + * Get collection items * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\CustomerActivityReport + * @return \TalonOne\Client\Model\InlineResponse20017|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getCustomerActivityReport($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) + public function getCollectionItems($collectionId, $pageSize = 1000, $skip = null) { - list($response) = $this->getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); + list($response) = $this->getCollectionItemsWithHttpInfo($collectionId, $pageSize, $skip); return $response; } /** - * Operation getCustomerActivityReportWithHttpInfo + * Operation getCollectionItemsWithHttpInfo * - * Get customer's activity report + * Get collection items * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\CustomerActivityReport, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20017|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) + public function getCollectionItemsWithHttpInfo($collectionId, $pageSize = 1000, $skip = null) { - $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); + $request = $this->getCollectionItemsRequest($collectionId, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -21566,20 +21479,32 @@ public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $a $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\CustomerActivityReport' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20017' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerActivityReport', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20017', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\CustomerActivityReport'; + $returnType = '\TalonOne\Client\Model\InlineResponse20017'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -21598,7 +21523,15 @@ public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $a case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\CustomerActivityReport', + '\TalonOne\Client\Model\InlineResponse20017', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -21609,23 +21542,20 @@ public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $a } /** - * Operation getCustomerActivityReportAsync + * Operation getCollectionItemsAsync * - * Get customer's activity report + * Get collection items * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerActivityReportAsync($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) + public function getCollectionItemsAsync($collectionId, $pageSize = 1000, $skip = null) { - return $this->getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip) + return $this->getCollectionItemsAsyncWithHttpInfo($collectionId, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -21634,24 +21564,21 @@ function ($response) { } /** - * Operation getCustomerActivityReportAsyncWithHttpInfo + * Operation getCollectionItemsAsyncWithHttpInfo * - * Get customer's activity report + * Get collection items * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) + public function getCollectionItemsAsyncWithHttpInfo($collectionId, $pageSize = 1000, $skip = null) { - $returnType = '\TalonOne\Client\Model\CustomerActivityReport'; - $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\InlineResponse20017'; + $request = $this->getCollectionItemsRequest($collectionId, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -21688,53 +21615,32 @@ function ($exception) { } /** - * Create request for operation 'getCustomerActivityReport' + * Create request for operation 'getCollectionItems' * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) + protected function getCollectionItemsRequest($collectionId, $pageSize = 1000, $skip = null) { - // verify the required parameter 'rangeStart' is set - if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling getCustomerActivityReport' - ); - } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling getCustomerActivityReport' - ); - } - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCustomerActivityReport' - ); - } - // verify the required parameter 'customerId' is set - if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $customerId when calling getCustomerActivityReport' + 'Missing the required parameter $collectionId when calling getCollectionItems' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReport, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCollectionItems, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReport, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCollectionItems, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/{customerId}'; + $resourcePath = '/v1/collections/{collectionId}/items'; $formParams = []; $queryParams = []; $headerParams = []; @@ -21755,35 +21661,13 @@ protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $app if ($skip !== null) { $queryParams['skip'] = $skip; } - // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); - } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; - } - // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); - } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; - } // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($customerId !== null) { + if ($collectionId !== null) { $resourcePath = str_replace( - '{' . 'customerId' . '}', - ObjectSerializer::toPathValue($customerId), + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), $resourcePath ); } @@ -21863,54 +21747,62 @@ protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $app } /** - * Operation getCustomerActivityReportsWithoutTotalCount + * Operation getCouponsWithoutTotalCount * - * Get Activity Reports for Application Customers + * List coupons * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $name Only return reports matching the customer name (optional) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param string $campaignName Only return reports matching the campaignName (optional) - * @param string $advocateName Only return reports matching the current customer referrer name (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20025 + * @return \TalonOne\Client\Model\InlineResponse2009 */ - public function getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCouponsWithoutTotalCount($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { - list($response) = $this->getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + list($response) = $this->getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); return $response; } /** - * Operation getCustomerActivityReportsWithoutTotalCountWithHttpInfo + * Operation getCouponsWithoutTotalCountWithHttpInfo * - * Get Activity Reports for Application Customers + * List coupons * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $name Only return reports matching the customer name (optional) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param string $campaignName Only return reports matching the campaignName (optional) - * @param string $advocateName Only return reports matching the current customer referrer name (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20025, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { - $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); try { $options = $this->createHttpClientOption(); @@ -21943,20 +21835,20 @@ public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeSt $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20025' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2009' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20025', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2009', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20025'; + $returnType = '\TalonOne\Client\Model\InlineResponse2009'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -21975,7 +21867,7 @@ public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeSt case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20025', + '\TalonOne\Client\Model\InlineResponse2009', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -21986,27 +21878,31 @@ public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeSt } /** - * Operation getCustomerActivityReportsWithoutTotalCountAsync + * Operation getCouponsWithoutTotalCountAsync * - * Get Activity Reports for Application Customers + * List coupons * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $name Only return reports matching the customer name (optional) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param string $campaignName Only return reports matching the campaignName (optional) - * @param string $advocateName Only return reports matching the current customer referrer name (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerActivityReportsWithoutTotalCountAsync($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCouponsWithoutTotalCountAsync($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { - return $this->getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) + return $this->getCouponsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch) ->then( function ($response) { return $response[0]; @@ -22015,28 +21911,32 @@ function ($response) { } /** - * Operation getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo + * Operation getCouponsWithoutTotalCountAsyncWithHttpInfo * - * Get Activity Reports for Application Customers + * List coupons * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $name Only return reports matching the customer name (optional) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param string $campaignName Only return reports matching the campaignName (optional) - * @param string $advocateName Only return reports matching the current customer referrer name (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCouponsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { - $returnType = '\TalonOne\Client\Model\InlineResponse20025'; - $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + $returnType = '\TalonOne\Client\Model\InlineResponse2009'; + $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -22073,51 +21973,49 @@ function ($exception) { } /** - * Create request for operation 'getCustomerActivityReportsWithoutTotalCount' + * Create request for operation 'getCouponsWithoutTotalCount' * - * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $name Only return reports matching the customer name (optional) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param string $campaignName Only return reports matching the campaignName (optional) - * @param string $advocateName Only return reports matching the current customer referrer name (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { - // verify the required parameter 'rangeStart' is set - if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling getCustomerActivityReportsWithoutTotalCount' - ); - } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling getCustomerActivityReportsWithoutTotalCount' + 'Missing the required parameter $applicationId when calling getCouponsWithoutTotalCount' ); } - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCustomerActivityReportsWithoutTotalCount' + 'Missing the required parameter $campaignId when calling getCouponsWithoutTotalCount' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReportsWithoutTotalCount, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCouponsWithoutTotalCount, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReportsWithoutTotalCount, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCouponsWithoutTotalCount, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/no_total'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_total'; $formParams = []; $queryParams = []; $headerParams = []; @@ -22146,46 +22044,67 @@ protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStar $queryParams['sort'] = $sort; } // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); + if (is_array($value)) { + $value = ObjectSerializer::serializeCollection($value, '', true); } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; + if ($value !== null) { + $queryParams['value'] = $value; } // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; } // query params - if (is_array($name)) { - $name = ObjectSerializer::serializeCollection($name, '', true); + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); } - if ($name !== null) { - $queryParams['name'] = $name; + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; } // query params - if (is_array($integrationId)) { - $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); + if (is_array($valid)) { + $valid = ObjectSerializer::serializeCollection($valid, '', true); } - if ($integrationId !== null) { - $queryParams['integrationId'] = $integrationId; + if ($valid !== null) { + $queryParams['valid'] = $valid; } // query params - if (is_array($campaignName)) { - $campaignName = ObjectSerializer::serializeCollection($campaignName, '', true); + if (is_array($usable)) { + $usable = ObjectSerializer::serializeCollection($usable, '', true); } - if ($campaignName !== null) { - $queryParams['campaignName'] = $campaignName; + if ($usable !== null) { + $queryParams['usable'] = $usable; } // query params - if (is_array($advocateName)) { - $advocateName = ObjectSerializer::serializeCollection($advocateName, '', true); + if (is_array($referralId)) { + $referralId = ObjectSerializer::serializeCollection($referralId, '', true); } - if ($advocateName !== null) { - $queryParams['advocateName'] = $advocateName; + if ($referralId !== null) { + $queryParams['referralId'] = $referralId; + } + // query params + if (is_array($recipientIntegrationId)) { + $recipientIntegrationId = ObjectSerializer::serializeCollection($recipientIntegrationId, '', true); + } + if ($recipientIntegrationId !== null) { + $queryParams['recipientIntegrationId'] = $recipientIntegrationId; + } + // query params + if (is_array($batchId)) { + $batchId = ObjectSerializer::serializeCollection($batchId, '', true); + } + if ($batchId !== null) { + $queryParams['batchId'] = $batchId; + } + // query params + if (is_array($exactMatch)) { + $exactMatch = ObjectSerializer::serializeCollection($exactMatch, '', true); + } + if ($exactMatch !== null) { + $queryParams['exactMatch'] = $exactMatch; } @@ -22197,6 +22116,14 @@ protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStar $resourcePath ); } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -22273,44 +22200,46 @@ protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStar } /** - * Operation getCustomerAnalytics + * Operation getCustomerActivityReport * - * Get customer's analytics report + * Get customer's activity report * + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\CustomerAnalytics + * @return \TalonOne\Client\Model\CustomerActivityReport */ - public function getCustomerAnalytics($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) + public function getCustomerActivityReport($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) { - list($response) = $this->getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort); + list($response) = $this->getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); return $response; } /** - * Operation getCustomerAnalyticsWithHttpInfo + * Operation getCustomerActivityReportWithHttpInfo * - * Get customer's analytics report + * Get customer's activity report * + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\CustomerAnalytics, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\CustomerActivityReport, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) + public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) { - $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); + $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -22343,20 +22272,20 @@ public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $p $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\CustomerAnalytics' === '\SplFileObject') { + if ('\TalonOne\Client\Model\CustomerActivityReport' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerAnalytics', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerActivityReport', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; + $returnType = '\TalonOne\Client\Model\CustomerActivityReport'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -22375,7 +22304,7 @@ public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $p case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\CustomerAnalytics', + '\TalonOne\Client\Model\CustomerActivityReport', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -22386,22 +22315,23 @@ public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $p } /** - * Operation getCustomerAnalyticsAsync + * Operation getCustomerActivityReportAsync * - * Get customer's analytics report + * Get customer's activity report * + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerAnalyticsAsync($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) + public function getCustomerActivityReportAsync($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) { - return $this->getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort) + return $this->getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -22410,23 +22340,24 @@ function ($response) { } /** - * Operation getCustomerAnalyticsAsyncWithHttpInfo + * Operation getCustomerActivityReportAsyncWithHttpInfo * - * Get customer's analytics report + * Get customer's activity report * + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) + public function getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) { - $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; - $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\CustomerActivityReport'; + $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -22463,40 +22394,53 @@ function ($exception) { } /** - * Create request for operation 'getCustomerAnalytics' + * Create request for operation 'getCustomerActivityReport' * + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) + protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) { + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeStart when calling getCustomerActivityReport' + ); + } + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeEnd when calling getCustomerActivityReport' + ); + } // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCustomerAnalytics' + 'Missing the required parameter $applicationId when calling getCustomerActivityReport' ); } // verify the required parameter 'customerId' is set if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $customerId when calling getCustomerAnalytics' + 'Missing the required parameter $customerId when calling getCustomerActivityReport' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerAnalytics, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReport, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerAnalytics, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReport, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/customers/{customerId}/analytics'; + $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/{customerId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -22518,11 +22462,18 @@ protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pag $queryParams['skip'] = $skip; } // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); + if (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); } - if ($sort !== null) { - $queryParams['sort'] = $sort; + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; + } + // query params + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + } + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; } @@ -22618,36 +22569,54 @@ protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pag } /** - * Operation getCustomerProfile + * Operation getCustomerActivityReportsWithoutTotalCount * - * Get customer profile + * Get Activity Reports for Application Customers * - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param string $campaignName Only return reports matching the campaignName (optional) + * @param string $advocateName Only return reports matching the current customer referrer name (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\CustomerProfile + * @return \TalonOne\Client\Model\InlineResponse20026 */ - public function getCustomerProfile($customerId) + public function getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - list($response) = $this->getCustomerProfileWithHttpInfo($customerId); + list($response) = $this->getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); return $response; } /** - * Operation getCustomerProfileWithHttpInfo + * Operation getCustomerActivityReportsWithoutTotalCountWithHttpInfo * - * Get customer profile + * Get Activity Reports for Application Customers * - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param string $campaignName Only return reports matching the campaignName (optional) + * @param string $advocateName Only return reports matching the current customer referrer name (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\CustomerProfile, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20026, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerProfileWithHttpInfo($customerId) + public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - $request = $this->getCustomerProfileRequest($customerId); + $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); try { $options = $this->createHttpClientOption(); @@ -22680,20 +22649,20 @@ public function getCustomerProfileWithHttpInfo($customerId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\CustomerProfile' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20026' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerProfile', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20026', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\CustomerProfile'; + $returnType = '\TalonOne\Client\Model\InlineResponse20026'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -22712,7 +22681,7 @@ public function getCustomerProfileWithHttpInfo($customerId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\CustomerProfile', + '\TalonOne\Client\Model\InlineResponse20026', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -22723,18 +22692,27 @@ public function getCustomerProfileWithHttpInfo($customerId) } /** - * Operation getCustomerProfileAsync + * Operation getCustomerActivityReportsWithoutTotalCountAsync * - * Get customer profile + * Get Activity Reports for Application Customers * - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param string $campaignName Only return reports matching the campaignName (optional) + * @param string $advocateName Only return reports matching the current customer referrer name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfileAsync($customerId) + public function getCustomerActivityReportsWithoutTotalCountAsync($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - return $this->getCustomerProfileAsyncWithHttpInfo($customerId) + return $this->getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) ->then( function ($response) { return $response[0]; @@ -22743,19 +22721,28 @@ function ($response) { } /** - * Operation getCustomerProfileAsyncWithHttpInfo + * Operation getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo * - * Get customer profile + * Get Activity Reports for Application Customers * - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param string $campaignName Only return reports matching the campaignName (optional) + * @param string $advocateName Only return reports matching the current customer referrer name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfileAsyncWithHttpInfo($customerId) + public function getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - $returnType = '\TalonOne\Client\Model\CustomerProfile'; - $request = $this->getCustomerProfileRequest($customerId); + $returnType = '\TalonOne\Client\Model\InlineResponse20026'; + $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -22792,36 +22779,127 @@ function ($exception) { } /** - * Create request for operation 'getCustomerProfile' + * Create request for operation 'getCustomerActivityReportsWithoutTotalCount' * - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param string $campaignName Only return reports matching the campaignName (optional) + * @param string $advocateName Only return reports matching the current customer referrer name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerProfileRequest($customerId) + protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - // verify the required parameter 'customerId' is set - if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $customerId when calling getCustomerProfile' + 'Missing the required parameter $rangeStart when calling getCustomerActivityReportsWithoutTotalCount' + ); + } + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeEnd when calling getCustomerActivityReportsWithoutTotalCount' ); } + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getCustomerActivityReportsWithoutTotalCount' + ); + } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReportsWithoutTotalCount, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReportsWithoutTotalCount, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/customers/{customerId}'; + + $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/no_total'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); + } + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; + } + // query params + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + } + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; + } + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); + } + if ($name !== null) { + $queryParams['name'] = $name; + } + // query params + if (is_array($integrationId)) { + $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); + } + if ($integrationId !== null) { + $queryParams['integrationId'] = $integrationId; + } + // query params + if (is_array($campaignName)) { + $campaignName = ObjectSerializer::serializeCollection($campaignName, '', true); + } + if ($campaignName !== null) { + $queryParams['campaignName'] = $campaignName; + } + // query params + if (is_array($advocateName)) { + $advocateName = ObjectSerializer::serializeCollection($advocateName, '', true); + } + if ($advocateName !== null) { + $queryParams['advocateName'] = $advocateName; + } // path params - if ($customerId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'customerId' . '}', - ObjectSerializer::toPathValue($customerId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } @@ -22901,40 +22979,44 @@ protected function getCustomerProfileRequest($customerId) } /** - * Operation getCustomerProfiles + * Operation getCustomerAnalytics * - * List customer profiles + * Get customer's analytics report * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20024 + * @return \TalonOne\Client\Model\CustomerAnalytics */ - public function getCustomerProfiles($pageSize = 1000, $skip = null, $sandbox = false) + public function getCustomerAnalytics($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getCustomerProfilesWithHttpInfo($pageSize, $skip, $sandbox); + list($response) = $this->getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort); return $response; } /** - * Operation getCustomerProfilesWithHttpInfo + * Operation getCustomerAnalyticsWithHttpInfo * - * List customer profiles + * Get customer's analytics report * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20024, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\CustomerAnalytics, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerProfilesWithHttpInfo($pageSize = 1000, $skip = null, $sandbox = false) + public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getCustomerProfilesRequest($pageSize, $skip, $sandbox); + $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -22967,20 +23049,20 @@ public function getCustomerProfilesWithHttpInfo($pageSize = 1000, $skip = null, $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20024' === '\SplFileObject') { + if ('\TalonOne\Client\Model\CustomerAnalytics' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20024', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerAnalytics', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20024'; + $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -22999,7 +23081,7 @@ public function getCustomerProfilesWithHttpInfo($pageSize = 1000, $skip = null, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20024', + '\TalonOne\Client\Model\CustomerAnalytics', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -23010,20 +23092,22 @@ public function getCustomerProfilesWithHttpInfo($pageSize = 1000, $skip = null, } /** - * Operation getCustomerProfilesAsync + * Operation getCustomerAnalyticsAsync * - * List customer profiles + * Get customer's analytics report * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfilesAsync($pageSize = 1000, $skip = null, $sandbox = false) + public function getCustomerAnalyticsAsync($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) { - return $this->getCustomerProfilesAsyncWithHttpInfo($pageSize, $skip, $sandbox) + return $this->getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -23032,21 +23116,23 @@ function ($response) { } /** - * Operation getCustomerProfilesAsyncWithHttpInfo + * Operation getCustomerAnalyticsAsyncWithHttpInfo * - * List customer profiles + * Get customer's analytics report * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfilesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sandbox = false) + public function getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20024'; - $request = $this->getCustomerProfilesRequest($pageSize, $skip, $sandbox); + $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; + $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -23083,26 +23169,40 @@ function ($exception) { } /** - * Create request for operation 'getCustomerProfiles' + * Create request for operation 'getCustomerAnalytics' * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerProfilesRequest($pageSize = 1000, $skip = null, $sandbox = false) + protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getCustomerAnalytics' + ); + } + // verify the required parameter 'customerId' is set + if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $customerId when calling getCustomerAnalytics' + ); + } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerProfiles, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerAnalytics, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerProfiles, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerAnalytics, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/customers/no_total'; + $resourcePath = '/v1/applications/{applicationId}/customers/{customerId}/analytics'; $formParams = []; $queryParams = []; $headerParams = []; @@ -23124,14 +23224,30 @@ protected function getCustomerProfilesRequest($pageSize = 1000, $skip = null, $s $queryParams['skip'] = $skip; } // query params - if (is_array($sandbox)) { - $sandbox = ObjectSerializer::serializeCollection($sandbox, '', true); + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); } - if ($sandbox !== null) { - $queryParams['sandbox'] = $sandbox; + if ($sort !== null) { + $queryParams['sort'] = $sort; } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($customerId !== null) { + $resourcePath = str_replace( + '{' . 'customerId' . '}', + ObjectSerializer::toPathValue($customerId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -23208,42 +23324,36 @@ protected function getCustomerProfilesRequest($pageSize = 1000, $skip = null, $s } /** - * Operation getCustomersByAttributes + * Operation getCustomerProfile * - * List customer profiles matching the given attributes + * Get customer profile * - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20023 + * @return \TalonOne\Client\Model\CustomerProfile */ - public function getCustomersByAttributes($body, $pageSize = 1000, $skip = null, $sandbox = false) + public function getCustomerProfile($customerId) { - list($response) = $this->getCustomersByAttributesWithHttpInfo($body, $pageSize, $skip, $sandbox); + list($response) = $this->getCustomerProfileWithHttpInfo($customerId); return $response; } /** - * Operation getCustomersByAttributesWithHttpInfo + * Operation getCustomerProfileWithHttpInfo * - * List customer profiles matching the given attributes + * Get customer profile * - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20023, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\CustomerProfile, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomersByAttributesWithHttpInfo($body, $pageSize = 1000, $skip = null, $sandbox = false) + public function getCustomerProfileWithHttpInfo($customerId) { - $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip, $sandbox); + $request = $this->getCustomerProfileRequest($customerId); try { $options = $this->createHttpClientOption(); @@ -23276,20 +23386,20 @@ public function getCustomersByAttributesWithHttpInfo($body, $pageSize = 1000, $s $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20023' === '\SplFileObject') { + if ('\TalonOne\Client\Model\CustomerProfile' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20023', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerProfile', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20023'; + $returnType = '\TalonOne\Client\Model\CustomerProfile'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -23308,7 +23418,7 @@ public function getCustomersByAttributesWithHttpInfo($body, $pageSize = 1000, $s case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20023', + '\TalonOne\Client\Model\CustomerProfile', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -23319,21 +23429,18 @@ public function getCustomersByAttributesWithHttpInfo($body, $pageSize = 1000, $s } /** - * Operation getCustomersByAttributesAsync + * Operation getCustomerProfileAsync * - * List customer profiles matching the given attributes + * Get customer profile * - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomersByAttributesAsync($body, $pageSize = 1000, $skip = null, $sandbox = false) + public function getCustomerProfileAsync($customerId) { - return $this->getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize, $skip, $sandbox) + return $this->getCustomerProfileAsyncWithHttpInfo($customerId) ->then( function ($response) { return $response[0]; @@ -23342,22 +23449,19 @@ function ($response) { } /** - * Operation getCustomersByAttributesAsyncWithHttpInfo + * Operation getCustomerProfileAsyncWithHttpInfo * - * List customer profiles matching the given attributes + * Get customer profile * - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize = 1000, $skip = null, $sandbox = false) + public function getCustomerProfileAsyncWithHttpInfo($customerId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20023'; - $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip, $sandbox); + $returnType = '\TalonOne\Client\Model\CustomerProfile'; + $request = $this->getCustomerProfileRequest($customerId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -23394,68 +23498,42 @@ function ($exception) { } /** - * Create request for operation 'getCustomersByAttributes' + * Create request for operation 'getCustomerProfile' * - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomersByAttributesRequest($body, $pageSize = 1000, $skip = null, $sandbox = false) + protected function getCustomerProfileRequest($customerId) { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { + // verify the required parameter 'customerId' is set + if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling getCustomersByAttributes' + 'Missing the required parameter $customerId when calling getCustomerProfile' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomersByAttributes, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomersByAttributes, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/customer_search/no_total'; + $resourcePath = '/v1/customers/{customerId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sandbox)) { - $sandbox = ObjectSerializer::serializeCollection($sandbox, '', true); - } - if ($sandbox !== null) { - $queryParams['sandbox'] = $sandbox; - } + // path params + if ($customerId !== null) { + $resourcePath = str_replace( + '{' . 'customerId' . '}', + ObjectSerializer::toPathValue($customerId), + $resourcePath + ); + } // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -23464,7 +23542,7 @@ protected function getCustomersByAttributesRequest($body, $pageSize = 1000, $ski } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -23521,7 +23599,7 @@ protected function getCustomersByAttributesRequest($body, $pageSize = 1000, $ski $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -23529,44 +23607,40 @@ protected function getCustomersByAttributesRequest($body, $pageSize = 1000, $ski } /** - * Operation getEventTypes + * Operation getCustomerProfiles * - * List event types + * List customer profiles * - * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) - * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20036 + * @return \TalonOne\Client\Model\InlineResponse20025 */ - public function getEventTypes($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) + public function getCustomerProfiles($pageSize = 1000, $skip = null, $sandbox = false) { - list($response) = $this->getEventTypesWithHttpInfo($name, $includeOldVersions, $pageSize, $skip, $sort); + list($response) = $this->getCustomerProfilesWithHttpInfo($pageSize, $skip, $sandbox); return $response; } /** - * Operation getEventTypesWithHttpInfo + * Operation getCustomerProfilesWithHttpInfo * - * List event types + * List customer profiles * - * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) - * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20036, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20025, HTTP status code, HTTP response headers (array of strings) */ - public function getEventTypesWithHttpInfo($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) + public function getCustomerProfilesWithHttpInfo($pageSize = 1000, $skip = null, $sandbox = false) { - $request = $this->getEventTypesRequest($name, $includeOldVersions, $pageSize, $skip, $sort); + $request = $this->getCustomerProfilesRequest($pageSize, $skip, $sandbox); try { $options = $this->createHttpClientOption(); @@ -23599,20 +23673,20 @@ public function getEventTypesWithHttpInfo($name = null, $includeOldVersions = fa $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20036' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20025' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20036', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20025', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20036'; + $returnType = '\TalonOne\Client\Model\InlineResponse20025'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -23631,7 +23705,7 @@ public function getEventTypesWithHttpInfo($name = null, $includeOldVersions = fa case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20036', + '\TalonOne\Client\Model\InlineResponse20025', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -23642,22 +23716,20 @@ public function getEventTypesWithHttpInfo($name = null, $includeOldVersions = fa } /** - * Operation getEventTypesAsync + * Operation getCustomerProfilesAsync * - * List event types + * List customer profiles * - * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) - * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventTypesAsync($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) + public function getCustomerProfilesAsync($pageSize = 1000, $skip = null, $sandbox = false) { - return $this->getEventTypesAsyncWithHttpInfo($name, $includeOldVersions, $pageSize, $skip, $sort) + return $this->getCustomerProfilesAsyncWithHttpInfo($pageSize, $skip, $sandbox) ->then( function ($response) { return $response[0]; @@ -23666,23 +23738,21 @@ function ($response) { } /** - * Operation getEventTypesAsyncWithHttpInfo + * Operation getCustomerProfilesAsyncWithHttpInfo * - * List event types + * List customer profiles * - * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) - * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventTypesAsyncWithHttpInfo($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) + public function getCustomerProfilesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sandbox = false) { - $returnType = '\TalonOne\Client\Model\InlineResponse20036'; - $request = $this->getEventTypesRequest($name, $includeOldVersions, $pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\InlineResponse20025'; + $request = $this->getCustomerProfilesRequest($pageSize, $skip, $sandbox); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -23719,48 +23789,32 @@ function ($exception) { } /** - * Create request for operation 'getEventTypes' + * Create request for operation 'getCustomerProfiles' * - * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) - * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getEventTypesRequest($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) + protected function getCustomerProfilesRequest($pageSize = 1000, $skip = null, $sandbox = false) { if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getEventTypes, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerProfiles, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getEventTypes, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerProfiles, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/event_types'; + $resourcePath = '/v1/customers/no_total'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($name)) { - $name = ObjectSerializer::serializeCollection($name, '', true); - } - if ($name !== null) { - $queryParams['name'] = $name; - } - // query params - if (is_array($includeOldVersions)) { - $includeOldVersions = ObjectSerializer::serializeCollection($includeOldVersions, '', true); - } - if ($includeOldVersions !== null) { - $queryParams['includeOldVersions'] = $includeOldVersions; - } // query params if (is_array($pageSize)) { $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); @@ -23776,11 +23830,11 @@ protected function getEventTypesRequest($name = null, $includeOldVersions = fals $queryParams['skip'] = $skip; } // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); + if (is_array($sandbox)) { + $sandbox = ObjectSerializer::serializeCollection($sandbox, '', true); } - if ($sort !== null) { - $queryParams['sort'] = $sort; + if ($sandbox !== null) { + $queryParams['sandbox'] = $sandbox; } @@ -23860,44 +23914,42 @@ protected function getEventTypesRequest($name = null, $includeOldVersions = fals } /** - * Operation getExports + * Operation getCustomersByAttributes * - * Get exports + * List customer profiles matching the given attributes * + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) - * @param string $entity The name of the entity type that was exported. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20039 + * @return \TalonOne\Client\Model\InlineResponse20024 */ - public function getExports($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getCustomersByAttributes($body, $pageSize = 1000, $skip = null, $sandbox = false) { - list($response) = $this->getExportsWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity); + list($response) = $this->getCustomersByAttributesWithHttpInfo($body, $pageSize, $skip, $sandbox); return $response; } /** - * Operation getExportsWithHttpInfo + * Operation getCustomersByAttributesWithHttpInfo * - * Get exports + * List customer profiles matching the given attributes * + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) - * @param string $entity The name of the entity type that was exported. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20039, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20024, HTTP status code, HTTP response headers (array of strings) */ - public function getExportsWithHttpInfo($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getCustomersByAttributesWithHttpInfo($body, $pageSize = 1000, $skip = null, $sandbox = false) { - $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); + $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip, $sandbox); try { $options = $this->createHttpClientOption(); @@ -23930,20 +23982,20 @@ public function getExportsWithHttpInfo($pageSize = 1000, $skip = null, $applicat $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20039' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20024' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20039', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20024', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20039'; + $returnType = '\TalonOne\Client\Model\InlineResponse20024'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -23962,7 +24014,7 @@ public function getExportsWithHttpInfo($pageSize = 1000, $skip = null, $applicat case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20039', + '\TalonOne\Client\Model\InlineResponse20024', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -23973,22 +24025,21 @@ public function getExportsWithHttpInfo($pageSize = 1000, $skip = null, $applicat } /** - * Operation getExportsAsync + * Operation getCustomersByAttributesAsync * - * Get exports + * List customer profiles matching the given attributes * + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) - * @param string $entity The name of the entity type that was exported. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getExportsAsync($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getCustomersByAttributesAsync($body, $pageSize = 1000, $skip = null, $sandbox = false) { - return $this->getExportsAsyncWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity) + return $this->getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize, $skip, $sandbox) ->then( function ($response) { return $response[0]; @@ -23997,23 +24048,22 @@ function ($response) { } /** - * Operation getExportsAsyncWithHttpInfo + * Operation getCustomersByAttributesAsyncWithHttpInfo * - * Get exports + * List customer profiles matching the given attributes * + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) - * @param string $entity The name of the entity type that was exported. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getExportsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize = 1000, $skip = null, $sandbox = false) { - $returnType = '\TalonOne\Client\Model\InlineResponse20039'; - $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); + $returnType = '\TalonOne\Client\Model\InlineResponse20024'; + $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip, $sandbox); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -24050,28 +24100,33 @@ function ($exception) { } /** - * Create request for operation 'getExports' + * Create request for operation 'getCustomersByAttributes' * + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) - * @param string $entity The name of the entity type that was exported. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getExportsRequest($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + protected function getCustomersByAttributesRequest($body, $pageSize = 1000, $skip = null, $sandbox = false) { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling getCustomersByAttributes' + ); + } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getExports, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomersByAttributes, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getExports, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomersByAttributes, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/exports'; + $resourcePath = '/v1/customer_search/no_total'; $formParams = []; $queryParams = []; $headerParams = []; @@ -24093,31 +24148,20 @@ protected function getExportsRequest($pageSize = 1000, $skip = null, $applicatio $queryParams['skip'] = $skip; } // query params - if (is_array($applicationId)) { - $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); - } - if ($applicationId !== null) { - $queryParams['applicationId'] = $applicationId; - } - // query params - if (is_array($campaignId)) { - $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); - } - if ($campaignId !== null) { - $queryParams['campaignId'] = $campaignId; - } - // query params - if (is_array($entity)) { - $entity = ObjectSerializer::serializeCollection($entity, '', true); + if (is_array($sandbox)) { + $sandbox = ObjectSerializer::serializeCollection($sandbox, '', true); } - if ($entity !== null) { - $queryParams['entity'] = $entity; + if ($sandbox !== null) { + $queryParams['sandbox'] = $sandbox; } // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -24126,7 +24170,7 @@ protected function getExportsRequest($pageSize = 1000, $skip = null, $applicatio } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -24183,7 +24227,7 @@ protected function getExportsRequest($pageSize = 1000, $skip = null, $applicatio $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -24191,38 +24235,44 @@ protected function getExportsRequest($pageSize = 1000, $skip = null, $applicatio } /** - * Operation getLoyaltyCard + * Operation getEventTypes * - * Get loyalty card + * List event types * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) + * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse20038 */ - public function getLoyaltyCard($loyaltyProgramId, $loyaltyCardId) + public function getEventTypes($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId); + list($response) = $this->getEventTypesWithHttpInfo($name, $includeOldVersions, $pageSize, $skip, $sort); return $response; } /** - * Operation getLoyaltyCardWithHttpInfo + * Operation getEventTypesWithHttpInfo * - * Get loyalty card + * List event types * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) + * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20038, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId) + public function getEventTypesWithHttpInfo($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId); + $request = $this->getEventTypesRequest($name, $includeOldVersions, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -24255,56 +24305,20 @@ public function getLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\LoyaltyCard' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyCard', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20038' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20038', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\LoyaltyCard'; + $returnType = '\TalonOne\Client\Model\InlineResponse20038'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -24323,31 +24337,7 @@ public function getLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\LoyaltyCard', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\InlineResponse20038', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -24358,19 +24348,22 @@ public function getLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId) } /** - * Operation getLoyaltyCardAsync + * Operation getEventTypesAsync * - * Get loyalty card + * List event types * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) + * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyCardAsync($loyaltyProgramId, $loyaltyCardId) + public function getEventTypesAsync($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) { - return $this->getLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId) + return $this->getEventTypesAsyncWithHttpInfo($name, $includeOldVersions, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -24379,20 +24372,23 @@ function ($response) { } /** - * Operation getLoyaltyCardAsyncWithHttpInfo + * Operation getEventTypesAsyncWithHttpInfo * - * Get loyalty card + * List event types * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) + * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId) + public function getEventTypesAsyncWithHttpInfo($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\LoyaltyCard'; - $request = $this->getLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId); + $returnType = '\TalonOne\Client\Model\InlineResponse20038'; + $request = $this->getEventTypesRequest($name, $includeOldVersions, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -24429,58 +24425,71 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyCard' + * Create request for operation 'getEventTypes' * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) + * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId) + protected function getEventTypesRequest($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) { - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCard' - ); - } - // verify the required parameter 'loyaltyCardId' is set - if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyCardId when calling getLoyaltyCard' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getEventTypes, must be smaller than or equal to 1000.'); } - if (strlen($loyaltyCardId) > 108) { - throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.getLoyaltyCard, must be smaller than or equal to 108.'); + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getEventTypes, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}'; + $resourcePath = '/v1/event_types'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - - - // path params - if ($loyaltyProgramId !== null) { - $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), - $resourcePath - ); + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); } - // path params - if ($loyaltyCardId !== null) { - $resourcePath = str_replace( - '{' . 'loyaltyCardId' . '}', - ObjectSerializer::toPathValue($loyaltyCardId), - $resourcePath - ); + if ($name !== null) { + $queryParams['name'] = $name; + } + // query params + if (is_array($includeOldVersions)) { + $includeOldVersions = ObjectSerializer::serializeCollection($includeOldVersions, '', true); + } + if ($includeOldVersions !== null) { + $queryParams['includeOldVersions'] = $includeOldVersions; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + + // body params $_tempBody = null; @@ -24557,48 +24566,44 @@ protected function getLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId) } /** - * Operation getLoyaltyCardTransactionLogs + * Operation getExports * - * List card's transactions + * Get exports * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20014|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse20041 */ - public function getLoyaltyCardTransactionLogs($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) + public function getExports($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - list($response) = $this->getLoyaltyCardTransactionLogsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId); + list($response) = $this->getExportsWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity); return $response; } /** - * Operation getLoyaltyCardTransactionLogsWithHttpInfo + * Operation getExportsWithHttpInfo * - * List card's transactions + * Get exports * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20014|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20041, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyCardTransactionLogsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) + public function getExportsWithHttpInfo($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - $request = $this->getLoyaltyCardTransactionLogsRequest($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId); + $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); try { $options = $this->createHttpClientOption(); @@ -24631,44 +24636,20 @@ public function getLoyaltyCardTransactionLogsWithHttpInfo($loyaltyProgramId, $lo $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20014' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20014', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20041' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20041', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20014'; + $returnType = '\TalonOne\Client\Model\InlineResponse20041'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -24687,23 +24668,7 @@ public function getLoyaltyCardTransactionLogsWithHttpInfo($loyaltyProgramId, $lo case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20014', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\InlineResponse20041', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -24714,24 +24679,22 @@ public function getLoyaltyCardTransactionLogsWithHttpInfo($loyaltyProgramId, $lo } /** - * Operation getLoyaltyCardTransactionLogsAsync + * Operation getExportsAsync * - * List card's transactions + * Get exports * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyCardTransactionLogsAsync($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) + public function getExportsAsync($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - return $this->getLoyaltyCardTransactionLogsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId) + return $this->getExportsAsyncWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity) ->then( function ($response) { return $response[0]; @@ -24740,25 +24703,23 @@ function ($response) { } /** - * Operation getLoyaltyCardTransactionLogsAsyncWithHttpInfo + * Operation getExportsAsyncWithHttpInfo * - * List card's transactions + * Get exports * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyCardTransactionLogsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) + public function getExportsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20014'; - $request = $this->getLoyaltyCardTransactionLogsRequest($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId); + $returnType = '\TalonOne\Client\Model\InlineResponse20041'; + $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -24795,66 +24756,34 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyCardTransactionLogs' + * Create request for operation 'getExports' * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyCardTransactionLogsRequest($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) + protected function getExportsRequest($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCardTransactionLogs' - ); - } - // verify the required parameter 'loyaltyCardId' is set - if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyCardId when calling getLoyaltyCardTransactionLogs' - ); - } - if (strlen($loyaltyCardId) > 108) { - throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.getLoyaltyCardTransactionLogs, must be smaller than or equal to 108.'); - } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCardTransactionLogs, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getExports, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCardTransactionLogs, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getExports, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs'; + $resourcePath = '/v1/exports'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($startDate)) { - $startDate = ObjectSerializer::serializeCollection($startDate, '', true); - } - if ($startDate !== null) { - $queryParams['startDate'] = $startDate; - } - // query params - if (is_array($endDate)) { - $endDate = ObjectSerializer::serializeCollection($endDate, '', true); - } - if ($endDate !== null) { - $queryParams['endDate'] = $endDate; - } // query params if (is_array($pageSize)) { $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); @@ -24870,30 +24799,28 @@ protected function getLoyaltyCardTransactionLogsRequest($loyaltyProgramId, $loya $queryParams['skip'] = $skip; } // query params - if (is_array($subledgerId)) { - $subledgerId = ObjectSerializer::serializeCollection($subledgerId, '', true); + if (is_array($applicationId)) { + $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); } - if ($subledgerId !== null) { - $queryParams['subledgerId'] = $subledgerId; + if ($applicationId !== null) { + $queryParams['applicationId'] = $applicationId; } - - - // path params - if ($loyaltyProgramId !== null) { - $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), - $resourcePath - ); + // query params + if (is_array($campaignId)) { + $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); } - // path params - if ($loyaltyCardId !== null) { - $resourcePath = str_replace( - '{' . 'loyaltyCardId' . '}', - ObjectSerializer::toPathValue($loyaltyCardId), - $resourcePath - ); + if ($campaignId !== null) { + $queryParams['campaignId'] = $campaignId; + } + // query params + if (is_array($entity)) { + $entity = ObjectSerializer::serializeCollection($entity, '', true); } + if ($entity !== null) { + $queryParams['entity'] = $entity; + } + + // body params $_tempBody = null; @@ -24970,46 +24897,38 @@ protected function getLoyaltyCardTransactionLogsRequest($loyaltyProgramId, $loya } /** - * Operation getLoyaltyCards + * Operation getLoyaltyCard * - * List loyalty cards + * Get loyalty card * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $identifier Optional query parameter to search cards by identifier. (optional) - * @param int $profileId Filter by the profile ID. (optional) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20013|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getLoyaltyCards($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) + public function getLoyaltyCard($loyaltyProgramId, $loyaltyCardId) { - list($response) = $this->getLoyaltyCardsWithHttpInfo($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId); + list($response) = $this->getLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId); return $response; } /** - * Operation getLoyaltyCardsWithHttpInfo + * Operation getLoyaltyCardWithHttpInfo * - * List loyalty cards + * Get loyalty card * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $identifier Optional query parameter to search cards by identifier. (optional) - * @param int $profileId Filter by the profile ID. (optional) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20013|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyCardsWithHttpInfo($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) + public function getLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId) { - $request = $this->getLoyaltyCardsRequest($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId); + $request = $this->getLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId); try { $options = $this->createHttpClientOption(); @@ -25042,14 +24961,14 @@ public function getLoyaltyCardsWithHttpInfo($loyaltyProgramId, $pageSize = 1000, $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20013' === '\SplFileObject') { + if ('\TalonOne\Client\Model\LoyaltyCard' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20013', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyCard', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -25072,6 +24991,18 @@ public function getLoyaltyCardsWithHttpInfo($loyaltyProgramId, $pageSize = 1000, $content = (string) $responseBody; } + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + return [ ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), @@ -25079,7 +25010,7 @@ public function getLoyaltyCardsWithHttpInfo($loyaltyProgramId, $pageSize = 1000, ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20013'; + $returnType = '\TalonOne\Client\Model\LoyaltyCard'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -25098,7 +25029,7 @@ public function getLoyaltyCardsWithHttpInfo($loyaltyProgramId, $pageSize = 1000, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20013', + '\TalonOne\Client\Model\LoyaltyCard', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -25119,29 +25050,33 @@ public function getLoyaltyCardsWithHttpInfo($loyaltyProgramId, $pageSize = 1000, ); $e->setResponseObject($data); break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation getLoyaltyCardsAsync + * Operation getLoyaltyCardAsync * - * List loyalty cards + * Get loyalty card * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $identifier Optional query parameter to search cards by identifier. (optional) - * @param int $profileId Filter by the profile ID. (optional) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyCardsAsync($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) + public function getLoyaltyCardAsync($loyaltyProgramId, $loyaltyCardId) { - return $this->getLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId) + return $this->getLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId) ->then( function ($response) { return $response[0]; @@ -25150,24 +25085,20 @@ function ($response) { } /** - * Operation getLoyaltyCardsAsyncWithHttpInfo + * Operation getLoyaltyCardAsyncWithHttpInfo * - * List loyalty cards + * Get loyalty card * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $identifier Optional query parameter to search cards by identifier. (optional) - * @param int $profileId Filter by the profile ID. (optional) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) + public function getLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20013'; - $request = $this->getLoyaltyCardsRequest($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId); + $returnType = '\TalonOne\Client\Model\LoyaltyCard'; + $request = $this->getLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -25204,84 +25135,40 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyCards' + * Create request for operation 'getLoyaltyCard' * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $identifier Optional query parameter to search cards by identifier. (optional) - * @param int $profileId Filter by the profile ID. (optional) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyCardsRequest($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) + protected function getLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCards' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCard' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCards, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCards, must be bigger than or equal to 1.'); - } - - if ($identifier !== null && strlen($identifier) < 4) { - throw new \InvalidArgumentException('invalid length for "$identifier" when calling ManagementApi.getLoyaltyCards, must be bigger than or equal to 4.'); + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyCardId when calling getLoyaltyCard' + ); } - - if ($profileId !== null && $profileId < 1) { - throw new \InvalidArgumentException('invalid value for "$profileId" when calling ManagementApi.getLoyaltyCards, must be bigger than or equal to 1.'); + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.getLoyaltyCard, must be smaller than or equal to 108.'); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($identifier)) { - $identifier = ObjectSerializer::serializeCollection($identifier, '', true); - } - if ($identifier !== null) { - $queryParams['identifier'] = $identifier; - } - // query params - if (is_array($profileId)) { - $profileId = ObjectSerializer::serializeCollection($profileId, '', true); - } - if ($profileId !== null) { - $queryParams['profileId'] = $profileId; - } // path params @@ -25292,6 +25179,14 @@ protected function getLoyaltyCardsRequest($loyaltyProgramId, $pageSize = 1000, $ $resourcePath ); } + // path params + if ($loyaltyCardId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -25368,38 +25263,48 @@ protected function getLoyaltyCardsRequest($loyaltyProgramId, $pageSize = 1000, $ } /** - * Operation getLoyaltyPoints + * Operation getLoyaltyCardTransactionLogs * - * Get customer's full loyalty ledger + * List card's transactions * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\LoyaltyLedger + * @return \TalonOne\Client\Model\InlineResponse20015|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getLoyaltyPoints($loyaltyProgramId, $integrationId) + public function getLoyaltyCardTransactionLogs($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) { - list($response) = $this->getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId); + list($response) = $this->getLoyaltyCardTransactionLogsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId); return $response; } /** - * Operation getLoyaltyPointsWithHttpInfo + * Operation getLoyaltyCardTransactionLogsWithHttpInfo * - * Get customer's full loyalty ledger + * List card's transactions * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\LoyaltyLedger, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20015|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId) + public function getLoyaltyCardTransactionLogsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) { - $request = $this->getLoyaltyPointsRequest($loyaltyProgramId, $integrationId); + $request = $this->getLoyaltyCardTransactionLogsRequest($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId); try { $options = $this->createHttpClientOption(); @@ -25432,20 +25337,44 @@ public function getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\LoyaltyLedger' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20015' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyLedger', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20015', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\LoyaltyLedger'; + $returnType = '\TalonOne\Client\Model\InlineResponse20015'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -25464,30 +25393,51 @@ public function getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\LoyaltyLedger', + '\TalonOne\Client\Model\InlineResponse20015', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - } - throw $e; - } - } - - /** - * Operation getLoyaltyPointsAsync - * - * Get customer's full loyalty ledger - * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getLoyaltyCardTransactionLogsAsync + * + * List card's transactions + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyPointsAsync($loyaltyProgramId, $integrationId) + public function getLoyaltyCardTransactionLogsAsync($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) { - return $this->getLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId) + return $this->getLoyaltyCardTransactionLogsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId) ->then( function ($response) { return $response[0]; @@ -25496,20 +25446,25 @@ function ($response) { } /** - * Operation getLoyaltyPointsAsyncWithHttpInfo + * Operation getLoyaltyCardTransactionLogsAsyncWithHttpInfo * - * Get customer's full loyalty ledger + * List card's transactions * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId) + public function getLoyaltyCardTransactionLogsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) { - $returnType = '\TalonOne\Client\Model\LoyaltyLedger'; - $request = $this->getLoyaltyPointsRequest($loyaltyProgramId, $integrationId); + $returnType = '\TalonOne\Client\Model\InlineResponse20015'; + $request = $this->getLoyaltyCardTransactionLogsRequest($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -25546,36 +25501,87 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyPoints' + * Create request for operation 'getLoyaltyCardTransactionLogs' * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyPointsRequest($loyaltyProgramId, $integrationId) + protected function getLoyaltyCardTransactionLogsRequest($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyPoints' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCardTransactionLogs' ); } - // verify the required parameter 'integrationId' is set - if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $integrationId when calling getLoyaltyPoints' + 'Missing the required parameter $loyaltyCardId when calling getLoyaltyCardTransactionLogs' ); } + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.getLoyaltyCardTransactionLogs, must be smaller than or equal to 108.'); + } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}'; + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCardTransactionLogs, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCardTransactionLogs, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($startDate)) { + $startDate = ObjectSerializer::serializeCollection($startDate, '', true); + } + if ($startDate !== null) { + $queryParams['startDate'] = $startDate; + } + // query params + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + } + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($subledgerId)) { + $subledgerId = ObjectSerializer::serializeCollection($subledgerId, '', true); + } + if ($subledgerId !== null) { + $queryParams['subledgerId'] = $subledgerId; + } // path params @@ -25587,10 +25593,10 @@ protected function getLoyaltyPointsRequest($loyaltyProgramId, $integrationId) ); } // path params - if ($integrationId !== null) { + if ($loyaltyCardId !== null) { $resourcePath = str_replace( - '{' . 'integrationId' . '}', - ObjectSerializer::toPathValue($integrationId), + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), $resourcePath ); } @@ -25670,36 +25676,46 @@ protected function getLoyaltyPointsRequest($loyaltyProgramId, $integrationId) } /** - * Operation getLoyaltyProgram + * Operation getLoyaltyCards * - * Get loyalty program + * List loyalty cards * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $identifier Optional query parameter to search cards by identifier. (optional) + * @param int $profileId Filter by the profile ID. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\LoyaltyProgram + * @return \TalonOne\Client\Model\InlineResponse20014|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getLoyaltyProgram($loyaltyProgramId) + public function getLoyaltyCards($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) { - list($response) = $this->getLoyaltyProgramWithHttpInfo($loyaltyProgramId); + list($response) = $this->getLoyaltyCardsWithHttpInfo($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId); return $response; } /** - * Operation getLoyaltyProgramWithHttpInfo + * Operation getLoyaltyCardsWithHttpInfo * - * Get loyalty program + * List loyalty cards * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $identifier Optional query parameter to search cards by identifier. (optional) + * @param int $profileId Filter by the profile ID. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\LoyaltyProgram, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20014|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyProgramWithHttpInfo($loyaltyProgramId) + public function getLoyaltyCardsWithHttpInfo($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) { - $request = $this->getLoyaltyProgramRequest($loyaltyProgramId); + $request = $this->getLoyaltyCardsRequest($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId); try { $options = $this->createHttpClientOption(); @@ -25732,20 +25748,44 @@ public function getLoyaltyProgramWithHttpInfo($loyaltyProgramId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\LoyaltyProgram' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20014' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyProgram', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20014', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\LoyaltyProgram'; + $returnType = '\TalonOne\Client\Model\InlineResponse20014'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -25764,7 +25804,23 @@ public function getLoyaltyProgramWithHttpInfo($loyaltyProgramId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\LoyaltyProgram', + '\TalonOne\Client\Model\InlineResponse20014', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -25775,18 +25831,23 @@ public function getLoyaltyProgramWithHttpInfo($loyaltyProgramId) } /** - * Operation getLoyaltyProgramAsync + * Operation getLoyaltyCardsAsync * - * Get loyalty program + * List loyalty cards * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $identifier Optional query parameter to search cards by identifier. (optional) + * @param int $profileId Filter by the profile ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramAsync($loyaltyProgramId) + public function getLoyaltyCardsAsync($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) { - return $this->getLoyaltyProgramAsyncWithHttpInfo($loyaltyProgramId) + return $this->getLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId) ->then( function ($response) { return $response[0]; @@ -25795,19 +25856,24 @@ function ($response) { } /** - * Operation getLoyaltyProgramAsyncWithHttpInfo + * Operation getLoyaltyCardsAsyncWithHttpInfo * - * Get loyalty program + * List loyalty cards * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $identifier Optional query parameter to search cards by identifier. (optional) + * @param int $profileId Filter by the profile ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramAsyncWithHttpInfo($loyaltyProgramId) + public function getLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) { - $returnType = '\TalonOne\Client\Model\LoyaltyProgram'; - $request = $this->getLoyaltyProgramRequest($loyaltyProgramId); + $returnType = '\TalonOne\Client\Model\InlineResponse20014'; + $request = $this->getLoyaltyCardsRequest($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -25844,29 +25910,84 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyProgram' + * Create request for operation 'getLoyaltyCards' * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $identifier Optional query parameter to search cards by identifier. (optional) + * @param int $profileId Filter by the profile ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyProgramRequest($loyaltyProgramId) + protected function getLoyaltyCardsRequest($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyProgram' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCards' ); } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCards, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCards, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}'; + if ($identifier !== null && strlen($identifier) < 4) { + throw new \InvalidArgumentException('invalid length for "$identifier" when calling ManagementApi.getLoyaltyCards, must be bigger than or equal to 4.'); + } + + if ($profileId !== null && $profileId < 1) { + throw new \InvalidArgumentException('invalid value for "$profileId" when calling ManagementApi.getLoyaltyCards, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($identifier)) { + $identifier = ObjectSerializer::serializeCollection($identifier, '', true); + } + if ($identifier !== null) { + $queryParams['identifier'] = $identifier; + } + // query params + if (is_array($profileId)) { + $profileId = ObjectSerializer::serializeCollection($profileId, '', true); + } + if ($profileId !== null) { + $queryParams['profileId'] = $profileId; + } // path params @@ -25953,48 +26074,38 @@ protected function getLoyaltyProgramRequest($loyaltyProgramId) } /** - * Operation getLoyaltyProgramTransactions + * Operation getLoyaltyPoints * - * List loyalty program transactions + * Get customer's full loyalty ledger * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) - * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 50) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20012|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\LoyaltyLedger */ - public function getLoyaltyProgramTransactions($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + public function getLoyaltyPoints($loyaltyProgramId, $integrationId) { - list($response) = $this->getLoyaltyProgramTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip); + list($response) = $this->getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId); return $response; } /** - * Operation getLoyaltyProgramTransactionsWithHttpInfo + * Operation getLoyaltyPointsWithHttpInfo * - * List loyalty program transactions + * Get customer's full loyalty ledger * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) - * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 50) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20012|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\LoyaltyLedger, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyProgramTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + public function getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId) { - $request = $this->getLoyaltyProgramTransactionsRequest($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip); + $request = $this->getLoyaltyPointsRequest($loyaltyProgramId, $integrationId); try { $options = $this->createHttpClientOption(); @@ -26027,56 +26138,20 @@ public function getLoyaltyProgramTransactionsWithHttpInfo($loyaltyProgramId, $lo $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20012' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20012', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\LoyaltyLedger' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyLedger', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20012'; + $returnType = '\TalonOne\Client\Model\LoyaltyLedger'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -26095,31 +26170,7 @@ public function getLoyaltyProgramTransactionsWithHttpInfo($loyaltyProgramId, $lo case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20012', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\LoyaltyLedger', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -26130,24 +26181,19 @@ public function getLoyaltyProgramTransactionsWithHttpInfo($loyaltyProgramId, $lo } /** - * Operation getLoyaltyProgramTransactionsAsync + * Operation getLoyaltyPointsAsync * - * List loyalty program transactions + * Get customer's full loyalty ledger * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) - * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 50) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramTransactionsAsync($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + public function getLoyaltyPointsAsync($loyaltyProgramId, $integrationId) { - return $this->getLoyaltyProgramTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip) + return $this->getLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId) ->then( function ($response) { return $response[0]; @@ -26156,25 +26202,20 @@ function ($response) { } /** - * Operation getLoyaltyProgramTransactionsAsyncWithHttpInfo + * Operation getLoyaltyPointsAsyncWithHttpInfo * - * List loyalty program transactions + * Get customer's full loyalty ledger * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) - * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 50) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + public function getLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20012'; - $request = $this->getLoyaltyProgramTransactionsRequest($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\LoyaltyLedger'; + $request = $this->getLoyaltyPointsRequest($loyaltyProgramId, $integrationId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -26211,88 +26252,36 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyProgramTransactions' + * Create request for operation 'getLoyaltyPoints' * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) - * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) - * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 50) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyProgramTransactionsRequest($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + protected function getLoyaltyPointsRequest($loyaltyProgramId, $integrationId) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyProgramTransactions' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyPoints' ); } - if ($loyaltyTransactionType !== null && strlen($loyaltyTransactionType) > 255) { - throw new \InvalidArgumentException('invalid length for "$loyaltyTransactionType" when calling ManagementApi.getLoyaltyProgramTransactions, must be smaller than or equal to 255.'); - } - - if ($pageSize !== null && $pageSize > 50) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyProgramTransactions, must be smaller than or equal to 50.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyProgramTransactions, must be bigger than or equal to 1.'); + // verify the required parameter 'integrationId' is set + if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $integrationId when calling getLoyaltyPoints' + ); } - - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/transactions'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($loyaltyTransactionType)) { - $loyaltyTransactionType = ObjectSerializer::serializeCollection($loyaltyTransactionType, '', true); - } - if ($loyaltyTransactionType !== null) { - $queryParams['loyaltyTransactionType'] = $loyaltyTransactionType; - } - // query params - if (is_array($subledgerId)) { - $subledgerId = ObjectSerializer::serializeCollection($subledgerId, '', true); - } - if ($subledgerId !== null) { - $queryParams['subledgerId'] = $subledgerId; - } - // query params - if (is_array($startDate)) { - $startDate = ObjectSerializer::serializeCollection($startDate, '', true); - } - if ($startDate !== null) { - $queryParams['startDate'] = $startDate; - } - // query params - if (is_array($endDate)) { - $endDate = ObjectSerializer::serializeCollection($endDate, '', true); - } - if ($endDate !== null) { - $queryParams['endDate'] = $endDate; - } - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } // path params @@ -26303,6 +26292,14 @@ protected function getLoyaltyProgramTransactionsRequest($loyaltyProgramId, $loya $resourcePath ); } + // path params + if ($integrationId !== null) { + $resourcePath = str_replace( + '{' . 'integrationId' . '}', + ObjectSerializer::toPathValue($integrationId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -26379,34 +26376,36 @@ protected function getLoyaltyProgramTransactionsRequest($loyaltyProgramId, $loya } /** - * Operation getLoyaltyPrograms + * Operation getLoyaltyProgram * - * List loyalty programs + * Get loyalty program * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20011 + * @return \TalonOne\Client\Model\LoyaltyProgram */ - public function getLoyaltyPrograms() + public function getLoyaltyProgram($loyaltyProgramId) { - list($response) = $this->getLoyaltyProgramsWithHttpInfo(); + list($response) = $this->getLoyaltyProgramWithHttpInfo($loyaltyProgramId); return $response; } /** - * Operation getLoyaltyProgramsWithHttpInfo + * Operation getLoyaltyProgramWithHttpInfo * - * List loyalty programs + * Get loyalty program * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20011, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\LoyaltyProgram, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyProgramsWithHttpInfo() + public function getLoyaltyProgramWithHttpInfo($loyaltyProgramId) { - $request = $this->getLoyaltyProgramsRequest(); + $request = $this->getLoyaltyProgramRequest($loyaltyProgramId); try { $options = $this->createHttpClientOption(); @@ -26439,20 +26438,20 @@ public function getLoyaltyProgramsWithHttpInfo() $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20011' === '\SplFileObject') { + if ('\TalonOne\Client\Model\LoyaltyProgram' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20011', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyProgram', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20011'; + $returnType = '\TalonOne\Client\Model\LoyaltyProgram'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -26471,7 +26470,7 @@ public function getLoyaltyProgramsWithHttpInfo() case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20011', + '\TalonOne\Client\Model\LoyaltyProgram', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -26482,17 +26481,18 @@ public function getLoyaltyProgramsWithHttpInfo() } /** - * Operation getLoyaltyProgramsAsync + * Operation getLoyaltyProgramAsync * - * List loyalty programs + * Get loyalty program * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramsAsync() + public function getLoyaltyProgramAsync($loyaltyProgramId) { - return $this->getLoyaltyProgramsAsyncWithHttpInfo() + return $this->getLoyaltyProgramAsyncWithHttpInfo($loyaltyProgramId) ->then( function ($response) { return $response[0]; @@ -26501,18 +26501,19 @@ function ($response) { } /** - * Operation getLoyaltyProgramsAsyncWithHttpInfo + * Operation getLoyaltyProgramAsyncWithHttpInfo * - * List loyalty programs + * Get loyalty program * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramsAsyncWithHttpInfo() + public function getLoyaltyProgramAsyncWithHttpInfo($loyaltyProgramId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20011'; - $request = $this->getLoyaltyProgramsRequest(); + $returnType = '\TalonOne\Client\Model\LoyaltyProgram'; + $request = $this->getLoyaltyProgramRequest($loyaltyProgramId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -26549,16 +26550,23 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyPrograms' + * Create request for operation 'getLoyaltyProgram' * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyProgramsRequest() + protected function getLoyaltyProgramRequest($loyaltyProgramId) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyProgram' + ); + } - $resourcePath = '/v1/loyalty_programs'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -26567,6 +26575,14 @@ protected function getLoyaltyProgramsRequest() + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -26643,36 +26659,48 @@ protected function getLoyaltyProgramsRequest() } /** - * Operation getLoyaltyStatistics + * Operation getLoyaltyProgramTransactions * - * Get loyalty program statistics + * List loyalty program transactions * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\LoyaltyStatistics + * @return \TalonOne\Client\Model\InlineResponse20013|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getLoyaltyStatistics($loyaltyProgramId) + public function getLoyaltyProgramTransactions($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - list($response) = $this->getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId); + list($response) = $this->getLoyaltyProgramTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip); return $response; } /** - * Operation getLoyaltyStatisticsWithHttpInfo + * Operation getLoyaltyProgramTransactionsWithHttpInfo * - * Get loyalty program statistics + * List loyalty program transactions * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\LoyaltyStatistics, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20013|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId) + public function getLoyaltyProgramTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - $request = $this->getLoyaltyStatisticsRequest($loyaltyProgramId); + $request = $this->getLoyaltyProgramTransactionsRequest($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -26705,20 +26733,56 @@ public function getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\LoyaltyStatistics' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20013' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20013', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyStatistics', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\LoyaltyStatistics'; + $returnType = '\TalonOne\Client\Model\InlineResponse20013'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -26737,7 +26801,31 @@ public function getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\LoyaltyStatistics', + '\TalonOne\Client\Model\InlineResponse20013', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -26748,18 +26836,24 @@ public function getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId) } /** - * Operation getLoyaltyStatisticsAsync + * Operation getLoyaltyProgramTransactionsAsync * - * Get loyalty program statistics + * List loyalty program transactions * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyStatisticsAsync($loyaltyProgramId) + public function getLoyaltyProgramTransactionsAsync($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - return $this->getLoyaltyStatisticsAsyncWithHttpInfo($loyaltyProgramId) + return $this->getLoyaltyProgramTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -26768,19 +26862,25 @@ function ($response) { } /** - * Operation getLoyaltyStatisticsAsyncWithHttpInfo + * Operation getLoyaltyProgramTransactionsAsyncWithHttpInfo * - * Get loyalty program statistics + * List loyalty program transactions * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyStatisticsAsyncWithHttpInfo($loyaltyProgramId) + public function getLoyaltyProgramTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - $returnType = '\TalonOne\Client\Model\LoyaltyStatistics'; - $request = $this->getLoyaltyStatisticsRequest($loyaltyProgramId); + $returnType = '\TalonOne\Client\Model\InlineResponse20013'; + $request = $this->getLoyaltyProgramTransactionsRequest($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -26817,29 +26917,84 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyStatistics' + * Create request for operation 'getLoyaltyProgramTransactions' * * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyStatisticsRequest($loyaltyProgramId) + protected function getLoyaltyProgramTransactionsRequest($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyStatistics' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyProgramTransactions' ); } + if ($pageSize !== null && $pageSize > 50) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyProgramTransactions, must be smaller than or equal to 50.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyProgramTransactions, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/statistics'; + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/transactions'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($loyaltyTransactionType)) { + $loyaltyTransactionType = ObjectSerializer::serializeCollection($loyaltyTransactionType, '', true); + } + if ($loyaltyTransactionType !== null) { + $queryParams['loyaltyTransactionType'] = $loyaltyTransactionType; + } + // query params + if (is_array($subledgerId)) { + $subledgerId = ObjectSerializer::serializeCollection($subledgerId, '', true); + } + if ($subledgerId !== null) { + $queryParams['subledgerId'] = $subledgerId; + } + // query params + if (is_array($startDate)) { + $startDate = ObjectSerializer::serializeCollection($startDate, '', true); + } + if ($startDate !== null) { + $queryParams['startDate'] = $startDate; + } + // query params + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + } + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } // path params @@ -26926,38 +27081,34 @@ protected function getLoyaltyStatisticsRequest($loyaltyProgramId) } /** - * Operation getNotificationWebhook + * Operation getLoyaltyPrograms * - * Get notification about campaign-related changes + * List loyalty programs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\NotificationWebhook + * @return \TalonOne\Client\Model\InlineResponse20012 */ - public function getNotificationWebhook($applicationId, $notificationWebhookId) + public function getLoyaltyPrograms() { - list($response) = $this->getNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId); + list($response) = $this->getLoyaltyProgramsWithHttpInfo(); return $response; } /** - * Operation getNotificationWebhookWithHttpInfo + * Operation getLoyaltyProgramsWithHttpInfo * - * Get notification about campaign-related changes + * List loyalty programs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\NotificationWebhook, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20012, HTTP status code, HTTP response headers (array of strings) */ - public function getNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId) + public function getLoyaltyProgramsWithHttpInfo() { - $request = $this->getNotificationWebhookRequest($applicationId, $notificationWebhookId); + $request = $this->getLoyaltyProgramsRequest(); try { $options = $this->createHttpClientOption(); @@ -26990,20 +27141,20 @@ public function getNotificationWebhookWithHttpInfo($applicationId, $notification $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\NotificationWebhook' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20012' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\NotificationWebhook', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20012', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\NotificationWebhook'; + $returnType = '\TalonOne\Client\Model\InlineResponse20012'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -27022,7 +27173,7 @@ public function getNotificationWebhookWithHttpInfo($applicationId, $notification case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\NotificationWebhook', + '\TalonOne\Client\Model\InlineResponse20012', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -27033,19 +27184,17 @@ public function getNotificationWebhookWithHttpInfo($applicationId, $notification } /** - * Operation getNotificationWebhookAsync + * Operation getLoyaltyProgramsAsync * - * Get notification about campaign-related changes + * List loyalty programs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationWebhookAsync($applicationId, $notificationWebhookId) + public function getLoyaltyProgramsAsync() { - return $this->getNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) + return $this->getLoyaltyProgramsAsyncWithHttpInfo() ->then( function ($response) { return $response[0]; @@ -27054,20 +27203,18 @@ function ($response) { } /** - * Operation getNotificationWebhookAsyncWithHttpInfo + * Operation getLoyaltyProgramsAsyncWithHttpInfo * - * Get notification about campaign-related changes + * List loyalty programs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) + public function getLoyaltyProgramsAsyncWithHttpInfo() { - $returnType = '\TalonOne\Client\Model\NotificationWebhook'; - $request = $this->getNotificationWebhookRequest($applicationId, $notificationWebhookId); + $returnType = '\TalonOne\Client\Model\InlineResponse20012'; + $request = $this->getLoyaltyProgramsRequest(); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -27104,30 +27251,16 @@ function ($exception) { } /** - * Create request for operation 'getNotificationWebhook' + * Create request for operation 'getLoyaltyPrograms' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getNotificationWebhookRequest($applicationId, $notificationWebhookId) + protected function getLoyaltyProgramsRequest() { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getNotificationWebhook' - ); - } - // verify the required parameter 'notificationWebhookId' is set - if ($notificationWebhookId === null || (is_array($notificationWebhookId) && count($notificationWebhookId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $notificationWebhookId when calling getNotificationWebhook' - ); - } - $resourcePath = '/v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}'; + $resourcePath = '/v1/loyalty_programs'; $formParams = []; $queryParams = []; $headerParams = []; @@ -27136,22 +27269,6 @@ protected function getNotificationWebhookRequest($applicationId, $notificationWe - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($notificationWebhookId !== null) { - $resourcePath = str_replace( - '{' . 'notificationWebhookId' . '}', - ObjectSerializer::toPathValue($notificationWebhookId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -27228,36 +27345,36 @@ protected function getNotificationWebhookRequest($applicationId, $notificationWe } /** - * Operation getNotificationWebhooks + * Operation getLoyaltyStatistics * - * List notifications about campaign-related changes + * Get loyalty program statistics * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2005 + * @return \TalonOne\Client\Model\LoyaltyDashboardData */ - public function getNotificationWebhooks($applicationId) + public function getLoyaltyStatistics($loyaltyProgramId) { - list($response) = $this->getNotificationWebhooksWithHttpInfo($applicationId); + list($response) = $this->getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId); return $response; } /** - * Operation getNotificationWebhooksWithHttpInfo + * Operation getLoyaltyStatisticsWithHttpInfo * - * List notifications about campaign-related changes + * Get loyalty program statistics * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2005, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\LoyaltyDashboardData, HTTP status code, HTTP response headers (array of strings) */ - public function getNotificationWebhooksWithHttpInfo($applicationId) + public function getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId) { - $request = $this->getNotificationWebhooksRequest($applicationId); + $request = $this->getLoyaltyStatisticsRequest($loyaltyProgramId); try { $options = $this->createHttpClientOption(); @@ -27290,20 +27407,20 @@ public function getNotificationWebhooksWithHttpInfo($applicationId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2005' === '\SplFileObject') { + if ('\TalonOne\Client\Model\LoyaltyDashboardData' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2005', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyDashboardData', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2005'; + $returnType = '\TalonOne\Client\Model\LoyaltyDashboardData'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -27322,7 +27439,7 @@ public function getNotificationWebhooksWithHttpInfo($applicationId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2005', + '\TalonOne\Client\Model\LoyaltyDashboardData', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -27333,18 +27450,18 @@ public function getNotificationWebhooksWithHttpInfo($applicationId) } /** - * Operation getNotificationWebhooksAsync + * Operation getLoyaltyStatisticsAsync * - * List notifications about campaign-related changes + * Get loyalty program statistics * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationWebhooksAsync($applicationId) + public function getLoyaltyStatisticsAsync($loyaltyProgramId) { - return $this->getNotificationWebhooksAsyncWithHttpInfo($applicationId) + return $this->getLoyaltyStatisticsAsyncWithHttpInfo($loyaltyProgramId) ->then( function ($response) { return $response[0]; @@ -27353,19 +27470,19 @@ function ($response) { } /** - * Operation getNotificationWebhooksAsyncWithHttpInfo + * Operation getLoyaltyStatisticsAsyncWithHttpInfo * - * List notifications about campaign-related changes + * Get loyalty program statistics * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationWebhooksAsyncWithHttpInfo($applicationId) + public function getLoyaltyStatisticsAsyncWithHttpInfo($loyaltyProgramId) { - $returnType = '\TalonOne\Client\Model\InlineResponse2005'; - $request = $this->getNotificationWebhooksRequest($applicationId); + $returnType = '\TalonOne\Client\Model\LoyaltyDashboardData'; + $request = $this->getLoyaltyStatisticsRequest($loyaltyProgramId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -27402,23 +27519,23 @@ function ($exception) { } /** - * Create request for operation 'getNotificationWebhooks' + * Create request for operation 'getLoyaltyStatistics' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getNotificationWebhooksRequest($applicationId) + protected function getLoyaltyStatisticsRequest($loyaltyProgramId) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getNotificationWebhooks' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyStatistics' ); } - $resourcePath = '/v1/applications/{applicationId}/notification_webhooks'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/statistics'; $formParams = []; $queryParams = []; $headerParams = []; @@ -27428,10 +27545,10 @@ protected function getNotificationWebhooksRequest($applicationId) // path params - if ($applicationId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } @@ -27518,7 +27635,7 @@ protected function getNotificationWebhooksRequest($applicationId) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -27529,7 +27646,7 @@ protected function getNotificationWebhooksRequest($applicationId) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2009 + * @return \TalonOne\Client\Model\InlineResponse20010 */ public function getReferralsWithoutTotalCount($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) { @@ -27545,7 +27662,7 @@ public function getReferralsWithoutTotalCount($applicationId, $campaignId, $page * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -27556,7 +27673,7 @@ public function getReferralsWithoutTotalCount($applicationId, $campaignId, $page * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20010, HTTP status code, HTTP response headers (array of strings) */ public function getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) { @@ -27593,20 +27710,20 @@ public function getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campa $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2009' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20010' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2009', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20010', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2009'; + $returnType = '\TalonOne\Client\Model\InlineResponse20010'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -27625,7 +27742,7 @@ public function getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campa case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2009', + '\TalonOne\Client\Model\InlineResponse20010', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -27643,7 +27760,7 @@ public function getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campa * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -27673,7 +27790,7 @@ function ($response) { * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -27687,7 +27804,7 @@ function ($response) { */ public function getReferralsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2009'; + $returnType = '\TalonOne\Client\Model\InlineResponse20010'; $request = $this->getReferralsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate); return $this->client @@ -27730,7 +27847,7 @@ function ($exception) { * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -27932,7 +28049,7 @@ protected function getReferralsWithoutTotalCountRequest($applicationId, $campaig * * Get role * - * @param int $roleId The Id of role. (required) + * @param int $roleId The ID of role. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -27949,7 +28066,7 @@ public function getRole($roleId) * * Get role * - * @param int $roleId The Id of role. (required) + * @param int $roleId The ID of role. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -28037,7 +28154,7 @@ public function getRoleWithHttpInfo($roleId) * * Get role * - * @param int $roleId The Id of role. (required) + * @param int $roleId The ID of role. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -28057,7 +28174,7 @@ function ($response) { * * Get role * - * @param int $roleId The Id of role. (required) + * @param int $roleId The ID of role. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -28104,7 +28221,7 @@ function ($exception) { /** * Create request for operation 'getRole' * - * @param int $roleId The Id of role. (required) + * @param int $roleId The ID of role. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -28539,12 +28656,12 @@ protected function getRulesetRequest($applicationId, $campaignId, $rulesetId) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2006 + * @return \TalonOne\Client\Model\InlineResponse2007 */ public function getRulesets($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null) { @@ -28560,12 +28677,12 @@ public function getRulesets($applicationId, $campaignId, $pageSize = 1000, $skip * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) */ public function getRulesetsWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null) { @@ -28602,20 +28719,20 @@ public function getRulesetsWithHttpInfo($applicationId, $campaignId, $pageSize = $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2006' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2007' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2006', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2007', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2006'; + $returnType = '\TalonOne\Client\Model\InlineResponse2007'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -28634,7 +28751,7 @@ public function getRulesetsWithHttpInfo($applicationId, $campaignId, $pageSize = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2006', + '\TalonOne\Client\Model\InlineResponse2007', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -28652,7 +28769,7 @@ public function getRulesetsWithHttpInfo($applicationId, $campaignId, $pageSize = * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException @@ -28676,7 +28793,7 @@ function ($response) { * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException @@ -28684,7 +28801,7 @@ function ($response) { */ public function getRulesetsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2006'; + $returnType = '\TalonOne\Client\Model\InlineResponse2007'; $request = $this->getRulesetsRequest($applicationId, $campaignId, $pageSize, $skip, $sort); return $this->client @@ -28727,7 +28844,7 @@ function ($exception) { * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException @@ -28877,36 +28994,38 @@ protected function getRulesetsRequest($applicationId, $campaignId, $pageSize = 1 } /** - * Operation getUser + * Operation getStore * - * Get user + * Get store * - * @param int $userId The ID of the user. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\User + * @return \TalonOne\Client\Model\Store|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getUser($userId) + public function getStore($applicationId, $storeId) { - list($response) = $this->getUserWithHttpInfo($userId); + list($response) = $this->getStoreWithHttpInfo($applicationId, $storeId); return $response; } /** - * Operation getUserWithHttpInfo + * Operation getStoreWithHttpInfo * - * Get user + * Get store * - * @param int $userId The ID of the user. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\User, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Store|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getUserWithHttpInfo($userId) + public function getStoreWithHttpInfo($applicationId, $storeId) { - $request = $this->getUserRequest($userId); + $request = $this->getStoreRequest($applicationId, $storeId); try { $options = $this->createHttpClientOption(); @@ -28939,20 +29058,32 @@ public function getUserWithHttpInfo($userId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\User' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Store' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\User', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Store', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\User'; + $returnType = '\TalonOne\Client\Model\Store'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -28971,7 +29102,15 @@ public function getUserWithHttpInfo($userId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\User', + '\TalonOne\Client\Model\Store', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -28982,18 +29121,19 @@ public function getUserWithHttpInfo($userId) } /** - * Operation getUserAsync + * Operation getStoreAsync * - * Get user + * Get store * - * @param int $userId The ID of the user. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserAsync($userId) + public function getStoreAsync($applicationId, $storeId) { - return $this->getUserAsyncWithHttpInfo($userId) + return $this->getStoreAsyncWithHttpInfo($applicationId, $storeId) ->then( function ($response) { return $response[0]; @@ -29002,19 +29142,20 @@ function ($response) { } /** - * Operation getUserAsyncWithHttpInfo + * Operation getStoreAsyncWithHttpInfo * - * Get user + * Get store * - * @param int $userId The ID of the user. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserAsyncWithHttpInfo($userId) + public function getStoreAsyncWithHttpInfo($applicationId, $storeId) { - $returnType = '\TalonOne\Client\Model\User'; - $request = $this->getUserRequest($userId); + $returnType = '\TalonOne\Client\Model\Store'; + $request = $this->getStoreRequest($applicationId, $storeId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -29051,23 +29192,30 @@ function ($exception) { } /** - * Create request for operation 'getUser' + * Create request for operation 'getStore' * - * @param int $userId The ID of the user. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getUserRequest($userId) + protected function getStoreRequest($applicationId, $storeId) { - // verify the required parameter 'userId' is set - if ($userId === null || (is_array($userId) && count($userId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $userId when calling getUser' + 'Missing the required parameter $applicationId when calling getStore' + ); + } + // verify the required parameter 'storeId' is set + if ($storeId === null || (is_array($storeId) && count($storeId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $storeId when calling getStore' ); } - $resourcePath = '/v1/users/{userId}'; + $resourcePath = '/v1/applications/{applicationId}/stores/{storeId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -29077,10 +29225,18 @@ protected function getUserRequest($userId) // path params - if ($userId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'userId' . '}', - ObjectSerializer::toPathValue($userId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($storeId !== null) { + $resourcePath = str_replace( + '{' . 'storeId' . '}', + ObjectSerializer::toPathValue($storeId), $resourcePath ); } @@ -29160,40 +29316,36 @@ protected function getUserRequest($userId) } /** - * Operation getUsers + * Operation getUser * - * List users in account + * Get user * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $userId The ID of the user. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20037 + * @return \TalonOne\Client\Model\User */ - public function getUsers($pageSize = 1000, $skip = null, $sort = null) + public function getUser($userId) { - list($response) = $this->getUsersWithHttpInfo($pageSize, $skip, $sort); + list($response) = $this->getUserWithHttpInfo($userId); return $response; } /** - * Operation getUsersWithHttpInfo + * Operation getUserWithHttpInfo * - * List users in account + * Get user * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $userId The ID of the user. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20037, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\User, HTTP status code, HTTP response headers (array of strings) */ - public function getUsersWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) + public function getUserWithHttpInfo($userId) { - $request = $this->getUsersRequest($pageSize, $skip, $sort); + $request = $this->getUserRequest($userId); try { $options = $this->createHttpClientOption(); @@ -29226,20 +29378,20 @@ public function getUsersWithHttpInfo($pageSize = 1000, $skip = null, $sort = nul $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20037' === '\SplFileObject') { + if ('\TalonOne\Client\Model\User' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20037', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\User', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20037'; + $returnType = '\TalonOne\Client\Model\User'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -29258,7 +29410,7 @@ public function getUsersWithHttpInfo($pageSize = 1000, $skip = null, $sort = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20037', + '\TalonOne\Client\Model\User', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -29269,20 +29421,18 @@ public function getUsersWithHttpInfo($pageSize = 1000, $skip = null, $sort = nul } /** - * Operation getUsersAsync + * Operation getUserAsync * - * List users in account + * Get user * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $userId The ID of the user. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUsersAsync($pageSize = 1000, $skip = null, $sort = null) + public function getUserAsync($userId) { - return $this->getUsersAsyncWithHttpInfo($pageSize, $skip, $sort) + return $this->getUserAsyncWithHttpInfo($userId) ->then( function ($response) { return $response[0]; @@ -29291,21 +29441,19 @@ function ($response) { } /** - * Operation getUsersAsyncWithHttpInfo + * Operation getUserAsyncWithHttpInfo * - * List users in account + * Get user * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $userId The ID of the user. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUsersAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) + public function getUserAsyncWithHttpInfo($userId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20037'; - $request = $this->getUsersRequest($pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\User'; + $request = $this->getUserRequest($userId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -29342,55 +29490,39 @@ function ($exception) { } /** - * Create request for operation 'getUsers' + * Create request for operation 'getUser' * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $userId The ID of the user. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getUsersRequest($pageSize = 1000, $skip = null, $sort = null) + protected function getUserRequest($userId) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getUsers, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getUsers, must be bigger than or equal to 1.'); + // verify the required parameter 'userId' is set + if ($userId === null || (is_array($userId) && count($userId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $userId when calling getUser' + ); } - - $resourcePath = '/v1/users'; + $resourcePath = '/v1/users/{userId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } + // path params + if ($userId !== null) { + $resourcePath = str_replace( + '{' . 'userId' . '}', + ObjectSerializer::toPathValue($userId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -29467,36 +29599,40 @@ protected function getUsersRequest($pageSize = 1000, $skip = null, $sort = null) } /** - * Operation getWebhook + * Operation getUsers * - * Get webhook + * List users in account * - * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Webhook + * @return \TalonOne\Client\Model\InlineResponse20039 */ - public function getWebhook($webhookId) + public function getUsers($pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getWebhookWithHttpInfo($webhookId); + list($response) = $this->getUsersWithHttpInfo($pageSize, $skip, $sort); return $response; } /** - * Operation getWebhookWithHttpInfo + * Operation getUsersWithHttpInfo * - * Get webhook + * List users in account * - * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Webhook, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20039, HTTP status code, HTTP response headers (array of strings) */ - public function getWebhookWithHttpInfo($webhookId) + public function getUsersWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getWebhookRequest($webhookId); + $request = $this->getUsersRequest($pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -29529,20 +29665,20 @@ public function getWebhookWithHttpInfo($webhookId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Webhook' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20039' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Webhook', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20039', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Webhook'; + $returnType = '\TalonOne\Client\Model\InlineResponse20039'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -29561,7 +29697,7 @@ public function getWebhookWithHttpInfo($webhookId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Webhook', + '\TalonOne\Client\Model\InlineResponse20039', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -29572,18 +29708,20 @@ public function getWebhookWithHttpInfo($webhookId) } /** - * Operation getWebhookAsync + * Operation getUsersAsync * - * Get webhook + * List users in account * - * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookAsync($webhookId) + public function getUsersAsync($pageSize = 1000, $skip = null, $sort = null) { - return $this->getWebhookAsyncWithHttpInfo($webhookId) + return $this->getUsersAsyncWithHttpInfo($pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -29592,19 +29730,21 @@ function ($response) { } /** - * Operation getWebhookAsyncWithHttpInfo + * Operation getUsersAsyncWithHttpInfo * - * Get webhook + * List users in account * - * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookAsyncWithHttpInfo($webhookId) + public function getUsersAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\Webhook'; - $request = $this->getWebhookRequest($webhookId); + $returnType = '\TalonOne\Client\Model\InlineResponse20039'; + $request = $this->getUsersRequest($pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -29641,39 +29781,55 @@ function ($exception) { } /** - * Create request for operation 'getWebhook' + * Create request for operation 'getUsers' * - * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getWebhookRequest($webhookId) + protected function getUsersRequest($pageSize = 1000, $skip = null, $sort = null) { - // verify the required parameter 'webhookId' is set - if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $webhookId when calling getWebhook' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getUsers, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getUsers, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/webhooks/{webhookId}'; + + $resourcePath = '/v1/users'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } - // path params - if ($webhookId !== null) { - $resourcePath = str_replace( - '{' . 'webhookId' . '}', - ObjectSerializer::toPathValue($webhookId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -29750,52 +29906,36 @@ protected function getWebhookRequest($webhookId) } /** - * Operation getWebhookActivationLogs + * Operation getWebhook * - * List webhook activation log entries + * Get webhook * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20034 + * @return \TalonOne\Client\Model\Webhook */ - public function getWebhookActivationLogs($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + public function getWebhook($webhookId) { - list($response) = $this->getWebhookActivationLogsWithHttpInfo($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); + list($response) = $this->getWebhookWithHttpInfo($webhookId); return $response; } /** - * Operation getWebhookActivationLogsWithHttpInfo + * Operation getWebhookWithHttpInfo * - * List webhook activation log entries + * Get webhook * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20034, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Webhook, HTTP status code, HTTP response headers (array of strings) */ - public function getWebhookActivationLogsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + public function getWebhookWithHttpInfo($webhookId) { - $request = $this->getWebhookActivationLogsRequest($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); + $request = $this->getWebhookRequest($webhookId); try { $options = $this->createHttpClientOption(); @@ -29828,20 +29968,20 @@ public function getWebhookActivationLogsWithHttpInfo($pageSize = 1000, $skip = n $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20034' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Webhook' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20034', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Webhook', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20034'; + $returnType = '\TalonOne\Client\Model\Webhook'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -29860,7 +30000,7 @@ public function getWebhookActivationLogsWithHttpInfo($pageSize = 1000, $skip = n case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20034', + '\TalonOne\Client\Model\Webhook', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -29871,26 +30011,18 @@ public function getWebhookActivationLogsWithHttpInfo($pageSize = 1000, $skip = n } /** - * Operation getWebhookActivationLogsAsync + * Operation getWebhookAsync * - * List webhook activation log entries + * Get webhook * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookActivationLogsAsync($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + public function getWebhookAsync($webhookId) { - return $this->getWebhookActivationLogsAsyncWithHttpInfo($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter) + return $this->getWebhookAsyncWithHttpInfo($webhookId) ->then( function ($response) { return $response[0]; @@ -29899,27 +30031,19 @@ function ($response) { } /** - * Operation getWebhookActivationLogsAsyncWithHttpInfo + * Operation getWebhookAsyncWithHttpInfo * - * List webhook activation log entries + * Get webhook * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookActivationLogsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + public function getWebhookAsyncWithHttpInfo($webhookId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20034'; - $request = $this->getWebhookActivationLogsRequest($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); + $returnType = '\TalonOne\Client\Model\Webhook'; + $request = $this->getWebhookRequest($webhookId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -29956,101 +30080,416 @@ function ($exception) { } /** - * Create request for operation 'getWebhookActivationLogs' + * Create request for operation 'getWebhook' * - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getWebhookActivationLogsRequest($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + protected function getWebhookRequest($webhookId) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookActivationLogs, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookActivationLogs, must be bigger than or equal to 1.'); + // verify the required parameter 'webhookId' is set + if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $webhookId when calling getWebhook' + ); } - - $resourcePath = '/v1/webhook_activation_logs'; + $resourcePath = '/v1/webhooks/{webhookId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($integrationRequestUuid)) { - $integrationRequestUuid = ObjectSerializer::serializeCollection($integrationRequestUuid, '', true); - } - if ($integrationRequestUuid !== null) { - $queryParams['integrationRequestUuid'] = $integrationRequestUuid; - } - // query params - if (is_array($webhookId)) { - $webhookId = ObjectSerializer::serializeCollection($webhookId, '', true); - } - if ($webhookId !== null) { - $queryParams['webhookId'] = $webhookId; - } - // query params - if (is_array($applicationId)) { - $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); - } - if ($applicationId !== null) { - $queryParams['applicationId'] = $applicationId; - } - // query params - if (is_array($campaignId)) { - $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); - } - if ($campaignId !== null) { - $queryParams['campaignId'] = $campaignId; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } + + + // path params + if ($webhookId !== null) { + $resourcePath = str_replace( + '{' . 'webhookId' . '}', + ObjectSerializer::toPathValue($webhookId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getWebhookActivationLogs + * + * List webhook activation log entries + * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\InlineResponse20036 + */ + public function getWebhookActivationLogs($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + { + list($response) = $this->getWebhookActivationLogsWithHttpInfo($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); + return $response; + } + + /** + * Operation getWebhookActivationLogsWithHttpInfo + * + * List webhook activation log entries + * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\InlineResponse20036, HTTP status code, HTTP response headers (array of strings) + */ + public function getWebhookActivationLogsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + { + $request = $this->getWebhookActivationLogsRequest($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\InlineResponse20036' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20036', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\InlineResponse20036'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\InlineResponse20036', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getWebhookActivationLogsAsync + * + * List webhook activation log entries + * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWebhookActivationLogsAsync($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + { + return $this->getWebhookActivationLogsAsyncWithHttpInfo($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getWebhookActivationLogsAsyncWithHttpInfo + * + * List webhook activation log entries + * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWebhookActivationLogsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + { + $returnType = '\TalonOne\Client\Model\InlineResponse20036'; + $request = $this->getWebhookActivationLogsRequest($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getWebhookActivationLogs' + * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getWebhookActivationLogsRequest($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + { + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookActivationLogs, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookActivationLogs, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/webhook_activation_logs'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($integrationRequestUuid)) { + $integrationRequestUuid = ObjectSerializer::serializeCollection($integrationRequestUuid, '', true); + } + if ($integrationRequestUuid !== null) { + $queryParams['integrationRequestUuid'] = $integrationRequestUuid; + } + // query params + if (is_array($webhookId)) { + $webhookId = ObjectSerializer::serializeCollection($webhookId, '', true); + } + if ($webhookId !== null) { + $queryParams['webhookId'] = $webhookId; + } + // query params + if (is_array($applicationId)) { + $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); + } + if ($applicationId !== null) { + $queryParams['applicationId'] = $applicationId; + } + // query params + if (is_array($campaignId)) { + $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); + } + if ($campaignId !== null) { + $queryParams['campaignId'] = $campaignId; + } + // query params + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + } + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; + } + // query params + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); + } + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } @@ -30134,7 +30573,7 @@ protected function getWebhookActivationLogsRequest($pageSize = 1000, $skip = nul * List webhook log entries * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $status Filter results by HTTP status codes. (optional) * @param float $webhookId Filter results by Webhook. (optional) @@ -30146,7 +30585,7 @@ protected function getWebhookActivationLogsRequest($pageSize = 1000, $skip = nul * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20035 + * @return \TalonOne\Client\Model\InlineResponse20037 */ public function getWebhookLogs($pageSize = 1000, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) { @@ -30160,7 +30599,7 @@ public function getWebhookLogs($pageSize = 1000, $skip = null, $sort = null, $st * List webhook log entries * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $status Filter results by HTTP status codes. (optional) * @param float $webhookId Filter results by Webhook. (optional) @@ -30172,7 +30611,7 @@ public function getWebhookLogs($pageSize = 1000, $skip = null, $sort = null, $st * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20035, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20037, HTTP status code, HTTP response headers (array of strings) */ public function getWebhookLogsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) { @@ -30209,20 +30648,20 @@ public function getWebhookLogsWithHttpInfo($pageSize = 1000, $skip = null, $sort $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20035' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20037' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20035', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20037', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20035'; + $returnType = '\TalonOne\Client\Model\InlineResponse20037'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -30241,7 +30680,7 @@ public function getWebhookLogsWithHttpInfo($pageSize = 1000, $skip = null, $sort case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20035', + '\TalonOne\Client\Model\InlineResponse20037', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -30257,7 +30696,7 @@ public function getWebhookLogsWithHttpInfo($pageSize = 1000, $skip = null, $sort * List webhook log entries * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $status Filter results by HTTP status codes. (optional) * @param float $webhookId Filter results by Webhook. (optional) @@ -30286,7 +30725,7 @@ function ($response) { * List webhook log entries * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $status Filter results by HTTP status codes. (optional) * @param float $webhookId Filter results by Webhook. (optional) @@ -30301,7 +30740,7 @@ function ($response) { */ public function getWebhookLogsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20035'; + $returnType = '\TalonOne\Client\Model\InlineResponse20037'; $request = $this->getWebhookLogsRequest($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter); return $this->client @@ -30342,7 +30781,7 @@ function ($exception) { * Create request for operation 'getWebhookLogs' * * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $status Filter results by HTTP status codes. (optional) * @param float $webhookId Filter results by Webhook. (optional) @@ -30524,18 +30963,22 @@ protected function getWebhookLogsRequest($pageSize = 1000, $skip = null, $sort = * * List webhooks * - * @param string $applicationIds Filter by one or more application IDs separated by a comma. (optional) + * @param string $applicationIds Filter by one or more Application IDs, separated by a comma. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $creationType Filter results by creation type. (optional) + * @param string $visibility Filter results by visibility. (optional) + * @param int $outgoingIntegrationsTypeId Filter results by outgoing integration type ID. (optional) + * @param string $title Filter results performing case-insensitive matching against the webhook title. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20033 + * @return \TalonOne\Client\Model\InlineResponse20035 */ - public function getWebhooks($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null) + public function getWebhooks($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null, $creationType = null, $visibility = null, $outgoingIntegrationsTypeId = null, $title = null) { - list($response) = $this->getWebhooksWithHttpInfo($applicationIds, $sort, $pageSize, $skip); + list($response) = $this->getWebhooksWithHttpInfo($applicationIds, $sort, $pageSize, $skip, $creationType, $visibility, $outgoingIntegrationsTypeId, $title); return $response; } @@ -30544,18 +30987,22 @@ public function getWebhooks($applicationIds = null, $sort = null, $pageSize = 10 * * List webhooks * - * @param string $applicationIds Filter by one or more application IDs separated by a comma. (optional) + * @param string $applicationIds Filter by one or more Application IDs, separated by a comma. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $creationType Filter results by creation type. (optional) + * @param string $visibility Filter results by visibility. (optional) + * @param int $outgoingIntegrationsTypeId Filter results by outgoing integration type ID. (optional) + * @param string $title Filter results performing case-insensitive matching against the webhook title. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20033, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20035, HTTP status code, HTTP response headers (array of strings) */ - public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null) + public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null, $creationType = null, $visibility = null, $outgoingIntegrationsTypeId = null, $title = null) { - $request = $this->getWebhooksRequest($applicationIds, $sort, $pageSize, $skip); + $request = $this->getWebhooksRequest($applicationIds, $sort, $pageSize, $skip, $creationType, $visibility, $outgoingIntegrationsTypeId, $title); try { $options = $this->createHttpClientOption(); @@ -30588,20 +31035,20 @@ public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $p $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20033' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20035' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20033', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20035', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20033'; + $returnType = '\TalonOne\Client\Model\InlineResponse20035'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -30620,7 +31067,7 @@ public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $p case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20033', + '\TalonOne\Client\Model\InlineResponse20035', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -30635,17 +31082,21 @@ public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $p * * List webhooks * - * @param string $applicationIds Filter by one or more application IDs separated by a comma. (optional) + * @param string $applicationIds Filter by one or more Application IDs, separated by a comma. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $creationType Filter results by creation type. (optional) + * @param string $visibility Filter results by visibility. (optional) + * @param int $outgoingIntegrationsTypeId Filter results by outgoing integration type ID. (optional) + * @param string $title Filter results performing case-insensitive matching against the webhook title. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhooksAsync($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null) + public function getWebhooksAsync($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null, $creationType = null, $visibility = null, $outgoingIntegrationsTypeId = null, $title = null) { - return $this->getWebhooksAsyncWithHttpInfo($applicationIds, $sort, $pageSize, $skip) + return $this->getWebhooksAsyncWithHttpInfo($applicationIds, $sort, $pageSize, $skip, $creationType, $visibility, $outgoingIntegrationsTypeId, $title) ->then( function ($response) { return $response[0]; @@ -30658,18 +31109,1750 @@ function ($response) { * * List webhooks * - * @param string $applicationIds Filter by one or more application IDs separated by a comma. (optional) + * @param string $applicationIds Filter by one or more Application IDs, separated by a comma. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $creationType Filter results by creation type. (optional) + * @param string $visibility Filter results by visibility. (optional) + * @param int $outgoingIntegrationsTypeId Filter results by outgoing integration type ID. (optional) + * @param string $title Filter results performing case-insensitive matching against the webhook title. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhooksAsyncWithHttpInfo($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null) + public function getWebhooksAsyncWithHttpInfo($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null, $creationType = null, $visibility = null, $outgoingIntegrationsTypeId = null, $title = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20033'; - $request = $this->getWebhooksRequest($applicationIds, $sort, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\InlineResponse20035'; + $request = $this->getWebhooksRequest($applicationIds, $sort, $pageSize, $skip, $creationType, $visibility, $outgoingIntegrationsTypeId, $title); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getWebhooks' + * + * @param string $applicationIds Filter by one or more Application IDs, separated by a comma. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $creationType Filter results by creation type. (optional) + * @param string $visibility Filter results by visibility. (optional) + * @param int $outgoingIntegrationsTypeId Filter results by outgoing integration type ID. (optional) + * @param string $title Filter results performing case-insensitive matching against the webhook title. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getWebhooksRequest($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null, $creationType = null, $visibility = null, $outgoingIntegrationsTypeId = null, $title = null) + { + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhooks, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhooks, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/webhooks'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (is_array($applicationIds)) { + $applicationIds = ObjectSerializer::serializeCollection($applicationIds, '', true); + } + if ($applicationIds !== null) { + $queryParams['applicationIds'] = $applicationIds; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($creationType)) { + $creationType = ObjectSerializer::serializeCollection($creationType, '', true); + } + if ($creationType !== null) { + $queryParams['creationType'] = $creationType; + } + // query params + if (is_array($visibility)) { + $visibility = ObjectSerializer::serializeCollection($visibility, '', true); + } + if ($visibility !== null) { + $queryParams['visibility'] = $visibility; + } + // query params + if (is_array($outgoingIntegrationsTypeId)) { + $outgoingIntegrationsTypeId = ObjectSerializer::serializeCollection($outgoingIntegrationsTypeId, '', true); + } + if ($outgoingIntegrationsTypeId !== null) { + $queryParams['outgoingIntegrationsTypeId'] = $outgoingIntegrationsTypeId; + } + // query params + if (is_array($title)) { + $title = ObjectSerializer::serializeCollection($title, '', true); + } + if ($title !== null) { + $queryParams['title'] = $title; + } + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importAccountCollection + * + * Import data into existing account-level collection + * + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function importAccountCollection($collectionId, $upFile = null) + { + list($response) = $this->importAccountCollectionWithHttpInfo($collectionId, $upFile); + return $response; + } + + /** + * Operation importAccountCollectionWithHttpInfo + * + * Import data into existing account-level collection + * + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function importAccountCollectionWithHttpInfo($collectionId, $upFile = null) + { + $request = $this->importAccountCollectionRequest($collectionId, $upFile); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importAccountCollectionAsync + * + * Import data into existing account-level collection + * + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importAccountCollectionAsync($collectionId, $upFile = null) + { + return $this->importAccountCollectionAsyncWithHttpInfo($collectionId, $upFile) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importAccountCollectionAsyncWithHttpInfo + * + * Import data into existing account-level collection + * + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importAccountCollectionAsyncWithHttpInfo($collectionId, $upFile = null) + { + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importAccountCollectionRequest($collectionId, $upFile); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importAccountCollection' + * + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function importAccountCollectionRequest($collectionId, $upFile = null) + { + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collectionId when calling importAccountCollection' + ); + } + + $resourcePath = '/v1/collections/{collectionId}/import'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($collectionId !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), + $resourcePath + ); + } + + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importAllowedList + * + * Import allowed values for attribute + * + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function importAllowedList($attributeId, $upFile = null) + { + list($response) = $this->importAllowedListWithHttpInfo($attributeId, $upFile); + return $response; + } + + /** + * Operation importAllowedListWithHttpInfo + * + * Import allowed values for attribute + * + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function importAllowedListWithHttpInfo($attributeId, $upFile = null) + { + $request = $this->importAllowedListRequest($attributeId, $upFile); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importAllowedListAsync + * + * Import allowed values for attribute + * + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importAllowedListAsync($attributeId, $upFile = null) + { + return $this->importAllowedListAsyncWithHttpInfo($attributeId, $upFile) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importAllowedListAsyncWithHttpInfo + * + * Import allowed values for attribute + * + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importAllowedListAsyncWithHttpInfo($attributeId, $upFile = null) + { + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importAllowedListRequest($attributeId, $upFile); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importAllowedList' + * + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function importAllowedListRequest($attributeId, $upFile = null) + { + // verify the required parameter 'attributeId' is set + if ($attributeId === null || (is_array($attributeId) && count($attributeId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeId when calling importAllowedList' + ); + } + + $resourcePath = '/v1/attributes/{attributeId}/allowed_list/import'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($attributeId !== null) { + $resourcePath = str_replace( + '{' . 'attributeId' . '}', + ObjectSerializer::toPathValue($attributeId), + $resourcePath + ); + } + + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importCollection + * + * Import data into existing campaign-level collection + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function importCollection($applicationId, $campaignId, $collectionId, $upFile = null) + { + list($response) = $this->importCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile); + return $response; + } + + /** + * Operation importCollectionWithHttpInfo + * + * Import data into existing campaign-level collection + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function importCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile = null) + { + $request = $this->importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importCollectionAsync + * + * Import data into existing campaign-level collection + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importCollectionAsync($applicationId, $campaignId, $collectionId, $upFile = null) + { + return $this->importCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importCollectionAsyncWithHttpInfo + * + * Import data into existing campaign-level collection + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile = null) + { + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importCollection' + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile = null) + { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling importCollection' + ); + } + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling importCollection' + ); + } + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collectionId when calling importCollection' + ); + } + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + // path params + if ($collectionId !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), + $resourcePath + ); + } + + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importCoupons + * + * Import coupons + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Import + */ + public function importCoupons($applicationId, $campaignId, $upFile = null) + { + list($response) = $this->importCouponsWithHttpInfo($applicationId, $campaignId, $upFile); + return $response; + } + + /** + * Operation importCouponsWithHttpInfo + * + * Import coupons + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + */ + public function importCouponsWithHttpInfo($applicationId, $campaignId, $upFile = null) + { + $request = $this->importCouponsRequest($applicationId, $campaignId, $upFile); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importCouponsAsync + * + * Import coupons + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importCouponsAsync($applicationId, $campaignId, $upFile = null) + { + return $this->importCouponsAsyncWithHttpInfo($applicationId, $campaignId, $upFile) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importCouponsAsyncWithHttpInfo + * + * Import coupons + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importCouponsAsyncWithHttpInfo($applicationId, $campaignId, $upFile = null) + { + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importCouponsRequest($applicationId, $campaignId, $upFile); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importCoupons' + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function importCouponsRequest($applicationId, $campaignId, $upFile = null) + { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling importCoupons' + ); + } + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling importCoupons' + ); + } + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importLoyaltyCards + * + * Import loyalty cards + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function importLoyaltyCards($loyaltyProgramId, $upFile = null) + { + list($response) = $this->importLoyaltyCardsWithHttpInfo($loyaltyProgramId, $upFile); + return $response; + } + + /** + * Operation importLoyaltyCardsWithHttpInfo + * + * Import loyalty cards + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function importLoyaltyCardsWithHttpInfo($loyaltyProgramId, $upFile = null) + { + $request = $this->importLoyaltyCardsRequest($loyaltyProgramId, $upFile); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importLoyaltyCardsAsync + * + * Import loyalty cards + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importLoyaltyCardsAsync($loyaltyProgramId, $upFile = null) + { + return $this->importLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $upFile) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importLoyaltyCardsAsyncWithHttpInfo + * + * Import loyalty cards + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $upFile = null) + { + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importLoyaltyCardsRequest($loyaltyProgramId, $upFile); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -30706,64 +32889,45 @@ function ($exception) { } /** - * Create request for operation 'getWebhooks' + * Create request for operation 'importLoyaltyCards' * - * @param string $applicationIds Filter by one or more application IDs separated by a comma. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getWebhooksRequest($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null) + protected function importLoyaltyCardsRequest($loyaltyProgramId, $upFile = null) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhooks, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhooks, must be bigger than or equal to 1.'); + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling importLoyaltyCards' + ); } - - $resourcePath = '/v1/webhooks'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/import_cards'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($applicationIds)) { - $applicationIds = ObjectSerializer::serializeCollection($applicationIds, '', true); - } - if ($applicationIds !== null) { - $queryParams['applicationIds'] = $applicationIds; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } // body params $_tempBody = null; @@ -30774,7 +32938,7 @@ protected function getWebhooksRequest($applicationIds = null, $sort = null, $pag } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['multipart/form-data'] ); } @@ -30831,7 +32995,7 @@ protected function getWebhooksRequest($applicationIds = null, $sort = null, $pag $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -30839,38 +33003,38 @@ protected function getWebhooksRequest($applicationIds = null, $sort = null, $pag } /** - * Operation importAccountCollection + * Operation importLoyaltyCustomersTiers * - * Import data in existing account-level collection + * Import customers into loyalty tiers * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function importAccountCollection($collectionId, $upFile = null) + public function importLoyaltyCustomersTiers($loyaltyProgramId, $upFile = null) { - list($response) = $this->importAccountCollectionWithHttpInfo($collectionId, $upFile); + list($response) = $this->importLoyaltyCustomersTiersWithHttpInfo($loyaltyProgramId, $upFile); return $response; } /** - * Operation importAccountCollectionWithHttpInfo + * Operation importLoyaltyCustomersTiersWithHttpInfo * - * Import data in existing account-level collection + * Import customers into loyalty tiers * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function importAccountCollectionWithHttpInfo($collectionId, $upFile = null) + public function importLoyaltyCustomersTiersWithHttpInfo($loyaltyProgramId, $upFile = null) { - $request = $this->importAccountCollectionRequest($collectionId, $upFile); + $request = $this->importLoyaltyCustomersTiersRequest($loyaltyProgramId, $upFile); try { $options = $this->createHttpClientOption(); @@ -30933,6 +33097,18 @@ public function importAccountCollectionWithHttpInfo($collectionId, $upFile = nul $content = (string) $responseBody; } + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + return [ ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), @@ -30980,25 +33156,33 @@ public function importAccountCollectionWithHttpInfo($collectionId, $upFile = nul ); $e->setResponseObject($data); break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation importAccountCollectionAsync + * Operation importLoyaltyCustomersTiersAsync * - * Import data in existing account-level collection + * Import customers into loyalty tiers * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importAccountCollectionAsync($collectionId, $upFile = null) + public function importLoyaltyCustomersTiersAsync($loyaltyProgramId, $upFile = null) { - return $this->importAccountCollectionAsyncWithHttpInfo($collectionId, $upFile) + return $this->importLoyaltyCustomersTiersAsyncWithHttpInfo($loyaltyProgramId, $upFile) ->then( function ($response) { return $response[0]; @@ -31007,20 +33191,20 @@ function ($response) { } /** - * Operation importAccountCollectionAsyncWithHttpInfo + * Operation importLoyaltyCustomersTiersAsyncWithHttpInfo * - * Import data in existing account-level collection + * Import customers into loyalty tiers * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importAccountCollectionAsyncWithHttpInfo($collectionId, $upFile = null) + public function importLoyaltyCustomersTiersAsyncWithHttpInfo($loyaltyProgramId, $upFile = null) { $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importAccountCollectionRequest($collectionId, $upFile); + $request = $this->importLoyaltyCustomersTiersRequest($loyaltyProgramId, $upFile); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -31057,24 +33241,24 @@ function ($exception) { } /** - * Create request for operation 'importAccountCollection' + * Create request for operation 'importLoyaltyCustomersTiers' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importAccountCollectionRequest($collectionId, $upFile = null) + protected function importLoyaltyCustomersTiersRequest($loyaltyProgramId, $upFile = null) { - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling importAccountCollection' + 'Missing the required parameter $loyaltyProgramId when calling importLoyaltyCustomersTiers' ); } - $resourcePath = '/v1/collections/{collectionId}/import'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/import_customers_tiers'; $formParams = []; $queryParams = []; $headerParams = []; @@ -31084,10 +33268,10 @@ protected function importAccountCollectionRequest($collectionId, $upFile = null) // path params - if ($collectionId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } @@ -31171,38 +33355,38 @@ protected function importAccountCollectionRequest($collectionId, $upFile = null) } /** - * Operation importAllowedList + * Operation importLoyaltyPoints * - * Import allowed values for attribute + * Import loyalty points * - * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\Import */ - public function importAllowedList($attributeId, $upFile = null) + public function importLoyaltyPoints($loyaltyProgramId, $upFile = null) { - list($response) = $this->importAllowedListWithHttpInfo($attributeId, $upFile); + list($response) = $this->importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile); return $response; } /** - * Operation importAllowedListWithHttpInfo + * Operation importLoyaltyPointsWithHttpInfo * - * Import allowed values for attribute + * Import loyalty points * - * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) */ - public function importAllowedListWithHttpInfo($attributeId, $upFile = null) + public function importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile = null) { - $request = $this->importAllowedListRequest($attributeId, $upFile); + $request = $this->importLoyaltyPointsRequest($loyaltyProgramId, $upFile); try { $options = $this->createHttpClientOption(); @@ -31246,42 +33430,6 @@ public function importAllowedListWithHttpInfo($attributeId, $upFile = null) $response->getStatusCode(), $response->getHeaders() ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponse' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; } $returnType = '\TalonOne\Client\Model\Import'; @@ -31308,49 +33456,25 @@ public function importAllowedListWithHttpInfo($attributeId, $upFile = null) ); $e->setResponseObject($data); break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation importAllowedListAsync + * Operation importLoyaltyPointsAsync * - * Import allowed values for attribute + * Import loyalty points * - * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importAllowedListAsync($attributeId, $upFile = null) + public function importLoyaltyPointsAsync($loyaltyProgramId, $upFile = null) { - return $this->importAllowedListAsyncWithHttpInfo($attributeId, $upFile) + return $this->importLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $upFile) ->then( function ($response) { return $response[0]; @@ -31359,20 +33483,20 @@ function ($response) { } /** - * Operation importAllowedListAsyncWithHttpInfo + * Operation importLoyaltyPointsAsyncWithHttpInfo * - * Import allowed values for attribute + * Import loyalty points * - * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importAllowedListAsyncWithHttpInfo($attributeId, $upFile = null) + public function importLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $upFile = null) { $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importAllowedListRequest($attributeId, $upFile); + $request = $this->importLoyaltyPointsRequest($loyaltyProgramId, $upFile); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -31409,24 +33533,24 @@ function ($exception) { } /** - * Create request for operation 'importAllowedList' + * Create request for operation 'importLoyaltyPoints' * - * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importAllowedListRequest($attributeId, $upFile = null) + protected function importLoyaltyPointsRequest($loyaltyProgramId, $upFile = null) { - // verify the required parameter 'attributeId' is set - if ($attributeId === null || (is_array($attributeId) && count($attributeId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeId when calling importAllowedList' + 'Missing the required parameter $loyaltyProgramId when calling importLoyaltyPoints' ); } - $resourcePath = '/v1/attributes/{attributeId}/allowed_list/import'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/import_points'; $formParams = []; $queryParams = []; $headerParams = []; @@ -31436,10 +33560,10 @@ protected function importAllowedListRequest($attributeId, $upFile = null) // path params - if ($attributeId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'attributeId' . '}', - ObjectSerializer::toPathValue($attributeId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } @@ -31523,42 +33647,38 @@ protected function importAllowedListRequest($attributeId, $upFile = null) } /** - * Operation importCollection + * Operation importPoolGiveaways * - * Import data in existing collection + * Import giveaway codes into a giveaway pool * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\Import */ - public function importCollection($applicationId, $campaignId, $collectionId, $upFile = null) + public function importPoolGiveaways($poolId, $upFile = null) { - list($response) = $this->importCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile); + list($response) = $this->importPoolGiveawaysWithHttpInfo($poolId, $upFile); return $response; } /** - * Operation importCollectionWithHttpInfo + * Operation importPoolGiveawaysWithHttpInfo * - * Import data in existing collection + * Import giveaway codes into a giveaway pool * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) */ - public function importCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile = null) + public function importPoolGiveawaysWithHttpInfo($poolId, $upFile = null) { - $request = $this->importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile); + $request = $this->importPoolGiveawaysRequest($poolId, $upFile); try { $options = $this->createHttpClientOption(); @@ -31602,18 +33722,6 @@ public function importCollectionWithHttpInfo($applicationId, $campaignId, $colle $response->getStatusCode(), $response->getHeaders() ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; } $returnType = '\TalonOne\Client\Model\Import'; @@ -31640,35 +33748,25 @@ public function importCollectionWithHttpInfo($applicationId, $campaignId, $colle ); $e->setResponseObject($data); break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation importCollectionAsync + * Operation importPoolGiveawaysAsync * - * Import data in existing collection + * Import giveaway codes into a giveaway pool * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importCollectionAsync($applicationId, $campaignId, $collectionId, $upFile = null) + public function importPoolGiveawaysAsync($poolId, $upFile = null) { - return $this->importCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile) + return $this->importPoolGiveawaysAsyncWithHttpInfo($poolId, $upFile) ->then( function ($response) { return $response[0]; @@ -31677,22 +33775,20 @@ function ($response) { } /** - * Operation importCollectionAsyncWithHttpInfo + * Operation importPoolGiveawaysAsyncWithHttpInfo * - * Import data in existing collection + * Import giveaway codes into a giveaway pool * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile = null) + public function importPoolGiveawaysAsyncWithHttpInfo($poolId, $upFile = null) { $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile); + $request = $this->importPoolGiveawaysRequest($poolId, $upFile); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -31729,38 +33825,24 @@ function ($exception) { } /** - * Create request for operation 'importCollection' + * Create request for operation 'importPoolGiveaways' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile = null) + protected function importPoolGiveawaysRequest($poolId, $upFile = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling importCollection' - ); - } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling importCollection' - ); - } - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + // verify the required parameter 'poolId' is set + if ($poolId === null || (is_array($poolId) && count($poolId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling importCollection' + 'Missing the required parameter $poolId when calling importPoolGiveaways' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import'; + $resourcePath = '/v1/giveaways/pools/{poolId}/import'; $formParams = []; $queryParams = []; $headerParams = []; @@ -31770,26 +33852,10 @@ protected function importCollectionRequest($applicationId, $campaignId, $collect // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); - } - // path params - if ($collectionId !== null) { + if ($poolId !== null) { $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), + '{' . 'poolId' . '}', + ObjectSerializer::toPathValue($poolId), $resourcePath ); } @@ -31873,9 +33939,9 @@ protected function importCollectionRequest($applicationId, $campaignId, $collect } /** - * Operation importCoupons + * Operation importReferrals * - * Import coupons + * Import referrals * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) @@ -31885,16 +33951,16 @@ protected function importCollectionRequest($applicationId, $campaignId, $collect * @throws \InvalidArgumentException * @return \TalonOne\Client\Model\Import */ - public function importCoupons($applicationId, $campaignId, $upFile = null) + public function importReferrals($applicationId, $campaignId, $upFile = null) { - list($response) = $this->importCouponsWithHttpInfo($applicationId, $campaignId, $upFile); + list($response) = $this->importReferralsWithHttpInfo($applicationId, $campaignId, $upFile); return $response; } /** - * Operation importCouponsWithHttpInfo + * Operation importReferralsWithHttpInfo * - * Import coupons + * Import referrals * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) @@ -31904,9 +33970,9 @@ public function importCoupons($applicationId, $campaignId, $upFile = null) * @throws \InvalidArgumentException * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) */ - public function importCouponsWithHttpInfo($applicationId, $campaignId, $upFile = null) + public function importReferralsWithHttpInfo($applicationId, $campaignId, $upFile = null) { - $request = $this->importCouponsRequest($applicationId, $campaignId, $upFile); + $request = $this->importReferralsRequest($applicationId, $campaignId, $upFile); try { $options = $this->createHttpClientOption(); @@ -31982,9 +34048,9 @@ public function importCouponsWithHttpInfo($applicationId, $campaignId, $upFile = } /** - * Operation importCouponsAsync + * Operation importReferralsAsync * - * Import coupons + * Import referrals * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) @@ -31993,9 +34059,9 @@ public function importCouponsWithHttpInfo($applicationId, $campaignId, $upFile = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importCouponsAsync($applicationId, $campaignId, $upFile = null) + public function importReferralsAsync($applicationId, $campaignId, $upFile = null) { - return $this->importCouponsAsyncWithHttpInfo($applicationId, $campaignId, $upFile) + return $this->importReferralsAsyncWithHttpInfo($applicationId, $campaignId, $upFile) ->then( function ($response) { return $response[0]; @@ -32004,9 +34070,9 @@ function ($response) { } /** - * Operation importCouponsAsyncWithHttpInfo + * Operation importReferralsAsyncWithHttpInfo * - * Import coupons + * Import referrals * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) @@ -32015,10 +34081,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importCouponsAsyncWithHttpInfo($applicationId, $campaignId, $upFile = null) + public function importReferralsAsyncWithHttpInfo($applicationId, $campaignId, $upFile = null) { $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importCouponsRequest($applicationId, $campaignId, $upFile); + $request = $this->importReferralsRequest($applicationId, $campaignId, $upFile); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -32055,7 +34121,7 @@ function ($exception) { } /** - * Create request for operation 'importCoupons' + * Create request for operation 'importReferrals' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) @@ -32064,22 +34130,22 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importCouponsRequest($applicationId, $campaignId, $upFile = null) + protected function importReferralsRequest($applicationId, $campaignId, $upFile = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling importCoupons' + 'Missing the required parameter $applicationId when calling importReferrals' ); } // verify the required parameter 'campaignId' is set if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling importCoupons' + 'Missing the required parameter $campaignId when calling importReferrals' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals'; $formParams = []; $queryParams = []; $headerParams = []; @@ -32184,38 +34250,44 @@ protected function importCouponsRequest($applicationId, $campaignId, $upFile = n } /** - * Operation importLoyaltyCards + * Operation listAccountCollections * - * Import loyalty cards + * List collections in account * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse20016|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function importLoyaltyCards($loyaltyProgramId, $upFile = null) + public function listAccountCollections($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - list($response) = $this->importLoyaltyCardsWithHttpInfo($loyaltyProgramId, $upFile); + list($response) = $this->listAccountCollectionsWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize, $name); return $response; } /** - * Operation importLoyaltyCardsWithHttpInfo + * Operation listAccountCollectionsWithHttpInfo * - * Import loyalty cards + * List collections in account * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20016|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function importLoyaltyCardsWithHttpInfo($loyaltyProgramId, $upFile = null) + public function listAccountCollectionsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - $request = $this->importLoyaltyCardsRequest($loyaltyProgramId, $upFile); + $request = $this->listAccountCollectionsRequest($pageSize, $skip, $sort, $withTotalResultSize, $name); try { $options = $this->createHttpClientOption(); @@ -32248,14 +34320,26 @@ public function importLoyaltyCardsWithHttpInfo($loyaltyProgramId, $upFile = null $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20016' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20016', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -32285,7 +34369,7 @@ public function importLoyaltyCardsWithHttpInfo($loyaltyProgramId, $upFile = null ]; } - $returnType = '\TalonOne\Client\Model\Import'; + $returnType = '\TalonOne\Client\Model\InlineResponse20016'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -32304,7 +34388,15 @@ public function importLoyaltyCardsWithHttpInfo($loyaltyProgramId, $upFile = null case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Import', + '\TalonOne\Client\Model\InlineResponse20016', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -32331,19 +34423,22 @@ public function importLoyaltyCardsWithHttpInfo($loyaltyProgramId, $upFile = null } /** - * Operation importLoyaltyCardsAsync + * Operation listAccountCollectionsAsync * - * Import loyalty cards + * List collections in account * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importLoyaltyCardsAsync($loyaltyProgramId, $upFile = null) + public function listAccountCollectionsAsync($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - return $this->importLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $upFile) + return $this->listAccountCollectionsAsyncWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize, $name) ->then( function ($response) { return $response[0]; @@ -32352,20 +34447,23 @@ function ($response) { } /** - * Operation importLoyaltyCardsAsyncWithHttpInfo + * Operation listAccountCollectionsAsyncWithHttpInfo * - * Import loyalty cards + * List collections in account * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $upFile = null) + public function listAccountCollectionsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importLoyaltyCardsRequest($loyaltyProgramId, $upFile); + $returnType = '\TalonOne\Client\Model\InlineResponse20016'; + $request = $this->listAccountCollectionsRequest($pageSize, $skip, $sort, $withTotalResultSize, $name); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -32402,45 +34500,72 @@ function ($exception) { } /** - * Create request for operation 'importLoyaltyCards' + * Create request for operation 'listAccountCollections' * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importLoyaltyCardsRequest($loyaltyProgramId, $upFile = null) + protected function listAccountCollectionsRequest($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling importLoyaltyCards' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listAccountCollections, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listAccountCollections, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/import_cards'; + + $resourcePath = '/v1/collections'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + } + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; + } + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); + } + if ($name !== null) { + $queryParams['name'] = $name; + } - // path params - if ($loyaltyProgramId !== null) { - $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), - $resourcePath - ); - } - // form params - if ($upFile !== null) { - $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); - } // body params $_tempBody = null; @@ -32451,7 +34576,7 @@ protected function importLoyaltyCardsRequest($loyaltyProgramId, $upFile = null) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['multipart/form-data'] + [] ); } @@ -32508,7 +34633,7 @@ protected function importLoyaltyCardsRequest($loyaltyProgramId, $upFile = null) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -32516,38 +34641,44 @@ protected function importLoyaltyCardsRequest($loyaltyProgramId, $upFile = null) } /** - * Operation importLoyaltyPoints + * Operation listCatalogItems * - * Import loyalty points + * List items in a catalog * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sku The SKU of the item. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import + * @return \TalonOne\Client\Model\InlineResponse20033 */ - public function importLoyaltyPoints($loyaltyProgramId, $upFile = null) + public function listCatalogItems($catalogId, $pageSize = 1000, $skip = null, $withTotalResultSize = null, $sku = null) { - list($response) = $this->importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile); + list($response) = $this->listCatalogItemsWithHttpInfo($catalogId, $pageSize, $skip, $withTotalResultSize, $sku); return $response; } /** - * Operation importLoyaltyPointsWithHttpInfo + * Operation listCatalogItemsWithHttpInfo * - * Import loyalty points + * List items in a catalog * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sku The SKU of the item. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20033, HTTP status code, HTTP response headers (array of strings) */ - public function importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile = null) + public function listCatalogItemsWithHttpInfo($catalogId, $pageSize = 1000, $skip = null, $withTotalResultSize = null, $sku = null) { - $request = $this->importLoyaltyPointsRequest($loyaltyProgramId, $upFile); + $request = $this->listCatalogItemsRequest($catalogId, $pageSize, $skip, $withTotalResultSize, $sku); try { $options = $this->createHttpClientOption(); @@ -32580,20 +34711,20 @@ public function importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile = nul $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20033' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20033', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Import'; + $returnType = '\TalonOne\Client\Model\InlineResponse20033'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -32612,7 +34743,7 @@ public function importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Import', + '\TalonOne\Client\Model\InlineResponse20033', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -32623,19 +34754,22 @@ public function importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile = nul } /** - * Operation importLoyaltyPointsAsync + * Operation listCatalogItemsAsync * - * Import loyalty points + * List items in a catalog * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sku The SKU of the item. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importLoyaltyPointsAsync($loyaltyProgramId, $upFile = null) + public function listCatalogItemsAsync($catalogId, $pageSize = 1000, $skip = null, $withTotalResultSize = null, $sku = null) { - return $this->importLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $upFile) + return $this->listCatalogItemsAsyncWithHttpInfo($catalogId, $pageSize, $skip, $withTotalResultSize, $sku) ->then( function ($response) { return $response[0]; @@ -32644,20 +34778,23 @@ function ($response) { } /** - * Operation importLoyaltyPointsAsyncWithHttpInfo + * Operation listCatalogItemsAsyncWithHttpInfo * - * Import loyalty points + * List items in a catalog * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sku The SKU of the item. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $upFile = null) + public function listCatalogItemsAsyncWithHttpInfo($catalogId, $pageSize = 1000, $skip = null, $withTotalResultSize = null, $sku = null) { - $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importLoyaltyPointsRequest($loyaltyProgramId, $upFile); + $returnType = '\TalonOne\Client\Model\InlineResponse20033'; + $request = $this->listCatalogItemsRequest($catalogId, $pageSize, $skip, $withTotalResultSize, $sku); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -32694,45 +34831,79 @@ function ($exception) { } /** - * Create request for operation 'importLoyaltyPoints' + * Create request for operation 'listCatalogItems' * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sku The SKU of the item. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importLoyaltyPointsRequest($loyaltyProgramId, $upFile = null) + protected function listCatalogItemsRequest($catalogId, $pageSize = 1000, $skip = null, $withTotalResultSize = null, $sku = null) { - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + // verify the required parameter 'catalogId' is set + if ($catalogId === null || (is_array($catalogId) && count($catalogId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling importLoyaltyPoints' + 'Missing the required parameter $catalogId when calling listCatalogItems' ); } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCatalogItems, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCatalogItems, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/import_points'; + + $resourcePath = '/v1/catalogs/{catalogId}/items'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + } + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; + } + // query params + if (is_array($sku)) { + $sku = ObjectSerializer::serializeCollection($sku, '', true); + } + if ($sku !== null) { + $queryParams['sku'] = $sku; + } // path params - if ($loyaltyProgramId !== null) { + if ($catalogId !== null) { $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), + '{' . 'catalogId' . '}', + ObjectSerializer::toPathValue($catalogId), $resourcePath ); } - // form params - if ($upFile !== null) { - $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); - } // body params $_tempBody = null; @@ -32743,7 +34914,7 @@ protected function importLoyaltyPointsRequest($loyaltyProgramId, $upFile = null) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['multipart/form-data'] + [] ); } @@ -32800,7 +34971,7 @@ protected function importLoyaltyPointsRequest($loyaltyProgramId, $upFile = null) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -32808,38 +34979,48 @@ protected function importLoyaltyPointsRequest($loyaltyProgramId, $upFile = null) } /** - * Operation importPoolGiveaways + * Operation listCollections * - * Import giveaway codes into a giveaway pool + * List collections in campaign * - * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import + * @return \TalonOne\Client\Model\InlineResponse20018|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function importPoolGiveaways($poolId, $upFile = null) + public function listCollections($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - list($response) = $this->importPoolGiveawaysWithHttpInfo($poolId, $upFile); + list($response) = $this->listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); return $response; } /** - * Operation importPoolGiveawaysWithHttpInfo + * Operation listCollectionsWithHttpInfo * - * Import giveaway codes into a giveaway pool + * List collections in campaign * - * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20018|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function importPoolGiveawaysWithHttpInfo($poolId, $upFile = null) + public function listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - $request = $this->importPoolGiveawaysRequest($poolId, $upFile); + $request = $this->listCollectionsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); try { $options = $this->createHttpClientOption(); @@ -32872,20 +35053,32 @@ public function importPoolGiveawaysWithHttpInfo($poolId, $upFile = null) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20018' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20018', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Import'; + $returnType = '\TalonOne\Client\Model\InlineResponse20018'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -32904,7 +35097,15 @@ public function importPoolGiveawaysWithHttpInfo($poolId, $upFile = null) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Import', + '\TalonOne\Client\Model\InlineResponse20018', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -32915,19 +35116,24 @@ public function importPoolGiveawaysWithHttpInfo($poolId, $upFile = null) } /** - * Operation importPoolGiveawaysAsync + * Operation listCollectionsAsync * - * Import giveaway codes into a giveaway pool + * List collections in campaign * - * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importPoolGiveawaysAsync($poolId, $upFile = null) + public function listCollectionsAsync($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - return $this->importPoolGiveawaysAsyncWithHttpInfo($poolId, $upFile) + return $this->listCollectionsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name) ->then( function ($response) { return $response[0]; @@ -32936,20 +35142,25 @@ function ($response) { } /** - * Operation importPoolGiveawaysAsyncWithHttpInfo + * Operation listCollectionsAsyncWithHttpInfo * - * Import giveaway codes into a giveaway pool + * List collections in campaign * - * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importPoolGiveawaysAsyncWithHttpInfo($poolId, $upFile = null) + public function listCollectionsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importPoolGiveawaysRequest($poolId, $upFile); + $returnType = '\TalonOne\Client\Model\InlineResponse20018'; + $request = $this->listCollectionsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -32986,45 +35197,102 @@ function ($exception) { } /** - * Create request for operation 'importPoolGiveaways' + * Create request for operation 'listCollections' * - * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importPoolGiveawaysRequest($poolId, $upFile = null) + protected function listCollectionsRequest($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - // verify the required parameter 'poolId' is set - if ($poolId === null || (is_array($poolId) && count($poolId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $poolId when calling importPoolGiveaways' + 'Missing the required parameter $applicationId when calling listCollections' ); } + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling listCollections' + ); + } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollections, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollections, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/giveaways/pools/{poolId}/import'; + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + } + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; + } + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); + } + if ($name !== null) { + $queryParams['name'] = $name; + } // path params - if ($poolId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'poolId' . '}', - ObjectSerializer::toPathValue($poolId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } - - // form params - if ($upFile !== null) { - $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); } + // body params $_tempBody = null; @@ -33035,7 +35303,7 @@ protected function importPoolGiveawaysRequest($poolId, $upFile = null) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['multipart/form-data'] + [] ); } @@ -33092,7 +35360,7 @@ protected function importPoolGiveawaysRequest($poolId, $upFile = null) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -33100,40 +35368,46 @@ protected function importPoolGiveawaysRequest($poolId, $upFile = null) } /** - * Operation importReferrals + * Operation listCollectionsInApplication * - * Import referrals + * List collections in Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import + * @return \TalonOne\Client\Model\InlineResponse20018|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function importReferrals($applicationId, $campaignId, $upFile = null) + public function listCollectionsInApplication($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - list($response) = $this->importReferralsWithHttpInfo($applicationId, $campaignId, $upFile); + list($response) = $this->listCollectionsInApplicationWithHttpInfo($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); return $response; } /** - * Operation importReferralsWithHttpInfo + * Operation listCollectionsInApplicationWithHttpInfo * - * Import referrals + * List collections in Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20018|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function importReferralsWithHttpInfo($applicationId, $campaignId, $upFile = null) + public function listCollectionsInApplicationWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - $request = $this->importReferralsRequest($applicationId, $campaignId, $upFile); + $request = $this->listCollectionsInApplicationRequest($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); try { $options = $this->createHttpClientOption(); @@ -33166,20 +35440,32 @@ public function importReferralsWithHttpInfo($applicationId, $campaignId, $upFile $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20018' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20018', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Import'; + $returnType = '\TalonOne\Client\Model\InlineResponse20018'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -33198,7 +35484,15 @@ public function importReferralsWithHttpInfo($applicationId, $campaignId, $upFile case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Import', + '\TalonOne\Client\Model\InlineResponse20018', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -33209,20 +35503,23 @@ public function importReferralsWithHttpInfo($applicationId, $campaignId, $upFile } /** - * Operation importReferralsAsync + * Operation listCollectionsInApplicationAsync * - * Import referrals + * List collections in Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importReferralsAsync($applicationId, $campaignId, $upFile = null) + public function listCollectionsInApplicationAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - return $this->importReferralsAsyncWithHttpInfo($applicationId, $campaignId, $upFile) + return $this->listCollectionsInApplicationAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name) ->then( function ($response) { return $response[0]; @@ -33231,21 +35528,24 @@ function ($response) { } /** - * Operation importReferralsAsyncWithHttpInfo + * Operation listCollectionsInApplicationAsyncWithHttpInfo * - * Import referrals + * List collections in Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importReferralsAsyncWithHttpInfo($applicationId, $campaignId, $upFile = null) + public function listCollectionsInApplicationAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { - $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importReferralsRequest($applicationId, $campaignId, $upFile); + $returnType = '\TalonOne\Client\Model\InlineResponse20018'; + $request = $this->listCollectionsInApplicationRequest($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -33282,37 +35582,76 @@ function ($exception) { } /** - * Create request for operation 'importReferrals' + * Create request for operation 'listCollectionsInApplication' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip The number of items to skip when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by collection name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importReferralsRequest($applicationId, $campaignId, $upFile = null) + protected function listCollectionsInApplicationRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling importReferrals' + 'Missing the required parameter $applicationId when calling listCollectionsInApplication' ); } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling importReferrals' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollectionsInApplication, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollectionsInApplication, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals'; + + $resourcePath = '/v1/applications/{applicationId}/collections'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + } + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; + } + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); + } + if ($name !== null) { + $queryParams['name'] = $name; + } // path params @@ -33323,19 +35662,7 @@ protected function importReferralsRequest($applicationId, $campaignId, $upFile = $resourcePath ); } - // path params - if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); - } - // form params - if ($upFile !== null) { - $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); - } // body params $_tempBody = null; @@ -33346,7 +35673,7 @@ protected function importReferralsRequest($applicationId, $campaignId, $upFile = } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['multipart/form-data'] + [] ); } @@ -33403,7 +35730,7 @@ protected function importReferralsRequest($applicationId, $campaignId, $upFile = $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -33411,44 +35738,50 @@ protected function importReferralsRequest($applicationId, $campaignId, $upFile = } /** - * Operation listAccountCollections + * Operation listStores * - * List collections in account + * List stores * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $name The name of the store. (optional) + * @param string $integrationId The integration ID of the store. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20015|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse20043 */ - public function listAccountCollections($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function listStores($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $campaignId = null, $name = null, $integrationId = null) { - list($response) = $this->listAccountCollectionsWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize, $name); + list($response) = $this->listStoresWithHttpInfo($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $campaignId, $name, $integrationId); return $response; } /** - * Operation listAccountCollectionsWithHttpInfo + * Operation listStoresWithHttpInfo * - * List collections in account + * List stores * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $name The name of the store. (optional) + * @param string $integrationId The integration ID of the store. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20015|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20043, HTTP status code, HTTP response headers (array of strings) */ - public function listAccountCollectionsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function listStoresWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $campaignId = null, $name = null, $integrationId = null) { - $request = $this->listAccountCollectionsRequest($pageSize, $skip, $sort, $withTotalResultSize, $name); + $request = $this->listStoresRequest($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $campaignId, $name, $integrationId); try { $options = $this->createHttpClientOption(); @@ -33481,56 +35814,20 @@ public function listAccountCollectionsWithHttpInfo($pageSize = 1000, $skip = nul $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20015' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20015', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20043' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20043', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20015'; + $returnType = '\TalonOne\Client\Model\InlineResponse20043'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -33549,31 +35846,7 @@ public function listAccountCollectionsWithHttpInfo($pageSize = 1000, $skip = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20015', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\InlineResponse20043', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -33584,22 +35857,25 @@ public function listAccountCollectionsWithHttpInfo($pageSize = 1000, $skip = nul } /** - * Operation listAccountCollectionsAsync + * Operation listStoresAsync * - * List collections in account + * List stores * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $name The name of the store. (optional) + * @param string $integrationId The integration ID of the store. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listAccountCollectionsAsync($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function listStoresAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $campaignId = null, $name = null, $integrationId = null) { - return $this->listAccountCollectionsAsyncWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize, $name) + return $this->listStoresAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $campaignId, $name, $integrationId) ->then( function ($response) { return $response[0]; @@ -33608,23 +35884,26 @@ function ($response) { } /** - * Operation listAccountCollectionsAsyncWithHttpInfo + * Operation listStoresAsyncWithHttpInfo * - * List collections in account + * List stores * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $name The name of the store. (optional) + * @param string $integrationId The integration ID of the store. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listAccountCollectionsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function listStoresAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $campaignId = null, $name = null, $integrationId = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20015'; - $request = $this->listAccountCollectionsRequest($pageSize, $skip, $sort, $withTotalResultSize, $name); + $returnType = '\TalonOne\Client\Model\InlineResponse20043'; + $request = $this->listStoresRequest($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $campaignId, $name, $integrationId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -33661,28 +35940,37 @@ function ($exception) { } /** - * Create request for operation 'listAccountCollections' + * Create request for operation 'listStores' * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $name The name of the store. (optional) + * @param string $integrationId The integration ID of the store. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function listAccountCollectionsRequest($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + protected function listStoresRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $campaignId = null, $name = null, $integrationId = null) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling listStores' + ); + } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listAccountCollections, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listStores, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listAccountCollections, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listStores, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/collections'; + $resourcePath = '/v1/applications/{applicationId}/stores'; $formParams = []; $queryParams = []; $headerParams = []; @@ -33718,14 +36006,36 @@ protected function listAccountCollectionsRequest($pageSize = 1000, $skip = null, $queryParams['withTotalResultSize'] = $withTotalResultSize; } // query params + if (is_array($campaignId)) { + $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); + } + if ($campaignId !== null) { + $queryParams['campaignId'] = $campaignId; + } + // query params if (is_array($name)) { $name = ObjectSerializer::serializeCollection($name, '', true); } if ($name !== null) { $queryParams['name'] = $name; } + // query params + if (is_array($integrationId)) { + $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); + } + if ($integrationId !== null) { + $queryParams['integrationId'] = $integrationId; + } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -33802,48 +36112,37 @@ protected function listAccountCollectionsRequest($pageSize = 1000, $skip = null, } /** - * Operation listCollections + * Operation notificationActivation * - * List collections + * Activate or deactivate notification * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $notificationId The ID of the notification. Get it with the appropriate _List notifications_ endpoint. (required) + * @param \TalonOne\Client\Model\NotificationActivation $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20017|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return void */ - public function listCollections($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function notificationActivation($notificationId, $body) { - list($response) = $this->listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); - return $response; + $this->notificationActivationWithHttpInfo($notificationId, $body); } /** - * Operation listCollectionsWithHttpInfo + * Operation notificationActivationWithHttpInfo * - * List collections + * Activate or deactivate notification * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $notificationId The ID of the notification. Get it with the appropriate _List notifications_ endpoint. (required) + * @param \TalonOne\Client\Model\NotificationActivation $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20017|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function notificationActivationWithHttpInfo($notificationId, $body) { - $request = $this->listCollectionsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + $request = $this->notificationActivationRequest($notificationId, $body); try { $options = $this->createHttpClientOption(); @@ -33873,90 +36172,29 @@ public function listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSi ); } - $responseBody = $response->getBody(); - switch($statusCode) { - case 200: - if ('\TalonOne\Client\Model\InlineResponse20017' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20017', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\TalonOne\Client\Model\InlineResponse20017'; - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20017', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation listCollectionsAsync + * Operation notificationActivationAsync * - * List collections + * Activate or deactivate notification * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $notificationId The ID of the notification. Get it with the appropriate _List notifications_ endpoint. (required) + * @param \TalonOne\Client\Model\NotificationActivation $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listCollectionsAsync($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function notificationActivationAsync($notificationId, $body) { - return $this->listCollectionsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name) + return $this->notificationActivationAsyncWithHttpInfo($notificationId, $body) ->then( function ($response) { return $response[0]; @@ -33965,42 +36203,26 @@ function ($response) { } /** - * Operation listCollectionsAsyncWithHttpInfo + * Operation notificationActivationAsyncWithHttpInfo * - * List collections + * Activate or deactivate notification * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $notificationId The ID of the notification. Get it with the appropriate _List notifications_ endpoint. (required) + * @param \TalonOne\Client\Model\NotificationActivation $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listCollectionsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function notificationActivationAsyncWithHttpInfo($notificationId, $body) { - $returnType = '\TalonOne\Client\Model\InlineResponse20017'; - $request = $this->listCollectionsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + $returnType = ''; + $request = $this->notificationActivationRequest($notificationId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -34020,113 +36242,61 @@ function ($exception) { } /** - * Create request for operation 'listCollections' + * Create request for operation 'notificationActivation' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $notificationId The ID of the notification. Get it with the appropriate _List notifications_ endpoint. (required) + * @param \TalonOne\Client\Model\NotificationActivation $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function listCollectionsRequest($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + protected function notificationActivationRequest($notificationId, $body) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'notificationId' is set + if ($notificationId === null || (is_array($notificationId) && count($notificationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling listCollections' + 'Missing the required parameter $notificationId when calling notificationActivation' ); } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling listCollections' + 'Missing the required parameter $body when calling notificationActivation' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollections, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollections, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections'; + $resourcePath = '/v1/notifications/{notificationId}/activation'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); - } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; - } - // query params - if (is_array($name)) { - $name = ObjectSerializer::serializeCollection($name, '', true); - } - if ($name !== null) { - $queryParams['name'] = $name; - } // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($campaignId !== null) { + if ($notificationId !== null) { $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + '{' . 'notificationId' . '}', + ObjectSerializer::toPathValue($notificationId), $resourcePath ); } // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + [] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] + [], + ['application/json'] ); } @@ -34183,7 +36353,7 @@ protected function listCollectionsRequest($applicationId, $campaignId, $pageSize $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -34191,46 +36361,38 @@ protected function listCollectionsRequest($applicationId, $campaignId, $pageSize } /** - * Operation listCollectionsInApplication + * Operation postAddedDeductedPointsNotification * - * List collections in application + * Create notification about added or deducted loyalty points * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20017|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\BaseNotification|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function listCollectionsInApplication($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function postAddedDeductedPointsNotification($loyaltyProgramId, $body) { - list($response) = $this->listCollectionsInApplicationWithHttpInfo($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + list($response) = $this->postAddedDeductedPointsNotificationWithHttpInfo($loyaltyProgramId, $body); return $response; } /** - * Operation listCollectionsInApplicationWithHttpInfo + * Operation postAddedDeductedPointsNotificationWithHttpInfo * - * List collections in application + * Create notification about added or deducted loyalty points * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20017|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\BaseNotification|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function listCollectionsInApplicationWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function postAddedDeductedPointsNotificationWithHttpInfo($loyaltyProgramId, $body) { - $request = $this->listCollectionsInApplicationRequest($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + $request = $this->postAddedDeductedPointsNotificationRequest($loyaltyProgramId, $body); try { $options = $this->createHttpClientOption(); @@ -34263,14 +36425,38 @@ public function listCollectionsInApplicationWithHttpInfo($applicationId, $pageSi $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20017' === '\SplFileObject') { + if ('\TalonOne\Client\Model\BaseNotification' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20017', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\BaseNotification', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -34288,7 +36474,7 @@ public function listCollectionsInApplicationWithHttpInfo($applicationId, $pageSi ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20017'; + $returnType = '\TalonOne\Client\Model\BaseNotification'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -34307,7 +36493,23 @@ public function listCollectionsInApplicationWithHttpInfo($applicationId, $pageSi case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20017', + '\TalonOne\Client\Model\BaseNotification', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -34326,23 +36528,19 @@ public function listCollectionsInApplicationWithHttpInfo($applicationId, $pageSi } /** - * Operation listCollectionsInApplicationAsync + * Operation postAddedDeductedPointsNotificationAsync * - * List collections in application + * Create notification about added or deducted loyalty points * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listCollectionsInApplicationAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function postAddedDeductedPointsNotificationAsync($loyaltyProgramId, $body) { - return $this->listCollectionsInApplicationAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name) + return $this->postAddedDeductedPointsNotificationAsyncWithHttpInfo($loyaltyProgramId, $body) ->then( function ($response) { return $response[0]; @@ -34351,24 +36549,20 @@ function ($response) { } /** - * Operation listCollectionsInApplicationAsyncWithHttpInfo + * Operation postAddedDeductedPointsNotificationAsyncWithHttpInfo * - * List collections in application + * Create notification about added or deducted loyalty points * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listCollectionsInApplicationAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function postAddedDeductedPointsNotificationAsyncWithHttpInfo($loyaltyProgramId, $body) { - $returnType = '\TalonOne\Client\Model\InlineResponse20017'; - $request = $this->listCollectionsInApplicationRequest($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + $returnType = '\TalonOne\Client\Model\BaseNotification'; + $request = $this->postAddedDeductedPointsNotificationRequest($loyaltyProgramId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -34405,89 +36599,52 @@ function ($exception) { } /** - * Create request for operation 'listCollectionsInApplication' + * Create request for operation 'postAddedDeductedPointsNotification' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function listCollectionsInApplicationRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + protected function postAddedDeductedPointsNotificationRequest($loyaltyProgramId, $body) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling listCollectionsInApplication' + 'Missing the required parameter $loyaltyProgramId when calling postAddedDeductedPointsNotification' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollectionsInApplication, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollectionsInApplication, must be bigger than or equal to 1.'); + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling postAddedDeductedPointsNotification' + ); } - - $resourcePath = '/v1/applications/{applicationId}/collections'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_points'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); - } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; - } - // query params - if (is_array($name)) { - $name = ObjectSerializer::serializeCollection($name, '', true); - } - if ($name !== null) { - $queryParams['name'] = $name; - } // path params - if ($applicationId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -34496,7 +36653,7 @@ protected function listCollectionsInApplicationRequest($applicationId, $pageSize } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -34553,7 +36710,7 @@ protected function listCollectionsInApplicationRequest($applicationId, $pageSize $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -34561,38 +36718,38 @@ protected function listCollectionsInApplicationRequest($applicationId, $pageSize } /** - * Operation postAddedDeductedPointsNotification + * Operation postCatalogsStrikethroughNotification * - * Create notification about added or deducted loyalty points + * Create strikethrough notification * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \TalonOne\Client\Model\BaseNotification|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function postAddedDeductedPointsNotification($loyaltyProgramId, $body) + public function postCatalogsStrikethroughNotification($applicationId, $body) { - list($response) = $this->postAddedDeductedPointsNotificationWithHttpInfo($loyaltyProgramId, $body); + list($response) = $this->postCatalogsStrikethroughNotificationWithHttpInfo($applicationId, $body); return $response; } /** - * Operation postAddedDeductedPointsNotificationWithHttpInfo + * Operation postCatalogsStrikethroughNotificationWithHttpInfo * - * Create notification about added or deducted loyalty points + * Create strikethrough notification * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \TalonOne\Client\Model\BaseNotification|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function postAddedDeductedPointsNotificationWithHttpInfo($loyaltyProgramId, $body) + public function postCatalogsStrikethroughNotificationWithHttpInfo($applicationId, $body) { - $request = $this->postAddedDeductedPointsNotificationRequest($loyaltyProgramId, $body); + $request = $this->postCatalogsStrikethroughNotificationRequest($applicationId, $body); try { $options = $this->createHttpClientOption(); @@ -34728,19 +36885,19 @@ public function postAddedDeductedPointsNotificationWithHttpInfo($loyaltyProgramI } /** - * Operation postAddedDeductedPointsNotificationAsync + * Operation postCatalogsStrikethroughNotificationAsync * - * Create notification about added or deducted loyalty points + * Create strikethrough notification * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postAddedDeductedPointsNotificationAsync($loyaltyProgramId, $body) + public function postCatalogsStrikethroughNotificationAsync($applicationId, $body) { - return $this->postAddedDeductedPointsNotificationAsyncWithHttpInfo($loyaltyProgramId, $body) + return $this->postCatalogsStrikethroughNotificationAsyncWithHttpInfo($applicationId, $body) ->then( function ($response) { return $response[0]; @@ -34749,20 +36906,20 @@ function ($response) { } /** - * Operation postAddedDeductedPointsNotificationAsyncWithHttpInfo + * Operation postCatalogsStrikethroughNotificationAsyncWithHttpInfo * - * Create notification about added or deducted loyalty points + * Create strikethrough notification * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postAddedDeductedPointsNotificationAsyncWithHttpInfo($loyaltyProgramId, $body) + public function postCatalogsStrikethroughNotificationAsyncWithHttpInfo($applicationId, $body) { $returnType = '\TalonOne\Client\Model\BaseNotification'; - $request = $this->postAddedDeductedPointsNotificationRequest($loyaltyProgramId, $body); + $request = $this->postCatalogsStrikethroughNotificationRequest($applicationId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -34799,30 +36956,30 @@ function ($exception) { } /** - * Create request for operation 'postAddedDeductedPointsNotification' + * Create request for operation 'postCatalogsStrikethroughNotification' * - * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function postAddedDeductedPointsNotificationRequest($loyaltyProgramId, $body) + protected function postCatalogsStrikethroughNotificationRequest($applicationId, $body) { - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling postAddedDeductedPointsNotification' + 'Missing the required parameter $applicationId when calling postCatalogsStrikethroughNotification' ); } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling postAddedDeductedPointsNotification' + 'Missing the required parameter $body when calling postCatalogsStrikethroughNotification' ); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_points'; + $resourcePath = '/v1/applications/{applicationId}/catalogs/notifications/strikethrough'; $formParams = []; $queryParams = []; $headerParams = []; @@ -34832,10 +36989,10 @@ protected function postAddedDeductedPointsNotificationRequest($loyaltyProgramId, // path params - if ($loyaltyProgramId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } @@ -34918,38 +37075,38 @@ protected function postAddedDeductedPointsNotificationRequest($loyaltyProgramId, } /** - * Operation postCatalogsStrikethroughNotification + * Operation postPendingPointsNotification * - * Create strikethrough notification + * Create notification about pending loyalty points * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \TalonOne\Client\Model\BaseNotification|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function postCatalogsStrikethroughNotification($applicationId, $body) + public function postPendingPointsNotification($loyaltyProgramId, $body) { - list($response) = $this->postCatalogsStrikethroughNotificationWithHttpInfo($applicationId, $body); + list($response) = $this->postPendingPointsNotificationWithHttpInfo($loyaltyProgramId, $body); return $response; } /** - * Operation postCatalogsStrikethroughNotificationWithHttpInfo + * Operation postPendingPointsNotificationWithHttpInfo * - * Create strikethrough notification + * Create notification about pending loyalty points * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \TalonOne\Client\Model\BaseNotification|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function postCatalogsStrikethroughNotificationWithHttpInfo($applicationId, $body) + public function postPendingPointsNotificationWithHttpInfo($loyaltyProgramId, $body) { - $request = $this->postCatalogsStrikethroughNotificationRequest($applicationId, $body); + $request = $this->postPendingPointsNotificationRequest($loyaltyProgramId, $body); try { $options = $this->createHttpClientOption(); @@ -35085,19 +37242,19 @@ public function postCatalogsStrikethroughNotificationWithHttpInfo($applicationId } /** - * Operation postCatalogsStrikethroughNotificationAsync + * Operation postPendingPointsNotificationAsync * - * Create strikethrough notification + * Create notification about pending loyalty points * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postCatalogsStrikethroughNotificationAsync($applicationId, $body) + public function postPendingPointsNotificationAsync($loyaltyProgramId, $body) { - return $this->postCatalogsStrikethroughNotificationAsyncWithHttpInfo($applicationId, $body) + return $this->postPendingPointsNotificationAsyncWithHttpInfo($loyaltyProgramId, $body) ->then( function ($response) { return $response[0]; @@ -35106,20 +37263,20 @@ function ($response) { } /** - * Operation postCatalogsStrikethroughNotificationAsyncWithHttpInfo + * Operation postPendingPointsNotificationAsyncWithHttpInfo * - * Create strikethrough notification + * Create notification about pending loyalty points * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postCatalogsStrikethroughNotificationAsyncWithHttpInfo($applicationId, $body) + public function postPendingPointsNotificationAsyncWithHttpInfo($loyaltyProgramId, $body) { $returnType = '\TalonOne\Client\Model\BaseNotification'; - $request = $this->postCatalogsStrikethroughNotificationRequest($applicationId, $body); + $request = $this->postPendingPointsNotificationRequest($loyaltyProgramId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -35156,30 +37313,30 @@ function ($exception) { } /** - * Create request for operation 'postCatalogsStrikethroughNotification' + * Create request for operation 'postPendingPointsNotification' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function postCatalogsStrikethroughNotificationRequest($applicationId, $body) + protected function postPendingPointsNotificationRequest($loyaltyProgramId, $body) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling postCatalogsStrikethroughNotification' + 'Missing the required parameter $loyaltyProgramId when calling postPendingPointsNotification' ); } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling postCatalogsStrikethroughNotification' + 'Missing the required parameter $body when calling postPendingPointsNotification' ); } - $resourcePath = '/v1/catalogs/{applicationId}/notifications/strikethrough'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/notifications/pending_points'; $formParams = []; $queryParams = []; $headerParams = []; @@ -35189,10 +37346,10 @@ protected function postCatalogsStrikethroughNotificationRequest($applicationId, // path params - if ($applicationId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } @@ -35852,7 +38009,7 @@ protected function resetPasswordRequest($body) * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param object $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -35867,7 +38024,7 @@ protected function resetPasswordRequest($body) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2008 + * @return \TalonOne\Client\Model\InlineResponse2009 */ public function searchCouponsAdvancedApplicationWideWithoutTotalCount($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) { @@ -35883,7 +38040,7 @@ public function searchCouponsAdvancedApplicationWideWithoutTotalCount($applicati * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param object $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -35898,7 +38055,7 @@ public function searchCouponsAdvancedApplicationWideWithoutTotalCount($applicati * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) */ public function searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) { @@ -35935,20 +38092,20 @@ public function searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInf $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2008' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2009' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2008', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2009', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2008'; + $returnType = '\TalonOne\Client\Model\InlineResponse2009'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -35967,7 +38124,7 @@ public function searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInf case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2008', + '\TalonOne\Client\Model\InlineResponse2009', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -35985,7 +38142,7 @@ public function searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInf * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param object $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -36019,7 +38176,7 @@ function ($response) { * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param object $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -36037,7 +38194,7 @@ function ($response) { */ public function searchCouponsAdvancedApplicationWideWithoutTotalCountAsyncWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2008'; + $returnType = '\TalonOne\Client\Model\InlineResponse2009'; $request = $this->searchCouponsAdvancedApplicationWideWithoutTotalCountRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState); return $this->client @@ -36080,7 +38237,7 @@ function ($exception) { * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param object $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -36313,7 +38470,7 @@ protected function searchCouponsAdvancedApplicationWideWithoutTotalCountRequest( * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param object $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -36327,7 +38484,7 @@ protected function searchCouponsAdvancedApplicationWideWithoutTotalCountRequest( * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2008 + * @return \TalonOne\Client\Model\InlineResponse2009 */ public function searchCouponsAdvancedWithoutTotalCount($applicationId, $campaignId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) { @@ -36344,7 +38501,7 @@ public function searchCouponsAdvancedWithoutTotalCount($applicationId, $campaign * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param object $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -36358,7 +38515,7 @@ public function searchCouponsAdvancedWithoutTotalCount($applicationId, $campaign * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) */ public function searchCouponsAdvancedWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) { @@ -36395,20 +38552,20 @@ public function searchCouponsAdvancedWithoutTotalCountWithHttpInfo($applicationI $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2008' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2009' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2008', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2009', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2008'; + $returnType = '\TalonOne\Client\Model\InlineResponse2009'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -36427,7 +38584,7 @@ public function searchCouponsAdvancedWithoutTotalCountWithHttpInfo($applicationI case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2008', + '\TalonOne\Client\Model\InlineResponse2009', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -36446,7 +38603,7 @@ public function searchCouponsAdvancedWithoutTotalCountWithHttpInfo($applicationI * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param object $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -36480,7 +38637,7 @@ function ($response) { * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param object $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -36497,7 +38654,7 @@ function ($response) { */ public function searchCouponsAdvancedWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2008'; + $returnType = '\TalonOne\Client\Model\InlineResponse2009'; $request = $this->searchCouponsAdvancedWithoutTotalCountRequest($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); return $this->client @@ -36541,7 +38698,7 @@ function ($exception) { * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * @param object $body body (required) * @param int $pageSize The number of items in this response. (optional, default to 1000) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $skip The number of items to skip when paging through large result sets. (optional) * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) @@ -37072,7 +39229,7 @@ protected function transferLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId, * * Update account-level collection * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * @param \TalonOne\Client\Model\UpdateCollection $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -37090,7 +39247,7 @@ public function updateAccountCollection($collectionId, $body) * * Update account-level collection * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * @param \TalonOne\Client\Model\UpdateCollection $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -37239,7 +39396,7 @@ public function updateAccountCollectionWithHttpInfo($collectionId, $body) * * Update account-level collection * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * @param \TalonOne\Client\Model\UpdateCollection $body body (required) * * @throws \InvalidArgumentException @@ -37260,7 +39417,7 @@ function ($response) { * * Update account-level collection * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * @param \TalonOne\Client\Model\UpdateCollection $body body (required) * * @throws \InvalidArgumentException @@ -37308,7 +39465,7 @@ function ($exception) { /** * Create request for operation 'updateAccountCollection' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. (required) * @param \TalonOne\Client\Model\UpdateCollection $body body (required) * * @throws \InvalidArgumentException @@ -38337,11 +40494,11 @@ protected function updateCampaignRequest($applicationId, $campaignId, $body) /** * Operation updateCollection * - * Update collection description + * Update campaign-level collection's description * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * @param \TalonOne\Client\Model\UpdateCampaignCollection $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -38357,11 +40514,11 @@ public function updateCollection($applicationId, $campaignId, $collectionId, $bo /** * Operation updateCollectionWithHttpInfo * - * Update collection description + * Update campaign-level collection's description * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * @param \TalonOne\Client\Model\UpdateCampaignCollection $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -38468,11 +40625,11 @@ public function updateCollectionWithHttpInfo($applicationId, $campaignId, $colle /** * Operation updateCollectionAsync * - * Update collection description + * Update campaign-level collection's description * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * @param \TalonOne\Client\Model\UpdateCampaignCollection $body body (required) * * @throws \InvalidArgumentException @@ -38491,11 +40648,11 @@ function ($response) { /** * Operation updateCollectionAsyncWithHttpInfo * - * Update collection description + * Update campaign-level collection's description * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * @param \TalonOne\Client\Model\UpdateCampaignCollection $body body (required) * * @throws \InvalidArgumentException @@ -38545,7 +40702,7 @@ function ($exception) { * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. (required) * @param \TalonOne\Client\Model\UpdateCampaignCollection $body body (required) * * @throws \InvalidArgumentException @@ -39673,40 +41830,42 @@ protected function updateLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId, $ } /** - * Operation updateNotificationWebhook + * Operation updateReferral * - * Update notification about campaign-related changes + * Update referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $referralId The ID of the referral code. (required) + * @param \TalonOne\Client\Model\UpdateReferral $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\NotificationWebhook + * @return \TalonOne\Client\Model\Referral */ - public function updateNotificationWebhook($applicationId, $notificationWebhookId, $body) + public function updateReferral($applicationId, $campaignId, $referralId, $body) { - list($response) = $this->updateNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId, $body); + list($response) = $this->updateReferralWithHttpInfo($applicationId, $campaignId, $referralId, $body); return $response; } /** - * Operation updateNotificationWebhookWithHttpInfo + * Operation updateReferralWithHttpInfo * - * Update notification about campaign-related changes + * Update referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $referralId The ID of the referral code. (required) + * @param \TalonOne\Client\Model\UpdateReferral $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\NotificationWebhook, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Referral, HTTP status code, HTTP response headers (array of strings) */ - public function updateNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId, $body) + public function updateReferralWithHttpInfo($applicationId, $campaignId, $referralId, $body) { - $request = $this->updateNotificationWebhookRequest($applicationId, $notificationWebhookId, $body); + $request = $this->updateReferralRequest($applicationId, $campaignId, $referralId, $body); try { $options = $this->createHttpClientOption(); @@ -39739,20 +41898,20 @@ public function updateNotificationWebhookWithHttpInfo($applicationId, $notificat $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\NotificationWebhook' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Referral' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\NotificationWebhook', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Referral', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\NotificationWebhook'; + $returnType = '\TalonOne\Client\Model\Referral'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -39771,7 +41930,7 @@ public function updateNotificationWebhookWithHttpInfo($applicationId, $notificat case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\NotificationWebhook', + '\TalonOne\Client\Model\Referral', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -39782,20 +41941,21 @@ public function updateNotificationWebhookWithHttpInfo($applicationId, $notificat } /** - * Operation updateNotificationWebhookAsync + * Operation updateReferralAsync * - * Update notification about campaign-related changes + * Update referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $referralId The ID of the referral code. (required) + * @param \TalonOne\Client\Model\UpdateReferral $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateNotificationWebhookAsync($applicationId, $notificationWebhookId, $body) + public function updateReferralAsync($applicationId, $campaignId, $referralId, $body) { - return $this->updateNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId, $body) + return $this->updateReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId, $body) ->then( function ($response) { return $response[0]; @@ -39804,21 +41964,22 @@ function ($response) { } /** - * Operation updateNotificationWebhookAsyncWithHttpInfo + * Operation updateReferralAsyncWithHttpInfo * - * Update notification about campaign-related changes + * Update referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $referralId The ID of the referral code. (required) + * @param \TalonOne\Client\Model\UpdateReferral $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId, $body) + public function updateReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId, $body) { - $returnType = '\TalonOne\Client\Model\NotificationWebhook'; - $request = $this->updateNotificationWebhookRequest($applicationId, $notificationWebhookId, $body); + $returnType = '\TalonOne\Client\Model\Referral'; + $request = $this->updateReferralRequest($applicationId, $campaignId, $referralId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -39855,37 +42016,44 @@ function ($exception) { } /** - * Create request for operation 'updateNotificationWebhook' + * Create request for operation 'updateReferral' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $referralId The ID of the referral code. (required) + * @param \TalonOne\Client\Model\UpdateReferral $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateNotificationWebhookRequest($applicationId, $notificationWebhookId, $body) + protected function updateReferralRequest($applicationId, $campaignId, $referralId, $body) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling updateNotificationWebhook' + 'Missing the required parameter $applicationId when calling updateReferral' + ); + } + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling updateReferral' ); } - // verify the required parameter 'notificationWebhookId' is set - if ($notificationWebhookId === null || (is_array($notificationWebhookId) && count($notificationWebhookId) === 0)) { + // verify the required parameter 'referralId' is set + if ($referralId === null || (is_array($referralId) && count($referralId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $notificationWebhookId when calling updateNotificationWebhook' + 'Missing the required parameter $referralId when calling updateReferral' ); } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling updateNotificationWebhook' + 'Missing the required parameter $body when calling updateReferral' ); } - $resourcePath = '/v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -39903,10 +42071,18 @@ protected function updateNotificationWebhookRequest($applicationId, $notificatio ); } // path params - if ($notificationWebhookId !== null) { + if ($campaignId !== null) { $resourcePath = str_replace( - '{' . 'notificationWebhookId' . '}', - ObjectSerializer::toPathValue($notificationWebhookId), + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + // path params + if ($referralId !== null) { + $resourcePath = str_replace( + '{' . 'referralId' . '}', + ObjectSerializer::toPathValue($referralId), $resourcePath ); } @@ -39989,42 +42165,40 @@ protected function updateNotificationWebhookRequest($applicationId, $notificatio } /** - * Operation updateReferral + * Operation updateStore * - * Update referral + * Update store * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code. (required) - * @param \TalonOne\Client\Model\UpdateReferral $body body (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) + * @param \TalonOne\Client\Model\NewStore $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Referral + * @return \TalonOne\Client\Model\Store|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function updateReferral($applicationId, $campaignId, $referralId, $body) + public function updateStore($applicationId, $storeId, $body) { - list($response) = $this->updateReferralWithHttpInfo($applicationId, $campaignId, $referralId, $body); + list($response) = $this->updateStoreWithHttpInfo($applicationId, $storeId, $body); return $response; } /** - * Operation updateReferralWithHttpInfo + * Operation updateStoreWithHttpInfo * - * Update referral + * Update store * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code. (required) - * @param \TalonOne\Client\Model\UpdateReferral $body body (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) + * @param \TalonOne\Client\Model\NewStore $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Referral, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Store|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function updateReferralWithHttpInfo($applicationId, $campaignId, $referralId, $body) + public function updateStoreWithHttpInfo($applicationId, $storeId, $body) { - $request = $this->updateReferralRequest($applicationId, $campaignId, $referralId, $body); + $request = $this->updateStoreRequest($applicationId, $storeId, $body); try { $options = $this->createHttpClientOption(); @@ -40057,20 +42231,44 @@ public function updateReferralWithHttpInfo($applicationId, $campaignId, $referra $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Referral' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Store' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Referral', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Store', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Referral'; + $returnType = '\TalonOne\Client\Model\Store'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -40089,7 +42287,23 @@ public function updateReferralWithHttpInfo($applicationId, $campaignId, $referra case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Referral', + '\TalonOne\Client\Model\Store', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -40100,21 +42314,20 @@ public function updateReferralWithHttpInfo($applicationId, $campaignId, $referra } /** - * Operation updateReferralAsync + * Operation updateStoreAsync * - * Update referral + * Update store * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code. (required) - * @param \TalonOne\Client\Model\UpdateReferral $body body (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) + * @param \TalonOne\Client\Model\NewStore $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateReferralAsync($applicationId, $campaignId, $referralId, $body) + public function updateStoreAsync($applicationId, $storeId, $body) { - return $this->updateReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId, $body) + return $this->updateStoreAsyncWithHttpInfo($applicationId, $storeId, $body) ->then( function ($response) { return $response[0]; @@ -40123,22 +42336,21 @@ function ($response) { } /** - * Operation updateReferralAsyncWithHttpInfo + * Operation updateStoreAsyncWithHttpInfo * - * Update referral + * Update store * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code. (required) - * @param \TalonOne\Client\Model\UpdateReferral $body body (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) + * @param \TalonOne\Client\Model\NewStore $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId, $body) + public function updateStoreAsyncWithHttpInfo($applicationId, $storeId, $body) { - $returnType = '\TalonOne\Client\Model\Referral'; - $request = $this->updateReferralRequest($applicationId, $campaignId, $referralId, $body); + $returnType = '\TalonOne\Client\Model\Store'; + $request = $this->updateStoreRequest($applicationId, $storeId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -40175,44 +42387,37 @@ function ($exception) { } /** - * Create request for operation 'updateReferral' + * Create request for operation 'updateStore' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code. (required) - * @param \TalonOne\Client\Model\UpdateReferral $body body (required) + * @param string $storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. (required) + * @param \TalonOne\Client\Model\NewStore $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateReferralRequest($applicationId, $campaignId, $referralId, $body) + protected function updateStoreRequest($applicationId, $storeId, $body) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling updateReferral' + 'Missing the required parameter $applicationId when calling updateStore' ); } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'storeId' is set + if ($storeId === null || (is_array($storeId) && count($storeId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling updateReferral' - ); - } - // verify the required parameter 'referralId' is set - if ($referralId === null || (is_array($referralId) && count($referralId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $referralId when calling updateReferral' + 'Missing the required parameter $storeId when calling updateStore' ); } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling updateReferral' + 'Missing the required parameter $body when calling updateStore' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}'; + $resourcePath = '/v1/applications/{applicationId}/stores/{storeId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -40230,18 +42435,10 @@ protected function updateReferralRequest($applicationId, $campaignId, $referralI ); } // path params - if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); - } - // path params - if ($referralId !== null) { + if ($storeId !== null) { $resourcePath = str_replace( - '{' . 'referralId' . '}', - ObjectSerializer::toPathValue($referralId), + '{' . 'storeId' . '}', + ObjectSerializer::toPathValue($storeId), $resourcePath ); } diff --git a/lib/Configuration.php b/lib/Configuration.php index 745cb273..ed113147 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -88,7 +88,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/5.1.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/6.0.0/PHP'; /** * Debug switch (default set to false) @@ -397,7 +397,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: ' . PHP_EOL; - $report .= ' SDK Package Version: 5.1.0' . PHP_EOL; + $report .= ' SDK Package Version: 6.0.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/AccountAdditionalCost.php b/lib/Model/AccountAdditionalCost.php index 466868bf..e2965907 100644 --- a/lib/Model/AccountAdditionalCost.php +++ b/lib/Model/AccountAdditionalCost.php @@ -261,8 +261,8 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if (!preg_match("/^[A-Za-z](\\w|\\s)*$/", $this->container['name'])) { - $invalidProperties[] = "invalid value for 'name', must be conform to the pattern /^[A-Za-z](\\w|\\s)*$/."; + if (!preg_match("/^[A-Za-z]\\w*$/", $this->container['name'])) { + $invalidProperties[] = "invalid value for 'name', must be conform to the pattern /^[A-Za-z]\\w*$/."; } if ($this->container['title'] === null) { @@ -390,8 +390,8 @@ public function getName() public function setName($name) { - if ((!preg_match("/^[A-Za-z](\\w|\\s)*$/", $name))) { - throw new \InvalidArgumentException("invalid value for $name when calling AccountAdditionalCost., must conform to the pattern /^[A-Za-z](\\w|\\s)*$/."); + if ((!preg_match("/^[A-Za-z]\\w*$/", $name))) { + throw new \InvalidArgumentException("invalid value for $name when calling AccountAdditionalCost., must conform to the pattern /^[A-Za-z]\\w*$/."); } $this->container['name'] = $name; diff --git a/lib/Model/AccountAnalytics.php b/lib/Model/AccountAnalytics.php index 11a67c9d..28a85e8c 100644 --- a/lib/Model/AccountAnalytics.php +++ b/lib/Model/AccountAnalytics.php @@ -75,7 +75,8 @@ class AccountAnalytics implements ModelInterface, ArrayAccess 'customAttributes' => 'int', 'webhooks' => 'int', 'loyaltyPrograms' => 'int', - 'liveLoyaltyPrograms' => 'int' + 'liveLoyaltyPrograms' => 'int', + 'lastUpdatedAt' => '\DateTime' ]; /** @@ -102,7 +103,8 @@ class AccountAnalytics implements ModelInterface, ArrayAccess 'customAttributes' => null, 'webhooks' => null, 'loyaltyPrograms' => null, - 'liveLoyaltyPrograms' => null + 'liveLoyaltyPrograms' => null, + 'lastUpdatedAt' => 'date-time' ]; /** @@ -150,7 +152,8 @@ public static function openAPIFormats() 'customAttributes' => 'customAttributes', 'webhooks' => 'webhooks', 'loyaltyPrograms' => 'loyaltyPrograms', - 'liveLoyaltyPrograms' => 'liveLoyaltyPrograms' + 'liveLoyaltyPrograms' => 'liveLoyaltyPrograms', + 'lastUpdatedAt' => 'lastUpdatedAt' ]; /** @@ -177,7 +180,8 @@ public static function openAPIFormats() 'customAttributes' => 'setCustomAttributes', 'webhooks' => 'setWebhooks', 'loyaltyPrograms' => 'setLoyaltyPrograms', - 'liveLoyaltyPrograms' => 'setLiveLoyaltyPrograms' + 'liveLoyaltyPrograms' => 'setLiveLoyaltyPrograms', + 'lastUpdatedAt' => 'setLastUpdatedAt' ]; /** @@ -204,7 +208,8 @@ public static function openAPIFormats() 'customAttributes' => 'getCustomAttributes', 'webhooks' => 'getWebhooks', 'loyaltyPrograms' => 'getLoyaltyPrograms', - 'liveLoyaltyPrograms' => 'getLiveLoyaltyPrograms' + 'liveLoyaltyPrograms' => 'getLiveLoyaltyPrograms', + 'lastUpdatedAt' => 'getLastUpdatedAt' ]; /** @@ -286,6 +291,7 @@ public function __construct(array $data = null) $this->container['webhooks'] = isset($data['webhooks']) ? $data['webhooks'] : null; $this->container['loyaltyPrograms'] = isset($data['loyaltyPrograms']) ? $data['loyaltyPrograms'] : null; $this->container['liveLoyaltyPrograms'] = isset($data['liveLoyaltyPrograms']) ? $data['liveLoyaltyPrograms'] : null; + $this->container['lastUpdatedAt'] = isset($data['lastUpdatedAt']) ? $data['lastUpdatedAt'] : null; } /** @@ -354,6 +360,9 @@ public function listInvalidProperties() if ($this->container['liveLoyaltyPrograms'] === null) { $invalidProperties[] = "'liveLoyaltyPrograms' can't be null"; } + if ($this->container['lastUpdatedAt'] === null) { + $invalidProperties[] = "'lastUpdatedAt' can't be null"; + } return $invalidProperties; } @@ -824,6 +833,30 @@ public function setLiveLoyaltyPrograms($liveLoyaltyPrograms) return $this; } + + /** + * Gets lastUpdatedAt + * + * @return \DateTime + */ + public function getLastUpdatedAt() + { + return $this->container['lastUpdatedAt']; + } + + /** + * Sets lastUpdatedAt + * + * @param \DateTime $lastUpdatedAt The point in time when the analytics numbers were updated last. + * + * @return $this + */ + public function setLastUpdatedAt($lastUpdatedAt) + { + $this->container['lastUpdatedAt'] = $lastUpdatedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/AccountDashboardStatisticCampaigns.php b/lib/Model/AccountDashboardStatisticCampaigns.php index 12ba2058..84a374bd 100644 --- a/lib/Model/AccountDashboardStatisticCampaigns.php +++ b/lib/Model/AccountDashboardStatisticCampaigns.php @@ -58,7 +58,8 @@ class AccountDashboardStatisticCampaigns implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'live' => 'int', - 'endingSoon' => 'int' + 'endingSoon' => 'int', + 'lowOnBudget' => 'int' ]; /** @@ -68,7 +69,8 @@ class AccountDashboardStatisticCampaigns implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'live' => null, - 'endingSoon' => null + 'endingSoon' => null, + 'lowOnBudget' => null ]; /** @@ -99,7 +101,8 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'live' => 'live', - 'endingSoon' => 'endingSoon' + 'endingSoon' => 'endingSoon', + 'lowOnBudget' => 'lowOnBudget' ]; /** @@ -109,7 +112,8 @@ public static function openAPIFormats() */ protected static $setters = [ 'live' => 'setLive', - 'endingSoon' => 'setEndingSoon' + 'endingSoon' => 'setEndingSoon', + 'lowOnBudget' => 'setLowOnBudget' ]; /** @@ -119,7 +123,8 @@ public static function openAPIFormats() */ protected static $getters = [ 'live' => 'getLive', - 'endingSoon' => 'getEndingSoon' + 'endingSoon' => 'getEndingSoon', + 'lowOnBudget' => 'getLowOnBudget' ]; /** @@ -184,6 +189,7 @@ public function __construct(array $data = null) { $this->container['live'] = isset($data['live']) ? $data['live'] : null; $this->container['endingSoon'] = isset($data['endingSoon']) ? $data['endingSoon'] : null; + $this->container['lowOnBudget'] = isset($data['lowOnBudget']) ? $data['lowOnBudget'] : null; } /** @@ -201,6 +207,9 @@ public function listInvalidProperties() if ($this->container['endingSoon'] === null) { $invalidProperties[] = "'endingSoon' can't be null"; } + if ($this->container['lowOnBudget'] === null) { + $invalidProperties[] = "'lowOnBudget' can't be null"; + } return $invalidProperties; } @@ -253,7 +262,7 @@ public function getEndingSoon() /** * Sets endingSoon * - * @param int $endingSoon Campaigns with a schedule ending in 7 days or with only 10% of budget left. + * @param int $endingSoon Campaigns scheduled to expire sometime in the next 7 days. * * @return $this */ @@ -263,6 +272,30 @@ public function setEndingSoon($endingSoon) return $this; } + + /** + * Gets lowOnBudget + * + * @return int + */ + public function getLowOnBudget() + { + return $this->container['lowOnBudget']; + } + + /** + * Sets lowOnBudget + * + * @param int $lowOnBudget Campaigns with less than 10% of budget left. + * + * @return $this + */ + public function setLowOnBudget($lowOnBudget) + { + $this->container['lowOnBudget'] = $lowOnBudget; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/AddLoyaltyPoints.php b/lib/Model/AddLoyaltyPoints.php index 67337257..f5dd603a 100644 --- a/lib/Model/AddLoyaltyPoints.php +++ b/lib/Model/AddLoyaltyPoints.php @@ -327,7 +327,7 @@ public function getValidityDuration() /** * Sets validityDuration * - * @param string|null $validityDuration The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks and months. Signifies the end of the day, week, or month. If passed, `validUntil` should be omitted. + * @param string|null $validityDuration The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. If passed, `validUntil` should be omitted. * * @return $this */ @@ -375,7 +375,7 @@ public function getPendingDuration() /** * Sets pendingDuration * - * @param string|null $pendingDuration The amount of time before the points are considered valid. The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks and months. Signifies the end of the day, week, or month. + * @param string|null $pendingDuration The amount of time before the points are considered valid. The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. * * @return $this */ diff --git a/lib/Model/AddLoyaltyPointsEffectProps.php b/lib/Model/AddLoyaltyPointsEffectProps.php index 330f3bab..f04d5722 100644 --- a/lib/Model/AddLoyaltyPointsEffectProps.php +++ b/lib/Model/AddLoyaltyPointsEffectProps.php @@ -566,7 +566,7 @@ public function getCartItemSubPosition() /** * Sets cartItemSubPosition * - * @param float|null $cartItemSubPosition The sub position is triggered when application flattening is enabled. It indicates to which item the loyalty points addition applies, for cart items with `quantity` > 1. + * @param float|null $cartItemSubPosition For cart items with `quantity` > 1, the sub position indicates to which item the loyalty points addition is applied. * * @return $this */ diff --git a/lib/Model/AddToAudienceEffectProps.php b/lib/Model/AddToAudienceEffectProps.php new file mode 100644 index 00000000..90e5f176 --- /dev/null +++ b/lib/Model/AddToAudienceEffectProps.php @@ -0,0 +1,399 @@ + 'int', + 'audienceName' => 'string', + 'profileIntegrationId' => 'string', + 'profileId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'audienceId' => null, + 'audienceName' => null, + 'profileIntegrationId' => null, + 'profileId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'audienceId' => 'audienceId', + 'audienceName' => 'audienceName', + 'profileIntegrationId' => 'profileIntegrationId', + 'profileId' => 'profileId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'audienceId' => 'setAudienceId', + 'audienceName' => 'setAudienceName', + 'profileIntegrationId' => 'setProfileIntegrationId', + 'profileId' => 'setProfileId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'audienceId' => 'getAudienceId', + 'audienceName' => 'getAudienceName', + 'profileIntegrationId' => 'getProfileIntegrationId', + 'profileId' => 'getProfileId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['audienceId'] = isset($data['audienceId']) ? $data['audienceId'] : null; + $this->container['audienceName'] = isset($data['audienceName']) ? $data['audienceName'] : null; + $this->container['profileIntegrationId'] = isset($data['profileIntegrationId']) ? $data['profileIntegrationId'] : null; + $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets audienceId + * + * @return int|null + */ + public function getAudienceId() + { + return $this->container['audienceId']; + } + + /** + * Sets audienceId + * + * @param int|null $audienceId The internal ID of the audience. + * + * @return $this + */ + public function setAudienceId($audienceId) + { + $this->container['audienceId'] = $audienceId; + + return $this; + } + + /** + * Gets audienceName + * + * @return string|null + */ + public function getAudienceName() + { + return $this->container['audienceName']; + } + + /** + * Sets audienceName + * + * @param string|null $audienceName The name of the audience. + * + * @return $this + */ + public function setAudienceName($audienceName) + { + $this->container['audienceName'] = $audienceName; + + return $this; + } + + /** + * Gets profileIntegrationId + * + * @return string|null + */ + public function getProfileIntegrationId() + { + return $this->container['profileIntegrationId']; + } + + /** + * Sets profileIntegrationId + * + * @param string|null $profileIntegrationId The ID of the customer profile in the third-party integration platform. + * + * @return $this + */ + public function setProfileIntegrationId($profileIntegrationId) + { + $this->container['profileIntegrationId'] = $profileIntegrationId; + + return $this; + } + + /** + * Gets profileId + * + * @return int|null + */ + public function getProfileId() + { + return $this->container['profileId']; + } + + /** + * Sets profileId + * + * @param int|null $profileId The internal ID of the customer profile. + * + * @return $this + */ + public function setProfileId($profileId) + { + $this->container['profileId'] = $profileId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/AdditionalCampaignProperties.php b/lib/Model/AdditionalCampaignProperties.php new file mode 100644 index 00000000..eb523230 --- /dev/null +++ b/lib/Model/AdditionalCampaignProperties.php @@ -0,0 +1,911 @@ + '\TalonOne\Client\Model\CampaignBudget[]', + 'couponRedemptionCount' => 'int', + 'referralRedemptionCount' => 'int', + 'discountCount' => 'float', + 'discountEffectCount' => 'int', + 'couponCreationCount' => 'int', + 'customEffectCount' => 'int', + 'referralCreationCount' => 'int', + 'addFreeItemEffectCount' => 'int', + 'awardedGiveawaysCount' => 'int', + 'createdLoyaltyPointsCount' => 'float', + 'createdLoyaltyPointsEffectCount' => 'int', + 'redeemedLoyaltyPointsCount' => 'float', + 'redeemedLoyaltyPointsEffectCount' => 'int', + 'callApiEffectCount' => 'int', + 'reservecouponEffectCount' => 'int', + 'lastActivity' => '\DateTime', + 'updated' => '\DateTime', + 'createdBy' => 'string', + 'updatedBy' => 'string', + 'templateId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'budgets' => null, + 'couponRedemptionCount' => null, + 'referralRedemptionCount' => null, + 'discountCount' => null, + 'discountEffectCount' => null, + 'couponCreationCount' => null, + 'customEffectCount' => null, + 'referralCreationCount' => null, + 'addFreeItemEffectCount' => null, + 'awardedGiveawaysCount' => null, + 'createdLoyaltyPointsCount' => null, + 'createdLoyaltyPointsEffectCount' => null, + 'redeemedLoyaltyPointsCount' => null, + 'redeemedLoyaltyPointsEffectCount' => null, + 'callApiEffectCount' => null, + 'reservecouponEffectCount' => null, + 'lastActivity' => 'date-time', + 'updated' => 'date-time', + 'createdBy' => null, + 'updatedBy' => null, + 'templateId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'budgets' => 'budgets', + 'couponRedemptionCount' => 'couponRedemptionCount', + 'referralRedemptionCount' => 'referralRedemptionCount', + 'discountCount' => 'discountCount', + 'discountEffectCount' => 'discountEffectCount', + 'couponCreationCount' => 'couponCreationCount', + 'customEffectCount' => 'customEffectCount', + 'referralCreationCount' => 'referralCreationCount', + 'addFreeItemEffectCount' => 'addFreeItemEffectCount', + 'awardedGiveawaysCount' => 'awardedGiveawaysCount', + 'createdLoyaltyPointsCount' => 'createdLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'createdLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'redeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'redeemedLoyaltyPointsEffectCount', + 'callApiEffectCount' => 'callApiEffectCount', + 'reservecouponEffectCount' => 'reservecouponEffectCount', + 'lastActivity' => 'lastActivity', + 'updated' => 'updated', + 'createdBy' => 'createdBy', + 'updatedBy' => 'updatedBy', + 'templateId' => 'templateId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'budgets' => 'setBudgets', + 'couponRedemptionCount' => 'setCouponRedemptionCount', + 'referralRedemptionCount' => 'setReferralRedemptionCount', + 'discountCount' => 'setDiscountCount', + 'discountEffectCount' => 'setDiscountEffectCount', + 'couponCreationCount' => 'setCouponCreationCount', + 'customEffectCount' => 'setCustomEffectCount', + 'referralCreationCount' => 'setReferralCreationCount', + 'addFreeItemEffectCount' => 'setAddFreeItemEffectCount', + 'awardedGiveawaysCount' => 'setAwardedGiveawaysCount', + 'createdLoyaltyPointsCount' => 'setCreatedLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'setCreatedLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'setRedeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'setRedeemedLoyaltyPointsEffectCount', + 'callApiEffectCount' => 'setCallApiEffectCount', + 'reservecouponEffectCount' => 'setReservecouponEffectCount', + 'lastActivity' => 'setLastActivity', + 'updated' => 'setUpdated', + 'createdBy' => 'setCreatedBy', + 'updatedBy' => 'setUpdatedBy', + 'templateId' => 'setTemplateId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'budgets' => 'getBudgets', + 'couponRedemptionCount' => 'getCouponRedemptionCount', + 'referralRedemptionCount' => 'getReferralRedemptionCount', + 'discountCount' => 'getDiscountCount', + 'discountEffectCount' => 'getDiscountEffectCount', + 'couponCreationCount' => 'getCouponCreationCount', + 'customEffectCount' => 'getCustomEffectCount', + 'referralCreationCount' => 'getReferralCreationCount', + 'addFreeItemEffectCount' => 'getAddFreeItemEffectCount', + 'awardedGiveawaysCount' => 'getAwardedGiveawaysCount', + 'createdLoyaltyPointsCount' => 'getCreatedLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'getCreatedLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'getRedeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'getRedeemedLoyaltyPointsEffectCount', + 'callApiEffectCount' => 'getCallApiEffectCount', + 'reservecouponEffectCount' => 'getReservecouponEffectCount', + 'lastActivity' => 'getLastActivity', + 'updated' => 'getUpdated', + 'createdBy' => 'getCreatedBy', + 'updatedBy' => 'getUpdatedBy', + 'templateId' => 'getTemplateId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['budgets'] = isset($data['budgets']) ? $data['budgets'] : null; + $this->container['couponRedemptionCount'] = isset($data['couponRedemptionCount']) ? $data['couponRedemptionCount'] : null; + $this->container['referralRedemptionCount'] = isset($data['referralRedemptionCount']) ? $data['referralRedemptionCount'] : null; + $this->container['discountCount'] = isset($data['discountCount']) ? $data['discountCount'] : null; + $this->container['discountEffectCount'] = isset($data['discountEffectCount']) ? $data['discountEffectCount'] : null; + $this->container['couponCreationCount'] = isset($data['couponCreationCount']) ? $data['couponCreationCount'] : null; + $this->container['customEffectCount'] = isset($data['customEffectCount']) ? $data['customEffectCount'] : null; + $this->container['referralCreationCount'] = isset($data['referralCreationCount']) ? $data['referralCreationCount'] : null; + $this->container['addFreeItemEffectCount'] = isset($data['addFreeItemEffectCount']) ? $data['addFreeItemEffectCount'] : null; + $this->container['awardedGiveawaysCount'] = isset($data['awardedGiveawaysCount']) ? $data['awardedGiveawaysCount'] : null; + $this->container['createdLoyaltyPointsCount'] = isset($data['createdLoyaltyPointsCount']) ? $data['createdLoyaltyPointsCount'] : null; + $this->container['createdLoyaltyPointsEffectCount'] = isset($data['createdLoyaltyPointsEffectCount']) ? $data['createdLoyaltyPointsEffectCount'] : null; + $this->container['redeemedLoyaltyPointsCount'] = isset($data['redeemedLoyaltyPointsCount']) ? $data['redeemedLoyaltyPointsCount'] : null; + $this->container['redeemedLoyaltyPointsEffectCount'] = isset($data['redeemedLoyaltyPointsEffectCount']) ? $data['redeemedLoyaltyPointsEffectCount'] : null; + $this->container['callApiEffectCount'] = isset($data['callApiEffectCount']) ? $data['callApiEffectCount'] : null; + $this->container['reservecouponEffectCount'] = isset($data['reservecouponEffectCount']) ? $data['reservecouponEffectCount'] : null; + $this->container['lastActivity'] = isset($data['lastActivity']) ? $data['lastActivity'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + $this->container['createdBy'] = isset($data['createdBy']) ? $data['createdBy'] : null; + $this->container['updatedBy'] = isset($data['updatedBy']) ? $data['updatedBy'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['budgets'] === null) { + $invalidProperties[] = "'budgets' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets budgets + * + * @return \TalonOne\Client\Model\CampaignBudget[] + */ + public function getBudgets() + { + return $this->container['budgets']; + } + + /** + * Sets budgets + * + * @param \TalonOne\Client\Model\CampaignBudget[] $budgets A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. + * + * @return $this + */ + public function setBudgets($budgets) + { + $this->container['budgets'] = $budgets; + + return $this; + } + + /** + * Gets couponRedemptionCount + * + * @return int|null + */ + public function getCouponRedemptionCount() + { + return $this->container['couponRedemptionCount']; + } + + /** + * Sets couponRedemptionCount + * + * @param int|null $couponRedemptionCount This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign. + * + * @return $this + */ + public function setCouponRedemptionCount($couponRedemptionCount) + { + $this->container['couponRedemptionCount'] = $couponRedemptionCount; + + return $this; + } + + /** + * Gets referralRedemptionCount + * + * @return int|null + */ + public function getReferralRedemptionCount() + { + return $this->container['referralRedemptionCount']; + } + + /** + * Sets referralRedemptionCount + * + * @param int|null $referralRedemptionCount This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign. + * + * @return $this + */ + public function setReferralRedemptionCount($referralRedemptionCount) + { + $this->container['referralRedemptionCount'] = $referralRedemptionCount; + + return $this; + } + + /** + * Gets discountCount + * + * @return float|null + */ + public function getDiscountCount() + { + return $this->container['discountCount']; + } + + /** + * Sets discountCount + * + * @param float|null $discountCount This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign. + * + * @return $this + */ + public function setDiscountCount($discountCount) + { + $this->container['discountCount'] = $discountCount; + + return $this; + } + + /** + * Gets discountEffectCount + * + * @return int|null + */ + public function getDiscountEffectCount() + { + return $this->container['discountEffectCount']; + } + + /** + * Sets discountEffectCount + * + * @param int|null $discountEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of times discounts were redeemed in this campaign. + * + * @return $this + */ + public function setDiscountEffectCount($discountEffectCount) + { + $this->container['discountEffectCount'] = $discountEffectCount; + + return $this; + } + + /** + * Gets couponCreationCount + * + * @return int|null + */ + public function getCouponCreationCount() + { + return $this->container['couponCreationCount']; + } + + /** + * Sets couponCreationCount + * + * @param int|null $couponCreationCount This property is **deprecated**. The count should be available under *budgets* property. Total number of coupons created by rules in this campaign. + * + * @return $this + */ + public function setCouponCreationCount($couponCreationCount) + { + $this->container['couponCreationCount'] = $couponCreationCount; + + return $this; + } + + /** + * Gets customEffectCount + * + * @return int|null + */ + public function getCustomEffectCount() + { + return $this->container['customEffectCount']; + } + + /** + * Sets customEffectCount + * + * @param int|null $customEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of custom effects triggered by rules in this campaign. + * + * @return $this + */ + public function setCustomEffectCount($customEffectCount) + { + $this->container['customEffectCount'] = $customEffectCount; + + return $this; + } + + /** + * Gets referralCreationCount + * + * @return int|null + */ + public function getReferralCreationCount() + { + return $this->container['referralCreationCount']; + } + + /** + * Sets referralCreationCount + * + * @param int|null $referralCreationCount This property is **deprecated**. The count should be available under *budgets* property. Total number of referrals created by rules in this campaign. + * + * @return $this + */ + public function setReferralCreationCount($referralCreationCount) + { + $this->container['referralCreationCount'] = $referralCreationCount; + + return $this; + } + + /** + * Gets addFreeItemEffectCount + * + * @return int|null + */ + public function getAddFreeItemEffectCount() + { + return $this->container['addFreeItemEffectCount']; + } + + /** + * Sets addFreeItemEffectCount + * + * @param int|null $addFreeItemEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign. + * + * @return $this + */ + public function setAddFreeItemEffectCount($addFreeItemEffectCount) + { + $this->container['addFreeItemEffectCount'] = $addFreeItemEffectCount; + + return $this; + } + + /** + * Gets awardedGiveawaysCount + * + * @return int|null + */ + public function getAwardedGiveawaysCount() + { + return $this->container['awardedGiveawaysCount']; + } + + /** + * Sets awardedGiveawaysCount + * + * @param int|null $awardedGiveawaysCount This property is **deprecated**. The count should be available under *budgets* property. Total number of giveaways awarded by rules in this campaign. + * + * @return $this + */ + public function setAwardedGiveawaysCount($awardedGiveawaysCount) + { + $this->container['awardedGiveawaysCount'] = $awardedGiveawaysCount; + + return $this; + } + + /** + * Gets createdLoyaltyPointsCount + * + * @return float|null + */ + public function getCreatedLoyaltyPointsCount() + { + return $this->container['createdLoyaltyPointsCount']; + } + + /** + * Sets createdLoyaltyPointsCount + * + * @param float|null $createdLoyaltyPointsCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points created by rules in this campaign. + * + * @return $this + */ + public function setCreatedLoyaltyPointsCount($createdLoyaltyPointsCount) + { + $this->container['createdLoyaltyPointsCount'] = $createdLoyaltyPointsCount; + + return $this; + } + + /** + * Gets createdLoyaltyPointsEffectCount + * + * @return int|null + */ + public function getCreatedLoyaltyPointsEffectCount() + { + return $this->container['createdLoyaltyPointsEffectCount']; + } + + /** + * Sets createdLoyaltyPointsEffectCount + * + * @param int|null $createdLoyaltyPointsEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point creation effects triggered by rules in this campaign. + * + * @return $this + */ + public function setCreatedLoyaltyPointsEffectCount($createdLoyaltyPointsEffectCount) + { + $this->container['createdLoyaltyPointsEffectCount'] = $createdLoyaltyPointsEffectCount; + + return $this; + } + + /** + * Gets redeemedLoyaltyPointsCount + * + * @return float|null + */ + public function getRedeemedLoyaltyPointsCount() + { + return $this->container['redeemedLoyaltyPointsCount']; + } + + /** + * Sets redeemedLoyaltyPointsCount + * + * @param float|null $redeemedLoyaltyPointsCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points redeemed by rules in this campaign. + * + * @return $this + */ + public function setRedeemedLoyaltyPointsCount($redeemedLoyaltyPointsCount) + { + $this->container['redeemedLoyaltyPointsCount'] = $redeemedLoyaltyPointsCount; + + return $this; + } + + /** + * Gets redeemedLoyaltyPointsEffectCount + * + * @return int|null + */ + public function getRedeemedLoyaltyPointsEffectCount() + { + return $this->container['redeemedLoyaltyPointsEffectCount']; + } + + /** + * Sets redeemedLoyaltyPointsEffectCount + * + * @param int|null $redeemedLoyaltyPointsEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point redemption effects triggered by rules in this campaign. + * + * @return $this + */ + public function setRedeemedLoyaltyPointsEffectCount($redeemedLoyaltyPointsEffectCount) + { + $this->container['redeemedLoyaltyPointsEffectCount'] = $redeemedLoyaltyPointsEffectCount; + + return $this; + } + + /** + * Gets callApiEffectCount + * + * @return int|null + */ + public function getCallApiEffectCount() + { + return $this->container['callApiEffectCount']; + } + + /** + * Sets callApiEffectCount + * + * @param int|null $callApiEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of webhooks triggered by rules in this campaign. + * + * @return $this + */ + public function setCallApiEffectCount($callApiEffectCount) + { + $this->container['callApiEffectCount'] = $callApiEffectCount; + + return $this; + } + + /** + * Gets reservecouponEffectCount + * + * @return int|null + */ + public function getReservecouponEffectCount() + { + return $this->container['reservecouponEffectCount']; + } + + /** + * Sets reservecouponEffectCount + * + * @param int|null $reservecouponEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of reserve coupon effects triggered by rules in this campaign. + * + * @return $this + */ + public function setReservecouponEffectCount($reservecouponEffectCount) + { + $this->container['reservecouponEffectCount'] = $reservecouponEffectCount; + + return $this; + } + + /** + * Gets lastActivity + * + * @return \DateTime|null + */ + public function getLastActivity() + { + return $this->container['lastActivity']; + } + + /** + * Sets lastActivity + * + * @param \DateTime|null $lastActivity Timestamp of the most recent event received by this campaign. + * + * @return $this + */ + public function setLastActivity($lastActivity) + { + $this->container['lastActivity'] = $lastActivity; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime|null + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime|null $updated Timestamp of the most recent update to the campaign's property. Updates to external entities used in this campaign are **not** registered by this property, such as collection or coupon updates. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets createdBy + * + * @return string|null + */ + public function getCreatedBy() + { + return $this->container['createdBy']; + } + + /** + * Sets createdBy + * + * @param string|null $createdBy Name of the user who created this campaign if available. + * + * @return $this + */ + public function setCreatedBy($createdBy) + { + $this->container['createdBy'] = $createdBy; + + return $this; + } + + /** + * Gets updatedBy + * + * @return string|null + */ + public function getUpdatedBy() + { + return $this->container['updatedBy']; + } + + /** + * Sets updatedBy + * + * @param string|null $updatedBy Name of the user who last updated this campaign if available. + * + * @return $this + */ + public function setUpdatedBy($updatedBy) + { + $this->container['updatedBy'] = $updatedBy; + + return $this; + } + + /** + * Gets templateId + * + * @return int|null + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int|null $templateId The ID of the Campaign Template this Campaign was created from. + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Application.php b/lib/Model/Application.php index 526e34ff..278e6ea3 100644 --- a/lib/Model/Application.php +++ b/lib/Model/Application.php @@ -69,8 +69,6 @@ class Application implements ModelInterface, ArrayAccess 'caseSensitivity' => 'string', 'attributes' => 'object', 'limits' => '\TalonOne\Client\Model\LimitConfig[]', - 'campaignPriority' => 'string', - 'exclusiveCampaignsStrategy' => 'string', 'defaultDiscountScope' => 'string', 'enableCascadingDiscounts' => 'bool', 'enableFlattenedCartItems' => 'bool', @@ -78,6 +76,7 @@ class Application implements ModelInterface, ArrayAccess 'sandbox' => 'bool', 'enablePartialDiscounts' => 'bool', 'defaultDiscountAdditionalCostPerItemScope' => 'string', + 'defaultEvaluationGroupId' => 'int', 'loyaltyPrograms' => '\TalonOne\Client\Model\LoyaltyProgram[]' ]; @@ -98,8 +97,6 @@ class Application implements ModelInterface, ArrayAccess 'caseSensitivity' => null, 'attributes' => null, 'limits' => null, - 'campaignPriority' => null, - 'exclusiveCampaignsStrategy' => null, 'defaultDiscountScope' => null, 'enableCascadingDiscounts' => null, 'enableFlattenedCartItems' => null, @@ -107,6 +104,7 @@ class Application implements ModelInterface, ArrayAccess 'sandbox' => null, 'enablePartialDiscounts' => null, 'defaultDiscountAdditionalCostPerItemScope' => null, + 'defaultEvaluationGroupId' => null, 'loyaltyPrograms' => null ]; @@ -148,8 +146,6 @@ public static function openAPIFormats() 'caseSensitivity' => 'caseSensitivity', 'attributes' => 'attributes', 'limits' => 'limits', - 'campaignPriority' => 'campaignPriority', - 'exclusiveCampaignsStrategy' => 'exclusiveCampaignsStrategy', 'defaultDiscountScope' => 'defaultDiscountScope', 'enableCascadingDiscounts' => 'enableCascadingDiscounts', 'enableFlattenedCartItems' => 'enableFlattenedCartItems', @@ -157,6 +153,7 @@ public static function openAPIFormats() 'sandbox' => 'sandbox', 'enablePartialDiscounts' => 'enablePartialDiscounts', 'defaultDiscountAdditionalCostPerItemScope' => 'defaultDiscountAdditionalCostPerItemScope', + 'defaultEvaluationGroupId' => 'defaultEvaluationGroupId', 'loyaltyPrograms' => 'loyaltyPrograms' ]; @@ -177,8 +174,6 @@ public static function openAPIFormats() 'caseSensitivity' => 'setCaseSensitivity', 'attributes' => 'setAttributes', 'limits' => 'setLimits', - 'campaignPriority' => 'setCampaignPriority', - 'exclusiveCampaignsStrategy' => 'setExclusiveCampaignsStrategy', 'defaultDiscountScope' => 'setDefaultDiscountScope', 'enableCascadingDiscounts' => 'setEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'setEnableFlattenedCartItems', @@ -186,6 +181,7 @@ public static function openAPIFormats() 'sandbox' => 'setSandbox', 'enablePartialDiscounts' => 'setEnablePartialDiscounts', 'defaultDiscountAdditionalCostPerItemScope' => 'setDefaultDiscountAdditionalCostPerItemScope', + 'defaultEvaluationGroupId' => 'setDefaultEvaluationGroupId', 'loyaltyPrograms' => 'setLoyaltyPrograms' ]; @@ -206,8 +202,6 @@ public static function openAPIFormats() 'caseSensitivity' => 'getCaseSensitivity', 'attributes' => 'getAttributes', 'limits' => 'getLimits', - 'campaignPriority' => 'getCampaignPriority', - 'exclusiveCampaignsStrategy' => 'getExclusiveCampaignsStrategy', 'defaultDiscountScope' => 'getDefaultDiscountScope', 'enableCascadingDiscounts' => 'getEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'getEnableFlattenedCartItems', @@ -215,6 +209,7 @@ public static function openAPIFormats() 'sandbox' => 'getSandbox', 'enablePartialDiscounts' => 'getEnablePartialDiscounts', 'defaultDiscountAdditionalCostPerItemScope' => 'getDefaultDiscountAdditionalCostPerItemScope', + 'defaultEvaluationGroupId' => 'getDefaultEvaluationGroupId', 'loyaltyPrograms' => 'getLoyaltyPrograms' ]; @@ -262,12 +257,6 @@ public function getModelName() const CASE_SENSITIVITY_SENSITIVE = 'sensitive'; const CASE_SENSITIVITY_INSENSITIVE_UPPERCASE = 'insensitive-uppercase'; const CASE_SENSITIVITY_INSENSITIVE_LOWERCASE = 'insensitive-lowercase'; - const CAMPAIGN_PRIORITY_UNIVERSAL = 'universal'; - const CAMPAIGN_PRIORITY_STACKABLE = 'stackable'; - const CAMPAIGN_PRIORITY_EXCLUSIVE = 'exclusive'; - const EXCLUSIVE_CAMPAIGNS_STRATEGY_LIST_ORDER = 'listOrder'; - const EXCLUSIVE_CAMPAIGNS_STRATEGY_LOWEST_DISCOUNT = 'lowestDiscount'; - const EXCLUSIVE_CAMPAIGNS_STRATEGY_HIGHEST_DISCOUNT = 'highestDiscount'; const DEFAULT_DISCOUNT_SCOPE_SESSION_TOTAL = 'sessionTotal'; const DEFAULT_DISCOUNT_SCOPE_CART_ITEMS = 'cartItems'; const DEFAULT_DISCOUNT_SCOPE_ADDITIONAL_COSTS = 'additionalCosts'; @@ -291,34 +280,6 @@ public function getCaseSensitivityAllowableValues() ]; } - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getCampaignPriorityAllowableValues() - { - return [ - self::CAMPAIGN_PRIORITY_UNIVERSAL, - self::CAMPAIGN_PRIORITY_STACKABLE, - self::CAMPAIGN_PRIORITY_EXCLUSIVE, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getExclusiveCampaignsStrategyAllowableValues() - { - return [ - self::EXCLUSIVE_CAMPAIGNS_STRATEGY_LIST_ORDER, - self::EXCLUSIVE_CAMPAIGNS_STRATEGY_LOWEST_DISCOUNT, - self::EXCLUSIVE_CAMPAIGNS_STRATEGY_HIGHEST_DISCOUNT, - ]; - } - /** * Gets allowable values of the enum * @@ -374,8 +335,6 @@ public function __construct(array $data = null) $this->container['caseSensitivity'] = isset($data['caseSensitivity']) ? $data['caseSensitivity'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; - $this->container['campaignPriority'] = isset($data['campaignPriority']) ? $data['campaignPriority'] : 'universal'; - $this->container['exclusiveCampaignsStrategy'] = isset($data['exclusiveCampaignsStrategy']) ? $data['exclusiveCampaignsStrategy'] : 'listOrder'; $this->container['defaultDiscountScope'] = isset($data['defaultDiscountScope']) ? $data['defaultDiscountScope'] : null; $this->container['enableCascadingDiscounts'] = isset($data['enableCascadingDiscounts']) ? $data['enableCascadingDiscounts'] : null; $this->container['enableFlattenedCartItems'] = isset($data['enableFlattenedCartItems']) ? $data['enableFlattenedCartItems'] : null; @@ -383,6 +342,7 @@ public function __construct(array $data = null) $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; $this->container['enablePartialDiscounts'] = isset($data['enablePartialDiscounts']) ? $data['enablePartialDiscounts'] : null; $this->container['defaultDiscountAdditionalCostPerItemScope'] = isset($data['defaultDiscountAdditionalCostPerItemScope']) ? $data['defaultDiscountAdditionalCostPerItemScope'] : null; + $this->container['defaultEvaluationGroupId'] = isset($data['defaultEvaluationGroupId']) ? $data['defaultEvaluationGroupId'] : null; $this->container['loyaltyPrograms'] = isset($data['loyaltyPrograms']) ? $data['loyaltyPrograms'] : null; } @@ -436,22 +396,6 @@ public function listInvalidProperties() ); } - $allowedValues = $this->getCampaignPriorityAllowableValues(); - if (!is_null($this->container['campaignPriority']) && !in_array($this->container['campaignPriority'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'campaignPriority', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getExclusiveCampaignsStrategyAllowableValues(); - if (!is_null($this->container['exclusiveCampaignsStrategy']) && !in_array($this->container['exclusiveCampaignsStrategy'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'exclusiveCampaignsStrategy', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - $allowedValues = $this->getDefaultDiscountScopeAllowableValues(); if (!is_null($this->container['defaultDiscountScope']) && !in_array($this->container['defaultDiscountScope'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -774,72 +718,6 @@ public function setLimits($limits) return $this; } - /** - * Gets campaignPriority - * - * @return string|null - */ - public function getCampaignPriority() - { - return $this->container['campaignPriority']; - } - - /** - * Sets campaignPriority - * - * @param string|null $campaignPriority Default [priority](https://docs.talon.one/docs/product/applications/setting-up-campaign-priorities) for campaigns created in this Application. - * - * @return $this - */ - public function setCampaignPriority($campaignPriority) - { - $allowedValues = $this->getCampaignPriorityAllowableValues(); - if (!is_null($campaignPriority) && !in_array($campaignPriority, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'campaignPriority', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['campaignPriority'] = $campaignPriority; - - return $this; - } - - /** - * Gets exclusiveCampaignsStrategy - * - * @return string|null - */ - public function getExclusiveCampaignsStrategy() - { - return $this->container['exclusiveCampaignsStrategy']; - } - - /** - * Sets exclusiveCampaignsStrategy - * - * @param string|null $exclusiveCampaignsStrategy The strategy used when choosing exclusive campaigns for evaluation. - * - * @return $this - */ - public function setExclusiveCampaignsStrategy($exclusiveCampaignsStrategy) - { - $allowedValues = $this->getExclusiveCampaignsStrategyAllowableValues(); - if (!is_null($exclusiveCampaignsStrategy) && !in_array($exclusiveCampaignsStrategy, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'exclusiveCampaignsStrategy', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['exclusiveCampaignsStrategy'] = $exclusiveCampaignsStrategy; - - return $this; - } - /** * Gets defaultDiscountScope * @@ -910,7 +788,7 @@ public function getEnableFlattenedCartItems() /** * Sets enableFlattenedCartItems * - * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). + * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. * * @return $this */ @@ -1026,6 +904,30 @@ public function setDefaultDiscountAdditionalCostPerItemScope($defaultDiscountAdd return $this; } + /** + * Gets defaultEvaluationGroupId + * + * @return int|null + */ + public function getDefaultEvaluationGroupId() + { + return $this->container['defaultEvaluationGroupId']; + } + + /** + * Sets defaultEvaluationGroupId + * + * @param int|null $defaultEvaluationGroupId The ID of the default campaign evaluation group to which new campaigns will be added unless a different group is selected when creating the campaign. + * + * @return $this + */ + public function setDefaultEvaluationGroupId($defaultEvaluationGroupId) + { + $this->container['defaultEvaluationGroupId'] = $defaultEvaluationGroupId; + + return $this; + } + /** * Gets loyaltyPrograms * diff --git a/lib/Model/ApplicationCustomer.php b/lib/Model/ApplicationCustomer.php index 5714b463..eb8264b4 100644 --- a/lib/Model/ApplicationCustomer.php +++ b/lib/Model/ApplicationCustomer.php @@ -536,7 +536,7 @@ public function getLastActivity() /** * Sets lastActivity * - * @param \DateTime $lastActivity Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. + * @param \DateTime $lastActivity Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the Rule Engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. * * @return $this */ diff --git a/lib/Model/ApplicationEvent.php b/lib/Model/ApplicationEvent.php index e2419d0e..e87fac19 100644 --- a/lib/Model/ApplicationEvent.php +++ b/lib/Model/ApplicationEvent.php @@ -62,6 +62,8 @@ class ApplicationEvent implements ModelInterface, ArrayAccess 'created' => '\DateTime', 'applicationId' => 'int', 'profileId' => 'int', + 'storeId' => 'int', + 'storeIntegrationId' => 'string', 'sessionId' => 'int', 'type' => 'string', 'attributes' => 'object', @@ -79,6 +81,8 @@ class ApplicationEvent implements ModelInterface, ArrayAccess 'created' => 'date-time', 'applicationId' => null, 'profileId' => null, + 'storeId' => null, + 'storeIntegrationId' => null, 'sessionId' => null, 'type' => null, 'attributes' => null, @@ -117,6 +121,8 @@ public static function openAPIFormats() 'created' => 'created', 'applicationId' => 'applicationId', 'profileId' => 'profileId', + 'storeId' => 'storeId', + 'storeIntegrationId' => 'storeIntegrationId', 'sessionId' => 'sessionId', 'type' => 'type', 'attributes' => 'attributes', @@ -134,6 +140,8 @@ public static function openAPIFormats() 'created' => 'setCreated', 'applicationId' => 'setApplicationId', 'profileId' => 'setProfileId', + 'storeId' => 'setStoreId', + 'storeIntegrationId' => 'setStoreIntegrationId', 'sessionId' => 'setSessionId', 'type' => 'setType', 'attributes' => 'setAttributes', @@ -151,6 +159,8 @@ public static function openAPIFormats() 'created' => 'getCreated', 'applicationId' => 'getApplicationId', 'profileId' => 'getProfileId', + 'storeId' => 'getStoreId', + 'storeIntegrationId' => 'getStoreIntegrationId', 'sessionId' => 'getSessionId', 'type' => 'getType', 'attributes' => 'getAttributes', @@ -222,6 +232,8 @@ public function __construct(array $data = null) $this->container['created'] = isset($data['created']) ? $data['created'] : null; $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['storeId'] = isset($data['storeId']) ? $data['storeId'] : null; + $this->container['storeIntegrationId'] = isset($data['storeIntegrationId']) ? $data['storeIntegrationId'] : null; $this->container['sessionId'] = isset($data['sessionId']) ? $data['sessionId'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; @@ -247,6 +259,14 @@ public function listInvalidProperties() if ($this->container['applicationId'] === null) { $invalidProperties[] = "'applicationId' can't be null"; } + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be bigger than or equal to 1."; + } + if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -367,6 +387,61 @@ public function setProfileId($profileId) return $this; } + /** + * Gets storeId + * + * @return int|null + */ + public function getStoreId() + { + return $this->container['storeId']; + } + + /** + * Sets storeId + * + * @param int|null $storeId The ID of the store. + * + * @return $this + */ + public function setStoreId($storeId) + { + $this->container['storeId'] = $storeId; + + return $this; + } + + /** + * Gets storeIntegrationId + * + * @return string|null + */ + public function getStoreIntegrationId() + { + return $this->container['storeIntegrationId']; + } + + /** + * Sets storeIntegrationId + * + * @param string|null $storeIntegrationId The integration ID of the store. You choose this ID when you create a store. + * + * @return $this + */ + public function setStoreIntegrationId($storeIntegrationId) + { + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling ApplicationEvent., must be smaller than or equal to 1000.'); + } + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling ApplicationEvent., must be bigger than or equal to 1.'); + } + + $this->container['storeIntegrationId'] = $storeIntegrationId; + + return $this; + } + /** * Gets sessionId * diff --git a/lib/Model/ApplicationNotification.php b/lib/Model/ApplicationNotification.php index 2bf3cd39..71ec7afa 100644 --- a/lib/Model/ApplicationNotification.php +++ b/lib/Model/ApplicationNotification.php @@ -220,7 +220,7 @@ public function getEvent() /** * Sets event * - * @param string $event Event type. It can be one of the following: ['campaign_priorities_changed'] + * @param string $event Event type. It can be one of the following: ['campaign_evaluation_tree_changed'] * * @return $this */ diff --git a/lib/Model/ApplicationSession.php b/lib/Model/ApplicationSession.php index c68fbc67..ba18c9ce 100644 --- a/lib/Model/ApplicationSession.php +++ b/lib/Model/ApplicationSession.php @@ -60,9 +60,10 @@ class ApplicationSession implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'id' => 'int', 'created' => '\DateTime', + 'integrationId' => 'string', + 'storeIntegrationId' => 'string', 'applicationId' => 'int', 'profileId' => 'int', - 'integrationId' => 'string', 'profileintegrationid' => 'string', 'coupon' => 'string', 'referral' => 'string', @@ -82,9 +83,10 @@ class ApplicationSession implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'id' => null, 'created' => 'date-time', + 'integrationId' => 'string', + 'storeIntegrationId' => null, 'applicationId' => null, 'profileId' => null, - 'integrationId' => 'string', 'profileintegrationid' => null, 'coupon' => null, 'referral' => null, @@ -125,9 +127,10 @@ public static function openAPIFormats() protected static $attributeMap = [ 'id' => 'id', 'created' => 'created', + 'integrationId' => 'integrationId', + 'storeIntegrationId' => 'storeIntegrationId', 'applicationId' => 'applicationId', 'profileId' => 'profileId', - 'integrationId' => 'integrationId', 'profileintegrationid' => 'profileintegrationid', 'coupon' => 'coupon', 'referral' => 'referral', @@ -147,9 +150,10 @@ public static function openAPIFormats() protected static $setters = [ 'id' => 'setId', 'created' => 'setCreated', + 'integrationId' => 'setIntegrationId', + 'storeIntegrationId' => 'setStoreIntegrationId', 'applicationId' => 'setApplicationId', 'profileId' => 'setProfileId', - 'integrationId' => 'setIntegrationId', 'profileintegrationid' => 'setProfileintegrationid', 'coupon' => 'setCoupon', 'referral' => 'setReferral', @@ -169,9 +173,10 @@ public static function openAPIFormats() protected static $getters = [ 'id' => 'getId', 'created' => 'getCreated', + 'integrationId' => 'getIntegrationId', + 'storeIntegrationId' => 'getStoreIntegrationId', 'applicationId' => 'getApplicationId', 'profileId' => 'getProfileId', - 'integrationId' => 'getIntegrationId', 'profileintegrationid' => 'getProfileintegrationid', 'coupon' => 'getCoupon', 'referral' => 'getReferral', @@ -264,9 +269,10 @@ public function __construct(array $data = null) { $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['integrationId'] = isset($data['integrationId']) ? $data['integrationId'] : null; + $this->container['storeIntegrationId'] = isset($data['storeIntegrationId']) ? $data['storeIntegrationId'] : null; $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; - $this->container['integrationId'] = isset($data['integrationId']) ? $data['integrationId'] : null; $this->container['profileintegrationid'] = isset($data['profileintegrationid']) ? $data['profileintegrationid'] : null; $this->container['coupon'] = isset($data['coupon']) ? $data['coupon'] : null; $this->container['referral'] = isset($data['referral']) ? $data['referral'] : null; @@ -293,9 +299,6 @@ public function listInvalidProperties() if ($this->container['created'] === null) { $invalidProperties[] = "'created' can't be null"; } - if ($this->container['applicationId'] === null) { - $invalidProperties[] = "'applicationId' can't be null"; - } if ($this->container['integrationId'] === null) { $invalidProperties[] = "'integrationId' can't be null"; } @@ -303,6 +306,17 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'integrationId', the character length must be smaller than or equal to 1000."; } + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be bigger than or equal to 1."; + } + + if ($this->container['applicationId'] === null) { + $invalidProperties[] = "'applicationId' can't be null"; + } if (!is_null($this->container['profileintegrationid']) && (mb_strlen($this->container['profileintegrationid']) > 1000)) { $invalidProperties[] = "invalid value for 'profileintegrationid', the character length must be smaller than or equal to 1000."; } @@ -400,77 +414,108 @@ public function setCreated($created) } /** - * Gets applicationId + * Gets integrationId * - * @return int + * @return string */ - public function getApplicationId() + public function getIntegrationId() { - return $this->container['applicationId']; + return $this->container['integrationId']; } /** - * Sets applicationId + * Sets integrationId * - * @param int $applicationId The ID of the application that owns this entity. + * @param string $integrationId The integration ID set by your integration layer. * * @return $this */ - public function setApplicationId($applicationId) + public function setIntegrationId($integrationId) { - $this->container['applicationId'] = $applicationId; + if ((mb_strlen($integrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $integrationId when calling ApplicationSession., must be smaller than or equal to 1000.'); + } + + $this->container['integrationId'] = $integrationId; return $this; } /** - * Gets profileId + * Gets storeIntegrationId * - * @return int|null + * @return string|null */ - public function getProfileId() + public function getStoreIntegrationId() { - return $this->container['profileId']; + return $this->container['storeIntegrationId']; } /** - * Sets profileId + * Sets storeIntegrationId * - * @param int|null $profileId The globally unique Talon.One ID of the customer that created this entity. + * @param string|null $storeIntegrationId The integration ID of the store. You choose this ID when you create a store. * * @return $this */ - public function setProfileId($profileId) + public function setStoreIntegrationId($storeIntegrationId) { - $this->container['profileId'] = $profileId; + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling ApplicationSession., must be smaller than or equal to 1000.'); + } + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling ApplicationSession., must be bigger than or equal to 1.'); + } + + $this->container['storeIntegrationId'] = $storeIntegrationId; return $this; } /** - * Gets integrationId + * Gets applicationId * - * @return string + * @return int */ - public function getIntegrationId() + public function getApplicationId() { - return $this->container['integrationId']; + return $this->container['applicationId']; } /** - * Sets integrationId + * Sets applicationId * - * @param string $integrationId The integration ID set by your integration layer. + * @param int $applicationId The ID of the application that owns this entity. * * @return $this */ - public function setIntegrationId($integrationId) + public function setApplicationId($applicationId) { - if ((mb_strlen($integrationId) > 1000)) { - throw new \InvalidArgumentException('invalid length for $integrationId when calling ApplicationSession., must be smaller than or equal to 1000.'); - } + $this->container['applicationId'] = $applicationId; - $this->container['integrationId'] = $integrationId; + return $this; + } + + /** + * Gets profileId + * + * @return int|null + */ + public function getProfileId() + { + return $this->container['profileId']; + } + + /** + * Sets profileId + * + * @param int|null $profileId The globally unique Talon.One ID of the customer that created this entity. + * + * @return $this + */ + public function setProfileId($profileId) + { + $this->container['profileId'] = $profileId; return $this; } @@ -564,7 +609,7 @@ public function getState() /** * Sets state * - * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). + * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). * * @return $this */ diff --git a/lib/Model/ApplicationStoreEntity.php b/lib/Model/ApplicationStoreEntity.php new file mode 100644 index 00000000..117ca27e --- /dev/null +++ b/lib/Model/ApplicationStoreEntity.php @@ -0,0 +1,308 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'storeId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'storeId' => 'storeId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'storeId' => 'setStoreId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'storeId' => 'getStoreId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['storeId'] = isset($data['storeId']) ? $data['storeId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets storeId + * + * @return int|null + */ + public function getStoreId() + { + return $this->container['storeId']; + } + + /** + * Sets storeId + * + * @param int|null $storeId The ID of the store. + * + * @return $this + */ + public function setStoreId($storeId) + { + $this->container['storeId'] = $storeId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Attribute.php b/lib/Model/Attribute.php index 9541a7c4..cd769e8e 100644 --- a/lib/Model/Attribute.php +++ b/lib/Model/Attribute.php @@ -249,6 +249,7 @@ public function getModelName() const ENTITY_EVENT = 'Event'; const ENTITY_GIVEAWAY = 'Giveaway'; const ENTITY_REFERRAL = 'Referral'; + const ENTITY_STORE = 'Store'; const TYPE_STRING = 'string'; const TYPE_NUMBER = 'number'; const TYPE_BOOLEAN = 'boolean'; @@ -281,6 +282,7 @@ public function getEntityAllowableValues() self::ENTITY_EVENT, self::ENTITY_GIVEAWAY, self::ENTITY_REFERRAL, + self::ENTITY_STORE, ]; } diff --git a/lib/Model/AudienceCustomer.php b/lib/Model/AudienceCustomer.php index 652a1119..a0abbd24 100644 --- a/lib/Model/AudienceCustomer.php +++ b/lib/Model/AudienceCustomer.php @@ -538,7 +538,7 @@ public function getLastActivity() /** * Sets lastActivity * - * @param \DateTime $lastActivity Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. + * @param \DateTime $lastActivity Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the Rule Engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. * * @return $this */ diff --git a/lib/Model/BaseCampaign.php b/lib/Model/BaseCampaign.php new file mode 100644 index 00000000..3c792a0c --- /dev/null +++ b/lib/Model/BaseCampaign.php @@ -0,0 +1,878 @@ + 'string', + 'description' => 'string', + 'startTime' => '\DateTime', + 'endTime' => '\DateTime', + 'attributes' => 'object', + 'state' => 'string', + 'activeRulesetId' => 'int', + 'tags' => 'string[]', + 'features' => 'string[]', + 'couponSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', + 'referralSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', + 'limits' => '\TalonOne\Client\Model\LimitConfig[]', + 'campaignGroups' => 'int[]', + 'evaluationGroupId' => 'int', + 'type' => 'string', + 'linkedStoreIds' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'startTime' => 'date-time', + 'endTime' => 'date-time', + 'attributes' => null, + 'state' => null, + 'activeRulesetId' => null, + 'tags' => null, + 'features' => null, + 'couponSettings' => null, + 'referralSettings' => null, + 'limits' => null, + 'campaignGroups' => null, + 'evaluationGroupId' => null, + 'type' => null, + 'linkedStoreIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'description' => 'description', + 'startTime' => 'startTime', + 'endTime' => 'endTime', + 'attributes' => 'attributes', + 'state' => 'state', + 'activeRulesetId' => 'activeRulesetId', + 'tags' => 'tags', + 'features' => 'features', + 'couponSettings' => 'couponSettings', + 'referralSettings' => 'referralSettings', + 'limits' => 'limits', + 'campaignGroups' => 'campaignGroups', + 'evaluationGroupId' => 'evaluationGroupId', + 'type' => 'type', + 'linkedStoreIds' => 'linkedStoreIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'startTime' => 'setStartTime', + 'endTime' => 'setEndTime', + 'attributes' => 'setAttributes', + 'state' => 'setState', + 'activeRulesetId' => 'setActiveRulesetId', + 'tags' => 'setTags', + 'features' => 'setFeatures', + 'couponSettings' => 'setCouponSettings', + 'referralSettings' => 'setReferralSettings', + 'limits' => 'setLimits', + 'campaignGroups' => 'setCampaignGroups', + 'evaluationGroupId' => 'setEvaluationGroupId', + 'type' => 'setType', + 'linkedStoreIds' => 'setLinkedStoreIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'startTime' => 'getStartTime', + 'endTime' => 'getEndTime', + 'attributes' => 'getAttributes', + 'state' => 'getState', + 'activeRulesetId' => 'getActiveRulesetId', + 'tags' => 'getTags', + 'features' => 'getFeatures', + 'couponSettings' => 'getCouponSettings', + 'referralSettings' => 'getReferralSettings', + 'limits' => 'getLimits', + 'campaignGroups' => 'getCampaignGroups', + 'evaluationGroupId' => 'getEvaluationGroupId', + 'type' => 'getType', + 'linkedStoreIds' => 'getLinkedStoreIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const STATE_ENABLED = 'enabled'; + const STATE_DISABLED = 'disabled'; + const STATE_ARCHIVED = 'archived'; + const FEATURES_COUPONS = 'coupons'; + const FEATURES_REFERRALS = 'referrals'; + const FEATURES_LOYALTY = 'loyalty'; + const FEATURES_GIVEAWAYS = 'giveaways'; + const FEATURES_STRIKETHROUGH = 'strikethrough'; + const TYPE_CART_ITEM = 'cartItem'; + const TYPE_ADVANCED = 'advanced'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_ENABLED, + self::STATE_DISABLED, + self::STATE_ARCHIVED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFeaturesAllowableValues() + { + return [ + self::FEATURES_COUPONS, + self::FEATURES_REFERRALS, + self::FEATURES_LOYALTY, + self::FEATURES_GIVEAWAYS, + self::FEATURES_STRIKETHROUGH, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CART_ITEM, + self::TYPE_ADVANCED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['startTime'] = isset($data['startTime']) ? $data['startTime'] : null; + $this->container['endTime'] = isset($data['endTime']) ? $data['endTime'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['state'] = isset($data['state']) ? $data['state'] : 'enabled'; + $this->container['activeRulesetId'] = isset($data['activeRulesetId']) ? $data['activeRulesetId'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['features'] = isset($data['features']) ? $data['features'] : null; + $this->container['couponSettings'] = isset($data['couponSettings']) ? $data['couponSettings'] : null; + $this->container['referralSettings'] = isset($data['referralSettings']) ? $data['referralSettings'] : null; + $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; + $this->container['campaignGroups'] = isset($data['campaignGroups']) ? $data['campaignGroups'] : null; + $this->container['evaluationGroupId'] = isset($data['evaluationGroupId']) ? $data['evaluationGroupId'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : 'advanced'; + $this->container['linkedStoreIds'] = isset($data['linkedStoreIds']) ? $data['linkedStoreIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'state', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['tags'] === null) { + $invalidProperties[] = "'tags' can't be null"; + } + if ($this->container['features'] === null) { + $invalidProperties[] = "'features' can't be null"; + } + if ($this->container['limits'] === null) { + $invalidProperties[] = "'limits' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name A user-facing name for this campaign. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling BaseCampaign., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A detailed description of the campaign. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets startTime + * + * @return \DateTime|null + */ + public function getStartTime() + { + return $this->container['startTime']; + } + + /** + * Sets startTime + * + * @param \DateTime|null $startTime Timestamp when the campaign will become active. + * + * @return $this + */ + public function setStartTime($startTime) + { + $this->container['startTime'] = $startTime; + + return $this; + } + + /** + * Gets endTime + * + * @return \DateTime|null + */ + public function getEndTime() + { + return $this->container['endTime']; + } + + /** + * Sets endTime + * + * @param \DateTime|null $endTime Timestamp when the campaign will become inactive. + * + * @return $this + */ + public function setEndTime($endTime) + { + $this->container['endTime'] = $endTime; + + return $this; + } + + /** + * Gets attributes + * + * @return object|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object|null $attributes Arbitrary properties associated with this campaign. + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state A disabled or archived campaign is not evaluated for rules or coupons. + * + * @return $this + */ + public function setState($state) + { + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'state', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets activeRulesetId + * + * @return int|null + */ + public function getActiveRulesetId() + { + return $this->container['activeRulesetId']; + } + + /** + * Sets activeRulesetId + * + * @param int|null $activeRulesetId [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. + * + * @return $this + */ + public function setActiveRulesetId($activeRulesetId) + { + $this->container['activeRulesetId'] = $activeRulesetId; + + return $this; + } + + /** + * Gets tags + * + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[] $tags A list of tags for the campaign. + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets features + * + * @return string[] + */ + public function getFeatures() + { + return $this->container['features']; + } + + /** + * Sets features + * + * @param string[] $features The features enabled in this campaign. + * + * @return $this + */ + public function setFeatures($features) + { + $allowedValues = $this->getFeaturesAllowableValues(); + if (array_diff($features, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'features', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['features'] = $features; + + return $this; + } + + /** + * Gets couponSettings + * + * @return \TalonOne\Client\Model\CodeGeneratorSettings|null + */ + public function getCouponSettings() + { + return $this->container['couponSettings']; + } + + /** + * Sets couponSettings + * + * @param \TalonOne\Client\Model\CodeGeneratorSettings|null $couponSettings couponSettings + * + * @return $this + */ + public function setCouponSettings($couponSettings) + { + $this->container['couponSettings'] = $couponSettings; + + return $this; + } + + /** + * Gets referralSettings + * + * @return \TalonOne\Client\Model\CodeGeneratorSettings|null + */ + public function getReferralSettings() + { + return $this->container['referralSettings']; + } + + /** + * Sets referralSettings + * + * @param \TalonOne\Client\Model\CodeGeneratorSettings|null $referralSettings referralSettings + * + * @return $this + */ + public function setReferralSettings($referralSettings) + { + $this->container['referralSettings'] = $referralSettings; + + return $this; + } + + /** + * Gets limits + * + * @return \TalonOne\Client\Model\LimitConfig[] + */ + public function getLimits() + { + return $this->container['limits']; + } + + /** + * Sets limits + * + * @param \TalonOne\Client\Model\LimitConfig[] $limits The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. + * + * @return $this + */ + public function setLimits($limits) + { + $this->container['limits'] = $limits; + + return $this; + } + + /** + * Gets campaignGroups + * + * @return int[]|null + */ + public function getCampaignGroups() + { + return $this->container['campaignGroups']; + } + + /** + * Sets campaignGroups + * + * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. + * + * @return $this + */ + public function setCampaignGroups($campaignGroups) + { + $this->container['campaignGroups'] = $campaignGroups; + + return $this; + } + + /** + * Gets evaluationGroupId + * + * @return int|null + */ + public function getEvaluationGroupId() + { + return $this->container['evaluationGroupId']; + } + + /** + * Sets evaluationGroupId + * + * @param int|null $evaluationGroupId The ID of the campaign evaluation group the campaign belongs to. + * + * @return $this + */ + public function setEvaluationGroupId($evaluationGroupId) + { + $this->container['evaluationGroupId'] = $evaluationGroupId; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets linkedStoreIds + * + * @return int[]|null + */ + public function getLinkedStoreIds() + { + return $this->container['linkedStoreIds']; + } + + /** + * Sets linkedStoreIds + * + * @param int[]|null $linkedStoreIds A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. + * + * @return $this + */ + public function setLinkedStoreIds($linkedStoreIds) + { + $this->container['linkedStoreIds'] = $linkedStoreIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BaseCampaignForNotification.php b/lib/Model/BaseCampaignForNotification.php new file mode 100644 index 00000000..f6b2002d --- /dev/null +++ b/lib/Model/BaseCampaignForNotification.php @@ -0,0 +1,886 @@ + 'string', + 'description' => 'string', + 'startTime' => '\DateTime', + 'endTime' => '\DateTime', + 'attributes' => 'object', + 'state' => 'string', + 'activeRulesetId' => 'int', + 'tags' => 'string[]', + 'features' => 'string[]', + 'couponSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', + 'referralSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', + 'limits' => '\TalonOne\Client\Model\LimitConfig[]', + 'campaignGroups' => 'int[]', + 'evaluationGroupId' => 'int', + 'type' => 'string', + 'linkedStoreIds' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'startTime' => 'date-time', + 'endTime' => 'date-time', + 'attributes' => null, + 'state' => null, + 'activeRulesetId' => null, + 'tags' => null, + 'features' => null, + 'couponSettings' => null, + 'referralSettings' => null, + 'limits' => null, + 'campaignGroups' => null, + 'evaluationGroupId' => null, + 'type' => null, + 'linkedStoreIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'description' => 'description', + 'startTime' => 'startTime', + 'endTime' => 'endTime', + 'attributes' => 'attributes', + 'state' => 'state', + 'activeRulesetId' => 'activeRulesetId', + 'tags' => 'tags', + 'features' => 'features', + 'couponSettings' => 'couponSettings', + 'referralSettings' => 'referralSettings', + 'limits' => 'limits', + 'campaignGroups' => 'campaignGroups', + 'evaluationGroupId' => 'evaluationGroupId', + 'type' => 'type', + 'linkedStoreIds' => 'linkedStoreIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'startTime' => 'setStartTime', + 'endTime' => 'setEndTime', + 'attributes' => 'setAttributes', + 'state' => 'setState', + 'activeRulesetId' => 'setActiveRulesetId', + 'tags' => 'setTags', + 'features' => 'setFeatures', + 'couponSettings' => 'setCouponSettings', + 'referralSettings' => 'setReferralSettings', + 'limits' => 'setLimits', + 'campaignGroups' => 'setCampaignGroups', + 'evaluationGroupId' => 'setEvaluationGroupId', + 'type' => 'setType', + 'linkedStoreIds' => 'setLinkedStoreIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'startTime' => 'getStartTime', + 'endTime' => 'getEndTime', + 'attributes' => 'getAttributes', + 'state' => 'getState', + 'activeRulesetId' => 'getActiveRulesetId', + 'tags' => 'getTags', + 'features' => 'getFeatures', + 'couponSettings' => 'getCouponSettings', + 'referralSettings' => 'getReferralSettings', + 'limits' => 'getLimits', + 'campaignGroups' => 'getCampaignGroups', + 'evaluationGroupId' => 'getEvaluationGroupId', + 'type' => 'getType', + 'linkedStoreIds' => 'getLinkedStoreIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const STATE_ENABLED = 'enabled'; + const STATE_DISABLED = 'disabled'; + const STATE_ARCHIVED = 'archived'; + const STATE_DRAFT = 'draft'; + const STATE_SCHEDULED = 'scheduled'; + const STATE_RUNNING = 'running'; + const STATE_EXPIRED = 'expired'; + const FEATURES_COUPONS = 'coupons'; + const FEATURES_REFERRALS = 'referrals'; + const FEATURES_LOYALTY = 'loyalty'; + const FEATURES_GIVEAWAYS = 'giveaways'; + const FEATURES_STRIKETHROUGH = 'strikethrough'; + const TYPE_CART_ITEM = 'cartItem'; + const TYPE_ADVANCED = 'advanced'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_ENABLED, + self::STATE_DISABLED, + self::STATE_ARCHIVED, + self::STATE_DRAFT, + self::STATE_SCHEDULED, + self::STATE_RUNNING, + self::STATE_EXPIRED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFeaturesAllowableValues() + { + return [ + self::FEATURES_COUPONS, + self::FEATURES_REFERRALS, + self::FEATURES_LOYALTY, + self::FEATURES_GIVEAWAYS, + self::FEATURES_STRIKETHROUGH, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CART_ITEM, + self::TYPE_ADVANCED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['startTime'] = isset($data['startTime']) ? $data['startTime'] : null; + $this->container['endTime'] = isset($data['endTime']) ? $data['endTime'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['state'] = isset($data['state']) ? $data['state'] : 'enabled'; + $this->container['activeRulesetId'] = isset($data['activeRulesetId']) ? $data['activeRulesetId'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['features'] = isset($data['features']) ? $data['features'] : null; + $this->container['couponSettings'] = isset($data['couponSettings']) ? $data['couponSettings'] : null; + $this->container['referralSettings'] = isset($data['referralSettings']) ? $data['referralSettings'] : null; + $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; + $this->container['campaignGroups'] = isset($data['campaignGroups']) ? $data['campaignGroups'] : null; + $this->container['evaluationGroupId'] = isset($data['evaluationGroupId']) ? $data['evaluationGroupId'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : 'advanced'; + $this->container['linkedStoreIds'] = isset($data['linkedStoreIds']) ? $data['linkedStoreIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'state', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['tags'] === null) { + $invalidProperties[] = "'tags' can't be null"; + } + if ($this->container['features'] === null) { + $invalidProperties[] = "'features' can't be null"; + } + if ($this->container['limits'] === null) { + $invalidProperties[] = "'limits' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name A user-facing name for this campaign. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling BaseCampaignForNotification., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A detailed description of the campaign. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets startTime + * + * @return \DateTime|null + */ + public function getStartTime() + { + return $this->container['startTime']; + } + + /** + * Sets startTime + * + * @param \DateTime|null $startTime Timestamp when the campaign will become active. + * + * @return $this + */ + public function setStartTime($startTime) + { + $this->container['startTime'] = $startTime; + + return $this; + } + + /** + * Gets endTime + * + * @return \DateTime|null + */ + public function getEndTime() + { + return $this->container['endTime']; + } + + /** + * Sets endTime + * + * @param \DateTime|null $endTime Timestamp when the campaign will become inactive. + * + * @return $this + */ + public function setEndTime($endTime) + { + $this->container['endTime'] = $endTime; + + return $this; + } + + /** + * Gets attributes + * + * @return object|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object|null $attributes Arbitrary properties associated with this campaign. + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state A disabled or archived campaign is not evaluated for rules or coupons. + * + * @return $this + */ + public function setState($state) + { + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'state', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets activeRulesetId + * + * @return int|null + */ + public function getActiveRulesetId() + { + return $this->container['activeRulesetId']; + } + + /** + * Sets activeRulesetId + * + * @param int|null $activeRulesetId [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. + * + * @return $this + */ + public function setActiveRulesetId($activeRulesetId) + { + $this->container['activeRulesetId'] = $activeRulesetId; + + return $this; + } + + /** + * Gets tags + * + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[] $tags A list of tags for the campaign. + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets features + * + * @return string[] + */ + public function getFeatures() + { + return $this->container['features']; + } + + /** + * Sets features + * + * @param string[] $features The features enabled in this campaign. + * + * @return $this + */ + public function setFeatures($features) + { + $allowedValues = $this->getFeaturesAllowableValues(); + if (array_diff($features, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'features', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['features'] = $features; + + return $this; + } + + /** + * Gets couponSettings + * + * @return \TalonOne\Client\Model\CodeGeneratorSettings|null + */ + public function getCouponSettings() + { + return $this->container['couponSettings']; + } + + /** + * Sets couponSettings + * + * @param \TalonOne\Client\Model\CodeGeneratorSettings|null $couponSettings couponSettings + * + * @return $this + */ + public function setCouponSettings($couponSettings) + { + $this->container['couponSettings'] = $couponSettings; + + return $this; + } + + /** + * Gets referralSettings + * + * @return \TalonOne\Client\Model\CodeGeneratorSettings|null + */ + public function getReferralSettings() + { + return $this->container['referralSettings']; + } + + /** + * Sets referralSettings + * + * @param \TalonOne\Client\Model\CodeGeneratorSettings|null $referralSettings referralSettings + * + * @return $this + */ + public function setReferralSettings($referralSettings) + { + $this->container['referralSettings'] = $referralSettings; + + return $this; + } + + /** + * Gets limits + * + * @return \TalonOne\Client\Model\LimitConfig[] + */ + public function getLimits() + { + return $this->container['limits']; + } + + /** + * Sets limits + * + * @param \TalonOne\Client\Model\LimitConfig[] $limits The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. + * + * @return $this + */ + public function setLimits($limits) + { + $this->container['limits'] = $limits; + + return $this; + } + + /** + * Gets campaignGroups + * + * @return int[]|null + */ + public function getCampaignGroups() + { + return $this->container['campaignGroups']; + } + + /** + * Sets campaignGroups + * + * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. + * + * @return $this + */ + public function setCampaignGroups($campaignGroups) + { + $this->container['campaignGroups'] = $campaignGroups; + + return $this; + } + + /** + * Gets evaluationGroupId + * + * @return int|null + */ + public function getEvaluationGroupId() + { + return $this->container['evaluationGroupId']; + } + + /** + * Sets evaluationGroupId + * + * @param int|null $evaluationGroupId The ID of the campaign evaluation group the campaign belongs to. + * + * @return $this + */ + public function setEvaluationGroupId($evaluationGroupId) + { + $this->container['evaluationGroupId'] = $evaluationGroupId; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets linkedStoreIds + * + * @return int[]|null + */ + public function getLinkedStoreIds() + { + return $this->container['linkedStoreIds']; + } + + /** + * Sets linkedStoreIds + * + * @param int[]|null $linkedStoreIds A list of store IDs that are linked to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. + * + * @return $this + */ + public function setLinkedStoreIds($linkedStoreIds) + { + $this->container['linkedStoreIds'] = $linkedStoreIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BaseLoyaltyProgram.php b/lib/Model/BaseLoyaltyProgram.php index b91d45ac..ec9e0003 100644 --- a/lib/Model/BaseLoyaltyProgram.php +++ b/lib/Model/BaseLoyaltyProgram.php @@ -64,7 +64,9 @@ class BaseLoyaltyProgram implements ModelInterface, ArrayAccess 'defaultPending' => 'string', 'allowSubledger' => 'bool', 'usersPerCardLimit' => 'int', - 'sandbox' => 'bool' + 'sandbox' => 'bool', + 'tiersExpireIn' => 'string', + 'tiersDowngradePolicy' => 'string' ]; /** @@ -80,7 +82,9 @@ class BaseLoyaltyProgram implements ModelInterface, ArrayAccess 'defaultPending' => null, 'allowSubledger' => null, 'usersPerCardLimit' => null, - 'sandbox' => null + 'sandbox' => null, + 'tiersExpireIn' => null, + 'tiersDowngradePolicy' => null ]; /** @@ -117,7 +121,9 @@ public static function openAPIFormats() 'defaultPending' => 'defaultPending', 'allowSubledger' => 'allowSubledger', 'usersPerCardLimit' => 'usersPerCardLimit', - 'sandbox' => 'sandbox' + 'sandbox' => 'sandbox', + 'tiersExpireIn' => 'tiersExpireIn', + 'tiersDowngradePolicy' => 'tiersDowngradePolicy' ]; /** @@ -133,7 +139,9 @@ public static function openAPIFormats() 'defaultPending' => 'setDefaultPending', 'allowSubledger' => 'setAllowSubledger', 'usersPerCardLimit' => 'setUsersPerCardLimit', - 'sandbox' => 'setSandbox' + 'sandbox' => 'setSandbox', + 'tiersExpireIn' => 'setTiersExpireIn', + 'tiersDowngradePolicy' => 'setTiersDowngradePolicy' ]; /** @@ -149,7 +157,9 @@ public static function openAPIFormats() 'defaultPending' => 'getDefaultPending', 'allowSubledger' => 'getAllowSubledger', 'usersPerCardLimit' => 'getUsersPerCardLimit', - 'sandbox' => 'getSandbox' + 'sandbox' => 'getSandbox', + 'tiersExpireIn' => 'getTiersExpireIn', + 'tiersDowngradePolicy' => 'getTiersDowngradePolicy' ]; /** @@ -193,9 +203,24 @@ public function getModelName() return self::$openAPIModelName; } + const TIERS_DOWNGRADE_POLICY_ONE_DOWN = 'one_down'; + const TIERS_DOWNGRADE_POLICY_BALANCE_BASED = 'balance_based'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTiersDowngradePolicyAllowableValues() + { + return [ + self::TIERS_DOWNGRADE_POLICY_ONE_DOWN, + self::TIERS_DOWNGRADE_POLICY_BALANCE_BASED, + ]; + } + /** * Associative array for storing property values @@ -220,6 +245,8 @@ public function __construct(array $data = null) $this->container['allowSubledger'] = isset($data['allowSubledger']) ? $data['allowSubledger'] : null; $this->container['usersPerCardLimit'] = isset($data['usersPerCardLimit']) ? $data['usersPerCardLimit'] : null; $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; + $this->container['tiersExpireIn'] = isset($data['tiersExpireIn']) ? $data['tiersExpireIn'] : null; + $this->container['tiersDowngradePolicy'] = isset($data['tiersDowngradePolicy']) ? $data['tiersDowngradePolicy'] : null; } /** @@ -235,6 +262,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'usersPerCardLimit', must be bigger than or equal to 0."; } + $allowedValues = $this->getTiersDowngradePolicyAllowableValues(); + if (!is_null($this->container['tiersDowngradePolicy']) && !in_array($this->container['tiersDowngradePolicy'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'tiersDowngradePolicy', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -446,6 +481,63 @@ public function setSandbox($sandbox) return $this; } + + /** + * Gets tiersExpireIn + * + * @return string|null + */ + public function getTiersExpireIn() + { + return $this->container['tiersExpireIn']; + } + + /** + * Sets tiersExpireIn + * + * @param string|null $tiersExpireIn The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. + * + * @return $this + */ + public function setTiersExpireIn($tiersExpireIn) + { + $this->container['tiersExpireIn'] = $tiersExpireIn; + + return $this; + } + + /** + * Gets tiersDowngradePolicy + * + * @return string|null + */ + public function getTiersDowngradePolicy() + { + return $this->container['tiersDowngradePolicy']; + } + + /** + * Sets tiersDowngradePolicy + * + * @param string|null $tiersDowngradePolicy Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. + * + * @return $this + */ + public function setTiersDowngradePolicy($tiersDowngradePolicy) + { + $allowedValues = $this->getTiersDowngradePolicyAllowableValues(); + if (!is_null($tiersDowngradePolicy) && !in_array($tiersDowngradePolicy, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'tiersDowngradePolicy', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['tiersDowngradePolicy'] = $tiersDowngradePolicy; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/BaseNotification.php b/lib/Model/BaseNotification.php index f83e9563..38410d0d 100644 --- a/lib/Model/BaseNotification.php +++ b/lib/Model/BaseNotification.php @@ -59,8 +59,10 @@ class BaseNotification implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'policy' => 'object', + 'enabled' => 'bool', 'webhook' => '\TalonOne\Client\Model\BaseNotificationWebhook', - 'id' => 'int' + 'id' => 'int', + 'type' => 'string' ]; /** @@ -70,8 +72,10 @@ class BaseNotification implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'policy' => null, + 'enabled' => null, 'webhook' => null, - 'id' => null + 'id' => null, + 'type' => null ]; /** @@ -102,8 +106,10 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'policy' => 'policy', + 'enabled' => 'enabled', 'webhook' => 'webhook', - 'id' => 'id' + 'id' => 'id', + 'type' => 'type' ]; /** @@ -113,8 +119,10 @@ public static function openAPIFormats() */ protected static $setters = [ 'policy' => 'setPolicy', + 'enabled' => 'setEnabled', 'webhook' => 'setWebhook', - 'id' => 'setId' + 'id' => 'setId', + 'type' => 'setType' ]; /** @@ -124,8 +132,10 @@ public static function openAPIFormats() */ protected static $getters = [ 'policy' => 'getPolicy', + 'enabled' => 'getEnabled', 'webhook' => 'getWebhook', - 'id' => 'getId' + 'id' => 'getId', + 'type' => 'getType' ]; /** @@ -169,9 +179,38 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE_CAMPAIGN = 'campaign'; + const TYPE_LOYALTY_ADDED_DEDUCTED_POINTS = 'loyalty_added_deducted_points'; + const TYPE_COUPON = 'coupon'; + const TYPE_EXPIRING_POINTS = 'expiring_points'; + const TYPE_PENDING_TO_ACTIVE_POINTS = 'pending_to_active_points'; + const TYPE_STRIKETHROUGH_PRICING = 'strikethrough_pricing'; + const TYPE_TIER_DOWNGRADE = 'tier_downgrade'; + const TYPE_TIER_UPGRADE = 'tier_upgrade'; + const TYPE_TIER_WILL_DOWNGRADE = 'tier_will_downgrade'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CAMPAIGN, + self::TYPE_LOYALTY_ADDED_DEDUCTED_POINTS, + self::TYPE_COUPON, + self::TYPE_EXPIRING_POINTS, + self::TYPE_PENDING_TO_ACTIVE_POINTS, + self::TYPE_STRIKETHROUGH_PRICING, + self::TYPE_TIER_DOWNGRADE, + self::TYPE_TIER_UPGRADE, + self::TYPE_TIER_WILL_DOWNGRADE, + ]; + } + /** * Associative array for storing property values @@ -189,8 +228,10 @@ public function getModelName() public function __construct(array $data = null) { $this->container['policy'] = isset($data['policy']) ? $data['policy'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : true; $this->container['webhook'] = isset($data['webhook']) ? $data['webhook'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; } /** @@ -215,6 +256,17 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'id', must be bigger than or equal to 1."; } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -254,6 +306,30 @@ public function setPolicy($policy) return $this; } + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled Indicates whether the notification is activated. + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + /** * Gets webhook * @@ -306,6 +382,39 @@ public function setId($id) return $this; } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The notification type. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/BaseNotificationEntity.php b/lib/Model/BaseNotificationEntity.php index 00860845..735b9edc 100644 --- a/lib/Model/BaseNotificationEntity.php +++ b/lib/Model/BaseNotificationEntity.php @@ -57,7 +57,8 @@ class BaseNotificationEntity implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'policy' => 'object' + 'policy' => 'object', + 'enabled' => 'bool' ]; /** @@ -66,7 +67,8 @@ class BaseNotificationEntity implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'policy' => null + 'policy' => null, + 'enabled' => null ]; /** @@ -96,7 +98,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'policy' => 'policy' + 'policy' => 'policy', + 'enabled' => 'enabled' ]; /** @@ -105,7 +108,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'policy' => 'setPolicy' + 'policy' => 'setPolicy', + 'enabled' => 'setEnabled' ]; /** @@ -114,7 +118,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'policy' => 'getPolicy' + 'policy' => 'getPolicy', + 'enabled' => 'getEnabled' ]; /** @@ -178,6 +183,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['policy'] = isset($data['policy']) ? $data['policy'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : true; } /** @@ -230,6 +236,30 @@ public function setPolicy($policy) return $this; } + + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled Indicates whether the notification is activated. + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/BaseNotificationWebhook.php b/lib/Model/BaseNotificationWebhook.php index f4fb038c..f8317077 100644 --- a/lib/Model/BaseNotificationWebhook.php +++ b/lib/Model/BaseNotificationWebhook.php @@ -62,7 +62,8 @@ class BaseNotificationWebhook implements ModelInterface, ArrayAccess 'created' => '\DateTime', 'modified' => '\DateTime', 'url' => 'string', - 'headers' => 'string[]' + 'headers' => 'string[]', + 'enabled' => 'bool' ]; /** @@ -75,7 +76,8 @@ class BaseNotificationWebhook implements ModelInterface, ArrayAccess 'created' => 'date-time', 'modified' => 'date-time', 'url' => null, - 'headers' => null + 'headers' => null, + 'enabled' => null ]; /** @@ -109,7 +111,8 @@ public static function openAPIFormats() 'created' => 'created', 'modified' => 'modified', 'url' => 'url', - 'headers' => 'headers' + 'headers' => 'headers', + 'enabled' => 'enabled' ]; /** @@ -122,7 +125,8 @@ public static function openAPIFormats() 'created' => 'setCreated', 'modified' => 'setModified', 'url' => 'setUrl', - 'headers' => 'setHeaders' + 'headers' => 'setHeaders', + 'enabled' => 'setEnabled' ]; /** @@ -135,7 +139,8 @@ public static function openAPIFormats() 'created' => 'getCreated', 'modified' => 'getModified', 'url' => 'getUrl', - 'headers' => 'getHeaders' + 'headers' => 'getHeaders', + 'enabled' => 'getEnabled' ]; /** @@ -203,6 +208,7 @@ public function __construct(array $data = null) $this->container['modified'] = isset($data['modified']) ? $data['modified'] : null; $this->container['url'] = isset($data['url']) ? $data['url'] : null; $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : true; } /** @@ -363,6 +369,30 @@ public function setHeaders($headers) return $this; } + + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled Indicates whether the notification is activated. + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/BulkOperationOnCampaigns.php b/lib/Model/BulkOperationOnCampaigns.php new file mode 100644 index 00000000..116cd208 --- /dev/null +++ b/lib/Model/BulkOperationOnCampaigns.php @@ -0,0 +1,376 @@ + 'string', + 'campaignIds' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'operation' => null, + 'campaignIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'operation' => 'operation', + 'campaignIds' => 'campaignIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'operation' => 'setOperation', + 'campaignIds' => 'setCampaignIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'operation' => 'getOperation', + 'campaignIds' => 'getCampaignIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const OPERATION_DISABLE = 'disable'; + const OPERATION_DELETE = 'delete'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOperationAllowableValues() + { + return [ + self::OPERATION_DISABLE, + self::OPERATION_DELETE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['operation'] = isset($data['operation']) ? $data['operation'] : null; + $this->container['campaignIds'] = isset($data['campaignIds']) ? $data['campaignIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['operation'] === null) { + $invalidProperties[] = "'operation' can't be null"; + } + $allowedValues = $this->getOperationAllowableValues(); + if (!is_null($this->container['operation']) && !in_array($this->container['operation'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'operation', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['campaignIds'] === null) { + $invalidProperties[] = "'campaignIds' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets operation + * + * @return string + */ + public function getOperation() + { + return $this->container['operation']; + } + + /** + * Sets operation + * + * @param string $operation The operation to perform on the specified campaign IDs. + * + * @return $this + */ + public function setOperation($operation) + { + $allowedValues = $this->getOperationAllowableValues(); + if (!in_array($operation, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'operation', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['operation'] = $operation; + + return $this; + } + + /** + * Gets campaignIds + * + * @return int[] + */ + public function getCampaignIds() + { + return $this->container['campaignIds']; + } + + /** + * Sets campaignIds + * + * @param int[] $campaignIds The list of campaign IDs on which the operation will be performed. + * + * @return $this + */ + public function setCampaignIds($campaignIds) + { + $this->container['campaignIds'] = $campaignIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Campaign.php b/lib/Model/Campaign.php index fb50744a..418175ab 100644 --- a/lib/Model/Campaign.php +++ b/lib/Model/Campaign.php @@ -75,6 +75,10 @@ class Campaign implements ModelInterface, ArrayAccess 'referralSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', 'limits' => '\TalonOne\Client\Model\LimitConfig[]', 'campaignGroups' => 'int[]', + 'evaluationGroupId' => 'int', + 'type' => 'string', + 'linkedStoreIds' => 'int[]', + 'budgets' => '\TalonOne\Client\Model\CampaignBudget[]', 'couponRedemptionCount' => 'int', 'referralRedemptionCount' => 'int', 'discountCount' => 'float', @@ -120,6 +124,10 @@ class Campaign implements ModelInterface, ArrayAccess 'referralSettings' => null, 'limits' => null, 'campaignGroups' => null, + 'evaluationGroupId' => null, + 'type' => null, + 'linkedStoreIds' => null, + 'budgets' => null, 'couponRedemptionCount' => null, 'referralRedemptionCount' => null, 'discountCount' => null, @@ -186,6 +194,10 @@ public static function openAPIFormats() 'referralSettings' => 'referralSettings', 'limits' => 'limits', 'campaignGroups' => 'campaignGroups', + 'evaluationGroupId' => 'evaluationGroupId', + 'type' => 'type', + 'linkedStoreIds' => 'linkedStoreIds', + 'budgets' => 'budgets', 'couponRedemptionCount' => 'couponRedemptionCount', 'referralRedemptionCount' => 'referralRedemptionCount', 'discountCount' => 'discountCount', @@ -231,6 +243,10 @@ public static function openAPIFormats() 'referralSettings' => 'setReferralSettings', 'limits' => 'setLimits', 'campaignGroups' => 'setCampaignGroups', + 'evaluationGroupId' => 'setEvaluationGroupId', + 'type' => 'setType', + 'linkedStoreIds' => 'setLinkedStoreIds', + 'budgets' => 'setBudgets', 'couponRedemptionCount' => 'setCouponRedemptionCount', 'referralRedemptionCount' => 'setReferralRedemptionCount', 'discountCount' => 'setDiscountCount', @@ -276,6 +292,10 @@ public static function openAPIFormats() 'referralSettings' => 'getReferralSettings', 'limits' => 'getLimits', 'campaignGroups' => 'getCampaignGroups', + 'evaluationGroupId' => 'getEvaluationGroupId', + 'type' => 'getType', + 'linkedStoreIds' => 'getLinkedStoreIds', + 'budgets' => 'getBudgets', 'couponRedemptionCount' => 'getCouponRedemptionCount', 'referralRedemptionCount' => 'getReferralRedemptionCount', 'discountCount' => 'getDiscountCount', @@ -347,6 +367,8 @@ public function getModelName() const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; const FEATURES_STRIKETHROUGH = 'strikethrough'; + const TYPE_CART_ITEM = 'cartItem'; + const TYPE_ADVANCED = 'advanced'; @@ -380,6 +402,19 @@ public function getFeaturesAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CART_ITEM, + self::TYPE_ADVANCED, + ]; + } + /** * Associative array for storing property values @@ -413,6 +448,10 @@ public function __construct(array $data = null) $this->container['referralSettings'] = isset($data['referralSettings']) ? $data['referralSettings'] : null; $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; $this->container['campaignGroups'] = isset($data['campaignGroups']) ? $data['campaignGroups'] : null; + $this->container['evaluationGroupId'] = isset($data['evaluationGroupId']) ? $data['evaluationGroupId'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : 'advanced'; + $this->container['linkedStoreIds'] = isset($data['linkedStoreIds']) ? $data['linkedStoreIds'] : null; + $this->container['budgets'] = isset($data['budgets']) ? $data['budgets'] : null; $this->container['couponRedemptionCount'] = isset($data['couponRedemptionCount']) ? $data['couponRedemptionCount'] : null; $this->container['referralRedemptionCount'] = isset($data['referralRedemptionCount']) ? $data['referralRedemptionCount'] : null; $this->container['discountCount'] = isset($data['discountCount']) ? $data['discountCount'] : null; @@ -486,6 +525,20 @@ public function listInvalidProperties() if ($this->container['limits'] === null) { $invalidProperties[] = "'limits' can't be null"; } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['budgets'] === null) { + $invalidProperties[] = "'budgets' can't be null"; + } return $invalidProperties; } @@ -687,7 +740,7 @@ public function getEndTime() /** * Sets endTime * - * @param \DateTime|null $endTime Timestamp the campaign will become inactive. + * @param \DateTime|null $endTime Timestamp when the campaign will become inactive. * * @return $this */ @@ -932,6 +985,111 @@ public function setCampaignGroups($campaignGroups) return $this; } + /** + * Gets evaluationGroupId + * + * @return int|null + */ + public function getEvaluationGroupId() + { + return $this->container['evaluationGroupId']; + } + + /** + * Sets evaluationGroupId + * + * @param int|null $evaluationGroupId The ID of the campaign evaluation group the campaign belongs to. + * + * @return $this + */ + public function setEvaluationGroupId($evaluationGroupId) + { + $this->container['evaluationGroupId'] = $evaluationGroupId; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets linkedStoreIds + * + * @return int[]|null + */ + public function getLinkedStoreIds() + { + return $this->container['linkedStoreIds']; + } + + /** + * Sets linkedStoreIds + * + * @param int[]|null $linkedStoreIds A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. + * + * @return $this + */ + public function setLinkedStoreIds($linkedStoreIds) + { + $this->container['linkedStoreIds'] = $linkedStoreIds; + + return $this; + } + + /** + * Gets budgets + * + * @return \TalonOne\Client\Model\CampaignBudget[] + */ + public function getBudgets() + { + return $this->container['budgets']; + } + + /** + * Sets budgets + * + * @param \TalonOne\Client\Model\CampaignBudget[] $budgets A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. + * + * @return $this + */ + public function setBudgets($budgets) + { + $this->container['budgets'] = $budgets; + + return $this; + } + /** * Gets couponRedemptionCount * @@ -945,7 +1103,7 @@ public function getCouponRedemptionCount() /** * Sets couponRedemptionCount * - * @param int|null $couponRedemptionCount Number of coupons redeemed in the campaign. + * @param int|null $couponRedemptionCount This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign. * * @return $this */ @@ -969,7 +1127,7 @@ public function getReferralRedemptionCount() /** * Sets referralRedemptionCount * - * @param int|null $referralRedemptionCount Number of referral codes redeemed in the campaign. + * @param int|null $referralRedemptionCount This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign. * * @return $this */ @@ -993,7 +1151,7 @@ public function getDiscountCount() /** * Sets discountCount * - * @param float|null $discountCount Total amount of discounts redeemed in the campaign. + * @param float|null $discountCount This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign. * * @return $this */ @@ -1017,7 +1175,7 @@ public function getDiscountEffectCount() /** * Sets discountEffectCount * - * @param int|null $discountEffectCount Total number of times discounts were redeemed in this campaign. + * @param int|null $discountEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of times discounts were redeemed in this campaign. * * @return $this */ @@ -1041,7 +1199,7 @@ public function getCouponCreationCount() /** * Sets couponCreationCount * - * @param int|null $couponCreationCount Total number of coupons created by rules in this campaign. + * @param int|null $couponCreationCount This property is **deprecated**. The count should be available under *budgets* property. Total number of coupons created by rules in this campaign. * * @return $this */ @@ -1065,7 +1223,7 @@ public function getCustomEffectCount() /** * Sets customEffectCount * - * @param int|null $customEffectCount Total number of custom effects triggered by rules in this campaign. + * @param int|null $customEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of custom effects triggered by rules in this campaign. * * @return $this */ @@ -1089,7 +1247,7 @@ public function getReferralCreationCount() /** * Sets referralCreationCount * - * @param int|null $referralCreationCount Total number of referrals created by rules in this campaign. + * @param int|null $referralCreationCount This property is **deprecated**. The count should be available under *budgets* property. Total number of referrals created by rules in this campaign. * * @return $this */ @@ -1113,7 +1271,7 @@ public function getAddFreeItemEffectCount() /** * Sets addFreeItemEffectCount * - * @param int|null $addFreeItemEffectCount Total number of times triggering add free item effext is allowed in this campaign. + * @param int|null $addFreeItemEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign. * * @return $this */ @@ -1137,7 +1295,7 @@ public function getAwardedGiveawaysCount() /** * Sets awardedGiveawaysCount * - * @param int|null $awardedGiveawaysCount Total number of giveaways awarded by rules in this campaign. + * @param int|null $awardedGiveawaysCount This property is **deprecated**. The count should be available under *budgets* property. Total number of giveaways awarded by rules in this campaign. * * @return $this */ @@ -1161,7 +1319,7 @@ public function getCreatedLoyaltyPointsCount() /** * Sets createdLoyaltyPointsCount * - * @param float|null $createdLoyaltyPointsCount Total number of loyalty points created by rules in this campaign. + * @param float|null $createdLoyaltyPointsCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points created by rules in this campaign. * * @return $this */ @@ -1185,7 +1343,7 @@ public function getCreatedLoyaltyPointsEffectCount() /** * Sets createdLoyaltyPointsEffectCount * - * @param int|null $createdLoyaltyPointsEffectCount Total number of loyalty point creation effects triggered by rules in this campaign. + * @param int|null $createdLoyaltyPointsEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point creation effects triggered by rules in this campaign. * * @return $this */ @@ -1209,7 +1367,7 @@ public function getRedeemedLoyaltyPointsCount() /** * Sets redeemedLoyaltyPointsCount * - * @param float|null $redeemedLoyaltyPointsCount Total number of loyalty points redeemed by rules in this campaign. + * @param float|null $redeemedLoyaltyPointsCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points redeemed by rules in this campaign. * * @return $this */ @@ -1233,7 +1391,7 @@ public function getRedeemedLoyaltyPointsEffectCount() /** * Sets redeemedLoyaltyPointsEffectCount * - * @param int|null $redeemedLoyaltyPointsEffectCount Total number of loyalty point redemption effects triggered by rules in this campaign. + * @param int|null $redeemedLoyaltyPointsEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point redemption effects triggered by rules in this campaign. * * @return $this */ @@ -1257,7 +1415,7 @@ public function getCallApiEffectCount() /** * Sets callApiEffectCount * - * @param int|null $callApiEffectCount Total number of webhook triggered by rules in this campaign. + * @param int|null $callApiEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of webhooks triggered by rules in this campaign. * * @return $this */ @@ -1281,7 +1439,7 @@ public function getReservecouponEffectCount() /** * Sets reservecouponEffectCount * - * @param int|null $reservecouponEffectCount Total number of reserve coupon effects triggered by rules in this campaign. + * @param int|null $reservecouponEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of reserve coupon effects triggered by rules in this campaign. * * @return $this */ diff --git a/lib/Model/CampaignBudget.php b/lib/Model/CampaignBudget.php new file mode 100644 index 00000000..1d4c3db1 --- /dev/null +++ b/lib/Model/CampaignBudget.php @@ -0,0 +1,395 @@ + 'string', + 'limit' => 'float', + 'counter' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'action' => null, + 'limit' => null, + 'counter' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'action' => 'action', + 'limit' => 'limit', + 'counter' => 'counter' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'action' => 'setAction', + 'limit' => 'setLimit', + 'counter' => 'setCounter' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'action' => 'getAction', + 'limit' => 'getLimit', + 'counter' => 'getCounter' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['action'] = isset($data['action']) ? $data['action'] : null; + $this->container['limit'] = isset($data['limit']) ? $data['limit'] : null; + $this->container['counter'] = isset($data['counter']) ? $data['counter'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['action'] === null) { + $invalidProperties[] = "'action' can't be null"; + } + if ($this->container['limit'] === null) { + $invalidProperties[] = "'limit' can't be null"; + } + if (($this->container['limit'] < 0)) { + $invalidProperties[] = "invalid value for 'limit', must be bigger than or equal to 0."; + } + + if ($this->container['counter'] === null) { + $invalidProperties[] = "'counter' can't be null"; + } + if (($this->container['counter'] < 0)) { + $invalidProperties[] = "invalid value for 'counter', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets action + * + * @return string + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param string $action The limitable action to which this limit applies. For example: - `setDiscount` - `setDiscountEffect` - `redeemCoupon` - `createCoupon` + * + * @return $this + */ + public function setAction($action) + { + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets limit + * + * @return float + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param float $limit The value to set for the limit. + * + * @return $this + */ + public function setLimit($limit) + { + + if (($limit < 0)) { + throw new \InvalidArgumentException('invalid value for $limit when calling CampaignBudget., must be bigger than or equal to 0.'); + } + + $this->container['limit'] = $limit; + + return $this; + } + + /** + * Gets counter + * + * @return float + */ + public function getCounter() + { + return $this->container['counter']; + } + + /** + * Sets counter + * + * @param float $counter The number of occurrences of the limited action in the context of the campaign. + * + * @return $this + */ + public function setCounter($counter) + { + + if (($counter < 0)) { + throw new \InvalidArgumentException('invalid value for $counter when calling CampaignBudget., must be bigger than or equal to 0.'); + } + + $this->container['counter'] = $counter; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignCopy.php b/lib/Model/CampaignCopy.php index 2168c568..61b50576 100644 --- a/lib/Model/CampaignCopy.php +++ b/lib/Model/CampaignCopy.php @@ -62,7 +62,8 @@ class CampaignCopy implements ModelInterface, ArrayAccess 'description' => 'string', 'startTime' => '\DateTime', 'endTime' => '\DateTime', - 'tags' => 'string[]' + 'tags' => 'string[]', + 'evaluationGroupId' => 'int' ]; /** @@ -76,7 +77,8 @@ class CampaignCopy implements ModelInterface, ArrayAccess 'description' => null, 'startTime' => 'date-time', 'endTime' => 'date-time', - 'tags' => null + 'tags' => null, + 'evaluationGroupId' => null ]; /** @@ -111,7 +113,8 @@ public static function openAPIFormats() 'description' => 'description', 'startTime' => 'startTime', 'endTime' => 'endTime', - 'tags' => 'tags' + 'tags' => 'tags', + 'evaluationGroupId' => 'evaluationGroupId' ]; /** @@ -125,7 +128,8 @@ public static function openAPIFormats() 'description' => 'setDescription', 'startTime' => 'setStartTime', 'endTime' => 'setEndTime', - 'tags' => 'setTags' + 'tags' => 'setTags', + 'evaluationGroupId' => 'setEvaluationGroupId' ]; /** @@ -139,7 +143,8 @@ public static function openAPIFormats() 'description' => 'getDescription', 'startTime' => 'getStartTime', 'endTime' => 'getEndTime', - 'tags' => 'getTags' + 'tags' => 'getTags', + 'evaluationGroupId' => 'getEvaluationGroupId' ]; /** @@ -208,6 +213,7 @@ public function __construct(array $data = null) $this->container['startTime'] = isset($data['startTime']) ? $data['startTime'] : null; $this->container['endTime'] = isset($data['endTime']) ? $data['endTime'] : null; $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['evaluationGroupId'] = isset($data['evaluationGroupId']) ? $data['evaluationGroupId'] : null; } /** @@ -380,6 +386,30 @@ public function setTags($tags) return $this; } + + /** + * Gets evaluationGroupId + * + * @return int|null + */ + public function getEvaluationGroupId() + { + return $this->container['evaluationGroupId']; + } + + /** + * Sets evaluationGroupId + * + * @param int|null $evaluationGroupId The ID of the campaign evaluation group the campaign belongs to. + * + * @return $this + */ + public function setEvaluationGroupId($evaluationGroupId) + { + $this->container['evaluationGroupId'] = $evaluationGroupId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CampaignCreatedNotification.php b/lib/Model/CampaignCreatedNotification.php index 7f9ec570..02399fd9 100644 --- a/lib/Model/CampaignCreatedNotification.php +++ b/lib/Model/CampaignCreatedNotification.php @@ -58,9 +58,9 @@ class CampaignCreatedNotification implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'campaign' => 'Campaign', + 'campaign' => '\TalonOne\Client\Model\CampaignStateNotification', 'ruleset' => '\TalonOne\Client\Model\Ruleset', - 'priority' => '\TalonOne\Client\Model\PriorityPosition' + 'evaluationPosition' => '\TalonOne\Client\Model\CampaignEvaluationPosition' ]; /** @@ -71,7 +71,7 @@ class CampaignCreatedNotification implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'campaign' => null, 'ruleset' => null, - 'priority' => null + 'evaluationPosition' => null ]; /** @@ -103,7 +103,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'campaign' => 'campaign', 'ruleset' => 'ruleset', - 'priority' => 'priority' + 'evaluationPosition' => 'evaluationPosition' ]; /** @@ -114,7 +114,7 @@ public static function openAPIFormats() protected static $setters = [ 'campaign' => 'setCampaign', 'ruleset' => 'setRuleset', - 'priority' => 'setPriority' + 'evaluationPosition' => 'setEvaluationPosition' ]; /** @@ -125,7 +125,7 @@ public static function openAPIFormats() protected static $getters = [ 'campaign' => 'getCampaign', 'ruleset' => 'getRuleset', - 'priority' => 'getPriority' + 'evaluationPosition' => 'getEvaluationPosition' ]; /** @@ -190,7 +190,7 @@ public function __construct(array $data = null) { $this->container['campaign'] = isset($data['campaign']) ? $data['campaign'] : null; $this->container['ruleset'] = isset($data['ruleset']) ? $data['ruleset'] : null; - $this->container['priority'] = isset($data['priority']) ? $data['priority'] : null; + $this->container['evaluationPosition'] = isset($data['evaluationPosition']) ? $data['evaluationPosition'] : null; } /** @@ -205,8 +205,8 @@ public function listInvalidProperties() if ($this->container['campaign'] === null) { $invalidProperties[] = "'campaign' can't be null"; } - if ($this->container['priority'] === null) { - $invalidProperties[] = "'priority' can't be null"; + if ($this->container['evaluationPosition'] === null) { + $invalidProperties[] = "'evaluationPosition' can't be null"; } return $invalidProperties; } @@ -226,7 +226,7 @@ public function valid() /** * Gets campaign * - * @return Campaign + * @return \TalonOne\Client\Model\CampaignStateNotification */ public function getCampaign() { @@ -236,7 +236,7 @@ public function getCampaign() /** * Sets campaign * - * @param Campaign $campaign campaign + * @param \TalonOne\Client\Model\CampaignStateNotification $campaign campaign * * @return $this */ @@ -272,25 +272,25 @@ public function setRuleset($ruleset) } /** - * Gets priority + * Gets evaluationPosition * - * @return \TalonOne\Client\Model\PriorityPosition + * @return \TalonOne\Client\Model\CampaignEvaluationPosition */ - public function getPriority() + public function getEvaluationPosition() { - return $this->container['priority']; + return $this->container['evaluationPosition']; } /** - * Sets priority + * Sets evaluationPosition * - * @param \TalonOne\Client\Model\PriorityPosition $priority priority + * @param \TalonOne\Client\Model\CampaignEvaluationPosition $evaluationPosition evaluationPosition * * @return $this */ - public function setPriority($priority) + public function setEvaluationPosition($evaluationPosition) { - $this->container['priority'] = $priority; + $this->container['evaluationPosition'] = $evaluationPosition; return $this; } diff --git a/lib/Model/CampaignDeletedNotification.php b/lib/Model/CampaignDeletedNotification.php index 064eb8ed..596da76b 100644 --- a/lib/Model/CampaignDeletedNotification.php +++ b/lib/Model/CampaignDeletedNotification.php @@ -58,7 +58,7 @@ class CampaignDeletedNotification implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'campaign' => 'Campaign', + 'campaign' => '\TalonOne\Client\Model\CampaignStateNotification', 'deletedAt' => '\DateTime' ]; @@ -220,7 +220,7 @@ public function valid() /** * Gets campaign * - * @return Campaign + * @return \TalonOne\Client\Model\CampaignStateNotification */ public function getCampaign() { @@ -230,7 +230,7 @@ public function getCampaign() /** * Sets campaign * - * @param Campaign $campaign campaign + * @param \TalonOne\Client\Model\CampaignStateNotification $campaign campaign * * @return $this */ diff --git a/lib/Model/CampaignEditedNotification.php b/lib/Model/CampaignEditedNotification.php index 1dd47b12..07819675 100644 --- a/lib/Model/CampaignEditedNotification.php +++ b/lib/Model/CampaignEditedNotification.php @@ -58,8 +58,8 @@ class CampaignEditedNotification implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'campaign' => 'Campaign', - 'oldCampaign' => 'Campaign', + 'campaign' => '\TalonOne\Client\Model\CampaignStateNotification', + 'oldCampaign' => '\TalonOne\Client\Model\CampaignStateNotification', 'ruleset' => '\TalonOne\Client\Model\Ruleset' ]; @@ -226,7 +226,7 @@ public function valid() /** * Gets campaign * - * @return Campaign + * @return \TalonOne\Client\Model\CampaignStateNotification */ public function getCampaign() { @@ -236,7 +236,7 @@ public function getCampaign() /** * Sets campaign * - * @param Campaign $campaign campaign + * @param \TalonOne\Client\Model\CampaignStateNotification $campaign campaign * * @return $this */ @@ -250,7 +250,7 @@ public function setCampaign($campaign) /** * Gets oldCampaign * - * @return Campaign + * @return \TalonOne\Client\Model\CampaignStateNotification */ public function getOldCampaign() { @@ -260,7 +260,7 @@ public function getOldCampaign() /** * Sets oldCampaign * - * @param Campaign $oldCampaign oldCampaign + * @param \TalonOne\Client\Model\CampaignStateNotification $oldCampaign oldCampaign * * @return $this */ diff --git a/lib/Model/CampaignEvaluationGroup.php b/lib/Model/CampaignEvaluationGroup.php new file mode 100644 index 00000000..31ca6ec7 --- /dev/null +++ b/lib/Model/CampaignEvaluationGroup.php @@ -0,0 +1,617 @@ + 'int', + 'name' => 'string', + 'parentId' => 'int', + 'description' => 'string', + 'evaluationMode' => 'string', + 'evaluationScope' => 'string', + 'locked' => 'bool', + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'applicationId' => null, + 'name' => null, + 'parentId' => null, + 'description' => null, + 'evaluationMode' => null, + 'evaluationScope' => null, + 'locked' => null, + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'applicationId' => 'applicationId', + 'name' => 'name', + 'parentId' => 'parentId', + 'description' => 'description', + 'evaluationMode' => 'evaluationMode', + 'evaluationScope' => 'evaluationScope', + 'locked' => 'locked', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'applicationId' => 'setApplicationId', + 'name' => 'setName', + 'parentId' => 'setParentId', + 'description' => 'setDescription', + 'evaluationMode' => 'setEvaluationMode', + 'evaluationScope' => 'setEvaluationScope', + 'locked' => 'setLocked', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'applicationId' => 'getApplicationId', + 'name' => 'getName', + 'parentId' => 'getParentId', + 'description' => 'getDescription', + 'evaluationMode' => 'getEvaluationMode', + 'evaluationScope' => 'getEvaluationScope', + 'locked' => 'getLocked', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const EVALUATION_MODE_STACKABLE = 'stackable'; + const EVALUATION_MODE_LIST_ORDER = 'listOrder'; + const EVALUATION_MODE_LOWEST_DISCOUNT = 'lowestDiscount'; + const EVALUATION_MODE_HIGHEST_DISCOUNT = 'highestDiscount'; + const EVALUATION_SCOPE_CART_ITEM = 'cartItem'; + const EVALUATION_SCOPE_SESSION = 'session'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEvaluationModeAllowableValues() + { + return [ + self::EVALUATION_MODE_STACKABLE, + self::EVALUATION_MODE_LIST_ORDER, + self::EVALUATION_MODE_LOWEST_DISCOUNT, + self::EVALUATION_MODE_HIGHEST_DISCOUNT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEvaluationScopeAllowableValues() + { + return [ + self::EVALUATION_SCOPE_CART_ITEM, + self::EVALUATION_SCOPE_SESSION, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['evaluationMode'] = isset($data['evaluationMode']) ? $data['evaluationMode'] : null; + $this->container['evaluationScope'] = isset($data['evaluationScope']) ? $data['evaluationScope'] : null; + $this->container['locked'] = isset($data['locked']) ? $data['locked'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['applicationId'] === null) { + $invalidProperties[] = "'applicationId' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['parentId'] === null) { + $invalidProperties[] = "'parentId' can't be null"; + } + if (($this->container['parentId'] < 1)) { + $invalidProperties[] = "invalid value for 'parentId', must be bigger than or equal to 1."; + } + + if ($this->container['evaluationMode'] === null) { + $invalidProperties[] = "'evaluationMode' can't be null"; + } + $allowedValues = $this->getEvaluationModeAllowableValues(); + if (!is_null($this->container['evaluationMode']) && !in_array($this->container['evaluationMode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'evaluationMode', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['evaluationScope'] === null) { + $invalidProperties[] = "'evaluationScope' can't be null"; + } + $allowedValues = $this->getEvaluationScopeAllowableValues(); + if (!is_null($this->container['evaluationScope']) && !in_array($this->container['evaluationScope'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'evaluationScope', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['locked'] === null) { + $invalidProperties[] = "'locked' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets applicationId + * + * @return int + */ + public function getApplicationId() + { + return $this->container['applicationId']; + } + + /** + * Sets applicationId + * + * @param int $applicationId The ID of the application that owns this entity. + * + * @return $this + */ + public function setApplicationId($applicationId) + { + $this->container['applicationId'] = $applicationId; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the campaign evaluation group. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets parentId + * + * @return int + */ + public function getParentId() + { + return $this->container['parentId']; + } + + /** + * Sets parentId + * + * @param int $parentId The ID of the parent group that contains the campaign evaluation group. + * + * @return $this + */ + public function setParentId($parentId) + { + + if (($parentId < 1)) { + throw new \InvalidArgumentException('invalid value for $parentId when calling CampaignEvaluationGroup., must be bigger than or equal to 1.'); + } + + $this->container['parentId'] = $parentId; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A description of the campaign evaluation group. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets evaluationMode + * + * @return string + */ + public function getEvaluationMode() + { + return $this->container['evaluationMode']; + } + + /** + * Sets evaluationMode + * + * @param string $evaluationMode The mode by which campaigns in the campaign evaluation group are evaluated. + * + * @return $this + */ + public function setEvaluationMode($evaluationMode) + { + $allowedValues = $this->getEvaluationModeAllowableValues(); + if (!in_array($evaluationMode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'evaluationMode', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['evaluationMode'] = $evaluationMode; + + return $this; + } + + /** + * Gets evaluationScope + * + * @return string + */ + public function getEvaluationScope() + { + return $this->container['evaluationScope']; + } + + /** + * Sets evaluationScope + * + * @param string $evaluationScope The evaluation scope of the campaign evaluation group. + * + * @return $this + */ + public function setEvaluationScope($evaluationScope) + { + $allowedValues = $this->getEvaluationScopeAllowableValues(); + if (!in_array($evaluationScope, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'evaluationScope', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['evaluationScope'] = $evaluationScope; + + return $this; + } + + /** + * Gets locked + * + * @return bool + */ + public function getLocked() + { + return $this->container['locked']; + } + + /** + * Sets locked + * + * @param bool $locked An indicator of whether the campaign evaluation group is locked for modification. + * + * @return $this + */ + public function setLocked($locked) + { + $this->container['locked'] = $locked; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignEvaluationPosition.php b/lib/Model/CampaignEvaluationPosition.php new file mode 100644 index 00000000..32b85770 --- /dev/null +++ b/lib/Model/CampaignEvaluationPosition.php @@ -0,0 +1,378 @@ + 'int', + 'groupName' => 'string', + 'position' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'groupId' => null, + 'groupName' => null, + 'position' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'groupId' => 'groupId', + 'groupName' => 'groupName', + 'position' => 'position' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'groupId' => 'setGroupId', + 'groupName' => 'setGroupName', + 'position' => 'setPosition' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'groupId' => 'getGroupId', + 'groupName' => 'getGroupName', + 'position' => 'getPosition' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['groupId'] = isset($data['groupId']) ? $data['groupId'] : null; + $this->container['groupName'] = isset($data['groupName']) ? $data['groupName'] : null; + $this->container['position'] = isset($data['position']) ? $data['position'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['groupId'] === null) { + $invalidProperties[] = "'groupId' can't be null"; + } + if ($this->container['groupName'] === null) { + $invalidProperties[] = "'groupName' can't be null"; + } + if ($this->container['position'] === null) { + $invalidProperties[] = "'position' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets groupId + * + * @return int + */ + public function getGroupId() + { + return $this->container['groupId']; + } + + /** + * Sets groupId + * + * @param int $groupId The ID of the campaign evaluation group the campaign belongs to. + * + * @return $this + */ + public function setGroupId($groupId) + { + $this->container['groupId'] = $groupId; + + return $this; + } + + /** + * Gets groupName + * + * @return string + */ + public function getGroupName() + { + return $this->container['groupName']; + } + + /** + * Sets groupName + * + * @param string $groupName The name of the campaign evaluation group the campaign belongs to. + * + * @return $this + */ + public function setGroupName($groupName) + { + $this->container['groupName'] = $groupName; + + return $this; + } + + /** + * Gets position + * + * @return int + */ + public function getPosition() + { + return $this->container['position']; + } + + /** + * Sets position + * + * @param int $position The position of the campaign node in its parent group. + * + * @return $this + */ + public function setPosition($position) + { + $this->container['position'] = $position; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignEvaluationTreeChangedNotification.php b/lib/Model/CampaignEvaluationTreeChangedNotification.php new file mode 100644 index 00000000..063e3824 --- /dev/null +++ b/lib/Model/CampaignEvaluationTreeChangedNotification.php @@ -0,0 +1,375 @@ + 'int', + 'oldEvaluationTree' => '\TalonOne\Client\Model\CampaignSet', + 'evaluationTree' => '\TalonOne\Client\Model\CampaignSet' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'applicationId' => null, + 'oldEvaluationTree' => null, + 'evaluationTree' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'applicationId' => 'applicationId', + 'oldEvaluationTree' => 'oldEvaluationTree', + 'evaluationTree' => 'evaluationTree' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'applicationId' => 'setApplicationId', + 'oldEvaluationTree' => 'setOldEvaluationTree', + 'evaluationTree' => 'setEvaluationTree' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'applicationId' => 'getApplicationId', + 'oldEvaluationTree' => 'getOldEvaluationTree', + 'evaluationTree' => 'getEvaluationTree' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; + $this->container['oldEvaluationTree'] = isset($data['oldEvaluationTree']) ? $data['oldEvaluationTree'] : null; + $this->container['evaluationTree'] = isset($data['evaluationTree']) ? $data['evaluationTree'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['applicationId'] === null) { + $invalidProperties[] = "'applicationId' can't be null"; + } + if ($this->container['evaluationTree'] === null) { + $invalidProperties[] = "'evaluationTree' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets applicationId + * + * @return int + */ + public function getApplicationId() + { + return $this->container['applicationId']; + } + + /** + * Sets applicationId + * + * @param int $applicationId The ID of the Application whose campaign evaluation tree changed. + * + * @return $this + */ + public function setApplicationId($applicationId) + { + $this->container['applicationId'] = $applicationId; + + return $this; + } + + /** + * Gets oldEvaluationTree + * + * @return \TalonOne\Client\Model\CampaignSet|null + */ + public function getOldEvaluationTree() + { + return $this->container['oldEvaluationTree']; + } + + /** + * Sets oldEvaluationTree + * + * @param \TalonOne\Client\Model\CampaignSet|null $oldEvaluationTree oldEvaluationTree + * + * @return $this + */ + public function setOldEvaluationTree($oldEvaluationTree) + { + $this->container['oldEvaluationTree'] = $oldEvaluationTree; + + return $this; + } + + /** + * Gets evaluationTree + * + * @return \TalonOne\Client\Model\CampaignSet + */ + public function getEvaluationTree() + { + return $this->container['evaluationTree']; + } + + /** + * Sets evaluationTree + * + * @param \TalonOne\Client\Model\CampaignSet $evaluationTree evaluationTree + * + * @return $this + */ + public function setEvaluationTree($evaluationTree) + { + $this->container['evaluationTree'] = $evaluationTree; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignForNotification.php b/lib/Model/CampaignForNotification.php new file mode 100644 index 00000000..f015f287 --- /dev/null +++ b/lib/Model/CampaignForNotification.php @@ -0,0 +1,1658 @@ + 'int', + 'created' => '\DateTime', + 'applicationId' => 'int', + 'userId' => 'int', + 'name' => 'string', + 'description' => 'string', + 'startTime' => '\DateTime', + 'endTime' => '\DateTime', + 'attributes' => 'object', + 'state' => 'string', + 'activeRulesetId' => 'int', + 'tags' => 'string[]', + 'features' => 'string[]', + 'couponSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', + 'referralSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', + 'limits' => '\TalonOne\Client\Model\LimitConfig[]', + 'campaignGroups' => 'int[]', + 'evaluationGroupId' => 'int', + 'type' => 'string', + 'linkedStoreIds' => 'int[]', + 'budgets' => '\TalonOne\Client\Model\CampaignBudget[]', + 'couponRedemptionCount' => 'int', + 'referralRedemptionCount' => 'int', + 'discountCount' => 'float', + 'discountEffectCount' => 'int', + 'couponCreationCount' => 'int', + 'customEffectCount' => 'int', + 'referralCreationCount' => 'int', + 'addFreeItemEffectCount' => 'int', + 'awardedGiveawaysCount' => 'int', + 'createdLoyaltyPointsCount' => 'float', + 'createdLoyaltyPointsEffectCount' => 'int', + 'redeemedLoyaltyPointsCount' => 'float', + 'redeemedLoyaltyPointsEffectCount' => 'int', + 'callApiEffectCount' => 'int', + 'reservecouponEffectCount' => 'int', + 'lastActivity' => '\DateTime', + 'updated' => '\DateTime', + 'createdBy' => 'string', + 'updatedBy' => 'string', + 'templateId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'created' => 'date-time', + 'applicationId' => null, + 'userId' => null, + 'name' => null, + 'description' => null, + 'startTime' => 'date-time', + 'endTime' => 'date-time', + 'attributes' => null, + 'state' => null, + 'activeRulesetId' => null, + 'tags' => null, + 'features' => null, + 'couponSettings' => null, + 'referralSettings' => null, + 'limits' => null, + 'campaignGroups' => null, + 'evaluationGroupId' => null, + 'type' => null, + 'linkedStoreIds' => null, + 'budgets' => null, + 'couponRedemptionCount' => null, + 'referralRedemptionCount' => null, + 'discountCount' => null, + 'discountEffectCount' => null, + 'couponCreationCount' => null, + 'customEffectCount' => null, + 'referralCreationCount' => null, + 'addFreeItemEffectCount' => null, + 'awardedGiveawaysCount' => null, + 'createdLoyaltyPointsCount' => null, + 'createdLoyaltyPointsEffectCount' => null, + 'redeemedLoyaltyPointsCount' => null, + 'redeemedLoyaltyPointsEffectCount' => null, + 'callApiEffectCount' => null, + 'reservecouponEffectCount' => null, + 'lastActivity' => 'date-time', + 'updated' => 'date-time', + 'createdBy' => null, + 'updatedBy' => null, + 'templateId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'created' => 'created', + 'applicationId' => 'applicationId', + 'userId' => 'userId', + 'name' => 'name', + 'description' => 'description', + 'startTime' => 'startTime', + 'endTime' => 'endTime', + 'attributes' => 'attributes', + 'state' => 'state', + 'activeRulesetId' => 'activeRulesetId', + 'tags' => 'tags', + 'features' => 'features', + 'couponSettings' => 'couponSettings', + 'referralSettings' => 'referralSettings', + 'limits' => 'limits', + 'campaignGroups' => 'campaignGroups', + 'evaluationGroupId' => 'evaluationGroupId', + 'type' => 'type', + 'linkedStoreIds' => 'linkedStoreIds', + 'budgets' => 'budgets', + 'couponRedemptionCount' => 'couponRedemptionCount', + 'referralRedemptionCount' => 'referralRedemptionCount', + 'discountCount' => 'discountCount', + 'discountEffectCount' => 'discountEffectCount', + 'couponCreationCount' => 'couponCreationCount', + 'customEffectCount' => 'customEffectCount', + 'referralCreationCount' => 'referralCreationCount', + 'addFreeItemEffectCount' => 'addFreeItemEffectCount', + 'awardedGiveawaysCount' => 'awardedGiveawaysCount', + 'createdLoyaltyPointsCount' => 'createdLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'createdLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'redeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'redeemedLoyaltyPointsEffectCount', + 'callApiEffectCount' => 'callApiEffectCount', + 'reservecouponEffectCount' => 'reservecouponEffectCount', + 'lastActivity' => 'lastActivity', + 'updated' => 'updated', + 'createdBy' => 'createdBy', + 'updatedBy' => 'updatedBy', + 'templateId' => 'templateId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'created' => 'setCreated', + 'applicationId' => 'setApplicationId', + 'userId' => 'setUserId', + 'name' => 'setName', + 'description' => 'setDescription', + 'startTime' => 'setStartTime', + 'endTime' => 'setEndTime', + 'attributes' => 'setAttributes', + 'state' => 'setState', + 'activeRulesetId' => 'setActiveRulesetId', + 'tags' => 'setTags', + 'features' => 'setFeatures', + 'couponSettings' => 'setCouponSettings', + 'referralSettings' => 'setReferralSettings', + 'limits' => 'setLimits', + 'campaignGroups' => 'setCampaignGroups', + 'evaluationGroupId' => 'setEvaluationGroupId', + 'type' => 'setType', + 'linkedStoreIds' => 'setLinkedStoreIds', + 'budgets' => 'setBudgets', + 'couponRedemptionCount' => 'setCouponRedemptionCount', + 'referralRedemptionCount' => 'setReferralRedemptionCount', + 'discountCount' => 'setDiscountCount', + 'discountEffectCount' => 'setDiscountEffectCount', + 'couponCreationCount' => 'setCouponCreationCount', + 'customEffectCount' => 'setCustomEffectCount', + 'referralCreationCount' => 'setReferralCreationCount', + 'addFreeItemEffectCount' => 'setAddFreeItemEffectCount', + 'awardedGiveawaysCount' => 'setAwardedGiveawaysCount', + 'createdLoyaltyPointsCount' => 'setCreatedLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'setCreatedLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'setRedeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'setRedeemedLoyaltyPointsEffectCount', + 'callApiEffectCount' => 'setCallApiEffectCount', + 'reservecouponEffectCount' => 'setReservecouponEffectCount', + 'lastActivity' => 'setLastActivity', + 'updated' => 'setUpdated', + 'createdBy' => 'setCreatedBy', + 'updatedBy' => 'setUpdatedBy', + 'templateId' => 'setTemplateId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'created' => 'getCreated', + 'applicationId' => 'getApplicationId', + 'userId' => 'getUserId', + 'name' => 'getName', + 'description' => 'getDescription', + 'startTime' => 'getStartTime', + 'endTime' => 'getEndTime', + 'attributes' => 'getAttributes', + 'state' => 'getState', + 'activeRulesetId' => 'getActiveRulesetId', + 'tags' => 'getTags', + 'features' => 'getFeatures', + 'couponSettings' => 'getCouponSettings', + 'referralSettings' => 'getReferralSettings', + 'limits' => 'getLimits', + 'campaignGroups' => 'getCampaignGroups', + 'evaluationGroupId' => 'getEvaluationGroupId', + 'type' => 'getType', + 'linkedStoreIds' => 'getLinkedStoreIds', + 'budgets' => 'getBudgets', + 'couponRedemptionCount' => 'getCouponRedemptionCount', + 'referralRedemptionCount' => 'getReferralRedemptionCount', + 'discountCount' => 'getDiscountCount', + 'discountEffectCount' => 'getDiscountEffectCount', + 'couponCreationCount' => 'getCouponCreationCount', + 'customEffectCount' => 'getCustomEffectCount', + 'referralCreationCount' => 'getReferralCreationCount', + 'addFreeItemEffectCount' => 'getAddFreeItemEffectCount', + 'awardedGiveawaysCount' => 'getAwardedGiveawaysCount', + 'createdLoyaltyPointsCount' => 'getCreatedLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'getCreatedLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'getRedeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'getRedeemedLoyaltyPointsEffectCount', + 'callApiEffectCount' => 'getCallApiEffectCount', + 'reservecouponEffectCount' => 'getReservecouponEffectCount', + 'lastActivity' => 'getLastActivity', + 'updated' => 'getUpdated', + 'createdBy' => 'getCreatedBy', + 'updatedBy' => 'getUpdatedBy', + 'templateId' => 'getTemplateId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const STATE_ENABLED = 'enabled'; + const STATE_DISABLED = 'disabled'; + const STATE_ARCHIVED = 'archived'; + const STATE_DRAFT = 'draft'; + const STATE_SCHEDULED = 'scheduled'; + const STATE_RUNNING = 'running'; + const STATE_EXPIRED = 'expired'; + const FEATURES_COUPONS = 'coupons'; + const FEATURES_REFERRALS = 'referrals'; + const FEATURES_LOYALTY = 'loyalty'; + const FEATURES_GIVEAWAYS = 'giveaways'; + const FEATURES_STRIKETHROUGH = 'strikethrough'; + const TYPE_CART_ITEM = 'cartItem'; + const TYPE_ADVANCED = 'advanced'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_ENABLED, + self::STATE_DISABLED, + self::STATE_ARCHIVED, + self::STATE_DRAFT, + self::STATE_SCHEDULED, + self::STATE_RUNNING, + self::STATE_EXPIRED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFeaturesAllowableValues() + { + return [ + self::FEATURES_COUPONS, + self::FEATURES_REFERRALS, + self::FEATURES_LOYALTY, + self::FEATURES_GIVEAWAYS, + self::FEATURES_STRIKETHROUGH, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CART_ITEM, + self::TYPE_ADVANCED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; + $this->container['userId'] = isset($data['userId']) ? $data['userId'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['startTime'] = isset($data['startTime']) ? $data['startTime'] : null; + $this->container['endTime'] = isset($data['endTime']) ? $data['endTime'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['state'] = isset($data['state']) ? $data['state'] : 'enabled'; + $this->container['activeRulesetId'] = isset($data['activeRulesetId']) ? $data['activeRulesetId'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['features'] = isset($data['features']) ? $data['features'] : null; + $this->container['couponSettings'] = isset($data['couponSettings']) ? $data['couponSettings'] : null; + $this->container['referralSettings'] = isset($data['referralSettings']) ? $data['referralSettings'] : null; + $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; + $this->container['campaignGroups'] = isset($data['campaignGroups']) ? $data['campaignGroups'] : null; + $this->container['evaluationGroupId'] = isset($data['evaluationGroupId']) ? $data['evaluationGroupId'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : 'advanced'; + $this->container['linkedStoreIds'] = isset($data['linkedStoreIds']) ? $data['linkedStoreIds'] : null; + $this->container['budgets'] = isset($data['budgets']) ? $data['budgets'] : null; + $this->container['couponRedemptionCount'] = isset($data['couponRedemptionCount']) ? $data['couponRedemptionCount'] : null; + $this->container['referralRedemptionCount'] = isset($data['referralRedemptionCount']) ? $data['referralRedemptionCount'] : null; + $this->container['discountCount'] = isset($data['discountCount']) ? $data['discountCount'] : null; + $this->container['discountEffectCount'] = isset($data['discountEffectCount']) ? $data['discountEffectCount'] : null; + $this->container['couponCreationCount'] = isset($data['couponCreationCount']) ? $data['couponCreationCount'] : null; + $this->container['customEffectCount'] = isset($data['customEffectCount']) ? $data['customEffectCount'] : null; + $this->container['referralCreationCount'] = isset($data['referralCreationCount']) ? $data['referralCreationCount'] : null; + $this->container['addFreeItemEffectCount'] = isset($data['addFreeItemEffectCount']) ? $data['addFreeItemEffectCount'] : null; + $this->container['awardedGiveawaysCount'] = isset($data['awardedGiveawaysCount']) ? $data['awardedGiveawaysCount'] : null; + $this->container['createdLoyaltyPointsCount'] = isset($data['createdLoyaltyPointsCount']) ? $data['createdLoyaltyPointsCount'] : null; + $this->container['createdLoyaltyPointsEffectCount'] = isset($data['createdLoyaltyPointsEffectCount']) ? $data['createdLoyaltyPointsEffectCount'] : null; + $this->container['redeemedLoyaltyPointsCount'] = isset($data['redeemedLoyaltyPointsCount']) ? $data['redeemedLoyaltyPointsCount'] : null; + $this->container['redeemedLoyaltyPointsEffectCount'] = isset($data['redeemedLoyaltyPointsEffectCount']) ? $data['redeemedLoyaltyPointsEffectCount'] : null; + $this->container['callApiEffectCount'] = isset($data['callApiEffectCount']) ? $data['callApiEffectCount'] : null; + $this->container['reservecouponEffectCount'] = isset($data['reservecouponEffectCount']) ? $data['reservecouponEffectCount'] : null; + $this->container['lastActivity'] = isset($data['lastActivity']) ? $data['lastActivity'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + $this->container['createdBy'] = isset($data['createdBy']) ? $data['createdBy'] : null; + $this->container['updatedBy'] = isset($data['updatedBy']) ? $data['updatedBy'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['applicationId'] === null) { + $invalidProperties[] = "'applicationId' can't be null"; + } + if ($this->container['userId'] === null) { + $invalidProperties[] = "'userId' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'state', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['tags'] === null) { + $invalidProperties[] = "'tags' can't be null"; + } + if ($this->container['features'] === null) { + $invalidProperties[] = "'features' can't be null"; + } + if ($this->container['limits'] === null) { + $invalidProperties[] = "'limits' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['budgets'] === null) { + $invalidProperties[] = "'budgets' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Unique ID for this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The exact moment this entity was created. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets applicationId + * + * @return int + */ + public function getApplicationId() + { + return $this->container['applicationId']; + } + + /** + * Sets applicationId + * + * @param int $applicationId The ID of the application that owns this entity. + * + * @return $this + */ + public function setApplicationId($applicationId) + { + $this->container['applicationId'] = $applicationId; + + return $this; + } + + /** + * Gets userId + * + * @return int + */ + public function getUserId() + { + return $this->container['userId']; + } + + /** + * Sets userId + * + * @param int $userId The ID of the user associated with this entity. + * + * @return $this + */ + public function setUserId($userId) + { + $this->container['userId'] = $userId; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name A user-facing name for this campaign. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling CampaignForNotification., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description A detailed description of the campaign. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets startTime + * + * @return \DateTime|null + */ + public function getStartTime() + { + return $this->container['startTime']; + } + + /** + * Sets startTime + * + * @param \DateTime|null $startTime Timestamp when the campaign will become active. + * + * @return $this + */ + public function setStartTime($startTime) + { + $this->container['startTime'] = $startTime; + + return $this; + } + + /** + * Gets endTime + * + * @return \DateTime|null + */ + public function getEndTime() + { + return $this->container['endTime']; + } + + /** + * Sets endTime + * + * @param \DateTime|null $endTime Timestamp when the campaign will become inactive. + * + * @return $this + */ + public function setEndTime($endTime) + { + $this->container['endTime'] = $endTime; + + return $this; + } + + /** + * Gets attributes + * + * @return object|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object|null $attributes Arbitrary properties associated with this campaign. + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state A disabled or archived campaign is not evaluated for rules or coupons. + * + * @return $this + */ + public function setState($state) + { + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'state', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets activeRulesetId + * + * @return int|null + */ + public function getActiveRulesetId() + { + return $this->container['activeRulesetId']; + } + + /** + * Sets activeRulesetId + * + * @param int|null $activeRulesetId [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. + * + * @return $this + */ + public function setActiveRulesetId($activeRulesetId) + { + $this->container['activeRulesetId'] = $activeRulesetId; + + return $this; + } + + /** + * Gets tags + * + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[] $tags A list of tags for the campaign. + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets features + * + * @return string[] + */ + public function getFeatures() + { + return $this->container['features']; + } + + /** + * Sets features + * + * @param string[] $features The features enabled in this campaign. + * + * @return $this + */ + public function setFeatures($features) + { + $allowedValues = $this->getFeaturesAllowableValues(); + if (array_diff($features, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'features', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['features'] = $features; + + return $this; + } + + /** + * Gets couponSettings + * + * @return \TalonOne\Client\Model\CodeGeneratorSettings|null + */ + public function getCouponSettings() + { + return $this->container['couponSettings']; + } + + /** + * Sets couponSettings + * + * @param \TalonOne\Client\Model\CodeGeneratorSettings|null $couponSettings couponSettings + * + * @return $this + */ + public function setCouponSettings($couponSettings) + { + $this->container['couponSettings'] = $couponSettings; + + return $this; + } + + /** + * Gets referralSettings + * + * @return \TalonOne\Client\Model\CodeGeneratorSettings|null + */ + public function getReferralSettings() + { + return $this->container['referralSettings']; + } + + /** + * Sets referralSettings + * + * @param \TalonOne\Client\Model\CodeGeneratorSettings|null $referralSettings referralSettings + * + * @return $this + */ + public function setReferralSettings($referralSettings) + { + $this->container['referralSettings'] = $referralSettings; + + return $this; + } + + /** + * Gets limits + * + * @return \TalonOne\Client\Model\LimitConfig[] + */ + public function getLimits() + { + return $this->container['limits']; + } + + /** + * Sets limits + * + * @param \TalonOne\Client\Model\LimitConfig[] $limits The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. + * + * @return $this + */ + public function setLimits($limits) + { + $this->container['limits'] = $limits; + + return $this; + } + + /** + * Gets campaignGroups + * + * @return int[]|null + */ + public function getCampaignGroups() + { + return $this->container['campaignGroups']; + } + + /** + * Sets campaignGroups + * + * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. + * + * @return $this + */ + public function setCampaignGroups($campaignGroups) + { + $this->container['campaignGroups'] = $campaignGroups; + + return $this; + } + + /** + * Gets evaluationGroupId + * + * @return int|null + */ + public function getEvaluationGroupId() + { + return $this->container['evaluationGroupId']; + } + + /** + * Sets evaluationGroupId + * + * @param int|null $evaluationGroupId The ID of the campaign evaluation group the campaign belongs to. + * + * @return $this + */ + public function setEvaluationGroupId($evaluationGroupId) + { + $this->container['evaluationGroupId'] = $evaluationGroupId; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets linkedStoreIds + * + * @return int[]|null + */ + public function getLinkedStoreIds() + { + return $this->container['linkedStoreIds']; + } + + /** + * Sets linkedStoreIds + * + * @param int[]|null $linkedStoreIds A list of store IDs that are linked to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. + * + * @return $this + */ + public function setLinkedStoreIds($linkedStoreIds) + { + $this->container['linkedStoreIds'] = $linkedStoreIds; + + return $this; + } + + /** + * Gets budgets + * + * @return \TalonOne\Client\Model\CampaignBudget[] + */ + public function getBudgets() + { + return $this->container['budgets']; + } + + /** + * Sets budgets + * + * @param \TalonOne\Client\Model\CampaignBudget[] $budgets A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. + * + * @return $this + */ + public function setBudgets($budgets) + { + $this->container['budgets'] = $budgets; + + return $this; + } + + /** + * Gets couponRedemptionCount + * + * @return int|null + */ + public function getCouponRedemptionCount() + { + return $this->container['couponRedemptionCount']; + } + + /** + * Sets couponRedemptionCount + * + * @param int|null $couponRedemptionCount This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign. + * + * @return $this + */ + public function setCouponRedemptionCount($couponRedemptionCount) + { + $this->container['couponRedemptionCount'] = $couponRedemptionCount; + + return $this; + } + + /** + * Gets referralRedemptionCount + * + * @return int|null + */ + public function getReferralRedemptionCount() + { + return $this->container['referralRedemptionCount']; + } + + /** + * Sets referralRedemptionCount + * + * @param int|null $referralRedemptionCount This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign. + * + * @return $this + */ + public function setReferralRedemptionCount($referralRedemptionCount) + { + $this->container['referralRedemptionCount'] = $referralRedemptionCount; + + return $this; + } + + /** + * Gets discountCount + * + * @return float|null + */ + public function getDiscountCount() + { + return $this->container['discountCount']; + } + + /** + * Sets discountCount + * + * @param float|null $discountCount This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign. + * + * @return $this + */ + public function setDiscountCount($discountCount) + { + $this->container['discountCount'] = $discountCount; + + return $this; + } + + /** + * Gets discountEffectCount + * + * @return int|null + */ + public function getDiscountEffectCount() + { + return $this->container['discountEffectCount']; + } + + /** + * Sets discountEffectCount + * + * @param int|null $discountEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of times discounts were redeemed in this campaign. + * + * @return $this + */ + public function setDiscountEffectCount($discountEffectCount) + { + $this->container['discountEffectCount'] = $discountEffectCount; + + return $this; + } + + /** + * Gets couponCreationCount + * + * @return int|null + */ + public function getCouponCreationCount() + { + return $this->container['couponCreationCount']; + } + + /** + * Sets couponCreationCount + * + * @param int|null $couponCreationCount This property is **deprecated**. The count should be available under *budgets* property. Total number of coupons created by rules in this campaign. + * + * @return $this + */ + public function setCouponCreationCount($couponCreationCount) + { + $this->container['couponCreationCount'] = $couponCreationCount; + + return $this; + } + + /** + * Gets customEffectCount + * + * @return int|null + */ + public function getCustomEffectCount() + { + return $this->container['customEffectCount']; + } + + /** + * Sets customEffectCount + * + * @param int|null $customEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of custom effects triggered by rules in this campaign. + * + * @return $this + */ + public function setCustomEffectCount($customEffectCount) + { + $this->container['customEffectCount'] = $customEffectCount; + + return $this; + } + + /** + * Gets referralCreationCount + * + * @return int|null + */ + public function getReferralCreationCount() + { + return $this->container['referralCreationCount']; + } + + /** + * Sets referralCreationCount + * + * @param int|null $referralCreationCount This property is **deprecated**. The count should be available under *budgets* property. Total number of referrals created by rules in this campaign. + * + * @return $this + */ + public function setReferralCreationCount($referralCreationCount) + { + $this->container['referralCreationCount'] = $referralCreationCount; + + return $this; + } + + /** + * Gets addFreeItemEffectCount + * + * @return int|null + */ + public function getAddFreeItemEffectCount() + { + return $this->container['addFreeItemEffectCount']; + } + + /** + * Sets addFreeItemEffectCount + * + * @param int|null $addFreeItemEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign. + * + * @return $this + */ + public function setAddFreeItemEffectCount($addFreeItemEffectCount) + { + $this->container['addFreeItemEffectCount'] = $addFreeItemEffectCount; + + return $this; + } + + /** + * Gets awardedGiveawaysCount + * + * @return int|null + */ + public function getAwardedGiveawaysCount() + { + return $this->container['awardedGiveawaysCount']; + } + + /** + * Sets awardedGiveawaysCount + * + * @param int|null $awardedGiveawaysCount This property is **deprecated**. The count should be available under *budgets* property. Total number of giveaways awarded by rules in this campaign. + * + * @return $this + */ + public function setAwardedGiveawaysCount($awardedGiveawaysCount) + { + $this->container['awardedGiveawaysCount'] = $awardedGiveawaysCount; + + return $this; + } + + /** + * Gets createdLoyaltyPointsCount + * + * @return float|null + */ + public function getCreatedLoyaltyPointsCount() + { + return $this->container['createdLoyaltyPointsCount']; + } + + /** + * Sets createdLoyaltyPointsCount + * + * @param float|null $createdLoyaltyPointsCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points created by rules in this campaign. + * + * @return $this + */ + public function setCreatedLoyaltyPointsCount($createdLoyaltyPointsCount) + { + $this->container['createdLoyaltyPointsCount'] = $createdLoyaltyPointsCount; + + return $this; + } + + /** + * Gets createdLoyaltyPointsEffectCount + * + * @return int|null + */ + public function getCreatedLoyaltyPointsEffectCount() + { + return $this->container['createdLoyaltyPointsEffectCount']; + } + + /** + * Sets createdLoyaltyPointsEffectCount + * + * @param int|null $createdLoyaltyPointsEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point creation effects triggered by rules in this campaign. + * + * @return $this + */ + public function setCreatedLoyaltyPointsEffectCount($createdLoyaltyPointsEffectCount) + { + $this->container['createdLoyaltyPointsEffectCount'] = $createdLoyaltyPointsEffectCount; + + return $this; + } + + /** + * Gets redeemedLoyaltyPointsCount + * + * @return float|null + */ + public function getRedeemedLoyaltyPointsCount() + { + return $this->container['redeemedLoyaltyPointsCount']; + } + + /** + * Sets redeemedLoyaltyPointsCount + * + * @param float|null $redeemedLoyaltyPointsCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points redeemed by rules in this campaign. + * + * @return $this + */ + public function setRedeemedLoyaltyPointsCount($redeemedLoyaltyPointsCount) + { + $this->container['redeemedLoyaltyPointsCount'] = $redeemedLoyaltyPointsCount; + + return $this; + } + + /** + * Gets redeemedLoyaltyPointsEffectCount + * + * @return int|null + */ + public function getRedeemedLoyaltyPointsEffectCount() + { + return $this->container['redeemedLoyaltyPointsEffectCount']; + } + + /** + * Sets redeemedLoyaltyPointsEffectCount + * + * @param int|null $redeemedLoyaltyPointsEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point redemption effects triggered by rules in this campaign. + * + * @return $this + */ + public function setRedeemedLoyaltyPointsEffectCount($redeemedLoyaltyPointsEffectCount) + { + $this->container['redeemedLoyaltyPointsEffectCount'] = $redeemedLoyaltyPointsEffectCount; + + return $this; + } + + /** + * Gets callApiEffectCount + * + * @return int|null + */ + public function getCallApiEffectCount() + { + return $this->container['callApiEffectCount']; + } + + /** + * Sets callApiEffectCount + * + * @param int|null $callApiEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of webhooks triggered by rules in this campaign. + * + * @return $this + */ + public function setCallApiEffectCount($callApiEffectCount) + { + $this->container['callApiEffectCount'] = $callApiEffectCount; + + return $this; + } + + /** + * Gets reservecouponEffectCount + * + * @return int|null + */ + public function getReservecouponEffectCount() + { + return $this->container['reservecouponEffectCount']; + } + + /** + * Sets reservecouponEffectCount + * + * @param int|null $reservecouponEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of reserve coupon effects triggered by rules in this campaign. + * + * @return $this + */ + public function setReservecouponEffectCount($reservecouponEffectCount) + { + $this->container['reservecouponEffectCount'] = $reservecouponEffectCount; + + return $this; + } + + /** + * Gets lastActivity + * + * @return \DateTime|null + */ + public function getLastActivity() + { + return $this->container['lastActivity']; + } + + /** + * Sets lastActivity + * + * @param \DateTime|null $lastActivity Timestamp of the most recent event received by this campaign. + * + * @return $this + */ + public function setLastActivity($lastActivity) + { + $this->container['lastActivity'] = $lastActivity; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime|null + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime|null $updated Timestamp of the most recent update to the campaign's property. Updates to external entities used in this campaign are **not** registered by this property, such as collection or coupon updates. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets createdBy + * + * @return string|null + */ + public function getCreatedBy() + { + return $this->container['createdBy']; + } + + /** + * Sets createdBy + * + * @param string|null $createdBy Name of the user who created this campaign if available. + * + * @return $this + */ + public function setCreatedBy($createdBy) + { + $this->container['createdBy'] = $createdBy; + + return $this; + } + + /** + * Gets updatedBy + * + * @return string|null + */ + public function getUpdatedBy() + { + return $this->container['updatedBy']; + } + + /** + * Sets updatedBy + * + * @param string|null $updatedBy Name of the user who last updated this campaign if available. + * + * @return $this + */ + public function setUpdatedBy($updatedBy) + { + $this->container['updatedBy'] = $updatedBy; + + return $this; + } + + /** + * Gets templateId + * + * @return int|null + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int|null $templateId The ID of the Campaign Template this Campaign was created from. + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignGroup.php b/lib/Model/CampaignGroup.php index 256d5a73..a2f9da75 100644 --- a/lib/Model/CampaignGroup.php +++ b/lib/Model/CampaignGroup.php @@ -375,7 +375,7 @@ public function getName() /** * Sets name * - * @param string $name The name of this campaign group. + * @param string $name The name of this campaign access group. * * @return $this */ @@ -404,7 +404,7 @@ public function getDescription() /** * Sets description * - * @param string|null $description A longer description of the campaign group. + * @param string|null $description A longer description of the campaign access group. * * @return $this */ @@ -428,7 +428,7 @@ public function getSubscribedApplicationsIds() /** * Sets subscribedApplicationsIds * - * @param int[]|null $subscribedApplicationsIds A list of the IDs of the applications that this campaign group is enabled for. + * @param int[]|null $subscribedApplicationsIds A list of IDs of the Applications that this campaign access group is enabled for. * * @return $this */ @@ -452,7 +452,7 @@ public function getCampaignIds() /** * Sets campaignIds * - * @param int[]|null $campaignIds A list of the IDs of the campaigns that this campaign group owns. + * @param int[]|null $campaignIds A list of IDs of the campaigns that are part of the campaign access group. * * @return $this */ diff --git a/lib/Model/CampaignNotificationPolicy.php b/lib/Model/CampaignNotificationPolicy.php new file mode 100644 index 00000000..af429167 --- /dev/null +++ b/lib/Model/CampaignNotificationPolicy.php @@ -0,0 +1,320 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Notification name. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling CampaignNotificationPolicy., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignRulesetChangedNotification.php b/lib/Model/CampaignRulesetChangedNotification.php index ec3fbed9..b3fed2ec 100644 --- a/lib/Model/CampaignRulesetChangedNotification.php +++ b/lib/Model/CampaignRulesetChangedNotification.php @@ -58,7 +58,7 @@ class CampaignRulesetChangedNotification implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'campaign' => 'Campaign', + 'campaign' => '\TalonOne\Client\Model\CampaignStateNotification', 'oldRuleset' => '\TalonOne\Client\Model\Ruleset', 'ruleset' => '\TalonOne\Client\Model\Ruleset' ]; @@ -223,7 +223,7 @@ public function valid() /** * Gets campaign * - * @return Campaign + * @return \TalonOne\Client\Model\CampaignStateNotification */ public function getCampaign() { @@ -233,7 +233,7 @@ public function getCampaign() /** * Sets campaign * - * @param Campaign $campaign campaign + * @param \TalonOne\Client\Model\CampaignStateNotification $campaign campaign * * @return $this */ diff --git a/lib/Model/CampaignSet.php b/lib/Model/CampaignSet.php index 57be856e..14da87b1 100644 --- a/lib/Model/CampaignSet.php +++ b/lib/Model/CampaignSet.php @@ -58,9 +58,8 @@ class CampaignSet implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'id' => 'int', - 'created' => '\DateTime', 'applicationId' => 'int', + 'id' => 'int', 'version' => 'int', 'set' => '\TalonOne\Client\Model\CampaignSetBranchNode', 'updatedBy' => 'string' @@ -72,9 +71,8 @@ class CampaignSet implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'id' => null, - 'created' => 'date-time', 'applicationId' => null, + 'id' => null, 'version' => null, 'set' => null, 'updatedBy' => null @@ -107,9 +105,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'created' => 'created', 'applicationId' => 'applicationId', + 'id' => 'id', 'version' => 'version', 'set' => 'set', 'updatedBy' => 'updatedBy' @@ -121,9 +118,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'created' => 'setCreated', 'applicationId' => 'setApplicationId', + 'id' => 'setId', 'version' => 'setVersion', 'set' => 'setSet', 'updatedBy' => 'setUpdatedBy' @@ -135,9 +131,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'created' => 'getCreated', 'applicationId' => 'getApplicationId', + 'id' => 'getId', 'version' => 'getVersion', 'set' => 'getSet', 'updatedBy' => 'getUpdatedBy' @@ -203,9 +198,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['created'] = isset($data['created']) ? $data['created'] : null; $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['version'] = isset($data['version']) ? $data['version'] : null; $this->container['set'] = isset($data['set']) ? $data['set'] : null; $this->container['updatedBy'] = isset($data['updatedBy']) ? $data['updatedBy'] : null; @@ -220,15 +214,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ($this->container['created'] === null) { - $invalidProperties[] = "'created' can't be null"; - } if ($this->container['applicationId'] === null) { $invalidProperties[] = "'applicationId' can't be null"; } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['version'] === null) { $invalidProperties[] = "'version' can't be null"; } @@ -255,73 +246,49 @@ public function valid() /** - * Gets id + * Gets applicationId * * @return int */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id Internal ID of this entity. - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets created - * - * @return \DateTime - */ - public function getCreated() + public function getApplicationId() { - return $this->container['created']; + return $this->container['applicationId']; } /** - * Sets created + * Sets applicationId * - * @param \DateTime $created The time this entity was created. + * @param int $applicationId The ID of the application that owns this entity. * * @return $this */ - public function setCreated($created) + public function setApplicationId($applicationId) { - $this->container['created'] = $created; + $this->container['applicationId'] = $applicationId; return $this; } /** - * Gets applicationId + * Gets id * * @return int */ - public function getApplicationId() + public function getId() { - return $this->container['applicationId']; + return $this->container['id']; } /** - * Sets applicationId + * Sets id * - * @param int $applicationId The ID of the application that owns this entity. + * @param int $id Internal ID of this entity. * * @return $this */ - public function setApplicationId($applicationId) + public function setId($id) { - $this->container['applicationId'] = $applicationId; + $this->container['id'] = $id; return $this; } diff --git a/lib/Model/CampaignSetBranchNode.php b/lib/Model/CampaignSetBranchNode.php index f8b14329..4622d728 100644 --- a/lib/Model/CampaignSetBranchNode.php +++ b/lib/Model/CampaignSetBranchNode.php @@ -60,7 +60,12 @@ class CampaignSetBranchNode implements ModelInterface, ArrayAccess 'type' => 'string', 'name' => 'string', 'operator' => 'string', - 'elements' => '\TalonOne\Client\Model\CampaignSetNode[]' + 'elements' => '\TalonOne\Client\Model\CampaignSetNode[]', + 'groupId' => 'int', + 'locked' => 'bool', + 'description' => 'string', + 'evaluationMode' => 'string', + 'evaluationScope' => 'string' ]; /** @@ -72,7 +77,12 @@ class CampaignSetBranchNode implements ModelInterface, ArrayAccess 'type' => null, 'name' => null, 'operator' => null, - 'elements' => null + 'elements' => null, + 'groupId' => null, + 'locked' => null, + 'description' => null, + 'evaluationMode' => null, + 'evaluationScope' => null ]; /** @@ -105,7 +115,12 @@ public static function openAPIFormats() 'type' => 'type', 'name' => 'name', 'operator' => 'operator', - 'elements' => 'elements' + 'elements' => 'elements', + 'groupId' => 'groupId', + 'locked' => 'locked', + 'description' => 'description', + 'evaluationMode' => 'evaluationMode', + 'evaluationScope' => 'evaluationScope' ]; /** @@ -117,7 +132,12 @@ public static function openAPIFormats() 'type' => 'setType', 'name' => 'setName', 'operator' => 'setOperator', - 'elements' => 'setElements' + 'elements' => 'setElements', + 'groupId' => 'setGroupId', + 'locked' => 'setLocked', + 'description' => 'setDescription', + 'evaluationMode' => 'setEvaluationMode', + 'evaluationScope' => 'setEvaluationScope' ]; /** @@ -129,7 +149,12 @@ public static function openAPIFormats() 'type' => 'getType', 'name' => 'getName', 'operator' => 'getOperator', - 'elements' => 'getElements' + 'elements' => 'getElements', + 'groupId' => 'getGroupId', + 'locked' => 'getLocked', + 'description' => 'getDescription', + 'evaluationMode' => 'getEvaluationMode', + 'evaluationScope' => 'getEvaluationScope' ]; /** @@ -176,6 +201,12 @@ public function getModelName() const TYPE_SET = 'SET'; const OPERATOR_ALL = 'ALL'; const OPERATOR_FIRST = 'FIRST'; + const EVALUATION_MODE_STACKABLE = 'stackable'; + const EVALUATION_MODE_LIST_ORDER = 'listOrder'; + const EVALUATION_MODE_LOWEST_DISCOUNT = 'lowestDiscount'; + const EVALUATION_MODE_HIGHEST_DISCOUNT = 'highestDiscount'; + const EVALUATION_SCOPE_CART_ITEM = 'cartItem'; + const EVALUATION_SCOPE_SESSION = 'session'; @@ -204,6 +235,34 @@ public function getOperatorAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEvaluationModeAllowableValues() + { + return [ + self::EVALUATION_MODE_STACKABLE, + self::EVALUATION_MODE_LIST_ORDER, + self::EVALUATION_MODE_LOWEST_DISCOUNT, + self::EVALUATION_MODE_HIGHEST_DISCOUNT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEvaluationScopeAllowableValues() + { + return [ + self::EVALUATION_SCOPE_CART_ITEM, + self::EVALUATION_SCOPE_SESSION, + ]; + } + /** * Associative array for storing property values @@ -224,6 +283,11 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['operator'] = isset($data['operator']) ? $data['operator'] : null; $this->container['elements'] = isset($data['elements']) ? $data['elements'] : null; + $this->container['groupId'] = isset($data['groupId']) ? $data['groupId'] : null; + $this->container['locked'] = isset($data['locked']) ? $data['locked'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['evaluationMode'] = isset($data['evaluationMode']) ? $data['evaluationMode'] : null; + $this->container['evaluationScope'] = isset($data['evaluationScope']) ? $data['evaluationScope'] : null; } /** @@ -263,6 +327,34 @@ public function listInvalidProperties() if ($this->container['elements'] === null) { $invalidProperties[] = "'elements' can't be null"; } + if ($this->container['groupId'] === null) { + $invalidProperties[] = "'groupId' can't be null"; + } + if ($this->container['locked'] === null) { + $invalidProperties[] = "'locked' can't be null"; + } + if ($this->container['evaluationMode'] === null) { + $invalidProperties[] = "'evaluationMode' can't be null"; + } + $allowedValues = $this->getEvaluationModeAllowableValues(); + if (!is_null($this->container['evaluationMode']) && !in_array($this->container['evaluationMode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'evaluationMode', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['evaluationScope'] === null) { + $invalidProperties[] = "'evaluationScope' can't be null"; + } + $allowedValues = $this->getEvaluationScopeAllowableValues(); + if (!is_null($this->container['evaluationScope']) && !in_array($this->container['evaluationScope'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'evaluationScope', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -324,7 +416,7 @@ public function getName() /** * Sets name * - * @param string $name Name of the set + * @param string $name Name of the set. * * @return $this */ @@ -348,7 +440,7 @@ public function getOperator() /** * Sets operator * - * @param string $operator How does the set operates on its elements. + * @param string $operator An indicator of how the set operates on its elements. * * @return $this */ @@ -391,6 +483,144 @@ public function setElements($elements) return $this; } + + /** + * Gets groupId + * + * @return int + */ + public function getGroupId() + { + return $this->container['groupId']; + } + + /** + * Sets groupId + * + * @param int $groupId The ID of the campaign set. + * + * @return $this + */ + public function setGroupId($groupId) + { + $this->container['groupId'] = $groupId; + + return $this; + } + + /** + * Gets locked + * + * @return bool + */ + public function getLocked() + { + return $this->container['locked']; + } + + /** + * Sets locked + * + * @param bool $locked An indicator of whether the campaign set is locked for modification. + * + * @return $this + */ + public function setLocked($locked) + { + $this->container['locked'] = $locked; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A description of the campaign set. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets evaluationMode + * + * @return string + */ + public function getEvaluationMode() + { + return $this->container['evaluationMode']; + } + + /** + * Sets evaluationMode + * + * @param string $evaluationMode The mode by which campaigns in the campaign evaluation group are evaluated. + * + * @return $this + */ + public function setEvaluationMode($evaluationMode) + { + $allowedValues = $this->getEvaluationModeAllowableValues(); + if (!in_array($evaluationMode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'evaluationMode', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['evaluationMode'] = $evaluationMode; + + return $this; + } + + /** + * Gets evaluationScope + * + * @return string + */ + public function getEvaluationScope() + { + return $this->container['evaluationScope']; + } + + /** + * Sets evaluationScope + * + * @param string $evaluationScope The evaluation scope of the campaign evaluation group. + * + * @return $this + */ + public function setEvaluationScope($evaluationScope) + { + $allowedValues = $this->getEvaluationScopeAllowableValues(); + if (!in_array($evaluationScope, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'evaluationScope', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['evaluationScope'] = $evaluationScope; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CampaignStateChangedNotification.php b/lib/Model/CampaignStateChangedNotification.php index c030b7c0..290cc35d 100644 --- a/lib/Model/CampaignStateChangedNotification.php +++ b/lib/Model/CampaignStateChangedNotification.php @@ -58,7 +58,7 @@ class CampaignStateChangedNotification implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'campaign' => '\TalonOne\Client\Model\Campaign', + 'campaign' => '\TalonOne\Client\Model\CampaignForNotification', 'oldState' => 'string', 'newState' => 'string', 'ruleset' => '\TalonOne\Client\Model\Ruleset' @@ -235,7 +235,7 @@ public function valid() /** * Gets campaign * - * @return \TalonOne\Client\Model\Campaign + * @return \TalonOne\Client\Model\CampaignForNotification */ public function getCampaign() { @@ -245,7 +245,7 @@ public function getCampaign() /** * Sets campaign * - * @param \TalonOne\Client\Model\Campaign $campaign campaign + * @param \TalonOne\Client\Model\CampaignForNotification $campaign campaign * * @return $this */ diff --git a/lib/Model/CampaignStateNotification.php b/lib/Model/CampaignStateNotification.php new file mode 100644 index 00000000..6b8adee2 --- /dev/null +++ b/lib/Model/CampaignStateNotification.php @@ -0,0 +1,1721 @@ + 'int', + 'created' => '\DateTime', + 'applicationId' => 'int', + 'userId' => 'int', + 'name' => 'string', + 'description' => 'string', + 'startTime' => '\DateTime', + 'endTime' => '\DateTime', + 'attributes' => 'object', + 'state' => 'string', + 'activeRulesetId' => 'int', + 'tags' => 'string[]', + 'features' => 'string[]', + 'couponSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', + 'referralSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', + 'limits' => '\TalonOne\Client\Model\LimitConfig[]', + 'campaignGroups' => 'int[]', + 'evaluationGroupId' => 'int', + 'type' => 'string', + 'linkedStoreIds' => 'int[]', + 'budgets' => '\TalonOne\Client\Model\CampaignBudget[]', + 'couponRedemptionCount' => 'int', + 'referralRedemptionCount' => 'int', + 'discountCount' => 'float', + 'discountEffectCount' => 'int', + 'couponCreationCount' => 'int', + 'customEffectCount' => 'int', + 'referralCreationCount' => 'int', + 'addFreeItemEffectCount' => 'int', + 'awardedGiveawaysCount' => 'int', + 'createdLoyaltyPointsCount' => 'float', + 'createdLoyaltyPointsEffectCount' => 'int', + 'redeemedLoyaltyPointsCount' => 'float', + 'redeemedLoyaltyPointsEffectCount' => 'int', + 'callApiEffectCount' => 'int', + 'reservecouponEffectCount' => 'int', + 'lastActivity' => '\DateTime', + 'updated' => '\DateTime', + 'createdBy' => 'string', + 'updatedBy' => 'string', + 'templateId' => 'int', + 'frontendState' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'created' => 'date-time', + 'applicationId' => null, + 'userId' => null, + 'name' => null, + 'description' => null, + 'startTime' => 'date-time', + 'endTime' => 'date-time', + 'attributes' => null, + 'state' => null, + 'activeRulesetId' => null, + 'tags' => null, + 'features' => null, + 'couponSettings' => null, + 'referralSettings' => null, + 'limits' => null, + 'campaignGroups' => null, + 'evaluationGroupId' => null, + 'type' => null, + 'linkedStoreIds' => null, + 'budgets' => null, + 'couponRedemptionCount' => null, + 'referralRedemptionCount' => null, + 'discountCount' => null, + 'discountEffectCount' => null, + 'couponCreationCount' => null, + 'customEffectCount' => null, + 'referralCreationCount' => null, + 'addFreeItemEffectCount' => null, + 'awardedGiveawaysCount' => null, + 'createdLoyaltyPointsCount' => null, + 'createdLoyaltyPointsEffectCount' => null, + 'redeemedLoyaltyPointsCount' => null, + 'redeemedLoyaltyPointsEffectCount' => null, + 'callApiEffectCount' => null, + 'reservecouponEffectCount' => null, + 'lastActivity' => 'date-time', + 'updated' => 'date-time', + 'createdBy' => null, + 'updatedBy' => null, + 'templateId' => null, + 'frontendState' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'created' => 'created', + 'applicationId' => 'applicationId', + 'userId' => 'userId', + 'name' => 'name', + 'description' => 'description', + 'startTime' => 'startTime', + 'endTime' => 'endTime', + 'attributes' => 'attributes', + 'state' => 'state', + 'activeRulesetId' => 'activeRulesetId', + 'tags' => 'tags', + 'features' => 'features', + 'couponSettings' => 'couponSettings', + 'referralSettings' => 'referralSettings', + 'limits' => 'limits', + 'campaignGroups' => 'campaignGroups', + 'evaluationGroupId' => 'evaluationGroupId', + 'type' => 'type', + 'linkedStoreIds' => 'linkedStoreIds', + 'budgets' => 'budgets', + 'couponRedemptionCount' => 'couponRedemptionCount', + 'referralRedemptionCount' => 'referralRedemptionCount', + 'discountCount' => 'discountCount', + 'discountEffectCount' => 'discountEffectCount', + 'couponCreationCount' => 'couponCreationCount', + 'customEffectCount' => 'customEffectCount', + 'referralCreationCount' => 'referralCreationCount', + 'addFreeItemEffectCount' => 'addFreeItemEffectCount', + 'awardedGiveawaysCount' => 'awardedGiveawaysCount', + 'createdLoyaltyPointsCount' => 'createdLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'createdLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'redeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'redeemedLoyaltyPointsEffectCount', + 'callApiEffectCount' => 'callApiEffectCount', + 'reservecouponEffectCount' => 'reservecouponEffectCount', + 'lastActivity' => 'lastActivity', + 'updated' => 'updated', + 'createdBy' => 'createdBy', + 'updatedBy' => 'updatedBy', + 'templateId' => 'templateId', + 'frontendState' => 'frontendState' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'created' => 'setCreated', + 'applicationId' => 'setApplicationId', + 'userId' => 'setUserId', + 'name' => 'setName', + 'description' => 'setDescription', + 'startTime' => 'setStartTime', + 'endTime' => 'setEndTime', + 'attributes' => 'setAttributes', + 'state' => 'setState', + 'activeRulesetId' => 'setActiveRulesetId', + 'tags' => 'setTags', + 'features' => 'setFeatures', + 'couponSettings' => 'setCouponSettings', + 'referralSettings' => 'setReferralSettings', + 'limits' => 'setLimits', + 'campaignGroups' => 'setCampaignGroups', + 'evaluationGroupId' => 'setEvaluationGroupId', + 'type' => 'setType', + 'linkedStoreIds' => 'setLinkedStoreIds', + 'budgets' => 'setBudgets', + 'couponRedemptionCount' => 'setCouponRedemptionCount', + 'referralRedemptionCount' => 'setReferralRedemptionCount', + 'discountCount' => 'setDiscountCount', + 'discountEffectCount' => 'setDiscountEffectCount', + 'couponCreationCount' => 'setCouponCreationCount', + 'customEffectCount' => 'setCustomEffectCount', + 'referralCreationCount' => 'setReferralCreationCount', + 'addFreeItemEffectCount' => 'setAddFreeItemEffectCount', + 'awardedGiveawaysCount' => 'setAwardedGiveawaysCount', + 'createdLoyaltyPointsCount' => 'setCreatedLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'setCreatedLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'setRedeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'setRedeemedLoyaltyPointsEffectCount', + 'callApiEffectCount' => 'setCallApiEffectCount', + 'reservecouponEffectCount' => 'setReservecouponEffectCount', + 'lastActivity' => 'setLastActivity', + 'updated' => 'setUpdated', + 'createdBy' => 'setCreatedBy', + 'updatedBy' => 'setUpdatedBy', + 'templateId' => 'setTemplateId', + 'frontendState' => 'setFrontendState' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'created' => 'getCreated', + 'applicationId' => 'getApplicationId', + 'userId' => 'getUserId', + 'name' => 'getName', + 'description' => 'getDescription', + 'startTime' => 'getStartTime', + 'endTime' => 'getEndTime', + 'attributes' => 'getAttributes', + 'state' => 'getState', + 'activeRulesetId' => 'getActiveRulesetId', + 'tags' => 'getTags', + 'features' => 'getFeatures', + 'couponSettings' => 'getCouponSettings', + 'referralSettings' => 'getReferralSettings', + 'limits' => 'getLimits', + 'campaignGroups' => 'getCampaignGroups', + 'evaluationGroupId' => 'getEvaluationGroupId', + 'type' => 'getType', + 'linkedStoreIds' => 'getLinkedStoreIds', + 'budgets' => 'getBudgets', + 'couponRedemptionCount' => 'getCouponRedemptionCount', + 'referralRedemptionCount' => 'getReferralRedemptionCount', + 'discountCount' => 'getDiscountCount', + 'discountEffectCount' => 'getDiscountEffectCount', + 'couponCreationCount' => 'getCouponCreationCount', + 'customEffectCount' => 'getCustomEffectCount', + 'referralCreationCount' => 'getReferralCreationCount', + 'addFreeItemEffectCount' => 'getAddFreeItemEffectCount', + 'awardedGiveawaysCount' => 'getAwardedGiveawaysCount', + 'createdLoyaltyPointsCount' => 'getCreatedLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'getCreatedLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'getRedeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'getRedeemedLoyaltyPointsEffectCount', + 'callApiEffectCount' => 'getCallApiEffectCount', + 'reservecouponEffectCount' => 'getReservecouponEffectCount', + 'lastActivity' => 'getLastActivity', + 'updated' => 'getUpdated', + 'createdBy' => 'getCreatedBy', + 'updatedBy' => 'getUpdatedBy', + 'templateId' => 'getTemplateId', + 'frontendState' => 'getFrontendState' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const STATE_ENABLED = 'enabled'; + const STATE_DISABLED = 'disabled'; + const STATE_ARCHIVED = 'archived'; + const FEATURES_COUPONS = 'coupons'; + const FEATURES_REFERRALS = 'referrals'; + const FEATURES_LOYALTY = 'loyalty'; + const FEATURES_GIVEAWAYS = 'giveaways'; + const FEATURES_STRIKETHROUGH = 'strikethrough'; + const TYPE_CART_ITEM = 'cartItem'; + const TYPE_ADVANCED = 'advanced'; + const FRONTEND_STATE_EXPIRED = 'expired'; + const FRONTEND_STATE_SCHEDULED = 'scheduled'; + const FRONTEND_STATE_RUNNING = 'running'; + const FRONTEND_STATE_DRAFT = 'draft'; + const FRONTEND_STATE_DISABLED = 'disabled'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStateAllowableValues() + { + return [ + self::STATE_ENABLED, + self::STATE_DISABLED, + self::STATE_ARCHIVED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFeaturesAllowableValues() + { + return [ + self::FEATURES_COUPONS, + self::FEATURES_REFERRALS, + self::FEATURES_LOYALTY, + self::FEATURES_GIVEAWAYS, + self::FEATURES_STRIKETHROUGH, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CART_ITEM, + self::TYPE_ADVANCED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFrontendStateAllowableValues() + { + return [ + self::FRONTEND_STATE_EXPIRED, + self::FRONTEND_STATE_SCHEDULED, + self::FRONTEND_STATE_RUNNING, + self::FRONTEND_STATE_DRAFT, + self::FRONTEND_STATE_DISABLED, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; + $this->container['userId'] = isset($data['userId']) ? $data['userId'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['startTime'] = isset($data['startTime']) ? $data['startTime'] : null; + $this->container['endTime'] = isset($data['endTime']) ? $data['endTime'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['state'] = isset($data['state']) ? $data['state'] : 'enabled'; + $this->container['activeRulesetId'] = isset($data['activeRulesetId']) ? $data['activeRulesetId'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['features'] = isset($data['features']) ? $data['features'] : null; + $this->container['couponSettings'] = isset($data['couponSettings']) ? $data['couponSettings'] : null; + $this->container['referralSettings'] = isset($data['referralSettings']) ? $data['referralSettings'] : null; + $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; + $this->container['campaignGroups'] = isset($data['campaignGroups']) ? $data['campaignGroups'] : null; + $this->container['evaluationGroupId'] = isset($data['evaluationGroupId']) ? $data['evaluationGroupId'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : 'advanced'; + $this->container['linkedStoreIds'] = isset($data['linkedStoreIds']) ? $data['linkedStoreIds'] : null; + $this->container['budgets'] = isset($data['budgets']) ? $data['budgets'] : null; + $this->container['couponRedemptionCount'] = isset($data['couponRedemptionCount']) ? $data['couponRedemptionCount'] : null; + $this->container['referralRedemptionCount'] = isset($data['referralRedemptionCount']) ? $data['referralRedemptionCount'] : null; + $this->container['discountCount'] = isset($data['discountCount']) ? $data['discountCount'] : null; + $this->container['discountEffectCount'] = isset($data['discountEffectCount']) ? $data['discountEffectCount'] : null; + $this->container['couponCreationCount'] = isset($data['couponCreationCount']) ? $data['couponCreationCount'] : null; + $this->container['customEffectCount'] = isset($data['customEffectCount']) ? $data['customEffectCount'] : null; + $this->container['referralCreationCount'] = isset($data['referralCreationCount']) ? $data['referralCreationCount'] : null; + $this->container['addFreeItemEffectCount'] = isset($data['addFreeItemEffectCount']) ? $data['addFreeItemEffectCount'] : null; + $this->container['awardedGiveawaysCount'] = isset($data['awardedGiveawaysCount']) ? $data['awardedGiveawaysCount'] : null; + $this->container['createdLoyaltyPointsCount'] = isset($data['createdLoyaltyPointsCount']) ? $data['createdLoyaltyPointsCount'] : null; + $this->container['createdLoyaltyPointsEffectCount'] = isset($data['createdLoyaltyPointsEffectCount']) ? $data['createdLoyaltyPointsEffectCount'] : null; + $this->container['redeemedLoyaltyPointsCount'] = isset($data['redeemedLoyaltyPointsCount']) ? $data['redeemedLoyaltyPointsCount'] : null; + $this->container['redeemedLoyaltyPointsEffectCount'] = isset($data['redeemedLoyaltyPointsEffectCount']) ? $data['redeemedLoyaltyPointsEffectCount'] : null; + $this->container['callApiEffectCount'] = isset($data['callApiEffectCount']) ? $data['callApiEffectCount'] : null; + $this->container['reservecouponEffectCount'] = isset($data['reservecouponEffectCount']) ? $data['reservecouponEffectCount'] : null; + $this->container['lastActivity'] = isset($data['lastActivity']) ? $data['lastActivity'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + $this->container['createdBy'] = isset($data['createdBy']) ? $data['createdBy'] : null; + $this->container['updatedBy'] = isset($data['updatedBy']) ? $data['updatedBy'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['frontendState'] = isset($data['frontendState']) ? $data['frontendState'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['applicationId'] === null) { + $invalidProperties[] = "'applicationId' can't be null"; + } + if ($this->container['userId'] === null) { + $invalidProperties[] = "'userId' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + $allowedValues = $this->getStateAllowableValues(); + if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'state', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['tags'] === null) { + $invalidProperties[] = "'tags' can't be null"; + } + if ($this->container['features'] === null) { + $invalidProperties[] = "'features' can't be null"; + } + if ($this->container['limits'] === null) { + $invalidProperties[] = "'limits' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['budgets'] === null) { + $invalidProperties[] = "'budgets' can't be null"; + } + if ($this->container['frontendState'] === null) { + $invalidProperties[] = "'frontendState' can't be null"; + } + $allowedValues = $this->getFrontendStateAllowableValues(); + if (!is_null($this->container['frontendState']) && !in_array($this->container['frontendState'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'frontendState', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Unique ID for this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The exact moment this entity was created. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets applicationId + * + * @return int + */ + public function getApplicationId() + { + return $this->container['applicationId']; + } + + /** + * Sets applicationId + * + * @param int $applicationId The ID of the application that owns this entity. + * + * @return $this + */ + public function setApplicationId($applicationId) + { + $this->container['applicationId'] = $applicationId; + + return $this; + } + + /** + * Gets userId + * + * @return int + */ + public function getUserId() + { + return $this->container['userId']; + } + + /** + * Sets userId + * + * @param int $userId The ID of the user associated with this entity. + * + * @return $this + */ + public function setUserId($userId) + { + $this->container['userId'] = $userId; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name A user-facing name for this campaign. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling CampaignStateNotification., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description A detailed description of the campaign. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets startTime + * + * @return \DateTime|null + */ + public function getStartTime() + { + return $this->container['startTime']; + } + + /** + * Sets startTime + * + * @param \DateTime|null $startTime Timestamp when the campaign will become active. + * + * @return $this + */ + public function setStartTime($startTime) + { + $this->container['startTime'] = $startTime; + + return $this; + } + + /** + * Gets endTime + * + * @return \DateTime|null + */ + public function getEndTime() + { + return $this->container['endTime']; + } + + /** + * Sets endTime + * + * @param \DateTime|null $endTime Timestamp when the campaign will become inactive. + * + * @return $this + */ + public function setEndTime($endTime) + { + $this->container['endTime'] = $endTime; + + return $this; + } + + /** + * Gets attributes + * + * @return object|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object|null $attributes Arbitrary properties associated with this campaign. + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state A disabled or archived campaign is not evaluated for rules or coupons. + * + * @return $this + */ + public function setState($state) + { + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'state', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets activeRulesetId + * + * @return int|null + */ + public function getActiveRulesetId() + { + return $this->container['activeRulesetId']; + } + + /** + * Sets activeRulesetId + * + * @param int|null $activeRulesetId [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. + * + * @return $this + */ + public function setActiveRulesetId($activeRulesetId) + { + $this->container['activeRulesetId'] = $activeRulesetId; + + return $this; + } + + /** + * Gets tags + * + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[] $tags A list of tags for the campaign. + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets features + * + * @return string[] + */ + public function getFeatures() + { + return $this->container['features']; + } + + /** + * Sets features + * + * @param string[] $features The features enabled in this campaign. + * + * @return $this + */ + public function setFeatures($features) + { + $allowedValues = $this->getFeaturesAllowableValues(); + if (array_diff($features, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'features', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['features'] = $features; + + return $this; + } + + /** + * Gets couponSettings + * + * @return \TalonOne\Client\Model\CodeGeneratorSettings|null + */ + public function getCouponSettings() + { + return $this->container['couponSettings']; + } + + /** + * Sets couponSettings + * + * @param \TalonOne\Client\Model\CodeGeneratorSettings|null $couponSettings couponSettings + * + * @return $this + */ + public function setCouponSettings($couponSettings) + { + $this->container['couponSettings'] = $couponSettings; + + return $this; + } + + /** + * Gets referralSettings + * + * @return \TalonOne\Client\Model\CodeGeneratorSettings|null + */ + public function getReferralSettings() + { + return $this->container['referralSettings']; + } + + /** + * Sets referralSettings + * + * @param \TalonOne\Client\Model\CodeGeneratorSettings|null $referralSettings referralSettings + * + * @return $this + */ + public function setReferralSettings($referralSettings) + { + $this->container['referralSettings'] = $referralSettings; + + return $this; + } + + /** + * Gets limits + * + * @return \TalonOne\Client\Model\LimitConfig[] + */ + public function getLimits() + { + return $this->container['limits']; + } + + /** + * Sets limits + * + * @param \TalonOne\Client\Model\LimitConfig[] $limits The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. + * + * @return $this + */ + public function setLimits($limits) + { + $this->container['limits'] = $limits; + + return $this; + } + + /** + * Gets campaignGroups + * + * @return int[]|null + */ + public function getCampaignGroups() + { + return $this->container['campaignGroups']; + } + + /** + * Sets campaignGroups + * + * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. + * + * @return $this + */ + public function setCampaignGroups($campaignGroups) + { + $this->container['campaignGroups'] = $campaignGroups; + + return $this; + } + + /** + * Gets evaluationGroupId + * + * @return int|null + */ + public function getEvaluationGroupId() + { + return $this->container['evaluationGroupId']; + } + + /** + * Sets evaluationGroupId + * + * @param int|null $evaluationGroupId The ID of the campaign evaluation group the campaign belongs to. + * + * @return $this + */ + public function setEvaluationGroupId($evaluationGroupId) + { + $this->container['evaluationGroupId'] = $evaluationGroupId; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets linkedStoreIds + * + * @return int[]|null + */ + public function getLinkedStoreIds() + { + return $this->container['linkedStoreIds']; + } + + /** + * Sets linkedStoreIds + * + * @param int[]|null $linkedStoreIds A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. + * + * @return $this + */ + public function setLinkedStoreIds($linkedStoreIds) + { + $this->container['linkedStoreIds'] = $linkedStoreIds; + + return $this; + } + + /** + * Gets budgets + * + * @return \TalonOne\Client\Model\CampaignBudget[] + */ + public function getBudgets() + { + return $this->container['budgets']; + } + + /** + * Sets budgets + * + * @param \TalonOne\Client\Model\CampaignBudget[] $budgets A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. + * + * @return $this + */ + public function setBudgets($budgets) + { + $this->container['budgets'] = $budgets; + + return $this; + } + + /** + * Gets couponRedemptionCount + * + * @return int|null + */ + public function getCouponRedemptionCount() + { + return $this->container['couponRedemptionCount']; + } + + /** + * Sets couponRedemptionCount + * + * @param int|null $couponRedemptionCount This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign. + * + * @return $this + */ + public function setCouponRedemptionCount($couponRedemptionCount) + { + $this->container['couponRedemptionCount'] = $couponRedemptionCount; + + return $this; + } + + /** + * Gets referralRedemptionCount + * + * @return int|null + */ + public function getReferralRedemptionCount() + { + return $this->container['referralRedemptionCount']; + } + + /** + * Sets referralRedemptionCount + * + * @param int|null $referralRedemptionCount This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign. + * + * @return $this + */ + public function setReferralRedemptionCount($referralRedemptionCount) + { + $this->container['referralRedemptionCount'] = $referralRedemptionCount; + + return $this; + } + + /** + * Gets discountCount + * + * @return float|null + */ + public function getDiscountCount() + { + return $this->container['discountCount']; + } + + /** + * Sets discountCount + * + * @param float|null $discountCount This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign. + * + * @return $this + */ + public function setDiscountCount($discountCount) + { + $this->container['discountCount'] = $discountCount; + + return $this; + } + + /** + * Gets discountEffectCount + * + * @return int|null + */ + public function getDiscountEffectCount() + { + return $this->container['discountEffectCount']; + } + + /** + * Sets discountEffectCount + * + * @param int|null $discountEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of times discounts were redeemed in this campaign. + * + * @return $this + */ + public function setDiscountEffectCount($discountEffectCount) + { + $this->container['discountEffectCount'] = $discountEffectCount; + + return $this; + } + + /** + * Gets couponCreationCount + * + * @return int|null + */ + public function getCouponCreationCount() + { + return $this->container['couponCreationCount']; + } + + /** + * Sets couponCreationCount + * + * @param int|null $couponCreationCount This property is **deprecated**. The count should be available under *budgets* property. Total number of coupons created by rules in this campaign. + * + * @return $this + */ + public function setCouponCreationCount($couponCreationCount) + { + $this->container['couponCreationCount'] = $couponCreationCount; + + return $this; + } + + /** + * Gets customEffectCount + * + * @return int|null + */ + public function getCustomEffectCount() + { + return $this->container['customEffectCount']; + } + + /** + * Sets customEffectCount + * + * @param int|null $customEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of custom effects triggered by rules in this campaign. + * + * @return $this + */ + public function setCustomEffectCount($customEffectCount) + { + $this->container['customEffectCount'] = $customEffectCount; + + return $this; + } + + /** + * Gets referralCreationCount + * + * @return int|null + */ + public function getReferralCreationCount() + { + return $this->container['referralCreationCount']; + } + + /** + * Sets referralCreationCount + * + * @param int|null $referralCreationCount This property is **deprecated**. The count should be available under *budgets* property. Total number of referrals created by rules in this campaign. + * + * @return $this + */ + public function setReferralCreationCount($referralCreationCount) + { + $this->container['referralCreationCount'] = $referralCreationCount; + + return $this; + } + + /** + * Gets addFreeItemEffectCount + * + * @return int|null + */ + public function getAddFreeItemEffectCount() + { + return $this->container['addFreeItemEffectCount']; + } + + /** + * Sets addFreeItemEffectCount + * + * @param int|null $addFreeItemEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign. + * + * @return $this + */ + public function setAddFreeItemEffectCount($addFreeItemEffectCount) + { + $this->container['addFreeItemEffectCount'] = $addFreeItemEffectCount; + + return $this; + } + + /** + * Gets awardedGiveawaysCount + * + * @return int|null + */ + public function getAwardedGiveawaysCount() + { + return $this->container['awardedGiveawaysCount']; + } + + /** + * Sets awardedGiveawaysCount + * + * @param int|null $awardedGiveawaysCount This property is **deprecated**. The count should be available under *budgets* property. Total number of giveaways awarded by rules in this campaign. + * + * @return $this + */ + public function setAwardedGiveawaysCount($awardedGiveawaysCount) + { + $this->container['awardedGiveawaysCount'] = $awardedGiveawaysCount; + + return $this; + } + + /** + * Gets createdLoyaltyPointsCount + * + * @return float|null + */ + public function getCreatedLoyaltyPointsCount() + { + return $this->container['createdLoyaltyPointsCount']; + } + + /** + * Sets createdLoyaltyPointsCount + * + * @param float|null $createdLoyaltyPointsCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points created by rules in this campaign. + * + * @return $this + */ + public function setCreatedLoyaltyPointsCount($createdLoyaltyPointsCount) + { + $this->container['createdLoyaltyPointsCount'] = $createdLoyaltyPointsCount; + + return $this; + } + + /** + * Gets createdLoyaltyPointsEffectCount + * + * @return int|null + */ + public function getCreatedLoyaltyPointsEffectCount() + { + return $this->container['createdLoyaltyPointsEffectCount']; + } + + /** + * Sets createdLoyaltyPointsEffectCount + * + * @param int|null $createdLoyaltyPointsEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point creation effects triggered by rules in this campaign. + * + * @return $this + */ + public function setCreatedLoyaltyPointsEffectCount($createdLoyaltyPointsEffectCount) + { + $this->container['createdLoyaltyPointsEffectCount'] = $createdLoyaltyPointsEffectCount; + + return $this; + } + + /** + * Gets redeemedLoyaltyPointsCount + * + * @return float|null + */ + public function getRedeemedLoyaltyPointsCount() + { + return $this->container['redeemedLoyaltyPointsCount']; + } + + /** + * Sets redeemedLoyaltyPointsCount + * + * @param float|null $redeemedLoyaltyPointsCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points redeemed by rules in this campaign. + * + * @return $this + */ + public function setRedeemedLoyaltyPointsCount($redeemedLoyaltyPointsCount) + { + $this->container['redeemedLoyaltyPointsCount'] = $redeemedLoyaltyPointsCount; + + return $this; + } + + /** + * Gets redeemedLoyaltyPointsEffectCount + * + * @return int|null + */ + public function getRedeemedLoyaltyPointsEffectCount() + { + return $this->container['redeemedLoyaltyPointsEffectCount']; + } + + /** + * Sets redeemedLoyaltyPointsEffectCount + * + * @param int|null $redeemedLoyaltyPointsEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point redemption effects triggered by rules in this campaign. + * + * @return $this + */ + public function setRedeemedLoyaltyPointsEffectCount($redeemedLoyaltyPointsEffectCount) + { + $this->container['redeemedLoyaltyPointsEffectCount'] = $redeemedLoyaltyPointsEffectCount; + + return $this; + } + + /** + * Gets callApiEffectCount + * + * @return int|null + */ + public function getCallApiEffectCount() + { + return $this->container['callApiEffectCount']; + } + + /** + * Sets callApiEffectCount + * + * @param int|null $callApiEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of webhooks triggered by rules in this campaign. + * + * @return $this + */ + public function setCallApiEffectCount($callApiEffectCount) + { + $this->container['callApiEffectCount'] = $callApiEffectCount; + + return $this; + } + + /** + * Gets reservecouponEffectCount + * + * @return int|null + */ + public function getReservecouponEffectCount() + { + return $this->container['reservecouponEffectCount']; + } + + /** + * Sets reservecouponEffectCount + * + * @param int|null $reservecouponEffectCount This property is **deprecated**. The count should be available under *budgets* property. Total number of reserve coupon effects triggered by rules in this campaign. + * + * @return $this + */ + public function setReservecouponEffectCount($reservecouponEffectCount) + { + $this->container['reservecouponEffectCount'] = $reservecouponEffectCount; + + return $this; + } + + /** + * Gets lastActivity + * + * @return \DateTime|null + */ + public function getLastActivity() + { + return $this->container['lastActivity']; + } + + /** + * Sets lastActivity + * + * @param \DateTime|null $lastActivity Timestamp of the most recent event received by this campaign. + * + * @return $this + */ + public function setLastActivity($lastActivity) + { + $this->container['lastActivity'] = $lastActivity; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime|null + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime|null $updated Timestamp of the most recent update to the campaign's property. Updates to external entities used in this campaign are **not** registered by this property, such as collection or coupon updates. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets createdBy + * + * @return string|null + */ + public function getCreatedBy() + { + return $this->container['createdBy']; + } + + /** + * Sets createdBy + * + * @param string|null $createdBy Name of the user who created this campaign if available. + * + * @return $this + */ + public function setCreatedBy($createdBy) + { + $this->container['createdBy'] = $createdBy; + + return $this; + } + + /** + * Gets updatedBy + * + * @return string|null + */ + public function getUpdatedBy() + { + return $this->container['updatedBy']; + } + + /** + * Sets updatedBy + * + * @param string|null $updatedBy Name of the user who last updated this campaign if available. + * + * @return $this + */ + public function setUpdatedBy($updatedBy) + { + $this->container['updatedBy'] = $updatedBy; + + return $this; + } + + /** + * Gets templateId + * + * @return int|null + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int|null $templateId The ID of the Campaign Template this Campaign was created from. + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + + /** + * Gets frontendState + * + * @return string + */ + public function getFrontendState() + { + return $this->container['frontendState']; + } + + /** + * Sets frontendState + * + * @param string $frontendState A campaign state described exactly as in the Campaign Manager. + * + * @return $this + */ + public function setFrontendState($frontendState) + { + $allowedValues = $this->getFrontendStateAllowableValues(); + if (!in_array($frontendState, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'frontendState', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['frontendState'] = $frontendState; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignTemplate.php b/lib/Model/CampaignTemplate.php index f1abbf6f..cc9835f4 100644 --- a/lib/Model/CampaignTemplate.php +++ b/lib/Model/CampaignTemplate.php @@ -78,6 +78,7 @@ class CampaignTemplate implements ModelInterface, ArrayAccess 'applicationsIds' => 'int[]', 'campaignCollections' => '\TalonOne\Client\Model\CampaignTemplateCollection[]', 'defaultCampaignGroupId' => 'int', + 'campaignType' => 'string', 'updated' => '\DateTime', 'updatedBy' => 'string', 'validApplicationIds' => 'int[]' @@ -109,6 +110,7 @@ class CampaignTemplate implements ModelInterface, ArrayAccess 'applicationsIds' => null, 'campaignCollections' => null, 'defaultCampaignGroupId' => null, + 'campaignType' => null, 'updated' => 'date-time', 'updatedBy' => null, 'validApplicationIds' => null @@ -161,6 +163,7 @@ public static function openAPIFormats() 'applicationsIds' => 'applicationsIds', 'campaignCollections' => 'campaignCollections', 'defaultCampaignGroupId' => 'defaultCampaignGroupId', + 'campaignType' => 'campaignType', 'updated' => 'updated', 'updatedBy' => 'updatedBy', 'validApplicationIds' => 'validApplicationIds' @@ -192,6 +195,7 @@ public static function openAPIFormats() 'applicationsIds' => 'setApplicationsIds', 'campaignCollections' => 'setCampaignCollections', 'defaultCampaignGroupId' => 'setDefaultCampaignGroupId', + 'campaignType' => 'setCampaignType', 'updated' => 'setUpdated', 'updatedBy' => 'setUpdatedBy', 'validApplicationIds' => 'setValidApplicationIds' @@ -223,6 +227,7 @@ public static function openAPIFormats() 'applicationsIds' => 'getApplicationsIds', 'campaignCollections' => 'getCampaignCollections', 'defaultCampaignGroupId' => 'getDefaultCampaignGroupId', + 'campaignType' => 'getCampaignType', 'updated' => 'getUpdated', 'updatedBy' => 'getUpdatedBy', 'validApplicationIds' => 'getValidApplicationIds' @@ -277,6 +282,8 @@ public function getModelName() const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; const FEATURES_STRIKETHROUGH = 'strikethrough'; + const CAMPAIGN_TYPE_CART_ITEM = 'cartItem'; + const CAMPAIGN_TYPE_ADVANCED = 'advanced'; @@ -310,6 +317,19 @@ public function getFeaturesAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCampaignTypeAllowableValues() + { + return [ + self::CAMPAIGN_TYPE_CART_ITEM, + self::CAMPAIGN_TYPE_ADVANCED, + ]; + } + /** * Associative array for storing property values @@ -346,6 +366,7 @@ public function __construct(array $data = null) $this->container['applicationsIds'] = isset($data['applicationsIds']) ? $data['applicationsIds'] : null; $this->container['campaignCollections'] = isset($data['campaignCollections']) ? $data['campaignCollections'] : null; $this->container['defaultCampaignGroupId'] = isset($data['defaultCampaignGroupId']) ? $data['defaultCampaignGroupId'] : null; + $this->container['campaignType'] = isset($data['campaignType']) ? $data['campaignType'] : 'advanced'; $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; $this->container['updatedBy'] = isset($data['updatedBy']) ? $data['updatedBy'] : null; $this->container['validApplicationIds'] = isset($data['validApplicationIds']) ? $data['validApplicationIds'] : null; @@ -399,6 +420,17 @@ public function listInvalidProperties() if ($this->container['applicationsIds'] === null) { $invalidProperties[] = "'applicationsIds' can't be null"; } + if ($this->container['campaignType'] === null) { + $invalidProperties[] = "'campaignType' can't be null"; + } + $allowedValues = $this->getCampaignTypeAllowableValues(); + if (!is_null($this->container['campaignType']) && !in_array($this->container['campaignType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'campaignType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + if ($this->container['validApplicationIds'] === null) { $invalidProperties[] = "'validApplicationIds' can't be null"; } @@ -920,6 +952,39 @@ public function setDefaultCampaignGroupId($defaultCampaignGroupId) return $this; } + /** + * Gets campaignType + * + * @return string + */ + public function getCampaignType() + { + return $this->container['campaignType']; + } + + /** + * Sets campaignType + * + * @param string $campaignType The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. + * + * @return $this + */ + public function setCampaignType($campaignType) + { + $allowedValues = $this->getCampaignTypeAllowableValues(); + if (!in_array($campaignType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'campaignType', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['campaignType'] = $campaignType; + + return $this; + } + /** * Gets updated * diff --git a/lib/Model/CardLedgerPointsEntryIntegrationAPI.php b/lib/Model/CardLedgerPointsEntryIntegrationAPI.php new file mode 100644 index 00000000..364c957f --- /dev/null +++ b/lib/Model/CardLedgerPointsEntryIntegrationAPI.php @@ -0,0 +1,635 @@ + 'int', + 'created' => '\DateTime', + 'programId' => 'int', + 'customerProfileID' => 'string', + 'customerSessionId' => 'string', + 'name' => 'string', + 'startDate' => 'string', + 'expiryDate' => 'string', + 'subledgerId' => 'string', + 'amount' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'created' => 'date-time', + 'programId' => null, + 'customerProfileID' => null, + 'customerSessionId' => null, + 'name' => null, + 'startDate' => null, + 'expiryDate' => null, + 'subledgerId' => null, + 'amount' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'created' => 'created', + 'programId' => 'programId', + 'customerProfileID' => 'customerProfileID', + 'customerSessionId' => 'customerSessionId', + 'name' => 'name', + 'startDate' => 'startDate', + 'expiryDate' => 'expiryDate', + 'subledgerId' => 'subledgerId', + 'amount' => 'amount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'created' => 'setCreated', + 'programId' => 'setProgramId', + 'customerProfileID' => 'setCustomerProfileID', + 'customerSessionId' => 'setCustomerSessionId', + 'name' => 'setName', + 'startDate' => 'setStartDate', + 'expiryDate' => 'setExpiryDate', + 'subledgerId' => 'setSubledgerId', + 'amount' => 'setAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'created' => 'getCreated', + 'programId' => 'getProgramId', + 'customerProfileID' => 'getCustomerProfileID', + 'customerSessionId' => 'getCustomerSessionId', + 'name' => 'getName', + 'startDate' => 'getStartDate', + 'expiryDate' => 'getExpiryDate', + 'subledgerId' => 'getSubledgerId', + 'amount' => 'getAmount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['programId'] = isset($data['programId']) ? $data['programId'] : null; + $this->container['customerProfileID'] = isset($data['customerProfileID']) ? $data['customerProfileID'] : null; + $this->container['customerSessionId'] = isset($data['customerSessionId']) ? $data['customerSessionId'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; + $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; + $this->container['subledgerId'] = isset($data['subledgerId']) ? $data['subledgerId'] : null; + $this->container['amount'] = isset($data['amount']) ? $data['amount'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['programId'] === null) { + $invalidProperties[] = "'programId' can't be null"; + } + if (!is_null($this->container['customerSessionId']) && (mb_strlen($this->container['customerSessionId']) > 255)) { + $invalidProperties[] = "invalid value for 'customerSessionId', the character length must be smaller than or equal to 255."; + } + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 255)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 255."; + } + + if ($this->container['startDate'] === null) { + $invalidProperties[] = "'startDate' can't be null"; + } + if ((mb_strlen($this->container['startDate']) > 64)) { + $invalidProperties[] = "invalid value for 'startDate', the character length must be smaller than or equal to 64."; + } + + if ($this->container['expiryDate'] === null) { + $invalidProperties[] = "'expiryDate' can't be null"; + } + if ($this->container['subledgerId'] === null) { + $invalidProperties[] = "'subledgerId' can't be null"; + } + if ((mb_strlen($this->container['subledgerId']) > 64)) { + $invalidProperties[] = "invalid value for 'subledgerId', the character length must be smaller than or equal to 64."; + } + + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the transaction that adds loyalty points. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created Date and time the loyalty card points were added. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets programId + * + * @return int + */ + public function getProgramId() + { + return $this->container['programId']; + } + + /** + * Sets programId + * + * @param int $programId ID of the loyalty program. + * + * @return $this + */ + public function setProgramId($programId) + { + $this->container['programId'] = $programId; + + return $this; + } + + /** + * Gets customerProfileID + * + * @return string|null + */ + public function getCustomerProfileID() + { + return $this->container['customerProfileID']; + } + + /** + * Sets customerProfileID + * + * @param string|null $customerProfileID Integration ID of the customer profile linked to the card. + * + * @return $this + */ + public function setCustomerProfileID($customerProfileID) + { + $this->container['customerProfileID'] = $customerProfileID; + + return $this; + } + + /** + * Gets customerSessionId + * + * @return string|null + */ + public function getCustomerSessionId() + { + return $this->container['customerSessionId']; + } + + /** + * Sets customerSessionId + * + * @param string|null $customerSessionId ID of the customer session where points were added. + * + * @return $this + */ + public function setCustomerSessionId($customerSessionId) + { + if (!is_null($customerSessionId) && (mb_strlen($customerSessionId) > 255)) { + throw new \InvalidArgumentException('invalid length for $customerSessionId when calling CardLedgerPointsEntryIntegrationAPI., must be smaller than or equal to 255.'); + } + + $this->container['customerSessionId'] = $customerSessionId; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name or reason of the transaction that adds loyalty points. + * + * @return $this + */ + public function setName($name) + { + if ((mb_strlen($name) > 255)) { + throw new \InvalidArgumentException('invalid length for $name when calling CardLedgerPointsEntryIntegrationAPI., must be smaller than or equal to 255.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets startDate + * + * @return string + */ + public function getStartDate() + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param string $startDate When points become active. Possible values: - `immediate`: Points are active immediately. - `timestamp value`: Points become active at a given date and time. + * + * @return $this + */ + public function setStartDate($startDate) + { + if ((mb_strlen($startDate) > 64)) { + throw new \InvalidArgumentException('invalid length for $startDate when calling CardLedgerPointsEntryIntegrationAPI., must be smaller than or equal to 64.'); + } + + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets expiryDate + * + * @return string + */ + public function getExpiryDate() + { + return $this->container['expiryDate']; + } + + /** + * Sets expiryDate + * + * @param string $expiryDate Date when points expire. Possible values are: - `unlimited`: Points have no expiration date. - `timestamp value`: Points expire on the given date and time. + * + * @return $this + */ + public function setExpiryDate($expiryDate) + { + $this->container['expiryDate'] = $expiryDate; + + return $this; + } + + /** + * Gets subledgerId + * + * @return string + */ + public function getSubledgerId() + { + return $this->container['subledgerId']; + } + + /** + * Sets subledgerId + * + * @param string $subledgerId ID of the subledger. + * + * @return $this + */ + public function setSubledgerId($subledgerId) + { + if ((mb_strlen($subledgerId) > 64)) { + throw new \InvalidArgumentException('invalid length for $subledgerId when calling CardLedgerPointsEntryIntegrationAPI., must be smaller than or equal to 64.'); + } + + $this->container['subledgerId'] = $subledgerId; + + return $this; + } + + /** + * Gets amount + * + * @return float + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param float $amount Amount of loyalty points added in the transaction. + * + * @return $this + */ + public function setAmount($amount) + { + $this->container['amount'] = $amount; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CartItem.php b/lib/Model/CartItem.php index ccc09ef8..202442d0 100644 --- a/lib/Model/CartItem.php +++ b/lib/Model/CartItem.php @@ -368,7 +368,7 @@ public function getQuantity() /** * Sets quantity * - * @param int $quantity Quantity of item. **Important:** If you enabled [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening), the quantity is always one and the same cart item might receive multiple per-item discounts. Ensure you can process multiple discounts on one cart item correctly. + * @param int $quantity Number of units of this item. Due to [cart item flattening](https://docs.talon.one/docs/product/rules/understanding-cart-item-flattening), if you provide a quantity greater than 1, the item will be split in as many items as the provided quantity. This will impact the number of **per-item** effects triggered from your campaigns. * * @return $this */ @@ -661,7 +661,7 @@ public function getCatalogItemID() /** * Sets catalogItemID * - * @param int|null $catalogItemID The [catalog item ID](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs/#synchronizing-cart-item-catalogs). + * @param int|null $catalogItemID The [catalog item ID](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs/#synchronizing-a-cart-item-catalog). * * @return $this */ diff --git a/lib/Model/Coupon.php b/lib/Model/Coupon.php index 6c8c2048..7aa7d56b 100644 --- a/lib/Model/Coupon.php +++ b/lib/Model/Coupon.php @@ -78,7 +78,8 @@ class Coupon implements ModelInterface, ArrayAccess 'importId' => 'int', 'reservation' => 'bool', 'batchId' => 'string', - 'isReservationMandatory' => 'bool' + 'isReservationMandatory' => 'bool', + 'implicitlyReserved' => 'bool' ]; /** @@ -107,7 +108,8 @@ class Coupon implements ModelInterface, ArrayAccess 'importId' => null, 'reservation' => null, 'batchId' => null, - 'isReservationMandatory' => null + 'isReservationMandatory' => null, + 'implicitlyReserved' => null ]; /** @@ -157,7 +159,8 @@ public static function openAPIFormats() 'importId' => 'importId', 'reservation' => 'reservation', 'batchId' => 'batchId', - 'isReservationMandatory' => 'isReservationMandatory' + 'isReservationMandatory' => 'isReservationMandatory', + 'implicitlyReserved' => 'implicitlyReserved' ]; /** @@ -186,7 +189,8 @@ public static function openAPIFormats() 'importId' => 'setImportId', 'reservation' => 'setReservation', 'batchId' => 'setBatchId', - 'isReservationMandatory' => 'setIsReservationMandatory' + 'isReservationMandatory' => 'setIsReservationMandatory', + 'implicitlyReserved' => 'setImplicitlyReserved' ]; /** @@ -215,7 +219,8 @@ public static function openAPIFormats() 'importId' => 'getImportId', 'reservation' => 'getReservation', 'batchId' => 'getBatchId', - 'isReservationMandatory' => 'getIsReservationMandatory' + 'isReservationMandatory' => 'getIsReservationMandatory', + 'implicitlyReserved' => 'getImplicitlyReserved' ]; /** @@ -299,6 +304,7 @@ public function __construct(array $data = null) $this->container['reservation'] = isset($data['reservation']) ? $data['reservation'] : true; $this->container['batchId'] = isset($data['batchId']) ? $data['batchId'] : null; $this->container['isReservationMandatory'] = isset($data['isReservationMandatory']) ? $data['isReservationMandatory'] : true; + $this->container['implicitlyReserved'] = isset($data['implicitlyReserved']) ? $data['implicitlyReserved'] : null; } /** @@ -911,6 +917,30 @@ public function setIsReservationMandatory($isReservationMandatory) return $this; } + + /** + * Gets implicitlyReserved + * + * @return bool|null + */ + public function getImplicitlyReserved() + { + return $this->container['implicitlyReserved']; + } + + /** + * Sets implicitlyReserved + * + * @param bool|null $implicitlyReserved An indication of whether the coupon is implicitly reserved for all customers. + * + * @return $this + */ + public function setImplicitlyReserved($implicitlyReserved) + { + $this->container['implicitlyReserved'] = $implicitlyReserved; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CreateTemplateCampaign.php b/lib/Model/CreateTemplateCampaign.php index 5726cc6b..97ae9487 100644 --- a/lib/Model/CreateTemplateCampaign.php +++ b/lib/Model/CreateTemplateCampaign.php @@ -64,7 +64,9 @@ class CreateTemplateCampaign implements ModelInterface, ArrayAccess 'templateParamValues' => '\TalonOne\Client\Model\Binding[]', 'limitOverrides' => '\TalonOne\Client\Model\LimitConfig[]', 'campaignGroups' => 'int[]', - 'tags' => 'string[]' + 'tags' => 'string[]', + 'evaluationGroupId' => 'int', + 'linkedStoreIds' => 'int[]' ]; /** @@ -80,7 +82,9 @@ class CreateTemplateCampaign implements ModelInterface, ArrayAccess 'templateParamValues' => null, 'limitOverrides' => null, 'campaignGroups' => null, - 'tags' => null + 'tags' => null, + 'evaluationGroupId' => null, + 'linkedStoreIds' => null ]; /** @@ -117,7 +121,9 @@ public static function openAPIFormats() 'templateParamValues' => 'templateParamValues', 'limitOverrides' => 'limitOverrides', 'campaignGroups' => 'campaignGroups', - 'tags' => 'tags' + 'tags' => 'tags', + 'evaluationGroupId' => 'evaluationGroupId', + 'linkedStoreIds' => 'linkedStoreIds' ]; /** @@ -133,7 +139,9 @@ public static function openAPIFormats() 'templateParamValues' => 'setTemplateParamValues', 'limitOverrides' => 'setLimitOverrides', 'campaignGroups' => 'setCampaignGroups', - 'tags' => 'setTags' + 'tags' => 'setTags', + 'evaluationGroupId' => 'setEvaluationGroupId', + 'linkedStoreIds' => 'setLinkedStoreIds' ]; /** @@ -149,7 +157,9 @@ public static function openAPIFormats() 'templateParamValues' => 'getTemplateParamValues', 'limitOverrides' => 'getLimitOverrides', 'campaignGroups' => 'getCampaignGroups', - 'tags' => 'getTags' + 'tags' => 'getTags', + 'evaluationGroupId' => 'getEvaluationGroupId', + 'linkedStoreIds' => 'getLinkedStoreIds' ]; /** @@ -220,6 +230,8 @@ public function __construct(array $data = null) $this->container['limitOverrides'] = isset($data['limitOverrides']) ? $data['limitOverrides'] : null; $this->container['campaignGroups'] = isset($data['campaignGroups']) ? $data['campaignGroups'] : null; $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['evaluationGroupId'] = isset($data['evaluationGroupId']) ? $data['evaluationGroupId'] : null; + $this->container['linkedStoreIds'] = isset($data['linkedStoreIds']) ? $data['linkedStoreIds'] : null; } /** @@ -418,7 +430,7 @@ public function getCampaignGroups() /** * Sets campaignGroups * - * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. + * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups) this campaign belongs to. * * @return $this */ @@ -452,6 +464,54 @@ public function setTags($tags) return $this; } + + /** + * Gets evaluationGroupId + * + * @return int|null + */ + public function getEvaluationGroupId() + { + return $this->container['evaluationGroupId']; + } + + /** + * Sets evaluationGroupId + * + * @param int|null $evaluationGroupId The ID of the campaign evaluation group the campaign belongs to. + * + * @return $this + */ + public function setEvaluationGroupId($evaluationGroupId) + { + $this->container['evaluationGroupId'] = $evaluationGroupId; + + return $this; + } + + /** + * Gets linkedStoreIds + * + * @return int[]|null + */ + public function getLinkedStoreIds() + { + return $this->container['linkedStoreIds']; + } + + /** + * Sets linkedStoreIds + * + * @param int[]|null $linkedStoreIds A list of store IDs that are linked to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. + * + * @return $this + */ + public function setLinkedStoreIds($linkedStoreIds) + { + $this->container['linkedStoreIds'] = $linkedStoreIds; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CustomEffectProps.php b/lib/Model/CustomEffectProps.php index d25009e9..4e268b6e 100644 --- a/lib/Model/CustomEffectProps.php +++ b/lib/Model/CustomEffectProps.php @@ -335,7 +335,7 @@ public function getCartItemSubPosition() /** * Sets cartItemSubPosition * - * @param float|null $cartItemSubPosition When cart item flattening is enabled, the sub position indicates to which item unit the custom effect is applied, for cart items with quantity > 1. + * @param float|null $cartItemSubPosition For cart items with quantity > 1, the sub position indicates to which item unit the custom effect is applied. * * @return $this */ diff --git a/lib/Model/CustomerProfile.php b/lib/Model/CustomerProfile.php index 29b23a78..64f9b0f6 100644 --- a/lib/Model/CustomerProfile.php +++ b/lib/Model/CustomerProfile.php @@ -526,7 +526,7 @@ public function getLastActivity() /** * Sets lastActivity * - * @param \DateTime $lastActivity Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. + * @param \DateTime $lastActivity Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the Rule Engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. * * @return $this */ diff --git a/lib/Model/CustomerProfileIntegrationResponseV2.php b/lib/Model/CustomerProfileIntegrationResponseV2.php new file mode 100644 index 00000000..3b06f8e5 --- /dev/null +++ b/lib/Model/CustomerProfileIntegrationResponseV2.php @@ -0,0 +1,558 @@ + '\TalonOne\Client\Model\CustomerProfile', + 'event' => '\TalonOne\Client\Model\Event', + 'loyalty' => '\TalonOne\Client\Model\Loyalty', + 'triggeredCampaigns' => '\TalonOne\Client\Model\Campaign[]', + 'ruleFailureReasons' => '\TalonOne\Client\Model\RuleFailureReason[]', + 'awardedGiveaways' => '\TalonOne\Client\Model\Giveaway[]', + 'effects' => '\TalonOne\Client\Model\Effect[]', + 'createdCoupons' => '\TalonOne\Client\Model\Coupon[]', + 'createdReferrals' => '\TalonOne\Client\Model\Referral[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'customerProfile' => null, + 'event' => null, + 'loyalty' => null, + 'triggeredCampaigns' => null, + 'ruleFailureReasons' => null, + 'awardedGiveaways' => null, + 'effects' => null, + 'createdCoupons' => null, + 'createdReferrals' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customerProfile' => 'customerProfile', + 'event' => 'event', + 'loyalty' => 'loyalty', + 'triggeredCampaigns' => 'triggeredCampaigns', + 'ruleFailureReasons' => 'ruleFailureReasons', + 'awardedGiveaways' => 'awardedGiveaways', + 'effects' => 'effects', + 'createdCoupons' => 'createdCoupons', + 'createdReferrals' => 'createdReferrals' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customerProfile' => 'setCustomerProfile', + 'event' => 'setEvent', + 'loyalty' => 'setLoyalty', + 'triggeredCampaigns' => 'setTriggeredCampaigns', + 'ruleFailureReasons' => 'setRuleFailureReasons', + 'awardedGiveaways' => 'setAwardedGiveaways', + 'effects' => 'setEffects', + 'createdCoupons' => 'setCreatedCoupons', + 'createdReferrals' => 'setCreatedReferrals' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customerProfile' => 'getCustomerProfile', + 'event' => 'getEvent', + 'loyalty' => 'getLoyalty', + 'triggeredCampaigns' => 'getTriggeredCampaigns', + 'ruleFailureReasons' => 'getRuleFailureReasons', + 'awardedGiveaways' => 'getAwardedGiveaways', + 'effects' => 'getEffects', + 'createdCoupons' => 'getCreatedCoupons', + 'createdReferrals' => 'getCreatedReferrals' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customerProfile'] = isset($data['customerProfile']) ? $data['customerProfile'] : null; + $this->container['event'] = isset($data['event']) ? $data['event'] : null; + $this->container['loyalty'] = isset($data['loyalty']) ? $data['loyalty'] : null; + $this->container['triggeredCampaigns'] = isset($data['triggeredCampaigns']) ? $data['triggeredCampaigns'] : null; + $this->container['ruleFailureReasons'] = isset($data['ruleFailureReasons']) ? $data['ruleFailureReasons'] : null; + $this->container['awardedGiveaways'] = isset($data['awardedGiveaways']) ? $data['awardedGiveaways'] : null; + $this->container['effects'] = isset($data['effects']) ? $data['effects'] : null; + $this->container['createdCoupons'] = isset($data['createdCoupons']) ? $data['createdCoupons'] : null; + $this->container['createdReferrals'] = isset($data['createdReferrals']) ? $data['createdReferrals'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['effects'] === null) { + $invalidProperties[] = "'effects' can't be null"; + } + if ($this->container['createdCoupons'] === null) { + $invalidProperties[] = "'createdCoupons' can't be null"; + } + if ($this->container['createdReferrals'] === null) { + $invalidProperties[] = "'createdReferrals' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customerProfile + * + * @return \TalonOne\Client\Model\CustomerProfile|null + */ + public function getCustomerProfile() + { + return $this->container['customerProfile']; + } + + /** + * Sets customerProfile + * + * @param \TalonOne\Client\Model\CustomerProfile|null $customerProfile customerProfile + * + * @return $this + */ + public function setCustomerProfile($customerProfile) + { + $this->container['customerProfile'] = $customerProfile; + + return $this; + } + + /** + * Gets event + * + * @return \TalonOne\Client\Model\Event|null + */ + public function getEvent() + { + return $this->container['event']; + } + + /** + * Sets event + * + * @param \TalonOne\Client\Model\Event|null $event event + * + * @return $this + */ + public function setEvent($event) + { + $this->container['event'] = $event; + + return $this; + } + + /** + * Gets loyalty + * + * @return \TalonOne\Client\Model\Loyalty|null + */ + public function getLoyalty() + { + return $this->container['loyalty']; + } + + /** + * Sets loyalty + * + * @param \TalonOne\Client\Model\Loyalty|null $loyalty loyalty + * + * @return $this + */ + public function setLoyalty($loyalty) + { + $this->container['loyalty'] = $loyalty; + + return $this; + } + + /** + * Gets triggeredCampaigns + * + * @return \TalonOne\Client\Model\Campaign[]|null + */ + public function getTriggeredCampaigns() + { + return $this->container['triggeredCampaigns']; + } + + /** + * Sets triggeredCampaigns + * + * @param \TalonOne\Client\Model\Campaign[]|null $triggeredCampaigns triggeredCampaigns + * + * @return $this + */ + public function setTriggeredCampaigns($triggeredCampaigns) + { + $this->container['triggeredCampaigns'] = $triggeredCampaigns; + + return $this; + } + + /** + * Gets ruleFailureReasons + * + * @return \TalonOne\Client\Model\RuleFailureReason[]|null + */ + public function getRuleFailureReasons() + { + return $this->container['ruleFailureReasons']; + } + + /** + * Sets ruleFailureReasons + * + * @param \TalonOne\Client\Model\RuleFailureReason[]|null $ruleFailureReasons ruleFailureReasons + * + * @return $this + */ + public function setRuleFailureReasons($ruleFailureReasons) + { + $this->container['ruleFailureReasons'] = $ruleFailureReasons; + + return $this; + } + + /** + * Gets awardedGiveaways + * + * @return \TalonOne\Client\Model\Giveaway[]|null + */ + public function getAwardedGiveaways() + { + return $this->container['awardedGiveaways']; + } + + /** + * Sets awardedGiveaways + * + * @param \TalonOne\Client\Model\Giveaway[]|null $awardedGiveaways awardedGiveaways + * + * @return $this + */ + public function setAwardedGiveaways($awardedGiveaways) + { + $this->container['awardedGiveaways'] = $awardedGiveaways; + + return $this; + } + + /** + * Gets effects + * + * @return \TalonOne\Client\Model\Effect[] + */ + public function getEffects() + { + return $this->container['effects']; + } + + /** + * Sets effects + * + * @param \TalonOne\Client\Model\Effect[] $effects The effects generated by the rules in your running campaigns. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). + * + * @return $this + */ + public function setEffects($effects) + { + $this->container['effects'] = $effects; + + return $this; + } + + /** + * Gets createdCoupons + * + * @return \TalonOne\Client\Model\Coupon[] + */ + public function getCreatedCoupons() + { + return $this->container['createdCoupons']; + } + + /** + * Sets createdCoupons + * + * @param \TalonOne\Client\Model\Coupon[] $createdCoupons createdCoupons + * + * @return $this + */ + public function setCreatedCoupons($createdCoupons) + { + $this->container['createdCoupons'] = $createdCoupons; + + return $this; + } + + /** + * Gets createdReferrals + * + * @return \TalonOne\Client\Model\Referral[] + */ + public function getCreatedReferrals() + { + return $this->container['createdReferrals']; + } + + /** + * Sets createdReferrals + * + * @param \TalonOne\Client\Model\Referral[] $createdReferrals createdReferrals + * + * @return $this + */ + public function setCreatedReferrals($createdReferrals) + { + $this->container['createdReferrals'] = $createdReferrals; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CustomerSession.php b/lib/Model/CustomerSession.php index f2afe4ed..8e717eb9 100644 --- a/lib/Model/CustomerSession.php +++ b/lib/Model/CustomerSession.php @@ -530,7 +530,7 @@ public function getState() /** * Sets state * - * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). + * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). * * @return $this */ diff --git a/lib/Model/CustomerSessionV2.php b/lib/Model/CustomerSessionV2.php index 3d91969f..a13aec78 100644 --- a/lib/Model/CustomerSessionV2.php +++ b/lib/Model/CustomerSessionV2.php @@ -63,6 +63,7 @@ class CustomerSessionV2 implements ModelInterface, ArrayAccess 'integrationId' => 'string', 'applicationId' => 'int', 'profileId' => 'string', + 'storeIntegrationId' => 'string', 'evaluableCampaignIds' => 'int[]', 'couponCodes' => 'string[]', 'referralCode' => 'string', @@ -90,6 +91,7 @@ class CustomerSessionV2 implements ModelInterface, ArrayAccess 'integrationId' => 'string', 'applicationId' => null, 'profileId' => null, + 'storeIntegrationId' => null, 'evaluableCampaignIds' => null, 'couponCodes' => null, 'referralCode' => null, @@ -138,6 +140,7 @@ public static function openAPIFormats() 'integrationId' => 'integrationId', 'applicationId' => 'applicationId', 'profileId' => 'profileId', + 'storeIntegrationId' => 'storeIntegrationId', 'evaluableCampaignIds' => 'evaluableCampaignIds', 'couponCodes' => 'couponCodes', 'referralCode' => 'referralCode', @@ -165,6 +168,7 @@ public static function openAPIFormats() 'integrationId' => 'setIntegrationId', 'applicationId' => 'setApplicationId', 'profileId' => 'setProfileId', + 'storeIntegrationId' => 'setStoreIntegrationId', 'evaluableCampaignIds' => 'setEvaluableCampaignIds', 'couponCodes' => 'setCouponCodes', 'referralCode' => 'setReferralCode', @@ -192,6 +196,7 @@ public static function openAPIFormats() 'integrationId' => 'getIntegrationId', 'applicationId' => 'getApplicationId', 'profileId' => 'getProfileId', + 'storeIntegrationId' => 'getStoreIntegrationId', 'evaluableCampaignIds' => 'getEvaluableCampaignIds', 'couponCodes' => 'getCouponCodes', 'referralCode' => 'getReferralCode', @@ -292,6 +297,7 @@ public function __construct(array $data = null) $this->container['integrationId'] = isset($data['integrationId']) ? $data['integrationId'] : null; $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['storeIntegrationId'] = isset($data['storeIntegrationId']) ? $data['storeIntegrationId'] : null; $this->container['evaluableCampaignIds'] = isset($data['evaluableCampaignIds']) ? $data['evaluableCampaignIds'] : null; $this->container['couponCodes'] = isset($data['couponCodes']) ? $data['couponCodes'] : null; $this->container['referralCode'] = isset($data['referralCode']) ? $data['referralCode'] : null; @@ -336,6 +342,14 @@ public function listInvalidProperties() if ($this->container['profileId'] === null) { $invalidProperties[] = "'profileId' can't be null"; } + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be bigger than or equal to 1."; + } + if (!is_null($this->container['referralCode']) && (mb_strlen($this->container['referralCode']) > 100)) { $invalidProperties[] = "invalid value for 'referralCode', the character length must be smaller than or equal to 100."; } @@ -511,6 +525,37 @@ public function setProfileId($profileId) return $this; } + /** + * Gets storeIntegrationId + * + * @return string|null + */ + public function getStoreIntegrationId() + { + return $this->container['storeIntegrationId']; + } + + /** + * Sets storeIntegrationId + * + * @param string|null $storeIntegrationId The integration ID of the store. You choose this ID when you create a store. + * + * @return $this + */ + public function setStoreIntegrationId($storeIntegrationId) + { + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling CustomerSessionV2., must be smaller than or equal to 1000.'); + } + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling CustomerSessionV2., must be bigger than or equal to 1.'); + } + + $this->container['storeIntegrationId'] = $storeIntegrationId; + + return $this; + } + /** * Gets evaluableCampaignIds * @@ -624,7 +669,7 @@ public function getState() /** * Sets state * - * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). + * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). * * @return $this */ @@ -657,7 +702,7 @@ public function getCartItems() /** * Sets cartItems * - * @param \TalonOne\Client\Model\CartItem[] $cartItems The items to add to this sessions. - If cart item flattening is disabled: **Do not exceed 1000 items** (regardless of their `quantity`) per request. - If cart item flattening is enabled: **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. + * @param \TalonOne\Client\Model\CartItem[] $cartItems The items to add to this session. **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. * * @return $this */ @@ -777,7 +822,7 @@ public function getTotal() /** * Sets total * - * @param float $total The total sum of cart-items, as well as additional costs, before any discounts applied. + * @param float $total The total value of cart items and additional costs in the session, before any discounts are applied. * * @return $this */ @@ -801,7 +846,7 @@ public function getCartItemTotal() /** * Sets cartItemTotal * - * @param float $cartItemTotal The total sum of cart-items before any discounts applied. + * @param float $cartItemTotal The total value of cart items, before any discounts are applied. * * @return $this */ @@ -825,7 +870,7 @@ public function getAdditionalCostTotal() /** * Sets additionalCostTotal * - * @param float $additionalCostTotal The total sum of additional costs before any discounts applied. + * @param float $additionalCostTotal The total value of additional costs, before any discounts are applied. * * @return $this */ diff --git a/lib/Model/Effect.php b/lib/Model/Effect.php index c4849065..e4bb33b6 100644 --- a/lib/Model/Effect.php +++ b/lib/Model/Effect.php @@ -65,6 +65,7 @@ class Effect implements ModelInterface, ArrayAccess 'effectType' => 'string', 'triggeredByCoupon' => 'int', 'triggeredForCatalogItem' => 'int', + 'conditionIndex' => 'int', 'props' => 'object' ]; @@ -81,6 +82,7 @@ class Effect implements ModelInterface, ArrayAccess 'effectType' => null, 'triggeredByCoupon' => null, 'triggeredForCatalogItem' => null, + 'conditionIndex' => null, 'props' => null ]; @@ -118,6 +120,7 @@ public static function openAPIFormats() 'effectType' => 'effectType', 'triggeredByCoupon' => 'triggeredByCoupon', 'triggeredForCatalogItem' => 'triggeredForCatalogItem', + 'conditionIndex' => 'conditionIndex', 'props' => 'props' ]; @@ -134,6 +137,7 @@ public static function openAPIFormats() 'effectType' => 'setEffectType', 'triggeredByCoupon' => 'setTriggeredByCoupon', 'triggeredForCatalogItem' => 'setTriggeredForCatalogItem', + 'conditionIndex' => 'setConditionIndex', 'props' => 'setProps' ]; @@ -150,6 +154,7 @@ public static function openAPIFormats() 'effectType' => 'getEffectType', 'triggeredByCoupon' => 'getTriggeredByCoupon', 'triggeredForCatalogItem' => 'getTriggeredForCatalogItem', + 'conditionIndex' => 'getConditionIndex', 'props' => 'getProps' ]; @@ -220,6 +225,7 @@ public function __construct(array $data = null) $this->container['effectType'] = isset($data['effectType']) ? $data['effectType'] : null; $this->container['triggeredByCoupon'] = isset($data['triggeredByCoupon']) ? $data['triggeredByCoupon'] : null; $this->container['triggeredForCatalogItem'] = isset($data['triggeredForCatalogItem']) ? $data['triggeredForCatalogItem'] : null; + $this->container['conditionIndex'] = isset($data['conditionIndex']) ? $data['conditionIndex'] : null; $this->container['props'] = isset($data['props']) ? $data['props'] : null; } @@ -433,6 +439,30 @@ public function setTriggeredForCatalogItem($triggeredForCatalogItem) return $this; } + /** + * Gets conditionIndex + * + * @return int|null + */ + public function getConditionIndex() + { + return $this->container['conditionIndex']; + } + + /** + * Sets conditionIndex + * + * @param int|null $conditionIndex The index of the condition that was triggered. + * + * @return $this + */ + public function setConditionIndex($conditionIndex) + { + $this->container['conditionIndex'] = $conditionIndex; + + return $this; + } + /** * Gets props * diff --git a/lib/Model/EffectEntity.php b/lib/Model/EffectEntity.php index c8c5e905..14397baa 100644 --- a/lib/Model/EffectEntity.php +++ b/lib/Model/EffectEntity.php @@ -64,7 +64,8 @@ class EffectEntity implements ModelInterface, ArrayAccess 'ruleName' => 'string', 'effectType' => 'string', 'triggeredByCoupon' => 'int', - 'triggeredForCatalogItem' => 'int' + 'triggeredForCatalogItem' => 'int', + 'conditionIndex' => 'int' ]; /** @@ -79,7 +80,8 @@ class EffectEntity implements ModelInterface, ArrayAccess 'ruleName' => null, 'effectType' => null, 'triggeredByCoupon' => null, - 'triggeredForCatalogItem' => null + 'triggeredForCatalogItem' => null, + 'conditionIndex' => null ]; /** @@ -115,7 +117,8 @@ public static function openAPIFormats() 'ruleName' => 'ruleName', 'effectType' => 'effectType', 'triggeredByCoupon' => 'triggeredByCoupon', - 'triggeredForCatalogItem' => 'triggeredForCatalogItem' + 'triggeredForCatalogItem' => 'triggeredForCatalogItem', + 'conditionIndex' => 'conditionIndex' ]; /** @@ -130,7 +133,8 @@ public static function openAPIFormats() 'ruleName' => 'setRuleName', 'effectType' => 'setEffectType', 'triggeredByCoupon' => 'setTriggeredByCoupon', - 'triggeredForCatalogItem' => 'setTriggeredForCatalogItem' + 'triggeredForCatalogItem' => 'setTriggeredForCatalogItem', + 'conditionIndex' => 'setConditionIndex' ]; /** @@ -145,7 +149,8 @@ public static function openAPIFormats() 'ruleName' => 'getRuleName', 'effectType' => 'getEffectType', 'triggeredByCoupon' => 'getTriggeredByCoupon', - 'triggeredForCatalogItem' => 'getTriggeredForCatalogItem' + 'triggeredForCatalogItem' => 'getTriggeredForCatalogItem', + 'conditionIndex' => 'getConditionIndex' ]; /** @@ -215,6 +220,7 @@ public function __construct(array $data = null) $this->container['effectType'] = isset($data['effectType']) ? $data['effectType'] : null; $this->container['triggeredByCoupon'] = isset($data['triggeredByCoupon']) ? $data['triggeredByCoupon'] : null; $this->container['triggeredForCatalogItem'] = isset($data['triggeredForCatalogItem']) ? $data['triggeredForCatalogItem'] : null; + $this->container['conditionIndex'] = isset($data['conditionIndex']) ? $data['conditionIndex'] : null; } /** @@ -423,6 +429,30 @@ public function setTriggeredForCatalogItem($triggeredForCatalogItem) return $this; } + + /** + * Gets conditionIndex + * + * @return int|null + */ + public function getConditionIndex() + { + return $this->container['conditionIndex']; + } + + /** + * Sets conditionIndex + * + * @param int|null $conditionIndex The index of the condition that was triggered. + * + * @return $this + */ + public function setConditionIndex($conditionIndex) + { + $this->container['conditionIndex'] = $conditionIndex; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Event.php b/lib/Model/Event.php index 2c159995..d9cc511d 100644 --- a/lib/Model/Event.php +++ b/lib/Model/Event.php @@ -62,6 +62,7 @@ class Event implements ModelInterface, ArrayAccess 'created' => '\DateTime', 'applicationId' => 'int', 'profileId' => 'string', + 'storeIntegrationId' => 'string', 'type' => 'string', 'attributes' => 'object', 'sessionId' => 'string', @@ -80,6 +81,7 @@ class Event implements ModelInterface, ArrayAccess 'created' => 'date-time', 'applicationId' => null, 'profileId' => null, + 'storeIntegrationId' => null, 'type' => null, 'attributes' => null, 'sessionId' => null, @@ -119,6 +121,7 @@ public static function openAPIFormats() 'created' => 'created', 'applicationId' => 'applicationId', 'profileId' => 'profileId', + 'storeIntegrationId' => 'storeIntegrationId', 'type' => 'type', 'attributes' => 'attributes', 'sessionId' => 'sessionId', @@ -137,6 +140,7 @@ public static function openAPIFormats() 'created' => 'setCreated', 'applicationId' => 'setApplicationId', 'profileId' => 'setProfileId', + 'storeIntegrationId' => 'setStoreIntegrationId', 'type' => 'setType', 'attributes' => 'setAttributes', 'sessionId' => 'setSessionId', @@ -155,6 +159,7 @@ public static function openAPIFormats() 'created' => 'getCreated', 'applicationId' => 'getApplicationId', 'profileId' => 'getProfileId', + 'storeIntegrationId' => 'getStoreIntegrationId', 'type' => 'getType', 'attributes' => 'getAttributes', 'sessionId' => 'getSessionId', @@ -227,6 +232,7 @@ public function __construct(array $data = null) $this->container['created'] = isset($data['created']) ? $data['created'] : null; $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['storeIntegrationId'] = isset($data['storeIntegrationId']) ? $data['storeIntegrationId'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['sessionId'] = isset($data['sessionId']) ? $data['sessionId'] : null; @@ -253,6 +259,14 @@ public function listInvalidProperties() if ($this->container['applicationId'] === null) { $invalidProperties[] = "'applicationId' can't be null"; } + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be bigger than or equal to 1."; + } + if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -380,6 +394,37 @@ public function setProfileId($profileId) return $this; } + /** + * Gets storeIntegrationId + * + * @return string|null + */ + public function getStoreIntegrationId() + { + return $this->container['storeIntegrationId']; + } + + /** + * Sets storeIntegrationId + * + * @param string|null $storeIntegrationId The integration ID of the store. You choose this ID when you create a store. + * + * @return $this + */ + public function setStoreIntegrationId($storeIntegrationId) + { + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling Event., must be smaller than or equal to 1000.'); + } + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling Event., must be bigger than or equal to 1.'); + } + + $this->container['storeIntegrationId'] = $storeIntegrationId; + + return $this; + } + /** * Gets type * diff --git a/lib/Model/EventV2.php b/lib/Model/EventV2.php index 74248633..46c06a69 100644 --- a/lib/Model/EventV2.php +++ b/lib/Model/EventV2.php @@ -59,6 +59,7 @@ class EventV2 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'profileId' => 'string', + 'storeIntegrationId' => 'string', 'evaluableCampaignIds' => 'int[]', 'type' => 'string', 'attributes' => 'object' @@ -71,6 +72,7 @@ class EventV2 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'profileId' => null, + 'storeIntegrationId' => null, 'evaluableCampaignIds' => null, 'type' => null, 'attributes' => null @@ -104,6 +106,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'profileId' => 'profileId', + 'storeIntegrationId' => 'storeIntegrationId', 'evaluableCampaignIds' => 'evaluableCampaignIds', 'type' => 'type', 'attributes' => 'attributes' @@ -116,6 +119,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'profileId' => 'setProfileId', + 'storeIntegrationId' => 'setStoreIntegrationId', 'evaluableCampaignIds' => 'setEvaluableCampaignIds', 'type' => 'setType', 'attributes' => 'setAttributes' @@ -128,6 +132,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'profileId' => 'getProfileId', + 'storeIntegrationId' => 'getStoreIntegrationId', 'evaluableCampaignIds' => 'getEvaluableCampaignIds', 'type' => 'getType', 'attributes' => 'getAttributes' @@ -194,6 +199,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['storeIntegrationId'] = isset($data['storeIntegrationId']) ? $data['storeIntegrationId'] : null; $this->container['evaluableCampaignIds'] = isset($data['evaluableCampaignIds']) ? $data['evaluableCampaignIds'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; @@ -208,6 +214,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be bigger than or equal to 1."; + } + if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -254,6 +268,37 @@ public function setProfileId($profileId) return $this; } + /** + * Gets storeIntegrationId + * + * @return string|null + */ + public function getStoreIntegrationId() + { + return $this->container['storeIntegrationId']; + } + + /** + * Sets storeIntegrationId + * + * @param string|null $storeIntegrationId The integration ID of the store. You choose this ID when you create a store. + * + * @return $this + */ + public function setStoreIntegrationId($storeIntegrationId) + { + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling EventV2., must be smaller than or equal to 1000.'); + } + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling EventV2., must be bigger than or equal to 1.'); + } + + $this->container['storeIntegrationId'] = $storeIntegrationId; + + return $this; + } + /** * Gets evaluableCampaignIds * @@ -291,7 +336,7 @@ public function getType() /** * Sets type * - * @param string $type A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event) of type `event` in the Campaign Manager. + * @param string $type A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) of type `event` in the Campaign Manager. * * @return $this */ @@ -320,7 +365,7 @@ public function getAttributes() /** * Sets attributes * - * @param object|null $attributes Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-custom-attributes). + * @param object|null $attributes Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-a-custom-attribute). * * @return $this */ diff --git a/lib/Model/IdentifiableEntity.php b/lib/Model/IdentifiableEntity.php new file mode 100644 index 00000000..afbf6c40 --- /dev/null +++ b/lib/Model/IdentifiableEntity.php @@ -0,0 +1,311 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InlineResponse20010.php b/lib/Model/InlineResponse20010.php index 3a8f1303..610bd270 100644 --- a/lib/Model/InlineResponse20010.php +++ b/lib/Model/InlineResponse20010.php @@ -58,7 +58,7 @@ class InlineResponse20010 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\CampaignTemplate[]' + 'data' => '\TalonOne\Client\Model\Referral[]' ]; /** @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\CampaignTemplate[] + * @return \TalonOne\Client\Model\Referral[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CampaignTemplate[] $data data + * @param \TalonOne\Client\Model\Referral[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20011.php b/lib/Model/InlineResponse20011.php index 1792ec02..6ae77096 100644 --- a/lib/Model/InlineResponse20011.php +++ b/lib/Model/InlineResponse20011.php @@ -57,8 +57,8 @@ class InlineResponse20011 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\LoyaltyProgram[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\CampaignTemplate[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse20011 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets totalResultSize + * Gets hasMore * - * @return int + * @return bool */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int $totalResultSize totalResultSize + * @param bool $hasMore hasMore * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\LoyaltyProgram[] + * @return \TalonOne\Client\Model\CampaignTemplate[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\LoyaltyProgram[] $data data + * @param \TalonOne\Client\Model\CampaignTemplate[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20012.php b/lib/Model/InlineResponse20012.php index 241155cc..c779e24a 100644 --- a/lib/Model/InlineResponse20012.php +++ b/lib/Model/InlineResponse20012.php @@ -57,8 +57,8 @@ class InlineResponse20012 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\LoyaltyProgramTransaction[]' + 'totalResultSize' => 'int', + 'data' => '\TalonOne\Client\Model\LoyaltyProgram[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse20012 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'hasMore' => null, + 'totalResultSize' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'hasMore' => 'hasMore', + 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'hasMore' => 'setHasMore', + 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'hasMore' => 'getHasMore', + 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['hasMore'] === null) { - $invalidProperties[] = "'hasMore' can't be null"; + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets hasMore + * Gets totalResultSize * - * @return bool + * @return int */ - public function getHasMore() + public function getTotalResultSize() { - return $this->container['hasMore']; + return $this->container['totalResultSize']; } /** - * Sets hasMore + * Sets totalResultSize * - * @param bool $hasMore hasMore + * @param int $totalResultSize totalResultSize * * @return $this */ - public function setHasMore($hasMore) + public function setTotalResultSize($totalResultSize) { - $this->container['hasMore'] = $hasMore; + $this->container['totalResultSize'] = $totalResultSize; return $this; } @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\LoyaltyProgramTransaction[] + * @return \TalonOne\Client\Model\LoyaltyProgram[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\LoyaltyProgramTransaction[] $data data + * @param \TalonOne\Client\Model\LoyaltyProgram[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20013.php b/lib/Model/InlineResponse20013.php index 9e61e827..26304f83 100644 --- a/lib/Model/InlineResponse20013.php +++ b/lib/Model/InlineResponse20013.php @@ -58,7 +58,7 @@ class InlineResponse20013 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\LoyaltyCard[]' + 'data' => '\TalonOne\Client\Model\LoyaltyProgramTransaction[]' ]; /** @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\LoyaltyCard[] + * @return \TalonOne\Client\Model\LoyaltyProgramTransaction[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\LoyaltyCard[] $data data + * @param \TalonOne\Client\Model\LoyaltyProgramTransaction[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20014.php b/lib/Model/InlineResponse20014.php index 060e96fa..d4ef33de 100644 --- a/lib/Model/InlineResponse20014.php +++ b/lib/Model/InlineResponse20014.php @@ -58,7 +58,7 @@ class InlineResponse20014 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\CardLedgerTransactionLogEntry[]' + 'data' => '\TalonOne\Client\Model\LoyaltyCard[]' ]; /** @@ -229,7 +229,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool $hasMore true means there is more data in the source collection to request.. + * @param bool $hasMore hasMore * * @return $this */ @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\CardLedgerTransactionLogEntry[] + * @return \TalonOne\Client\Model\LoyaltyCard[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CardLedgerTransactionLogEntry[] $data List of loyalty card transaction logs. + * @param \TalonOne\Client\Model\LoyaltyCard[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20015.php b/lib/Model/InlineResponse20015.php index 75aaebfb..72da2dea 100644 --- a/lib/Model/InlineResponse20015.php +++ b/lib/Model/InlineResponse20015.php @@ -58,8 +58,7 @@ class InlineResponse20015 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\CollectionWithoutPayload[]' + 'data' => '\TalonOne\Client\Model\CardLedgerTransactionLogEntry[]' ]; /** @@ -69,7 +68,6 @@ class InlineResponse20015 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'hasMore' => null, - 'totalResultSize' => null, 'data' => null ]; @@ -101,7 +99,6 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'hasMore' => 'hasMore', - 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -112,7 +109,6 @@ public static function openAPIFormats() */ protected static $setters = [ 'hasMore' => 'setHasMore', - 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -123,7 +119,6 @@ public static function openAPIFormats() */ protected static $getters = [ 'hasMore' => 'getHasMore', - 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -188,7 +183,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -201,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; + } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -222,7 +219,7 @@ public function valid() /** * Gets hasMore * - * @return bool|null + * @return bool */ public function getHasMore() { @@ -232,7 +229,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool|null $hasMore hasMore + * @param bool $hasMore true means there is more data in the source collection to request.. * * @return $this */ @@ -243,34 +240,10 @@ public function setHasMore($hasMore) return $this; } - /** - * Gets totalResultSize - * - * @return int|null - */ - public function getTotalResultSize() - { - return $this->container['totalResultSize']; - } - - /** - * Sets totalResultSize - * - * @param int|null $totalResultSize totalResultSize - * - * @return $this - */ - public function setTotalResultSize($totalResultSize) - { - $this->container['totalResultSize'] = $totalResultSize; - - return $this; - } - /** * Gets data * - * @return \TalonOne\Client\Model\CollectionWithoutPayload[] + * @return \TalonOne\Client\Model\CardLedgerTransactionLogEntry[] */ public function getData() { @@ -280,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CollectionWithoutPayload[] $data data + * @param \TalonOne\Client\Model\CardLedgerTransactionLogEntry[] $data List of loyalty card transaction logs. * * @return $this */ diff --git a/lib/Model/InlineResponse20016.php b/lib/Model/InlineResponse20016.php index 1656305a..72cc53ce 100644 --- a/lib/Model/InlineResponse20016.php +++ b/lib/Model/InlineResponse20016.php @@ -58,7 +58,8 @@ class InlineResponse20016 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\CollectionItem[]' + 'totalResultSize' => 'int', + 'data' => '\TalonOne\Client\Model\CollectionWithoutPayload[]' ]; /** @@ -68,6 +69,7 @@ class InlineResponse20016 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'hasMore' => null, + 'totalResultSize' => null, 'data' => null ]; @@ -99,6 +101,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'hasMore' => 'hasMore', + 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -109,6 +112,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'hasMore' => 'setHasMore', + 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -119,6 +123,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'hasMore' => 'getHasMore', + 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -183,6 +188,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,9 +201,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['hasMore'] === null) { - $invalidProperties[] = "'hasMore' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -219,7 +222,7 @@ public function valid() /** * Gets hasMore * - * @return bool + * @return bool|null */ public function getHasMore() { @@ -229,7 +232,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool $hasMore hasMore + * @param bool|null $hasMore hasMore * * @return $this */ @@ -240,10 +243,34 @@ public function setHasMore($hasMore) return $this; } + /** + * Gets totalResultSize + * + * @return int|null + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int|null $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + /** * Gets data * - * @return \TalonOne\Client\Model\CollectionItem[] + * @return \TalonOne\Client\Model\CollectionWithoutPayload[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CollectionItem[] $data data + * @param \TalonOne\Client\Model\CollectionWithoutPayload[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20017.php b/lib/Model/InlineResponse20017.php index 12be54f5..fbd2f95b 100644 --- a/lib/Model/InlineResponse20017.php +++ b/lib/Model/InlineResponse20017.php @@ -58,8 +58,7 @@ class InlineResponse20017 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Collection[]' + 'data' => '\TalonOne\Client\Model\CollectionItem[]' ]; /** @@ -69,7 +68,6 @@ class InlineResponse20017 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'hasMore' => null, - 'totalResultSize' => null, 'data' => null ]; @@ -101,7 +99,6 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'hasMore' => 'hasMore', - 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -112,7 +109,6 @@ public static function openAPIFormats() */ protected static $setters = [ 'hasMore' => 'setHasMore', - 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -123,7 +119,6 @@ public static function openAPIFormats() */ protected static $getters = [ 'hasMore' => 'getHasMore', - 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -188,7 +183,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -201,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; + } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -222,7 +219,7 @@ public function valid() /** * Gets hasMore * - * @return bool|null + * @return bool */ public function getHasMore() { @@ -232,7 +229,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool|null $hasMore hasMore + * @param bool $hasMore hasMore * * @return $this */ @@ -243,34 +240,10 @@ public function setHasMore($hasMore) return $this; } - /** - * Gets totalResultSize - * - * @return int|null - */ - public function getTotalResultSize() - { - return $this->container['totalResultSize']; - } - - /** - * Sets totalResultSize - * - * @param int|null $totalResultSize totalResultSize - * - * @return $this - */ - public function setTotalResultSize($totalResultSize) - { - $this->container['totalResultSize'] = $totalResultSize; - - return $this; - } - /** * Gets data * - * @return \TalonOne\Client\Model\Collection[] + * @return \TalonOne\Client\Model\CollectionItem[] */ public function getData() { @@ -280,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Collection[] $data data + * @param \TalonOne\Client\Model\CollectionItem[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20018.php b/lib/Model/InlineResponse20018.php index a73a3c35..ed65f0da 100644 --- a/lib/Model/InlineResponse20018.php +++ b/lib/Model/InlineResponse20018.php @@ -58,7 +58,8 @@ class InlineResponse20018 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\AccessLogEntry[]' + 'totalResultSize' => 'int', + 'data' => '\TalonOne\Client\Model\Collection[]' ]; /** @@ -68,6 +69,7 @@ class InlineResponse20018 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'hasMore' => null, + 'totalResultSize' => null, 'data' => null ]; @@ -99,6 +101,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'hasMore' => 'hasMore', + 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -109,6 +112,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'hasMore' => 'setHasMore', + 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -119,6 +123,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'hasMore' => 'getHasMore', + 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -183,6 +188,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,9 +201,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['hasMore'] === null) { - $invalidProperties[] = "'hasMore' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -219,7 +222,7 @@ public function valid() /** * Gets hasMore * - * @return bool + * @return bool|null */ public function getHasMore() { @@ -229,7 +232,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool $hasMore hasMore + * @param bool|null $hasMore hasMore * * @return $this */ @@ -240,10 +243,34 @@ public function setHasMore($hasMore) return $this; } + /** + * Gets totalResultSize + * + * @return int|null + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int|null $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + /** * Gets data * - * @return \TalonOne\Client\Model\AccessLogEntry[] + * @return \TalonOne\Client\Model\Collection[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\AccessLogEntry[] $data data + * @param \TalonOne\Client\Model\Collection[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20019.php b/lib/Model/InlineResponse20019.php index ea22c0c4..3bd12e49 100644 --- a/lib/Model/InlineResponse20019.php +++ b/lib/Model/InlineResponse20019.php @@ -57,7 +57,7 @@ class InlineResponse20019 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', + 'hasMore' => 'bool', 'data' => '\TalonOne\Client\Model\AccessLogEntry[]' ]; @@ -67,7 +67,7 @@ class InlineResponse20019 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets totalResultSize + * Gets hasMore * - * @return int + * @return bool */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int $totalResultSize totalResultSize + * @param bool $hasMore hasMore * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } diff --git a/lib/Model/InlineResponse20020.php b/lib/Model/InlineResponse20020.php index 37071d57..b14d049e 100644 --- a/lib/Model/InlineResponse20020.php +++ b/lib/Model/InlineResponse20020.php @@ -58,7 +58,7 @@ class InlineResponse20020 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\CampaignAnalytics[]' + 'data' => '\TalonOne\Client\Model\AccessLogEntry[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\CampaignAnalytics[] + * @return \TalonOne\Client\Model\AccessLogEntry[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CampaignAnalytics[] $data data + * @param \TalonOne\Client\Model\AccessLogEntry[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20021.php b/lib/Model/InlineResponse20021.php index 6006de69..7a2688c6 100644 --- a/lib/Model/InlineResponse20021.php +++ b/lib/Model/InlineResponse20021.php @@ -58,8 +58,7 @@ class InlineResponse20021 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\ApplicationCustomer[]' + 'data' => '\TalonOne\Client\Model\CampaignAnalytics[]' ]; /** @@ -69,7 +68,6 @@ class InlineResponse20021 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'totalResultSize' => null, - 'hasMore' => null, 'data' => null ]; @@ -101,7 +99,6 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'totalResultSize' => 'totalResultSize', - 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -112,7 +109,6 @@ public static function openAPIFormats() */ protected static $setters = [ 'totalResultSize' => 'setTotalResultSize', - 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -123,7 +119,6 @@ public static function openAPIFormats() */ protected static $getters = [ 'totalResultSize' => 'getTotalResultSize', - 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -188,7 +183,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; - $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -201,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; + } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -222,7 +219,7 @@ public function valid() /** * Gets totalResultSize * - * @return int|null + * @return int */ public function getTotalResultSize() { @@ -232,7 +229,7 @@ public function getTotalResultSize() /** * Sets totalResultSize * - * @param int|null $totalResultSize totalResultSize + * @param int $totalResultSize totalResultSize * * @return $this */ @@ -243,34 +240,10 @@ public function setTotalResultSize($totalResultSize) return $this; } - /** - * Gets hasMore - * - * @return bool|null - */ - public function getHasMore() - { - return $this->container['hasMore']; - } - - /** - * Sets hasMore - * - * @param bool|null $hasMore hasMore - * - * @return $this - */ - public function setHasMore($hasMore) - { - $this->container['hasMore'] = $hasMore; - - return $this; - } - /** * Gets data * - * @return \TalonOne\Client\Model\ApplicationCustomer[] + * @return \TalonOne\Client\Model\CampaignAnalytics[] */ public function getData() { @@ -280,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\ApplicationCustomer[] $data data + * @param \TalonOne\Client\Model\CampaignAnalytics[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20022.php b/lib/Model/InlineResponse20022.php index 1a2582c7..186c8e36 100644 --- a/lib/Model/InlineResponse20022.php +++ b/lib/Model/InlineResponse20022.php @@ -57,8 +57,8 @@ class InlineResponse20022 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'hasMore' => 'bool', 'totalResultSize' => 'int', + 'hasMore' => 'bool', 'data' => '\TalonOne\Client\Model\ApplicationCustomer[]' ]; @@ -68,8 +68,8 @@ class InlineResponse20022 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'hasMore' => null, 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'hasMore' => 'hasMore', 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -111,8 +111,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'hasMore' => 'setHasMore', 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -122,8 +122,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'hasMore' => 'getHasMore', 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -187,8 +187,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -220,49 +220,49 @@ public function valid() /** - * Gets hasMore + * Gets totalResultSize * - * @return bool|null + * @return int|null */ - public function getHasMore() + public function getTotalResultSize() { - return $this->container['hasMore']; + return $this->container['totalResultSize']; } /** - * Sets hasMore + * Sets totalResultSize * - * @param bool|null $hasMore hasMore + * @param int|null $totalResultSize totalResultSize * * @return $this */ - public function setHasMore($hasMore) + public function setTotalResultSize($totalResultSize) { - $this->container['hasMore'] = $hasMore; + $this->container['totalResultSize'] = $totalResultSize; return $this; } /** - * Gets totalResultSize + * Gets hasMore * - * @return int|null + * @return bool|null */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int|null $totalResultSize totalResultSize + * @param bool|null $hasMore hasMore * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } diff --git a/lib/Model/InlineResponse20023.php b/lib/Model/InlineResponse20023.php index 9860bd6b..a243ab2b 100644 --- a/lib/Model/InlineResponse20023.php +++ b/lib/Model/InlineResponse20023.php @@ -59,7 +59,7 @@ class InlineResponse20023 implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'hasMore' => 'bool', 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\CustomerProfile[]' + 'data' => '\TalonOne\Client\Model\ApplicationCustomer[]' ]; /** @@ -270,7 +270,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\CustomerProfile[] + * @return \TalonOne\Client\Model\ApplicationCustomer[] */ public function getData() { @@ -280,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CustomerProfile[] $data data + * @param \TalonOne\Client\Model\ApplicationCustomer[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20024.php b/lib/Model/InlineResponse20024.php index b1477a4b..03e29699 100644 --- a/lib/Model/InlineResponse20024.php +++ b/lib/Model/InlineResponse20024.php @@ -58,6 +58,7 @@ class InlineResponse20024 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', + 'totalResultSize' => 'int', 'data' => '\TalonOne\Client\Model\CustomerProfile[]' ]; @@ -68,6 +69,7 @@ class InlineResponse20024 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'hasMore' => null, + 'totalResultSize' => null, 'data' => null ]; @@ -99,6 +101,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'hasMore' => 'hasMore', + 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -109,6 +112,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'hasMore' => 'setHasMore', + 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -119,6 +123,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'hasMore' => 'getHasMore', + 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -183,6 +188,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,9 +201,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['hasMore'] === null) { - $invalidProperties[] = "'hasMore' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -219,7 +222,7 @@ public function valid() /** * Gets hasMore * - * @return bool + * @return bool|null */ public function getHasMore() { @@ -229,7 +232,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool $hasMore hasMore + * @param bool|null $hasMore hasMore * * @return $this */ @@ -240,6 +243,30 @@ public function setHasMore($hasMore) return $this; } + /** + * Gets totalResultSize + * + * @return int|null + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int|null $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + /** * Gets data * diff --git a/lib/Model/InlineResponse20025.php b/lib/Model/InlineResponse20025.php index 9ed9e679..7fed1bb5 100644 --- a/lib/Model/InlineResponse20025.php +++ b/lib/Model/InlineResponse20025.php @@ -58,7 +58,7 @@ class InlineResponse20025 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\CustomerActivityReport[]' + 'data' => '\TalonOne\Client\Model\CustomerProfile[]' ]; /** @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\CustomerActivityReport[] + * @return \TalonOne\Client\Model\CustomerProfile[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CustomerActivityReport[] $data data + * @param \TalonOne\Client\Model\CustomerProfile[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20026.php b/lib/Model/InlineResponse20026.php index 0c861e8a..d7f16864 100644 --- a/lib/Model/InlineResponse20026.php +++ b/lib/Model/InlineResponse20026.php @@ -58,7 +58,7 @@ class InlineResponse20026 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\ApplicationSession[]' + 'data' => '\TalonOne\Client\Model\CustomerActivityReport[]' ]; /** @@ -195,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; + } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -216,7 +219,7 @@ public function valid() /** * Gets hasMore * - * @return bool|null + * @return bool */ public function getHasMore() { @@ -226,7 +229,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool|null $hasMore hasMore + * @param bool $hasMore hasMore * * @return $this */ @@ -240,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\ApplicationSession[] + * @return \TalonOne\Client\Model\CustomerActivityReport[] */ public function getData() { @@ -250,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\ApplicationSession[] $data data + * @param \TalonOne\Client\Model\CustomerActivityReport[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20027.php b/lib/Model/InlineResponse20027.php index 8d7b57cc..e61e945c 100644 --- a/lib/Model/InlineResponse20027.php +++ b/lib/Model/InlineResponse20027.php @@ -58,7 +58,7 @@ class InlineResponse20027 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\ApplicationEvent[]' + 'data' => '\TalonOne\Client\Model\ApplicationSession[]' ]; /** @@ -195,9 +195,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['hasMore'] === null) { - $invalidProperties[] = "'hasMore' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -219,7 +216,7 @@ public function valid() /** * Gets hasMore * - * @return bool + * @return bool|null */ public function getHasMore() { @@ -229,7 +226,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool $hasMore hasMore + * @param bool|null $hasMore hasMore * * @return $this */ @@ -243,7 +240,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\ApplicationEvent[] + * @return \TalonOne\Client\Model\ApplicationSession[] */ public function getData() { @@ -253,7 +250,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\ApplicationEvent[] $data data + * @param \TalonOne\Client\Model\ApplicationSession[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20028.php b/lib/Model/InlineResponse20028.php index e3c9313b..9baeb34f 100644 --- a/lib/Model/InlineResponse20028.php +++ b/lib/Model/InlineResponse20028.php @@ -57,8 +57,8 @@ class InlineResponse20028 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', - 'data' => 'string[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\ApplicationEvent[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse20028 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets totalResultSize + * Gets hasMore * - * @return int + * @return bool */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int $totalResultSize totalResultSize + * @param bool $hasMore hasMore * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return string[] + * @return \TalonOne\Client\Model\ApplicationEvent[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param string[] $data data + * @param \TalonOne\Client\Model\ApplicationEvent[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20029.php b/lib/Model/InlineResponse20029.php index b3c40eb7..086dba2e 100644 --- a/lib/Model/InlineResponse20029.php +++ b/lib/Model/InlineResponse20029.php @@ -57,9 +57,8 @@ class InlineResponse20029 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'hasMore' => 'bool', 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Audience[]' + 'data' => 'string[]' ]; /** @@ -68,7 +67,6 @@ class InlineResponse20029 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'hasMore' => null, 'totalResultSize' => null, 'data' => null ]; @@ -100,7 +98,6 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'hasMore' => 'hasMore', 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -111,7 +108,6 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'hasMore' => 'setHasMore', 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -122,7 +118,6 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'hasMore' => 'getHasMore', 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -187,7 +182,6 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -201,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; + } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -219,34 +216,10 @@ public function valid() } - /** - * Gets hasMore - * - * @return bool|null - */ - public function getHasMore() - { - return $this->container['hasMore']; - } - - /** - * Sets hasMore - * - * @param bool|null $hasMore hasMore - * - * @return $this - */ - public function setHasMore($hasMore) - { - $this->container['hasMore'] = $hasMore; - - return $this; - } - /** * Gets totalResultSize * - * @return int|null + * @return int */ public function getTotalResultSize() { @@ -256,7 +229,7 @@ public function getTotalResultSize() /** * Sets totalResultSize * - * @param int|null $totalResultSize totalResultSize + * @param int $totalResultSize totalResultSize * * @return $this */ @@ -270,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Audience[] + * @return string[] */ public function getData() { @@ -280,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Audience[] $data data + * @param string[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse2003.php b/lib/Model/InlineResponse2003.php index d98a9623..b4a27bac 100644 --- a/lib/Model/InlineResponse2003.php +++ b/lib/Model/InlineResponse2003.php @@ -57,8 +57,8 @@ class InlineResponse2003 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Application[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\CardLedgerPointsEntryIntegrationAPI[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse2003 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets totalResultSize + * Gets hasMore * - * @return int + * @return bool */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int $totalResultSize totalResultSize + * @param bool $hasMore hasMore * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Application[] + * @return \TalonOne\Client\Model\CardLedgerPointsEntryIntegrationAPI[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Application[] $data data + * @param \TalonOne\Client\Model\CardLedgerPointsEntryIntegrationAPI[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20030.php b/lib/Model/InlineResponse20030.php index eb2c91de..5fecfa44 100644 --- a/lib/Model/InlineResponse20030.php +++ b/lib/Model/InlineResponse20030.php @@ -59,7 +59,7 @@ class InlineResponse20030 implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'hasMore' => 'bool', 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\ApplicationReferee[]' + 'data' => '\TalonOne\Client\Model\Audience[]' ]; /** @@ -270,7 +270,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\ApplicationReferee[] + * @return \TalonOne\Client\Model\Audience[] */ public function getData() { @@ -280,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\ApplicationReferee[] $data data + * @param \TalonOne\Client\Model\Audience[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20031.php b/lib/Model/InlineResponse20031.php index 44f0bbd3..a69fd571 100644 --- a/lib/Model/InlineResponse20031.php +++ b/lib/Model/InlineResponse20031.php @@ -57,8 +57,9 @@ class InlineResponse20031 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ + 'hasMore' => 'bool', 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Attribute[]' + 'data' => '\TalonOne\Client\Model\ApplicationReferee[]' ]; /** @@ -67,6 +68,7 @@ class InlineResponse20031 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ + 'hasMore' => null, 'totalResultSize' => null, 'data' => null ]; @@ -98,6 +100,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'hasMore' => 'hasMore', 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,6 +111,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'hasMore' => 'setHasMore', 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,6 +122,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'hasMore' => 'getHasMore', 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,6 +187,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,9 +201,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -216,10 +219,34 @@ public function valid() } + /** + * Gets hasMore + * + * @return bool|null + */ + public function getHasMore() + { + return $this->container['hasMore']; + } + + /** + * Sets hasMore + * + * @param bool|null $hasMore hasMore + * + * @return $this + */ + public function setHasMore($hasMore) + { + $this->container['hasMore'] = $hasMore; + + return $this; + } + /** * Gets totalResultSize * - * @return int + * @return int|null */ public function getTotalResultSize() { @@ -229,7 +256,7 @@ public function getTotalResultSize() /** * Sets totalResultSize * - * @param int $totalResultSize totalResultSize + * @param int|null $totalResultSize totalResultSize * * @return $this */ @@ -243,7 +270,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Attribute[] + * @return \TalonOne\Client\Model\ApplicationReferee[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Attribute[] $data data + * @param \TalonOne\Client\Model\ApplicationReferee[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20032.php b/lib/Model/InlineResponse20032.php index 7c7f87fd..08c69641 100644 --- a/lib/Model/InlineResponse20032.php +++ b/lib/Model/InlineResponse20032.php @@ -58,7 +58,7 @@ class InlineResponse20032 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\AccountAdditionalCost[]' + 'data' => '\TalonOne\Client\Model\Attribute[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\AccountAdditionalCost[] + * @return \TalonOne\Client\Model\Attribute[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\AccountAdditionalCost[] $data data + * @param \TalonOne\Client\Model\Attribute[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20033.php b/lib/Model/InlineResponse20033.php index f7c127cf..85b5df83 100644 --- a/lib/Model/InlineResponse20033.php +++ b/lib/Model/InlineResponse20033.php @@ -57,8 +57,9 @@ class InlineResponse20033 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ + 'hasMore' => 'bool', 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Webhook[]' + 'data' => '\TalonOne\Client\Model\CatalogItem[]' ]; /** @@ -67,6 +68,7 @@ class InlineResponse20033 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ + 'hasMore' => null, 'totalResultSize' => null, 'data' => null ]; @@ -98,6 +100,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'hasMore' => 'hasMore', 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,6 +111,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'hasMore' => 'setHasMore', 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,6 +122,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'hasMore' => 'getHasMore', 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,6 +187,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,9 +201,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -216,10 +219,34 @@ public function valid() } + /** + * Gets hasMore + * + * @return bool|null + */ + public function getHasMore() + { + return $this->container['hasMore']; + } + + /** + * Sets hasMore + * + * @param bool|null $hasMore hasMore + * + * @return $this + */ + public function setHasMore($hasMore) + { + $this->container['hasMore'] = $hasMore; + + return $this; + } + /** * Gets totalResultSize * - * @return int + * @return int|null */ public function getTotalResultSize() { @@ -229,7 +256,7 @@ public function getTotalResultSize() /** * Sets totalResultSize * - * @param int $totalResultSize totalResultSize + * @param int|null $totalResultSize totalResultSize * * @return $this */ @@ -243,7 +270,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Webhook[] + * @return \TalonOne\Client\Model\CatalogItem[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Webhook[] $data data + * @param \TalonOne\Client\Model\CatalogItem[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20034.php b/lib/Model/InlineResponse20034.php index 5dbf4301..7fbf0036 100644 --- a/lib/Model/InlineResponse20034.php +++ b/lib/Model/InlineResponse20034.php @@ -58,7 +58,7 @@ class InlineResponse20034 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\WebhookActivationLogEntry[]' + 'data' => '\TalonOne\Client\Model\AccountAdditionalCost[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\WebhookActivationLogEntry[] + * @return \TalonOne\Client\Model\AccountAdditionalCost[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\WebhookActivationLogEntry[] $data data + * @param \TalonOne\Client\Model\AccountAdditionalCost[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20035.php b/lib/Model/InlineResponse20035.php index bf15c4e7..760087e3 100644 --- a/lib/Model/InlineResponse20035.php +++ b/lib/Model/InlineResponse20035.php @@ -58,7 +58,7 @@ class InlineResponse20035 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\WebhookLogEntry[]' + 'data' => '\TalonOne\Client\Model\WebhookWithOutgoingIntegrationDetails[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\WebhookLogEntry[] + * @return \TalonOne\Client\Model\WebhookWithOutgoingIntegrationDetails[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\WebhookLogEntry[] $data data + * @param \TalonOne\Client\Model\WebhookWithOutgoingIntegrationDetails[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20036.php b/lib/Model/InlineResponse20036.php index d989c847..e5a9376c 100644 --- a/lib/Model/InlineResponse20036.php +++ b/lib/Model/InlineResponse20036.php @@ -58,7 +58,7 @@ class InlineResponse20036 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\EventType[]' + 'data' => '\TalonOne\Client\Model\WebhookActivationLogEntry[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\EventType[] + * @return \TalonOne\Client\Model\WebhookActivationLogEntry[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\EventType[] $data data + * @param \TalonOne\Client\Model\WebhookActivationLogEntry[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20037.php b/lib/Model/InlineResponse20037.php index 6becbc65..9e6bcb60 100644 --- a/lib/Model/InlineResponse20037.php +++ b/lib/Model/InlineResponse20037.php @@ -58,7 +58,7 @@ class InlineResponse20037 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\User[]' + 'data' => '\TalonOne\Client\Model\WebhookLogEntry[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\User[] + * @return \TalonOne\Client\Model\WebhookLogEntry[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\User[] $data data + * @param \TalonOne\Client\Model\WebhookLogEntry[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20038.php b/lib/Model/InlineResponse20038.php index 86d110e6..5f6d709a 100644 --- a/lib/Model/InlineResponse20038.php +++ b/lib/Model/InlineResponse20038.php @@ -58,8 +58,7 @@ class InlineResponse20038 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\Change[]' + 'data' => '\TalonOne\Client\Model\EventType[]' ]; /** @@ -69,7 +68,6 @@ class InlineResponse20038 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'totalResultSize' => null, - 'hasMore' => null, 'data' => null ]; @@ -101,7 +99,6 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'totalResultSize' => 'totalResultSize', - 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -112,7 +109,6 @@ public static function openAPIFormats() */ protected static $setters = [ 'totalResultSize' => 'setTotalResultSize', - 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -123,7 +119,6 @@ public static function openAPIFormats() */ protected static $getters = [ 'totalResultSize' => 'getTotalResultSize', - 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -188,7 +183,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; - $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -201,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; + } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -222,7 +219,7 @@ public function valid() /** * Gets totalResultSize * - * @return int|null + * @return int */ public function getTotalResultSize() { @@ -232,7 +229,7 @@ public function getTotalResultSize() /** * Sets totalResultSize * - * @param int|null $totalResultSize totalResultSize + * @param int $totalResultSize totalResultSize * * @return $this */ @@ -243,34 +240,10 @@ public function setTotalResultSize($totalResultSize) return $this; } - /** - * Gets hasMore - * - * @return bool|null - */ - public function getHasMore() - { - return $this->container['hasMore']; - } - - /** - * Sets hasMore - * - * @param bool|null $hasMore hasMore - * - * @return $this - */ - public function setHasMore($hasMore) - { - $this->container['hasMore'] = $hasMore; - - return $this; - } - /** * Gets data * - * @return \TalonOne\Client\Model\Change[] + * @return \TalonOne\Client\Model\EventType[] */ public function getData() { @@ -280,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Change[] $data data + * @param \TalonOne\Client\Model\EventType[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20039.php b/lib/Model/InlineResponse20039.php index 272667fe..088348c9 100644 --- a/lib/Model/InlineResponse20039.php +++ b/lib/Model/InlineResponse20039.php @@ -58,7 +58,7 @@ class InlineResponse20039 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Export[]' + 'data' => '\TalonOne\Client\Model\User[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Export[] + * @return \TalonOne\Client\Model\User[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Export[] $data data + * @param \TalonOne\Client\Model\User[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse2004.php b/lib/Model/InlineResponse2004.php index d12f102f..cf9d6811 100644 --- a/lib/Model/InlineResponse2004.php +++ b/lib/Model/InlineResponse2004.php @@ -57,8 +57,8 @@ class InlineResponse2004 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Campaign[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\LedgerPointsEntryIntegrationAPI[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse2004 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets totalResultSize + * Gets hasMore * - * @return int + * @return bool */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int $totalResultSize totalResultSize + * @param bool $hasMore hasMore * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Campaign[] + * @return \TalonOne\Client\Model\LedgerPointsEntryIntegrationAPI[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Campaign[] $data data + * @param \TalonOne\Client\Model\LedgerPointsEntryIntegrationAPI[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20040.php b/lib/Model/InlineResponse20040.php index f218a743..0c852b71 100644 --- a/lib/Model/InlineResponse20040.php +++ b/lib/Model/InlineResponse20040.php @@ -58,7 +58,8 @@ class InlineResponse20040 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Role[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\Change[]' ]; /** @@ -68,6 +69,7 @@ class InlineResponse20040 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -99,6 +101,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -109,6 +112,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -119,6 +123,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -183,6 +188,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,9 +201,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -219,7 +222,7 @@ public function valid() /** * Gets totalResultSize * - * @return int + * @return int|null */ public function getTotalResultSize() { @@ -229,7 +232,7 @@ public function getTotalResultSize() /** * Sets totalResultSize * - * @param int $totalResultSize totalResultSize + * @param int|null $totalResultSize totalResultSize * * @return $this */ @@ -240,10 +243,34 @@ public function setTotalResultSize($totalResultSize) return $this; } + /** + * Gets hasMore + * + * @return bool|null + */ + public function getHasMore() + { + return $this->container['hasMore']; + } + + /** + * Sets hasMore + * + * @param bool|null $hasMore hasMore + * + * @return $this + */ + public function setHasMore($hasMore) + { + $this->container['hasMore'] = $hasMore; + + return $this; + } + /** * Gets data * - * @return \TalonOne\Client\Model\Role[] + * @return \TalonOne\Client\Model\Change[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Role[] $data data + * @param \TalonOne\Client\Model\Change[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20041.php b/lib/Model/InlineResponse20041.php new file mode 100644 index 00000000..62fe72bf --- /dev/null +++ b/lib/Model/InlineResponse20041.php @@ -0,0 +1,344 @@ + 'int', + 'data' => '\TalonOne\Client\Model\Export[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'totalResultSize' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'totalResultSize' => 'totalResultSize', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'totalResultSize' => 'setTotalResultSize', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'totalResultSize' => 'getTotalResultSize', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets totalResultSize + * + * @return int + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + + /** + * Gets data + * + * @return \TalonOne\Client\Model\Export[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\Export[] $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InlineResponse20042.php b/lib/Model/InlineResponse20042.php new file mode 100644 index 00000000..f24181c9 --- /dev/null +++ b/lib/Model/InlineResponse20042.php @@ -0,0 +1,344 @@ + 'int', + 'data' => '\TalonOne\Client\Model\Role[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'totalResultSize' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'totalResultSize' => 'totalResultSize', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'totalResultSize' => 'setTotalResultSize', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'totalResultSize' => 'getTotalResultSize', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets totalResultSize + * + * @return int + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + + /** + * Gets data + * + * @return \TalonOne\Client\Model\Role[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\Role[] $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InlineResponse20043.php b/lib/Model/InlineResponse20043.php new file mode 100644 index 00000000..7bce1784 --- /dev/null +++ b/lib/Model/InlineResponse20043.php @@ -0,0 +1,371 @@ + 'bool', + 'totalResultSize' => 'int', + 'data' => '\TalonOne\Client\Model\Store[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'hasMore' => null, + 'totalResultSize' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'hasMore' => 'hasMore', + 'totalResultSize' => 'totalResultSize', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'hasMore' => 'setHasMore', + 'totalResultSize' => 'setTotalResultSize', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'hasMore' => 'getHasMore', + 'totalResultSize' => 'getTotalResultSize', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets hasMore + * + * @return bool|null + */ + public function getHasMore() + { + return $this->container['hasMore']; + } + + /** + * Sets hasMore + * + * @param bool|null $hasMore hasMore + * + * @return $this + */ + public function setHasMore($hasMore) + { + $this->container['hasMore'] = $hasMore; + + return $this; + } + + /** + * Gets totalResultSize + * + * @return int|null + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int|null $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + + /** + * Gets data + * + * @return \TalonOne\Client\Model\Store[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\Store[] $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InlineResponse2005.php b/lib/Model/InlineResponse2005.php index 95226dff..a8c52015 100644 --- a/lib/Model/InlineResponse2005.php +++ b/lib/Model/InlineResponse2005.php @@ -58,7 +58,7 @@ class InlineResponse2005 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\NotificationWebhook[]' + 'data' => '\TalonOne\Client\Model\Application[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\NotificationWebhook[] + * @return \TalonOne\Client\Model\Application[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\NotificationWebhook[] $data data + * @param \TalonOne\Client\Model\Application[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse2006.php b/lib/Model/InlineResponse2006.php index deff14c9..b6735d33 100644 --- a/lib/Model/InlineResponse2006.php +++ b/lib/Model/InlineResponse2006.php @@ -58,7 +58,7 @@ class InlineResponse2006 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Ruleset[]' + 'data' => '\TalonOne\Client\Model\Campaign[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Ruleset[] + * @return \TalonOne\Client\Model\Campaign[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Ruleset[] $data data + * @param \TalonOne\Client\Model\Campaign[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse2007.php b/lib/Model/InlineResponse2007.php index e7a72218..8b564389 100644 --- a/lib/Model/InlineResponse2007.php +++ b/lib/Model/InlineResponse2007.php @@ -58,7 +58,7 @@ class InlineResponse2007 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Coupon[]' + 'data' => '\TalonOne\Client\Model\Ruleset[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Coupon[] + * @return \TalonOne\Client\Model\Ruleset[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Coupon[] $data data + * @param \TalonOne\Client\Model\Ruleset[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse2008.php b/lib/Model/InlineResponse2008.php index 31b3167c..85f5b7d4 100644 --- a/lib/Model/InlineResponse2008.php +++ b/lib/Model/InlineResponse2008.php @@ -57,7 +57,7 @@ class InlineResponse2008 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'hasMore' => 'bool', + 'totalResultSize' => 'int', 'data' => '\TalonOne\Client\Model\Coupon[]' ]; @@ -67,7 +67,7 @@ class InlineResponse2008 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'hasMore' => null, + 'totalResultSize' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'hasMore' => 'hasMore', + 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'hasMore' => 'setHasMore', + 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'hasMore' => 'getHasMore', + 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['hasMore'] === null) { - $invalidProperties[] = "'hasMore' can't be null"; + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets hasMore + * Gets totalResultSize * - * @return bool + * @return int */ - public function getHasMore() + public function getTotalResultSize() { - return $this->container['hasMore']; + return $this->container['totalResultSize']; } /** - * Sets hasMore + * Sets totalResultSize * - * @param bool $hasMore hasMore + * @param int $totalResultSize totalResultSize * * @return $this */ - public function setHasMore($hasMore) + public function setTotalResultSize($totalResultSize) { - $this->container['hasMore'] = $hasMore; + $this->container['totalResultSize'] = $totalResultSize; return $this; } diff --git a/lib/Model/InlineResponse2009.php b/lib/Model/InlineResponse2009.php index 042261bf..2ef8e241 100644 --- a/lib/Model/InlineResponse2009.php +++ b/lib/Model/InlineResponse2009.php @@ -58,7 +58,7 @@ class InlineResponse2009 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\Referral[]' + 'data' => '\TalonOne\Client\Model\Coupon[]' ]; /** @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\Referral[] + * @return \TalonOne\Client\Model\Coupon[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Referral[] $data data + * @param \TalonOne\Client\Model\Coupon[] $data data * * @return $this */ diff --git a/lib/Model/IntegrationCoupon.php b/lib/Model/IntegrationCoupon.php index f33156cb..09487f69 100644 --- a/lib/Model/IntegrationCoupon.php +++ b/lib/Model/IntegrationCoupon.php @@ -79,6 +79,7 @@ class IntegrationCoupon implements ModelInterface, ArrayAccess 'reservation' => 'bool', 'batchId' => 'string', 'isReservationMandatory' => 'bool', + 'implicitlyReserved' => 'bool', 'profileRedemptionCount' => 'int' ]; @@ -109,6 +110,7 @@ class IntegrationCoupon implements ModelInterface, ArrayAccess 'reservation' => null, 'batchId' => null, 'isReservationMandatory' => null, + 'implicitlyReserved' => null, 'profileRedemptionCount' => null ]; @@ -160,6 +162,7 @@ public static function openAPIFormats() 'reservation' => 'reservation', 'batchId' => 'batchId', 'isReservationMandatory' => 'isReservationMandatory', + 'implicitlyReserved' => 'implicitlyReserved', 'profileRedemptionCount' => 'profileRedemptionCount' ]; @@ -190,6 +193,7 @@ public static function openAPIFormats() 'reservation' => 'setReservation', 'batchId' => 'setBatchId', 'isReservationMandatory' => 'setIsReservationMandatory', + 'implicitlyReserved' => 'setImplicitlyReserved', 'profileRedemptionCount' => 'setProfileRedemptionCount' ]; @@ -220,6 +224,7 @@ public static function openAPIFormats() 'reservation' => 'getReservation', 'batchId' => 'getBatchId', 'isReservationMandatory' => 'getIsReservationMandatory', + 'implicitlyReserved' => 'getImplicitlyReserved', 'profileRedemptionCount' => 'getProfileRedemptionCount' ]; @@ -304,6 +309,7 @@ public function __construct(array $data = null) $this->container['reservation'] = isset($data['reservation']) ? $data['reservation'] : true; $this->container['batchId'] = isset($data['batchId']) ? $data['batchId'] : null; $this->container['isReservationMandatory'] = isset($data['isReservationMandatory']) ? $data['isReservationMandatory'] : true; + $this->container['implicitlyReserved'] = isset($data['implicitlyReserved']) ? $data['implicitlyReserved'] : null; $this->container['profileRedemptionCount'] = isset($data['profileRedemptionCount']) ? $data['profileRedemptionCount'] : null; } @@ -921,6 +927,30 @@ public function setIsReservationMandatory($isReservationMandatory) return $this; } + /** + * Gets implicitlyReserved + * + * @return bool|null + */ + public function getImplicitlyReserved() + { + return $this->container['implicitlyReserved']; + } + + /** + * Sets implicitlyReserved + * + * @param bool|null $implicitlyReserved An indication of whether the coupon is implicitly reserved for all customers. + * + * @return $this + */ + public function setImplicitlyReserved($implicitlyReserved) + { + $this->container['implicitlyReserved'] = $implicitlyReserved; + + return $this; + } + /** * Gets profileRedemptionCount * diff --git a/lib/Model/IntegrationEvent.php b/lib/Model/IntegrationEvent.php index 25270c6e..d68398a0 100644 --- a/lib/Model/IntegrationEvent.php +++ b/lib/Model/IntegrationEvent.php @@ -59,6 +59,7 @@ class IntegrationEvent implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'profileId' => 'string', + 'storeIntegrationId' => 'string', 'type' => 'string', 'attributes' => 'object' ]; @@ -70,6 +71,7 @@ class IntegrationEvent implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'profileId' => null, + 'storeIntegrationId' => null, 'type' => null, 'attributes' => null ]; @@ -102,6 +104,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'profileId' => 'profileId', + 'storeIntegrationId' => 'storeIntegrationId', 'type' => 'type', 'attributes' => 'attributes' ]; @@ -113,6 +116,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'profileId' => 'setProfileId', + 'storeIntegrationId' => 'setStoreIntegrationId', 'type' => 'setType', 'attributes' => 'setAttributes' ]; @@ -124,6 +128,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'profileId' => 'getProfileId', + 'storeIntegrationId' => 'getStoreIntegrationId', 'type' => 'getType', 'attributes' => 'getAttributes' ]; @@ -189,6 +194,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['storeIntegrationId'] = isset($data['storeIntegrationId']) ? $data['storeIntegrationId'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; } @@ -202,6 +208,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be bigger than or equal to 1."; + } + if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -251,6 +265,37 @@ public function setProfileId($profileId) return $this; } + /** + * Gets storeIntegrationId + * + * @return string|null + */ + public function getStoreIntegrationId() + { + return $this->container['storeIntegrationId']; + } + + /** + * Sets storeIntegrationId + * + * @param string|null $storeIntegrationId The integration ID of the store. You choose this ID when you create a store. + * + * @return $this + */ + public function setStoreIntegrationId($storeIntegrationId) + { + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling IntegrationEvent., must be smaller than or equal to 1000.'); + } + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling IntegrationEvent., must be bigger than or equal to 1.'); + } + + $this->container['storeIntegrationId'] = $storeIntegrationId; + + return $this; + } + /** * Gets type * diff --git a/lib/Model/IntegrationEventV2Request.php b/lib/Model/IntegrationEventV2Request.php index 2fbb309e..644bc4d1 100644 --- a/lib/Model/IntegrationEventV2Request.php +++ b/lib/Model/IntegrationEventV2Request.php @@ -59,6 +59,7 @@ class IntegrationEventV2Request implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'profileId' => 'string', + 'storeIntegrationId' => 'string', 'evaluableCampaignIds' => 'int[]', 'type' => 'string', 'attributes' => 'object', @@ -72,6 +73,7 @@ class IntegrationEventV2Request implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'profileId' => null, + 'storeIntegrationId' => null, 'evaluableCampaignIds' => null, 'type' => null, 'attributes' => null, @@ -106,6 +108,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'profileId' => 'profileId', + 'storeIntegrationId' => 'storeIntegrationId', 'evaluableCampaignIds' => 'evaluableCampaignIds', 'type' => 'type', 'attributes' => 'attributes', @@ -119,6 +122,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'profileId' => 'setProfileId', + 'storeIntegrationId' => 'setStoreIntegrationId', 'evaluableCampaignIds' => 'setEvaluableCampaignIds', 'type' => 'setType', 'attributes' => 'setAttributes', @@ -132,6 +136,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'profileId' => 'getProfileId', + 'storeIntegrationId' => 'getStoreIntegrationId', 'evaluableCampaignIds' => 'getEvaluableCampaignIds', 'type' => 'getType', 'attributes' => 'getAttributes', @@ -222,6 +227,7 @@ public function getResponseContentAllowableValues() public function __construct(array $data = null) { $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['storeIntegrationId'] = isset($data['storeIntegrationId']) ? $data['storeIntegrationId'] : null; $this->container['evaluableCampaignIds'] = isset($data['evaluableCampaignIds']) ? $data['evaluableCampaignIds'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; @@ -237,6 +243,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be bigger than or equal to 1."; + } + if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -283,6 +297,37 @@ public function setProfileId($profileId) return $this; } + /** + * Gets storeIntegrationId + * + * @return string|null + */ + public function getStoreIntegrationId() + { + return $this->container['storeIntegrationId']; + } + + /** + * Sets storeIntegrationId + * + * @param string|null $storeIntegrationId The integration ID of the store. You choose this ID when you create a store. + * + * @return $this + */ + public function setStoreIntegrationId($storeIntegrationId) + { + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling IntegrationEventV2Request., must be smaller than or equal to 1000.'); + } + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling IntegrationEventV2Request., must be bigger than or equal to 1.'); + } + + $this->container['storeIntegrationId'] = $storeIntegrationId; + + return $this; + } + /** * Gets evaluableCampaignIds * @@ -320,7 +365,7 @@ public function getType() /** * Sets type * - * @param string $type A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event) of type `event` in the Campaign Manager. + * @param string $type A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) of type `event` in the Campaign Manager. * * @return $this */ @@ -349,7 +394,7 @@ public function getAttributes() /** * Sets attributes * - * @param object|null $attributes Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-custom-attributes). + * @param object|null $attributes Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-a-custom-attribute). * * @return $this */ diff --git a/lib/Model/IntegrationRequest.php b/lib/Model/IntegrationRequest.php index dc545e8c..302a366e 100644 --- a/lib/Model/IntegrationRequest.php +++ b/lib/Model/IntegrationRequest.php @@ -282,7 +282,7 @@ public function getResponseContent() /** * Sets responseContent * - * @param string[]|null $responseContent Extends the response with the chosen data entities. Use this property to get as much data as you need in one _Update customer session_ request instead of sending extra requests to other endpoints. + * @param string[]|null $responseContent Extends the response with the chosen data entities. Use this property to get as much data as you need in one _Update customer session_ request instead of sending extra requests to other endpoints. **Note:** To retrieve loyalty card details, your request must include a loyalty card ID. * * @return $this */ diff --git a/lib/Model/IntegrationStoreEntity.php b/lib/Model/IntegrationStoreEntity.php new file mode 100644 index 00000000..8931bbe2 --- /dev/null +++ b/lib/Model/IntegrationStoreEntity.php @@ -0,0 +1,323 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'storeIntegrationId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'storeIntegrationId' => 'storeIntegrationId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'storeIntegrationId' => 'setStoreIntegrationId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'storeIntegrationId' => 'getStoreIntegrationId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['storeIntegrationId'] = isset($data['storeIntegrationId']) ? $data['storeIntegrationId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets storeIntegrationId + * + * @return string|null + */ + public function getStoreIntegrationId() + { + return $this->container['storeIntegrationId']; + } + + /** + * Sets storeIntegrationId + * + * @param string|null $storeIntegrationId The integration ID of the store. You choose this ID when you create a store. + * + * @return $this + */ + public function setStoreIntegrationId($storeIntegrationId) + { + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling IntegrationStoreEntity., must be smaller than or equal to 1000.'); + } + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling IntegrationStoreEntity., must be bigger than or equal to 1.'); + } + + $this->container['storeIntegrationId'] = $storeIntegrationId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InventoryCoupon.php b/lib/Model/InventoryCoupon.php index f9fd3171..9666810e 100644 --- a/lib/Model/InventoryCoupon.php +++ b/lib/Model/InventoryCoupon.php @@ -79,6 +79,7 @@ class InventoryCoupon implements ModelInterface, ArrayAccess 'reservation' => 'bool', 'batchId' => 'string', 'isReservationMandatory' => 'bool', + 'implicitlyReserved' => 'bool', 'profileRedemptionCount' => 'int', 'state' => 'string' ]; @@ -110,6 +111,7 @@ class InventoryCoupon implements ModelInterface, ArrayAccess 'reservation' => null, 'batchId' => null, 'isReservationMandatory' => null, + 'implicitlyReserved' => null, 'profileRedemptionCount' => null, 'state' => null ]; @@ -162,6 +164,7 @@ public static function openAPIFormats() 'reservation' => 'reservation', 'batchId' => 'batchId', 'isReservationMandatory' => 'isReservationMandatory', + 'implicitlyReserved' => 'implicitlyReserved', 'profileRedemptionCount' => 'profileRedemptionCount', 'state' => 'state' ]; @@ -193,6 +196,7 @@ public static function openAPIFormats() 'reservation' => 'setReservation', 'batchId' => 'setBatchId', 'isReservationMandatory' => 'setIsReservationMandatory', + 'implicitlyReserved' => 'setImplicitlyReserved', 'profileRedemptionCount' => 'setProfileRedemptionCount', 'state' => 'setState' ]; @@ -224,6 +228,7 @@ public static function openAPIFormats() 'reservation' => 'getReservation', 'batchId' => 'getBatchId', 'isReservationMandatory' => 'getIsReservationMandatory', + 'implicitlyReserved' => 'getImplicitlyReserved', 'profileRedemptionCount' => 'getProfileRedemptionCount', 'state' => 'getState' ]; @@ -309,6 +314,7 @@ public function __construct(array $data = null) $this->container['reservation'] = isset($data['reservation']) ? $data['reservation'] : true; $this->container['batchId'] = isset($data['batchId']) ? $data['batchId'] : null; $this->container['isReservationMandatory'] = isset($data['isReservationMandatory']) ? $data['isReservationMandatory'] : true; + $this->container['implicitlyReserved'] = isset($data['implicitlyReserved']) ? $data['implicitlyReserved'] : null; $this->container['profileRedemptionCount'] = isset($data['profileRedemptionCount']) ? $data['profileRedemptionCount'] : null; $this->container['state'] = isset($data['state']) ? $data['state'] : null; } @@ -930,6 +936,30 @@ public function setIsReservationMandatory($isReservationMandatory) return $this; } + /** + * Gets implicitlyReserved + * + * @return bool|null + */ + public function getImplicitlyReserved() + { + return $this->container['implicitlyReserved']; + } + + /** + * Sets implicitlyReserved + * + * @param bool|null $implicitlyReserved An indication of whether the coupon is implicitly reserved for all customers. + * + * @return $this + */ + public function setImplicitlyReserved($implicitlyReserved) + { + $this->container['implicitlyReserved'] = $implicitlyReserved; + + return $this; + } + /** * Gets profileRedemptionCount * diff --git a/lib/Model/LedgerPointsEntryIntegrationAPI.php b/lib/Model/LedgerPointsEntryIntegrationAPI.php new file mode 100644 index 00000000..fd97ac70 --- /dev/null +++ b/lib/Model/LedgerPointsEntryIntegrationAPI.php @@ -0,0 +1,605 @@ + 'int', + 'created' => '\DateTime', + 'programId' => 'int', + 'customerSessionId' => 'string', + 'name' => 'string', + 'startDate' => 'string', + 'expiryDate' => 'string', + 'subledgerId' => 'string', + 'amount' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'created' => 'date-time', + 'programId' => null, + 'customerSessionId' => null, + 'name' => null, + 'startDate' => null, + 'expiryDate' => null, + 'subledgerId' => null, + 'amount' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'created' => 'created', + 'programId' => 'programId', + 'customerSessionId' => 'customerSessionId', + 'name' => 'name', + 'startDate' => 'startDate', + 'expiryDate' => 'expiryDate', + 'subledgerId' => 'subledgerId', + 'amount' => 'amount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'created' => 'setCreated', + 'programId' => 'setProgramId', + 'customerSessionId' => 'setCustomerSessionId', + 'name' => 'setName', + 'startDate' => 'setStartDate', + 'expiryDate' => 'setExpiryDate', + 'subledgerId' => 'setSubledgerId', + 'amount' => 'setAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'created' => 'getCreated', + 'programId' => 'getProgramId', + 'customerSessionId' => 'getCustomerSessionId', + 'name' => 'getName', + 'startDate' => 'getStartDate', + 'expiryDate' => 'getExpiryDate', + 'subledgerId' => 'getSubledgerId', + 'amount' => 'getAmount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['programId'] = isset($data['programId']) ? $data['programId'] : null; + $this->container['customerSessionId'] = isset($data['customerSessionId']) ? $data['customerSessionId'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; + $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; + $this->container['subledgerId'] = isset($data['subledgerId']) ? $data['subledgerId'] : null; + $this->container['amount'] = isset($data['amount']) ? $data['amount'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['programId'] === null) { + $invalidProperties[] = "'programId' can't be null"; + } + if (!is_null($this->container['customerSessionId']) && (mb_strlen($this->container['customerSessionId']) > 255)) { + $invalidProperties[] = "invalid value for 'customerSessionId', the character length must be smaller than or equal to 255."; + } + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 255)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 255."; + } + + if ($this->container['startDate'] === null) { + $invalidProperties[] = "'startDate' can't be null"; + } + if ((mb_strlen($this->container['startDate']) > 64)) { + $invalidProperties[] = "invalid value for 'startDate', the character length must be smaller than or equal to 64."; + } + + if ($this->container['expiryDate'] === null) { + $invalidProperties[] = "'expiryDate' can't be null"; + } + if ($this->container['subledgerId'] === null) { + $invalidProperties[] = "'subledgerId' can't be null"; + } + if ((mb_strlen($this->container['subledgerId']) > 64)) { + $invalidProperties[] = "invalid value for 'subledgerId', the character length must be smaller than or equal to 64."; + } + + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the transaction that adds loyalty points. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created Date and time the loyalty points were added. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets programId + * + * @return int + */ + public function getProgramId() + { + return $this->container['programId']; + } + + /** + * Sets programId + * + * @param int $programId ID of the loyalty program. + * + * @return $this + */ + public function setProgramId($programId) + { + $this->container['programId'] = $programId; + + return $this; + } + + /** + * Gets customerSessionId + * + * @return string|null + */ + public function getCustomerSessionId() + { + return $this->container['customerSessionId']; + } + + /** + * Sets customerSessionId + * + * @param string|null $customerSessionId ID of the customer session where points were added. + * + * @return $this + */ + public function setCustomerSessionId($customerSessionId) + { + if (!is_null($customerSessionId) && (mb_strlen($customerSessionId) > 255)) { + throw new \InvalidArgumentException('invalid length for $customerSessionId when calling LedgerPointsEntryIntegrationAPI., must be smaller than or equal to 255.'); + } + + $this->container['customerSessionId'] = $customerSessionId; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name or reason of the transaction that adds loyalty points. + * + * @return $this + */ + public function setName($name) + { + if ((mb_strlen($name) > 255)) { + throw new \InvalidArgumentException('invalid length for $name when calling LedgerPointsEntryIntegrationAPI., must be smaller than or equal to 255.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets startDate + * + * @return string + */ + public function getStartDate() + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param string $startDate When points become active. Possible values: - `immediate`: Points are active immediately. - `timestamp value`: Points become active at a given date and time. + * + * @return $this + */ + public function setStartDate($startDate) + { + if ((mb_strlen($startDate) > 64)) { + throw new \InvalidArgumentException('invalid length for $startDate when calling LedgerPointsEntryIntegrationAPI., must be smaller than or equal to 64.'); + } + + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets expiryDate + * + * @return string + */ + public function getExpiryDate() + { + return $this->container['expiryDate']; + } + + /** + * Sets expiryDate + * + * @param string $expiryDate Date when points expire. Possible values are: - `unlimited`: Points have no expiration date. - `timestamp value`: Points expire on the given date and time. + * + * @return $this + */ + public function setExpiryDate($expiryDate) + { + $this->container['expiryDate'] = $expiryDate; + + return $this; + } + + /** + * Gets subledgerId + * + * @return string + */ + public function getSubledgerId() + { + return $this->container['subledgerId']; + } + + /** + * Sets subledgerId + * + * @param string $subledgerId ID of the subledger. + * + * @return $this + */ + public function setSubledgerId($subledgerId) + { + if ((mb_strlen($subledgerId) > 64)) { + throw new \InvalidArgumentException('invalid length for $subledgerId when calling LedgerPointsEntryIntegrationAPI., must be smaller than or equal to 64.'); + } + + $this->container['subledgerId'] = $subledgerId; + + return $this; + } + + /** + * Gets amount + * + * @return float + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param float $amount Amount of loyalty points added in the transaction. + * + * @return $this + */ + public function setAmount($amount) + { + $this->container['amount'] = $amount; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Loyalty.php b/lib/Model/Loyalty.php index 1323c0fa..e2b2dcd3 100644 --- a/lib/Model/Loyalty.php +++ b/lib/Model/Loyalty.php @@ -36,7 +36,7 @@ * Loyalty Class Doc Comment * * @category Class - * @description Customer specific information about loyalty points. + * @description Customer-specific information about loyalty points. * @package TalonOne\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech diff --git a/lib/Model/LoyaltyProgram.php b/lib/Model/LoyaltyProgram.php index 07cdfae7..0a59dc86 100644 --- a/lib/Model/LoyaltyProgram.php +++ b/lib/Model/LoyaltyProgram.php @@ -68,11 +68,15 @@ class LoyaltyProgram implements ModelInterface, ArrayAccess 'allowSubledger' => 'bool', 'usersPerCardLimit' => 'int', 'sandbox' => 'bool', + 'tiersExpireIn' => 'string', + 'tiersDowngradePolicy' => 'string', 'accountID' => 'int', 'name' => 'string', 'tiers' => '\TalonOne\Client\Model\LoyaltyTier[]', 'timezone' => 'string', - 'cardBased' => 'bool' + 'cardBased' => 'bool', + 'canUpdateTiers' => 'bool', + 'canUpgradeToAdvancedTiers' => 'bool' ]; /** @@ -91,11 +95,15 @@ class LoyaltyProgram implements ModelInterface, ArrayAccess 'allowSubledger' => null, 'usersPerCardLimit' => null, 'sandbox' => null, + 'tiersExpireIn' => null, + 'tiersDowngradePolicy' => null, 'accountID' => null, 'name' => null, 'tiers' => null, 'timezone' => null, - 'cardBased' => null + 'cardBased' => null, + 'canUpdateTiers' => null, + 'canUpgradeToAdvancedTiers' => null ]; /** @@ -135,11 +143,15 @@ public static function openAPIFormats() 'allowSubledger' => 'allowSubledger', 'usersPerCardLimit' => 'usersPerCardLimit', 'sandbox' => 'sandbox', + 'tiersExpireIn' => 'tiersExpireIn', + 'tiersDowngradePolicy' => 'tiersDowngradePolicy', 'accountID' => 'accountID', 'name' => 'name', 'tiers' => 'tiers', 'timezone' => 'timezone', - 'cardBased' => 'cardBased' + 'cardBased' => 'cardBased', + 'canUpdateTiers' => 'canUpdateTiers', + 'canUpgradeToAdvancedTiers' => 'canUpgradeToAdvancedTiers' ]; /** @@ -158,11 +170,15 @@ public static function openAPIFormats() 'allowSubledger' => 'setAllowSubledger', 'usersPerCardLimit' => 'setUsersPerCardLimit', 'sandbox' => 'setSandbox', + 'tiersExpireIn' => 'setTiersExpireIn', + 'tiersDowngradePolicy' => 'setTiersDowngradePolicy', 'accountID' => 'setAccountID', 'name' => 'setName', 'tiers' => 'setTiers', 'timezone' => 'setTimezone', - 'cardBased' => 'setCardBased' + 'cardBased' => 'setCardBased', + 'canUpdateTiers' => 'setCanUpdateTiers', + 'canUpgradeToAdvancedTiers' => 'setCanUpgradeToAdvancedTiers' ]; /** @@ -181,11 +197,15 @@ public static function openAPIFormats() 'allowSubledger' => 'getAllowSubledger', 'usersPerCardLimit' => 'getUsersPerCardLimit', 'sandbox' => 'getSandbox', + 'tiersExpireIn' => 'getTiersExpireIn', + 'tiersDowngradePolicy' => 'getTiersDowngradePolicy', 'accountID' => 'getAccountID', 'name' => 'getName', 'tiers' => 'getTiers', 'timezone' => 'getTimezone', - 'cardBased' => 'getCardBased' + 'cardBased' => 'getCardBased', + 'canUpdateTiers' => 'getCanUpdateTiers', + 'canUpgradeToAdvancedTiers' => 'getCanUpgradeToAdvancedTiers' ]; /** @@ -229,9 +249,24 @@ public function getModelName() return self::$openAPIModelName; } + const TIERS_DOWNGRADE_POLICY_ONE_DOWN = 'one_down'; + const TIERS_DOWNGRADE_POLICY_BALANCE_BASED = 'balance_based'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTiersDowngradePolicyAllowableValues() + { + return [ + self::TIERS_DOWNGRADE_POLICY_ONE_DOWN, + self::TIERS_DOWNGRADE_POLICY_BALANCE_BASED, + ]; + } + /** * Associative array for storing property values @@ -258,11 +293,15 @@ public function __construct(array $data = null) $this->container['allowSubledger'] = isset($data['allowSubledger']) ? $data['allowSubledger'] : null; $this->container['usersPerCardLimit'] = isset($data['usersPerCardLimit']) ? $data['usersPerCardLimit'] : null; $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; + $this->container['tiersExpireIn'] = isset($data['tiersExpireIn']) ? $data['tiersExpireIn'] : null; + $this->container['tiersDowngradePolicy'] = isset($data['tiersDowngradePolicy']) ? $data['tiersDowngradePolicy'] : null; $this->container['accountID'] = isset($data['accountID']) ? $data['accountID'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['tiers'] = isset($data['tiers']) ? $data['tiers'] : null; $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; $this->container['cardBased'] = isset($data['cardBased']) ? $data['cardBased'] : false; + $this->container['canUpdateTiers'] = isset($data['canUpdateTiers']) ? $data['canUpdateTiers'] : false; + $this->container['canUpgradeToAdvancedTiers'] = isset($data['canUpgradeToAdvancedTiers']) ? $data['canUpgradeToAdvancedTiers'] : false; } /** @@ -305,6 +344,14 @@ public function listInvalidProperties() if ($this->container['sandbox'] === null) { $invalidProperties[] = "'sandbox' can't be null"; } + $allowedValues = $this->getTiersDowngradePolicyAllowableValues(); + if (!is_null($this->container['tiersDowngradePolicy']) && !in_array($this->container['tiersDowngradePolicy'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'tiersDowngradePolicy', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + if ($this->container['accountID'] === null) { $invalidProperties[] = "'accountID' can't be null"; } @@ -581,6 +628,63 @@ public function setSandbox($sandbox) return $this; } + /** + * Gets tiersExpireIn + * + * @return string|null + */ + public function getTiersExpireIn() + { + return $this->container['tiersExpireIn']; + } + + /** + * Sets tiersExpireIn + * + * @param string|null $tiersExpireIn The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. + * + * @return $this + */ + public function setTiersExpireIn($tiersExpireIn) + { + $this->container['tiersExpireIn'] = $tiersExpireIn; + + return $this; + } + + /** + * Gets tiersDowngradePolicy + * + * @return string|null + */ + public function getTiersDowngradePolicy() + { + return $this->container['tiersDowngradePolicy']; + } + + /** + * Sets tiersDowngradePolicy + * + * @param string|null $tiersDowngradePolicy Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. + * + * @return $this + */ + public function setTiersDowngradePolicy($tiersDowngradePolicy) + { + $allowedValues = $this->getTiersDowngradePolicyAllowableValues(); + if (!is_null($tiersDowngradePolicy) && !in_array($tiersDowngradePolicy, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'tiersDowngradePolicy', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['tiersDowngradePolicy'] = $tiersDowngradePolicy; + + return $this; + } + /** * Gets accountID * @@ -705,6 +809,54 @@ public function setCardBased($cardBased) return $this; } + + /** + * Gets canUpdateTiers + * + * @return bool|null + */ + public function getCanUpdateTiers() + { + return $this->container['canUpdateTiers']; + } + + /** + * Sets canUpdateTiers + * + * @param bool|null $canUpdateTiers `True` if the tier definitions can be updated. + * + * @return $this + */ + public function setCanUpdateTiers($canUpdateTiers) + { + $this->container['canUpdateTiers'] = $canUpdateTiers; + + return $this; + } + + /** + * Gets canUpgradeToAdvancedTiers + * + * @return bool|null + */ + public function getCanUpgradeToAdvancedTiers() + { + return $this->container['canUpgradeToAdvancedTiers']; + } + + /** + * Sets canUpgradeToAdvancedTiers + * + * @param bool|null $canUpgradeToAdvancedTiers `True` if the program can be upgraded to use the `tiersExpireIn` and `tiersDowngradePolicy` properties. + * + * @return $this + */ + public function setCanUpgradeToAdvancedTiers($canUpgradeToAdvancedTiers) + { + $this->container['canUpgradeToAdvancedTiers'] = $canUpgradeToAdvancedTiers; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LoyaltyProgramLedgers.php b/lib/Model/LoyaltyProgramLedgers.php index 7a2aa768..1683aee2 100644 --- a/lib/Model/LoyaltyProgramLedgers.php +++ b/lib/Model/LoyaltyProgramLedgers.php @@ -36,7 +36,7 @@ * LoyaltyProgramLedgers Class Doc Comment * * @category Class - * @description Customer specific information about loyalty points. + * @description Customer-specific information about loyalty points. * @package TalonOne\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech diff --git a/lib/Model/LoyaltyProgramSubledgers.php b/lib/Model/LoyaltyProgramSubledgers.php new file mode 100644 index 00000000..da7ae6e6 --- /dev/null +++ b/lib/Model/LoyaltyProgramSubledgers.php @@ -0,0 +1,345 @@ + 'int', + 'subledgerIds' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'loyaltyProgramId' => null, + 'subledgerIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'loyaltyProgramId' => 'loyaltyProgramId', + 'subledgerIds' => 'subledgerIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'loyaltyProgramId' => 'setLoyaltyProgramId', + 'subledgerIds' => 'setSubledgerIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'loyaltyProgramId' => 'getLoyaltyProgramId', + 'subledgerIds' => 'getSubledgerIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['loyaltyProgramId'] = isset($data['loyaltyProgramId']) ? $data['loyaltyProgramId'] : null; + $this->container['subledgerIds'] = isset($data['subledgerIds']) ? $data['subledgerIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['loyaltyProgramId'] === null) { + $invalidProperties[] = "'loyaltyProgramId' can't be null"; + } + if ($this->container['subledgerIds'] === null) { + $invalidProperties[] = "'subledgerIds' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets loyaltyProgramId + * + * @return int + */ + public function getLoyaltyProgramId() + { + return $this->container['loyaltyProgramId']; + } + + /** + * Sets loyaltyProgramId + * + * @param int $loyaltyProgramId The internal ID of the loyalty program. + * + * @return $this + */ + public function setLoyaltyProgramId($loyaltyProgramId) + { + $this->container['loyaltyProgramId'] = $loyaltyProgramId; + + return $this; + } + + /** + * Gets subledgerIds + * + * @return string[] + */ + public function getSubledgerIds() + { + return $this->container['subledgerIds']; + } + + /** + * Sets subledgerIds + * + * @param string[] $subledgerIds The list of subledger IDs. + * + * @return $this + */ + public function setSubledgerIds($subledgerIds) + { + $this->container['subledgerIds'] = $subledgerIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LoyaltyProgramTransaction.php b/lib/Model/LoyaltyProgramTransaction.php index bfc97d44..fc65d356 100644 --- a/lib/Model/LoyaltyProgramTransaction.php +++ b/lib/Model/LoyaltyProgramTransaction.php @@ -740,7 +740,7 @@ public function getUserId() /** * Sets userId * - * @param int|null $userId ID of the user who manually added or deducted points. Applies only for manual transactions. + * @param int|null $userId ID of the user who manually added or deducted points. Applies only to manual transactions. * * @return $this */ @@ -764,7 +764,7 @@ public function getUserEmail() /** * Sets userEmail * - * @param string|null $userEmail The email of the user who manually added or deducted points. Applies only for manual transactions. + * @param string|null $userEmail The email of the Campaign Manager account that manually added or deducted points. Applies only to manual transactions. * * @return $this */ diff --git a/lib/Model/NewAdditionalCost.php b/lib/Model/NewAdditionalCost.php index 1b78dbc9..61145103 100644 --- a/lib/Model/NewAdditionalCost.php +++ b/lib/Model/NewAdditionalCost.php @@ -234,8 +234,8 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if (!preg_match("/^[A-Za-z](\\w|\\s)*$/", $this->container['name'])) { - $invalidProperties[] = "invalid value for 'name', must be conform to the pattern /^[A-Za-z](\\w|\\s)*$/."; + if (!preg_match("/^[A-Za-z]\\w*$/", $this->container['name'])) { + $invalidProperties[] = "invalid value for 'name', must be conform to the pattern /^[A-Za-z]\\w*$/."; } if ($this->container['title'] === null) { @@ -291,8 +291,8 @@ public function getName() public function setName($name) { - if ((!preg_match("/^[A-Za-z](\\w|\\s)*$/", $name))) { - throw new \InvalidArgumentException("invalid value for $name when calling NewAdditionalCost., must conform to the pattern /^[A-Za-z](\\w|\\s)*$/."); + if ((!preg_match("/^[A-Za-z]\\w*$/", $name))) { + throw new \InvalidArgumentException("invalid value for $name when calling NewAdditionalCost., must conform to the pattern /^[A-Za-z]\\w*$/."); } $this->container['name'] = $name; diff --git a/lib/Model/NewApplication.php b/lib/Model/NewApplication.php index 8f796c8c..dc475f6d 100644 --- a/lib/Model/NewApplication.php +++ b/lib/Model/NewApplication.php @@ -36,7 +36,6 @@ * NewApplication Class Doc Comment * * @category Class - * @description * @package TalonOne\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -65,8 +64,6 @@ class NewApplication implements ModelInterface, ArrayAccess 'caseSensitivity' => 'string', 'attributes' => 'object', 'limits' => '\TalonOne\Client\Model\LimitConfig[]', - 'campaignPriority' => 'string', - 'exclusiveCampaignsStrategy' => 'string', 'defaultDiscountScope' => 'string', 'enableCascadingDiscounts' => 'bool', 'enableFlattenedCartItems' => 'bool', @@ -90,8 +87,6 @@ class NewApplication implements ModelInterface, ArrayAccess 'caseSensitivity' => null, 'attributes' => null, 'limits' => null, - 'campaignPriority' => null, - 'exclusiveCampaignsStrategy' => null, 'defaultDiscountScope' => null, 'enableCascadingDiscounts' => null, 'enableFlattenedCartItems' => null, @@ -136,8 +131,6 @@ public static function openAPIFormats() 'caseSensitivity' => 'caseSensitivity', 'attributes' => 'attributes', 'limits' => 'limits', - 'campaignPriority' => 'campaignPriority', - 'exclusiveCampaignsStrategy' => 'exclusiveCampaignsStrategy', 'defaultDiscountScope' => 'defaultDiscountScope', 'enableCascadingDiscounts' => 'enableCascadingDiscounts', 'enableFlattenedCartItems' => 'enableFlattenedCartItems', @@ -161,8 +154,6 @@ public static function openAPIFormats() 'caseSensitivity' => 'setCaseSensitivity', 'attributes' => 'setAttributes', 'limits' => 'setLimits', - 'campaignPriority' => 'setCampaignPriority', - 'exclusiveCampaignsStrategy' => 'setExclusiveCampaignsStrategy', 'defaultDiscountScope' => 'setDefaultDiscountScope', 'enableCascadingDiscounts' => 'setEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'setEnableFlattenedCartItems', @@ -186,8 +177,6 @@ public static function openAPIFormats() 'caseSensitivity' => 'getCaseSensitivity', 'attributes' => 'getAttributes', 'limits' => 'getLimits', - 'campaignPriority' => 'getCampaignPriority', - 'exclusiveCampaignsStrategy' => 'getExclusiveCampaignsStrategy', 'defaultDiscountScope' => 'getDefaultDiscountScope', 'enableCascadingDiscounts' => 'getEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'getEnableFlattenedCartItems', @@ -242,12 +231,6 @@ public function getModelName() const CASE_SENSITIVITY_SENSITIVE = 'sensitive'; const CASE_SENSITIVITY_INSENSITIVE_UPPERCASE = 'insensitive-uppercase'; const CASE_SENSITIVITY_INSENSITIVE_LOWERCASE = 'insensitive-lowercase'; - const CAMPAIGN_PRIORITY_UNIVERSAL = 'universal'; - const CAMPAIGN_PRIORITY_STACKABLE = 'stackable'; - const CAMPAIGN_PRIORITY_EXCLUSIVE = 'exclusive'; - const EXCLUSIVE_CAMPAIGNS_STRATEGY_LIST_ORDER = 'listOrder'; - const EXCLUSIVE_CAMPAIGNS_STRATEGY_LOWEST_DISCOUNT = 'lowestDiscount'; - const EXCLUSIVE_CAMPAIGNS_STRATEGY_HIGHEST_DISCOUNT = 'highestDiscount'; const DEFAULT_DISCOUNT_SCOPE_SESSION_TOTAL = 'sessionTotal'; const DEFAULT_DISCOUNT_SCOPE_CART_ITEMS = 'cartItems'; const DEFAULT_DISCOUNT_SCOPE_ADDITIONAL_COSTS = 'additionalCosts'; @@ -271,34 +254,6 @@ public function getCaseSensitivityAllowableValues() ]; } - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getCampaignPriorityAllowableValues() - { - return [ - self::CAMPAIGN_PRIORITY_UNIVERSAL, - self::CAMPAIGN_PRIORITY_STACKABLE, - self::CAMPAIGN_PRIORITY_EXCLUSIVE, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getExclusiveCampaignsStrategyAllowableValues() - { - return [ - self::EXCLUSIVE_CAMPAIGNS_STRATEGY_LIST_ORDER, - self::EXCLUSIVE_CAMPAIGNS_STRATEGY_LOWEST_DISCOUNT, - self::EXCLUSIVE_CAMPAIGNS_STRATEGY_HIGHEST_DISCOUNT, - ]; - } - /** * Gets allowable values of the enum * @@ -350,8 +305,6 @@ public function __construct(array $data = null) $this->container['caseSensitivity'] = isset($data['caseSensitivity']) ? $data['caseSensitivity'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; - $this->container['campaignPriority'] = isset($data['campaignPriority']) ? $data['campaignPriority'] : 'universal'; - $this->container['exclusiveCampaignsStrategy'] = isset($data['exclusiveCampaignsStrategy']) ? $data['exclusiveCampaignsStrategy'] : 'listOrder'; $this->container['defaultDiscountScope'] = isset($data['defaultDiscountScope']) ? $data['defaultDiscountScope'] : null; $this->container['enableCascadingDiscounts'] = isset($data['enableCascadingDiscounts']) ? $data['enableCascadingDiscounts'] : null; $this->container['enableFlattenedCartItems'] = isset($data['enableFlattenedCartItems']) ? $data['enableFlattenedCartItems'] : null; @@ -400,22 +353,6 @@ public function listInvalidProperties() ); } - $allowedValues = $this->getCampaignPriorityAllowableValues(); - if (!is_null($this->container['campaignPriority']) && !in_array($this->container['campaignPriority'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'campaignPriority', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getExclusiveCampaignsStrategyAllowableValues(); - if (!is_null($this->container['exclusiveCampaignsStrategy']) && !in_array($this->container['exclusiveCampaignsStrategy'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'exclusiveCampaignsStrategy', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - $allowedValues = $this->getDefaultDiscountScopeAllowableValues(); if (!is_null($this->container['defaultDiscountScope']) && !in_array($this->container['defaultDiscountScope'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -643,72 +580,6 @@ public function setLimits($limits) return $this; } - /** - * Gets campaignPriority - * - * @return string|null - */ - public function getCampaignPriority() - { - return $this->container['campaignPriority']; - } - - /** - * Sets campaignPriority - * - * @param string|null $campaignPriority Default [priority](https://docs.talon.one/docs/product/applications/setting-up-campaign-priorities) for campaigns created in this Application. - * - * @return $this - */ - public function setCampaignPriority($campaignPriority) - { - $allowedValues = $this->getCampaignPriorityAllowableValues(); - if (!is_null($campaignPriority) && !in_array($campaignPriority, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'campaignPriority', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['campaignPriority'] = $campaignPriority; - - return $this; - } - - /** - * Gets exclusiveCampaignsStrategy - * - * @return string|null - */ - public function getExclusiveCampaignsStrategy() - { - return $this->container['exclusiveCampaignsStrategy']; - } - - /** - * Sets exclusiveCampaignsStrategy - * - * @param string|null $exclusiveCampaignsStrategy The strategy used when choosing exclusive campaigns for evaluation. - * - * @return $this - */ - public function setExclusiveCampaignsStrategy($exclusiveCampaignsStrategy) - { - $allowedValues = $this->getExclusiveCampaignsStrategyAllowableValues(); - if (!is_null($exclusiveCampaignsStrategy) && !in_array($exclusiveCampaignsStrategy, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'exclusiveCampaignsStrategy', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['exclusiveCampaignsStrategy'] = $exclusiveCampaignsStrategy; - - return $this; - } - /** * Gets defaultDiscountScope * @@ -779,7 +650,7 @@ public function getEnableFlattenedCartItems() /** * Sets enableFlattenedCartItems * - * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). + * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. * * @return $this */ diff --git a/lib/Model/NewAttribute.php b/lib/Model/NewAttribute.php index b2aa4808..126f9cbd 100644 --- a/lib/Model/NewAttribute.php +++ b/lib/Model/NewAttribute.php @@ -229,6 +229,7 @@ public function getModelName() const ENTITY_EVENT = 'Event'; const ENTITY_GIVEAWAY = 'Giveaway'; const ENTITY_REFERRAL = 'Referral'; + const ENTITY_STORE = 'Store'; const TYPE_STRING = 'string'; const TYPE_NUMBER = 'number'; const TYPE_BOOLEAN = 'boolean'; @@ -261,6 +262,7 @@ public function getEntityAllowableValues() self::ENTITY_EVENT, self::ENTITY_GIVEAWAY, self::ENTITY_REFERRAL, + self::ENTITY_STORE, ]; } diff --git a/lib/Model/NewBaseNotification.php b/lib/Model/NewBaseNotification.php index 0d2635e7..84fb3d5e 100644 --- a/lib/Model/NewBaseNotification.php +++ b/lib/Model/NewBaseNotification.php @@ -59,6 +59,7 @@ class NewBaseNotification implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'policy' => 'object', + 'enabled' => 'bool', 'webhook' => '\TalonOne\Client\Model\NewNotificationWebhook' ]; @@ -69,6 +70,7 @@ class NewBaseNotification implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'policy' => null, + 'enabled' => null, 'webhook' => null ]; @@ -100,6 +102,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'policy' => 'policy', + 'enabled' => 'enabled', 'webhook' => 'webhook' ]; @@ -110,6 +113,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'policy' => 'setPolicy', + 'enabled' => 'setEnabled', 'webhook' => 'setWebhook' ]; @@ -120,6 +124,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'policy' => 'getPolicy', + 'enabled' => 'getEnabled', 'webhook' => 'getWebhook' ]; @@ -184,6 +189,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['policy'] = isset($data['policy']) ? $data['policy'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : true; $this->container['webhook'] = isset($data['webhook']) ? $data['webhook'] : null; } @@ -241,6 +247,30 @@ public function setPolicy($policy) return $this; } + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled Indicates whether the notification is activated. + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + /** * Gets webhook * diff --git a/lib/Model/NewCampaign.php b/lib/Model/NewCampaign.php index 091a3926..c27f55bd 100644 --- a/lib/Model/NewCampaign.php +++ b/lib/Model/NewCampaign.php @@ -36,6 +36,7 @@ * NewCampaign Class Doc Comment * * @category Class + * @description * @package TalonOne\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -69,7 +70,10 @@ class NewCampaign implements ModelInterface, ArrayAccess 'couponSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', 'referralSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', 'limits' => '\TalonOne\Client\Model\LimitConfig[]', - 'campaignGroups' => 'int[]' + 'campaignGroups' => 'int[]', + 'evaluationGroupId' => 'int', + 'type' => 'string', + 'linkedStoreIds' => 'int[]' ]; /** @@ -90,7 +94,10 @@ class NewCampaign implements ModelInterface, ArrayAccess 'couponSettings' => null, 'referralSettings' => null, 'limits' => null, - 'campaignGroups' => null + 'campaignGroups' => null, + 'evaluationGroupId' => null, + 'type' => null, + 'linkedStoreIds' => null ]; /** @@ -132,7 +139,10 @@ public static function openAPIFormats() 'couponSettings' => 'couponSettings', 'referralSettings' => 'referralSettings', 'limits' => 'limits', - 'campaignGroups' => 'campaignGroups' + 'campaignGroups' => 'campaignGroups', + 'evaluationGroupId' => 'evaluationGroupId', + 'type' => 'type', + 'linkedStoreIds' => 'linkedStoreIds' ]; /** @@ -153,7 +163,10 @@ public static function openAPIFormats() 'couponSettings' => 'setCouponSettings', 'referralSettings' => 'setReferralSettings', 'limits' => 'setLimits', - 'campaignGroups' => 'setCampaignGroups' + 'campaignGroups' => 'setCampaignGroups', + 'evaluationGroupId' => 'setEvaluationGroupId', + 'type' => 'setType', + 'linkedStoreIds' => 'setLinkedStoreIds' ]; /** @@ -174,7 +187,10 @@ public static function openAPIFormats() 'couponSettings' => 'getCouponSettings', 'referralSettings' => 'getReferralSettings', 'limits' => 'getLimits', - 'campaignGroups' => 'getCampaignGroups' + 'campaignGroups' => 'getCampaignGroups', + 'evaluationGroupId' => 'getEvaluationGroupId', + 'type' => 'getType', + 'linkedStoreIds' => 'getLinkedStoreIds' ]; /** @@ -226,6 +242,8 @@ public function getModelName() const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; const FEATURES_STRIKETHROUGH = 'strikethrough'; + const TYPE_CART_ITEM = 'cartItem'; + const TYPE_ADVANCED = 'advanced'; @@ -259,6 +277,19 @@ public function getFeaturesAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CART_ITEM, + self::TYPE_ADVANCED, + ]; + } + /** * Associative array for storing property values @@ -288,6 +319,9 @@ public function __construct(array $data = null) $this->container['referralSettings'] = isset($data['referralSettings']) ? $data['referralSettings'] : null; $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; $this->container['campaignGroups'] = isset($data['campaignGroups']) ? $data['campaignGroups'] : null; + $this->container['evaluationGroupId'] = isset($data['evaluationGroupId']) ? $data['evaluationGroupId'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : 'advanced'; + $this->container['linkedStoreIds'] = isset($data['linkedStoreIds']) ? $data['linkedStoreIds'] : null; } /** @@ -326,6 +360,14 @@ public function listInvalidProperties() if ($this->container['limits'] === null) { $invalidProperties[] = "'limits' can't be null"; } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -431,7 +473,7 @@ public function getEndTime() /** * Sets endTime * - * @param \DateTime|null $endTime Timestamp the campaign will become inactive. + * @param \DateTime|null $endTime Timestamp when the campaign will become inactive. * * @return $this */ @@ -675,6 +717,87 @@ public function setCampaignGroups($campaignGroups) return $this; } + + /** + * Gets evaluationGroupId + * + * @return int|null + */ + public function getEvaluationGroupId() + { + return $this->container['evaluationGroupId']; + } + + /** + * Sets evaluationGroupId + * + * @param int|null $evaluationGroupId The ID of the campaign evaluation group the campaign belongs to. + * + * @return $this + */ + public function setEvaluationGroupId($evaluationGroupId) + { + $this->container['evaluationGroupId'] = $evaluationGroupId; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets linkedStoreIds + * + * @return int[]|null + */ + public function getLinkedStoreIds() + { + return $this->container['linkedStoreIds']; + } + + /** + * Sets linkedStoreIds + * + * @param int[]|null $linkedStoreIds A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. + * + * @return $this + */ + public function setLinkedStoreIds($linkedStoreIds) + { + $this->container['linkedStoreIds'] = $linkedStoreIds; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/NewCampaignEvaluationGroup.php b/lib/Model/NewCampaignEvaluationGroup.php new file mode 100644 index 00000000..8b195b59 --- /dev/null +++ b/lib/Model/NewCampaignEvaluationGroup.php @@ -0,0 +1,550 @@ + 'string', + 'parentId' => 'int', + 'description' => 'string', + 'evaluationMode' => 'string', + 'evaluationScope' => 'string', + 'locked' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'parentId' => null, + 'description' => null, + 'evaluationMode' => null, + 'evaluationScope' => null, + 'locked' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'parentId' => 'parentId', + 'description' => 'description', + 'evaluationMode' => 'evaluationMode', + 'evaluationScope' => 'evaluationScope', + 'locked' => 'locked' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'parentId' => 'setParentId', + 'description' => 'setDescription', + 'evaluationMode' => 'setEvaluationMode', + 'evaluationScope' => 'setEvaluationScope', + 'locked' => 'setLocked' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'parentId' => 'getParentId', + 'description' => 'getDescription', + 'evaluationMode' => 'getEvaluationMode', + 'evaluationScope' => 'getEvaluationScope', + 'locked' => 'getLocked' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const EVALUATION_MODE_STACKABLE = 'stackable'; + const EVALUATION_MODE_LIST_ORDER = 'listOrder'; + const EVALUATION_MODE_LOWEST_DISCOUNT = 'lowestDiscount'; + const EVALUATION_MODE_HIGHEST_DISCOUNT = 'highestDiscount'; + const EVALUATION_SCOPE_CART_ITEM = 'cartItem'; + const EVALUATION_SCOPE_SESSION = 'session'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEvaluationModeAllowableValues() + { + return [ + self::EVALUATION_MODE_STACKABLE, + self::EVALUATION_MODE_LIST_ORDER, + self::EVALUATION_MODE_LOWEST_DISCOUNT, + self::EVALUATION_MODE_HIGHEST_DISCOUNT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEvaluationScopeAllowableValues() + { + return [ + self::EVALUATION_SCOPE_CART_ITEM, + self::EVALUATION_SCOPE_SESSION, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['evaluationMode'] = isset($data['evaluationMode']) ? $data['evaluationMode'] : null; + $this->container['evaluationScope'] = isset($data['evaluationScope']) ? $data['evaluationScope'] : null; + $this->container['locked'] = isset($data['locked']) ? $data['locked'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['parentId'] === null) { + $invalidProperties[] = "'parentId' can't be null"; + } + if (($this->container['parentId'] < 1)) { + $invalidProperties[] = "invalid value for 'parentId', must be bigger than or equal to 1."; + } + + if ($this->container['evaluationMode'] === null) { + $invalidProperties[] = "'evaluationMode' can't be null"; + } + $allowedValues = $this->getEvaluationModeAllowableValues(); + if (!is_null($this->container['evaluationMode']) && !in_array($this->container['evaluationMode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'evaluationMode', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['evaluationScope'] === null) { + $invalidProperties[] = "'evaluationScope' can't be null"; + } + $allowedValues = $this->getEvaluationScopeAllowableValues(); + if (!is_null($this->container['evaluationScope']) && !in_array($this->container['evaluationScope'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'evaluationScope', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['locked'] === null) { + $invalidProperties[] = "'locked' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the campaign evaluation group. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets parentId + * + * @return int + */ + public function getParentId() + { + return $this->container['parentId']; + } + + /** + * Sets parentId + * + * @param int $parentId The ID of the parent group that contains the campaign evaluation group. + * + * @return $this + */ + public function setParentId($parentId) + { + + if (($parentId < 1)) { + throw new \InvalidArgumentException('invalid value for $parentId when calling NewCampaignEvaluationGroup., must be bigger than or equal to 1.'); + } + + $this->container['parentId'] = $parentId; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A description of the campaign evaluation group. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets evaluationMode + * + * @return string + */ + public function getEvaluationMode() + { + return $this->container['evaluationMode']; + } + + /** + * Sets evaluationMode + * + * @param string $evaluationMode The mode by which campaigns in the campaign evaluation group are evaluated. + * + * @return $this + */ + public function setEvaluationMode($evaluationMode) + { + $allowedValues = $this->getEvaluationModeAllowableValues(); + if (!in_array($evaluationMode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'evaluationMode', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['evaluationMode'] = $evaluationMode; + + return $this; + } + + /** + * Gets evaluationScope + * + * @return string + */ + public function getEvaluationScope() + { + return $this->container['evaluationScope']; + } + + /** + * Sets evaluationScope + * + * @param string $evaluationScope The evaluation scope of the campaign evaluation group. + * + * @return $this + */ + public function setEvaluationScope($evaluationScope) + { + $allowedValues = $this->getEvaluationScopeAllowableValues(); + if (!in_array($evaluationScope, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'evaluationScope', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['evaluationScope'] = $evaluationScope; + + return $this; + } + + /** + * Gets locked + * + * @return bool + */ + public function getLocked() + { + return $this->container['locked']; + } + + /** + * Sets locked + * + * @param bool $locked An indicator of whether the campaign evaluation group is locked for modification. + * + * @return $this + */ + public function setLocked($locked) + { + $this->container['locked'] = $locked; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/NewCampaignGroup.php b/lib/Model/NewCampaignGroup.php index 158fb6f8..a9f62541 100644 --- a/lib/Model/NewCampaignGroup.php +++ b/lib/Model/NewCampaignGroup.php @@ -242,7 +242,7 @@ public function getName() /** * Sets name * - * @param string $name The name of this campaign group. + * @param string $name The name of this campaign access group. * * @return $this */ @@ -271,7 +271,7 @@ public function getDescription() /** * Sets description * - * @param string|null $description A longer description of the campaign group. + * @param string|null $description A longer description of the campaign access group. * * @return $this */ @@ -295,7 +295,7 @@ public function getSubscribedApplicationsIds() /** * Sets subscribedApplicationsIds * - * @param int[]|null $subscribedApplicationsIds A list of the IDs of the applications that this campaign group is enabled for. + * @param int[]|null $subscribedApplicationsIds A list of IDs of the Applications that this campaign access group is enabled for. * * @return $this */ @@ -319,7 +319,7 @@ public function getCampaignIds() /** * Sets campaignIds * - * @param int[]|null $campaignIds A list of the IDs of the campaigns that this campaign group owns. + * @param int[]|null $campaignIds A list of IDs of the campaigns that are part of the campaign access group. * * @return $this */ diff --git a/lib/Model/NewCampaignTemplate.php b/lib/Model/NewCampaignTemplate.php index 135d6877..24e74844 100644 --- a/lib/Model/NewCampaignTemplate.php +++ b/lib/Model/NewCampaignTemplate.php @@ -70,7 +70,8 @@ class NewCampaignTemplate implements ModelInterface, ArrayAccess 'limits' => '\TalonOne\Client\Model\TemplateLimitConfig[]', 'templateParams' => '\TalonOne\Client\Model\CampaignTemplateParams[]', 'campaignCollections' => '\TalonOne\Client\Model\CampaignTemplateCollection[]', - 'defaultCampaignGroupId' => 'int' + 'defaultCampaignGroupId' => 'int', + 'campaignType' => 'string' ]; /** @@ -92,7 +93,8 @@ class NewCampaignTemplate implements ModelInterface, ArrayAccess 'limits' => null, 'templateParams' => null, 'campaignCollections' => null, - 'defaultCampaignGroupId' => null + 'defaultCampaignGroupId' => null, + 'campaignType' => null ]; /** @@ -135,7 +137,8 @@ public static function openAPIFormats() 'limits' => 'limits', 'templateParams' => 'templateParams', 'campaignCollections' => 'campaignCollections', - 'defaultCampaignGroupId' => 'defaultCampaignGroupId' + 'defaultCampaignGroupId' => 'defaultCampaignGroupId', + 'campaignType' => 'campaignType' ]; /** @@ -157,7 +160,8 @@ public static function openAPIFormats() 'limits' => 'setLimits', 'templateParams' => 'setTemplateParams', 'campaignCollections' => 'setCampaignCollections', - 'defaultCampaignGroupId' => 'setDefaultCampaignGroupId' + 'defaultCampaignGroupId' => 'setDefaultCampaignGroupId', + 'campaignType' => 'setCampaignType' ]; /** @@ -179,7 +183,8 @@ public static function openAPIFormats() 'limits' => 'getLimits', 'templateParams' => 'getTemplateParams', 'campaignCollections' => 'getCampaignCollections', - 'defaultCampaignGroupId' => 'getDefaultCampaignGroupId' + 'defaultCampaignGroupId' => 'getDefaultCampaignGroupId', + 'campaignType' => 'getCampaignType' ]; /** @@ -231,6 +236,8 @@ public function getModelName() const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; const FEATURES_STRIKETHROUGH = 'strikethrough'; + const CAMPAIGN_TYPE_CART_ITEM = 'cartItem'; + const CAMPAIGN_TYPE_ADVANCED = 'advanced'; @@ -264,6 +271,19 @@ public function getFeaturesAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCampaignTypeAllowableValues() + { + return [ + self::CAMPAIGN_TYPE_CART_ITEM, + self::CAMPAIGN_TYPE_ADVANCED, + ]; + } + /** * Associative array for storing property values @@ -294,6 +314,7 @@ public function __construct(array $data = null) $this->container['templateParams'] = isset($data['templateParams']) ? $data['templateParams'] : null; $this->container['campaignCollections'] = isset($data['campaignCollections']) ? $data['campaignCollections'] : null; $this->container['defaultCampaignGroupId'] = isset($data['defaultCampaignGroupId']) ? $data['defaultCampaignGroupId'] : null; + $this->container['campaignType'] = isset($data['campaignType']) ? $data['campaignType'] : 'advanced'; } /** @@ -329,6 +350,17 @@ public function listInvalidProperties() ); } + if ($this->container['campaignType'] === null) { + $invalidProperties[] = "'campaignType' can't be null"; + } + $allowedValues = $this->getCampaignTypeAllowableValues(); + if (!is_null($this->container['campaignType']) && !in_array($this->container['campaignType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'campaignType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -702,6 +734,39 @@ public function setDefaultCampaignGroupId($defaultCampaignGroupId) return $this; } + + /** + * Gets campaignType + * + * @return string + */ + public function getCampaignType() + { + return $this->container['campaignType']; + } + + /** + * Sets campaignType + * + * @param string $campaignType The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. + * + * @return $this + */ + public function setCampaignType($campaignType) + { + $allowedValues = $this->getCampaignTypeAllowableValues(); + if (!in_array($campaignType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'campaignType', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['campaignType'] = $campaignType; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/NewCoupons.php b/lib/Model/NewCoupons.php index 45475cfc..0f8255c2 100644 --- a/lib/Model/NewCoupons.php +++ b/lib/Model/NewCoupons.php @@ -70,7 +70,8 @@ class NewCoupons implements ModelInterface, ArrayAccess 'recipientIntegrationId' => 'string', 'validCharacters' => 'string[]', 'couponPattern' => 'string', - 'isReservationMandatory' => 'bool' + 'isReservationMandatory' => 'bool', + 'implicitlyReserved' => 'bool' ]; /** @@ -91,7 +92,8 @@ class NewCoupons implements ModelInterface, ArrayAccess 'recipientIntegrationId' => null, 'validCharacters' => null, 'couponPattern' => null, - 'isReservationMandatory' => null + 'isReservationMandatory' => null, + 'implicitlyReserved' => null ]; /** @@ -133,7 +135,8 @@ public static function openAPIFormats() 'recipientIntegrationId' => 'recipientIntegrationId', 'validCharacters' => 'validCharacters', 'couponPattern' => 'couponPattern', - 'isReservationMandatory' => 'isReservationMandatory' + 'isReservationMandatory' => 'isReservationMandatory', + 'implicitlyReserved' => 'implicitlyReserved' ]; /** @@ -154,7 +157,8 @@ public static function openAPIFormats() 'recipientIntegrationId' => 'setRecipientIntegrationId', 'validCharacters' => 'setValidCharacters', 'couponPattern' => 'setCouponPattern', - 'isReservationMandatory' => 'setIsReservationMandatory' + 'isReservationMandatory' => 'setIsReservationMandatory', + 'implicitlyReserved' => 'setImplicitlyReserved' ]; /** @@ -175,7 +179,8 @@ public static function openAPIFormats() 'recipientIntegrationId' => 'getRecipientIntegrationId', 'validCharacters' => 'getValidCharacters', 'couponPattern' => 'getCouponPattern', - 'isReservationMandatory' => 'getIsReservationMandatory' + 'isReservationMandatory' => 'getIsReservationMandatory', + 'implicitlyReserved' => 'getImplicitlyReserved' ]; /** @@ -251,6 +256,7 @@ public function __construct(array $data = null) $this->container['validCharacters'] = isset($data['validCharacters']) ? $data['validCharacters'] : null; $this->container['couponPattern'] = isset($data['couponPattern']) ? $data['couponPattern'] : null; $this->container['isReservationMandatory'] = isset($data['isReservationMandatory']) ? $data['isReservationMandatory'] : true; + $this->container['implicitlyReserved'] = isset($data['implicitlyReserved']) ? $data['implicitlyReserved'] : null; } /** @@ -665,6 +671,30 @@ public function setIsReservationMandatory($isReservationMandatory) return $this; } + + /** + * Gets implicitlyReserved + * + * @return bool|null + */ + public function getImplicitlyReserved() + { + return $this->container['implicitlyReserved']; + } + + /** + * Sets implicitlyReserved + * + * @param bool|null $implicitlyReserved An indication of whether the coupon is implicitly reserved for all customers. + * + * @return $this + */ + public function setImplicitlyReserved($implicitlyReserved) + { + $this->container['implicitlyReserved'] = $implicitlyReserved; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/NewCustomerSession.php b/lib/Model/NewCustomerSession.php index 4c07bd7b..93503109 100644 --- a/lib/Model/NewCustomerSession.php +++ b/lib/Model/NewCustomerSession.php @@ -375,7 +375,7 @@ public function getState() /** * Sets state * - * @param string|null $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). + * @param string|null $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). * * @return $this */ diff --git a/lib/Model/NewCustomerSessionV2.php b/lib/Model/NewCustomerSessionV2.php index 5700a6f0..f9827ee9 100644 --- a/lib/Model/NewCustomerSessionV2.php +++ b/lib/Model/NewCustomerSessionV2.php @@ -59,6 +59,7 @@ class NewCustomerSessionV2 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'profileId' => 'string', + 'storeIntegrationId' => 'string', 'evaluableCampaignIds' => 'int[]', 'couponCodes' => 'string[]', 'referralCode' => 'string', @@ -77,6 +78,7 @@ class NewCustomerSessionV2 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'profileId' => null, + 'storeIntegrationId' => null, 'evaluableCampaignIds' => null, 'couponCodes' => null, 'referralCode' => null, @@ -116,6 +118,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'profileId' => 'profileId', + 'storeIntegrationId' => 'storeIntegrationId', 'evaluableCampaignIds' => 'evaluableCampaignIds', 'couponCodes' => 'couponCodes', 'referralCode' => 'referralCode', @@ -134,6 +137,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'profileId' => 'setProfileId', + 'storeIntegrationId' => 'setStoreIntegrationId', 'evaluableCampaignIds' => 'setEvaluableCampaignIds', 'couponCodes' => 'setCouponCodes', 'referralCode' => 'setReferralCode', @@ -152,6 +156,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'profileId' => 'getProfileId', + 'storeIntegrationId' => 'getStoreIntegrationId', 'evaluableCampaignIds' => 'getEvaluableCampaignIds', 'couponCodes' => 'getCouponCodes', 'referralCode' => 'getReferralCode', @@ -243,6 +248,7 @@ public function getStateAllowableValues() public function __construct(array $data = null) { $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['storeIntegrationId'] = isset($data['storeIntegrationId']) ? $data['storeIntegrationId'] : null; $this->container['evaluableCampaignIds'] = isset($data['evaluableCampaignIds']) ? $data['evaluableCampaignIds'] : null; $this->container['couponCodes'] = isset($data['couponCodes']) ? $data['couponCodes'] : null; $this->container['referralCode'] = isset($data['referralCode']) ? $data['referralCode'] : null; @@ -263,6 +269,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be bigger than or equal to 1."; + } + if (!is_null($this->container['referralCode']) && (mb_strlen($this->container['referralCode']) > 100)) { $invalidProperties[] = "invalid value for 'referralCode', the character length must be smaller than or equal to 100."; } @@ -314,6 +328,37 @@ public function setProfileId($profileId) return $this; } + /** + * Gets storeIntegrationId + * + * @return string|null + */ + public function getStoreIntegrationId() + { + return $this->container['storeIntegrationId']; + } + + /** + * Sets storeIntegrationId + * + * @param string|null $storeIntegrationId The integration ID of the store. You choose this ID when you create a store. + * + * @return $this + */ + public function setStoreIntegrationId($storeIntegrationId) + { + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling NewCustomerSessionV2., must be smaller than or equal to 1000.'); + } + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling NewCustomerSessionV2., must be bigger than or equal to 1.'); + } + + $this->container['storeIntegrationId'] = $storeIntegrationId; + + return $this; + } + /** * Gets evaluableCampaignIds * @@ -427,7 +472,7 @@ public function getState() /** * Sets state * - * @param string|null $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). + * @param string|null $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). * * @return $this */ @@ -460,7 +505,7 @@ public function getCartItems() /** * Sets cartItems * - * @param \TalonOne\Client\Model\CartItem[]|null $cartItems The items to add to this sessions. - If cart item flattening is disabled: **Do not exceed 1000 items** (regardless of their `quantity`) per request. - If cart item flattening is enabled: **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. + * @param \TalonOne\Client\Model\CartItem[]|null $cartItems The items to add to this session. **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. * * @return $this */ diff --git a/lib/Model/NewEvent.php b/lib/Model/NewEvent.php index 89f4ecce..83b71f52 100644 --- a/lib/Model/NewEvent.php +++ b/lib/Model/NewEvent.php @@ -59,6 +59,7 @@ class NewEvent implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'profileId' => 'string', + 'storeIntegrationId' => 'string', 'type' => 'string', 'attributes' => 'object', 'sessionId' => 'string' @@ -71,6 +72,7 @@ class NewEvent implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'profileId' => null, + 'storeIntegrationId' => null, 'type' => null, 'attributes' => null, 'sessionId' => null @@ -104,6 +106,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'profileId' => 'profileId', + 'storeIntegrationId' => 'storeIntegrationId', 'type' => 'type', 'attributes' => 'attributes', 'sessionId' => 'sessionId' @@ -116,6 +119,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'profileId' => 'setProfileId', + 'storeIntegrationId' => 'setStoreIntegrationId', 'type' => 'setType', 'attributes' => 'setAttributes', 'sessionId' => 'setSessionId' @@ -128,6 +132,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'profileId' => 'getProfileId', + 'storeIntegrationId' => 'getStoreIntegrationId', 'type' => 'getType', 'attributes' => 'getAttributes', 'sessionId' => 'getSessionId' @@ -194,6 +199,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['storeIntegrationId'] = isset($data['storeIntegrationId']) ? $data['storeIntegrationId'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['sessionId'] = isset($data['sessionId']) ? $data['sessionId'] : null; @@ -208,6 +214,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['storeIntegrationId']) && (mb_strlen($this->container['storeIntegrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'storeIntegrationId', the character length must be bigger than or equal to 1."; + } + if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -264,6 +278,37 @@ public function setProfileId($profileId) return $this; } + /** + * Gets storeIntegrationId + * + * @return string|null + */ + public function getStoreIntegrationId() + { + return $this->container['storeIntegrationId']; + } + + /** + * Sets storeIntegrationId + * + * @param string|null $storeIntegrationId The integration ID of the store. You choose this ID when you create a store. + * + * @return $this + */ + public function setStoreIntegrationId($storeIntegrationId) + { + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling NewEvent., must be smaller than or equal to 1000.'); + } + if (!is_null($storeIntegrationId) && (mb_strlen($storeIntegrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $storeIntegrationId when calling NewEvent., must be bigger than or equal to 1.'); + } + + $this->container['storeIntegrationId'] = $storeIntegrationId; + + return $this; + } + /** * Gets type * diff --git a/lib/Model/NewInvitation.php b/lib/Model/NewInvitation.php index 940d5d09..a4cf31ab 100644 --- a/lib/Model/NewInvitation.php +++ b/lib/Model/NewInvitation.php @@ -61,6 +61,7 @@ class NewInvitation implements ModelInterface, ArrayAccess 'name' => 'string', 'email' => 'string', 'acl' => 'string', + 'isAdmin' => 'bool', 'roles' => 'int[]' ]; @@ -73,6 +74,7 @@ class NewInvitation implements ModelInterface, ArrayAccess 'name' => null, 'email' => 'email', 'acl' => null, + 'isAdmin' => null, 'roles' => null ]; @@ -106,6 +108,7 @@ public static function openAPIFormats() 'name' => 'name', 'email' => 'email', 'acl' => 'acl', + 'isAdmin' => 'isAdmin', 'roles' => 'roles' ]; @@ -118,6 +121,7 @@ public static function openAPIFormats() 'name' => 'setName', 'email' => 'setEmail', 'acl' => 'setAcl', + 'isAdmin' => 'setIsAdmin', 'roles' => 'setRoles' ]; @@ -130,6 +134,7 @@ public static function openAPIFormats() 'name' => 'getName', 'email' => 'getEmail', 'acl' => 'getAcl', + 'isAdmin' => 'getIsAdmin', 'roles' => 'getRoles' ]; @@ -196,6 +201,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['email'] = isset($data['email']) ? $data['email'] : null; $this->container['acl'] = isset($data['acl']) ? $data['acl'] : null; + $this->container['isAdmin'] = isset($data['isAdmin']) ? $data['isAdmin'] : null; $this->container['roles'] = isset($data['roles']) ? $data['roles'] : null; } @@ -211,9 +217,6 @@ public function listInvalidProperties() if ($this->container['email'] === null) { $invalidProperties[] = "'email' can't be null"; } - if ($this->container['acl'] === null) { - $invalidProperties[] = "'acl' can't be null"; - } return $invalidProperties; } @@ -280,7 +283,7 @@ public function setEmail($email) /** * Gets acl * - * @return string + * @return string|null */ public function getAcl() { @@ -290,7 +293,7 @@ public function getAcl() /** * Sets acl * - * @param string $acl The `Access Control List` json defining the role of the user. This represents the access control on the user level. Use one of the following: - normal user: `{\"Role\": 0}` - admin: `{\"Role\": 127}` + * @param string|null $acl The `Access Control List` json defining the role of the user. This represents the access control on the user level. Use one of the following: - normal user: `{\"Role\": 0}` - admin: `{\"Role\": 127}` * * @return $this */ @@ -301,6 +304,30 @@ public function setAcl($acl) return $this; } + /** + * Gets isAdmin + * + * @return bool|null + */ + public function getIsAdmin() + { + return $this->container['isAdmin']; + } + + /** + * Sets isAdmin + * + * @param bool|null $isAdmin An indication of whether the user has admin permissions. We recommend using this flag over using the `acl` with value `{\"Role\": 127}`. + * + * @return $this + */ + public function setIsAdmin($isAdmin) + { + $this->container['isAdmin'] = $isAdmin; + + return $this; + } + /** * Gets roles * @@ -314,7 +341,7 @@ public function getRoles() /** * Sets roles * - * @param int[]|null $roles An array of roleIDs to assign the new user to. + * @param int[]|null $roles An array of role IDs to assign to the new user. * * @return $this */ diff --git a/lib/Model/NewLoyaltyProgram.php b/lib/Model/NewLoyaltyProgram.php index 52bd39c5..adf9ff85 100644 --- a/lib/Model/NewLoyaltyProgram.php +++ b/lib/Model/NewLoyaltyProgram.php @@ -66,6 +66,8 @@ class NewLoyaltyProgram implements ModelInterface, ArrayAccess 'allowSubledger' => 'bool', 'usersPerCardLimit' => 'int', 'sandbox' => 'bool', + 'tiersExpireIn' => 'string', + 'tiersDowngradePolicy' => 'string', 'name' => 'string', 'tiers' => '\TalonOne\Client\Model\NewLoyaltyTier[]', 'timezone' => 'string', @@ -86,6 +88,8 @@ class NewLoyaltyProgram implements ModelInterface, ArrayAccess 'allowSubledger' => null, 'usersPerCardLimit' => null, 'sandbox' => null, + 'tiersExpireIn' => null, + 'tiersDowngradePolicy' => null, 'name' => null, 'tiers' => null, 'timezone' => null, @@ -127,6 +131,8 @@ public static function openAPIFormats() 'allowSubledger' => 'allowSubledger', 'usersPerCardLimit' => 'usersPerCardLimit', 'sandbox' => 'sandbox', + 'tiersExpireIn' => 'tiersExpireIn', + 'tiersDowngradePolicy' => 'tiersDowngradePolicy', 'name' => 'name', 'tiers' => 'tiers', 'timezone' => 'timezone', @@ -147,6 +153,8 @@ public static function openAPIFormats() 'allowSubledger' => 'setAllowSubledger', 'usersPerCardLimit' => 'setUsersPerCardLimit', 'sandbox' => 'setSandbox', + 'tiersExpireIn' => 'setTiersExpireIn', + 'tiersDowngradePolicy' => 'setTiersDowngradePolicy', 'name' => 'setName', 'tiers' => 'setTiers', 'timezone' => 'setTimezone', @@ -167,6 +175,8 @@ public static function openAPIFormats() 'allowSubledger' => 'getAllowSubledger', 'usersPerCardLimit' => 'getUsersPerCardLimit', 'sandbox' => 'getSandbox', + 'tiersExpireIn' => 'getTiersExpireIn', + 'tiersDowngradePolicy' => 'getTiersDowngradePolicy', 'name' => 'getName', 'tiers' => 'getTiers', 'timezone' => 'getTimezone', @@ -214,9 +224,24 @@ public function getModelName() return self::$openAPIModelName; } + const TIERS_DOWNGRADE_POLICY_ONE_DOWN = 'one_down'; + const TIERS_DOWNGRADE_POLICY_BALANCE_BASED = 'balance_based'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTiersDowngradePolicyAllowableValues() + { + return [ + self::TIERS_DOWNGRADE_POLICY_ONE_DOWN, + self::TIERS_DOWNGRADE_POLICY_BALANCE_BASED, + ]; + } + /** * Associative array for storing property values @@ -241,6 +266,8 @@ public function __construct(array $data = null) $this->container['allowSubledger'] = isset($data['allowSubledger']) ? $data['allowSubledger'] : null; $this->container['usersPerCardLimit'] = isset($data['usersPerCardLimit']) ? $data['usersPerCardLimit'] : null; $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; + $this->container['tiersExpireIn'] = isset($data['tiersExpireIn']) ? $data['tiersExpireIn'] : null; + $this->container['tiersDowngradePolicy'] = isset($data['tiersDowngradePolicy']) ? $data['tiersDowngradePolicy'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['tiers'] = isset($data['tiers']) ? $data['tiers'] : null; $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; @@ -275,6 +302,14 @@ public function listInvalidProperties() if ($this->container['sandbox'] === null) { $invalidProperties[] = "'sandbox' can't be null"; } + $allowedValues = $this->getTiersDowngradePolicyAllowableValues(); + if (!is_null($this->container['tiersDowngradePolicy']) && !in_array($this->container['tiersDowngradePolicy'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'tiersDowngradePolicy', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } @@ -500,6 +535,63 @@ public function setSandbox($sandbox) return $this; } + /** + * Gets tiersExpireIn + * + * @return string|null + */ + public function getTiersExpireIn() + { + return $this->container['tiersExpireIn']; + } + + /** + * Sets tiersExpireIn + * + * @param string|null $tiersExpireIn The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. + * + * @return $this + */ + public function setTiersExpireIn($tiersExpireIn) + { + $this->container['tiersExpireIn'] = $tiersExpireIn; + + return $this; + } + + /** + * Gets tiersDowngradePolicy + * + * @return string|null + */ + public function getTiersDowngradePolicy() + { + return $this->container['tiersDowngradePolicy']; + } + + /** + * Sets tiersDowngradePolicy + * + * @param string|null $tiersDowngradePolicy Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. + * + * @return $this + */ + public function setTiersDowngradePolicy($tiersDowngradePolicy) + { + $allowedValues = $this->getTiersDowngradePolicyAllowableValues(); + if (!is_null($tiersDowngradePolicy) && !in_array($tiersDowngradePolicy, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'tiersDowngradePolicy', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['tiersDowngradePolicy'] = $tiersDowngradePolicy; + + return $this; + } + /** * Gets name * diff --git a/lib/Model/NewNotificationWebhook.php b/lib/Model/NewNotificationWebhook.php index 0b2df195..91d7baac 100644 --- a/lib/Model/NewNotificationWebhook.php +++ b/lib/Model/NewNotificationWebhook.php @@ -58,7 +58,8 @@ class NewNotificationWebhook implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'url' => 'string', - 'headers' => 'string[]' + 'headers' => 'string[]', + 'enabled' => 'bool' ]; /** @@ -68,7 +69,8 @@ class NewNotificationWebhook implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'url' => null, - 'headers' => null + 'headers' => null, + 'enabled' => null ]; /** @@ -99,7 +101,8 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'url' => 'url', - 'headers' => 'headers' + 'headers' => 'headers', + 'enabled' => 'enabled' ]; /** @@ -109,7 +112,8 @@ public static function openAPIFormats() */ protected static $setters = [ 'url' => 'setUrl', - 'headers' => 'setHeaders' + 'headers' => 'setHeaders', + 'enabled' => 'setEnabled' ]; /** @@ -119,7 +123,8 @@ public static function openAPIFormats() */ protected static $getters = [ 'url' => 'getUrl', - 'headers' => 'getHeaders' + 'headers' => 'getHeaders', + 'enabled' => 'getEnabled' ]; /** @@ -184,6 +189,7 @@ public function __construct(array $data = null) { $this->container['url'] = isset($data['url']) ? $data['url'] : null; $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : true; } /** @@ -263,6 +269,30 @@ public function setHeaders($headers) return $this; } + + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled Indicates whether the notification is activated. + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/NewRoleV2.php b/lib/Model/NewRoleV2.php new file mode 100644 index 00000000..3475b631 --- /dev/null +++ b/lib/Model/NewRoleV2.php @@ -0,0 +1,405 @@ + 'string', + 'description' => 'string', + 'permissions' => '\TalonOne\Client\Model\RoleV2Permissions', + 'members' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'permissions' => null, + 'members' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'description' => 'description', + 'permissions' => 'permissions', + 'members' => 'members' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'permissions' => 'setPermissions', + 'members' => 'setMembers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'permissions' => 'getPermissions', + 'members' => 'getMembers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['permissions'] = isset($data['permissions']) ? $data['permissions'] : null; + $this->container['members'] = isset($data['members']) ? $data['members'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the role. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description Description of the role. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets permissions + * + * @return \TalonOne\Client\Model\RoleV2Permissions|null + */ + public function getPermissions() + { + return $this->container['permissions']; + } + + /** + * Sets permissions + * + * @param \TalonOne\Client\Model\RoleV2Permissions|null $permissions permissions + * + * @return $this + */ + public function setPermissions($permissions) + { + $this->container['permissions'] = $permissions; + + return $this; + } + + /** + * Gets members + * + * @return int[]|null + */ + public function getMembers() + { + return $this->container['members']; + } + + /** + * Sets members + * + * @param int[]|null $members A list of user identifiers the role is assigned to. + * + * @return $this + */ + public function setMembers($members) + { + $this->container['members'] = $members; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/NewStore.php b/lib/Model/NewStore.php new file mode 100644 index 00000000..a330d308 --- /dev/null +++ b/lib/Model/NewStore.php @@ -0,0 +1,438 @@ + 'string', + 'description' => 'string', + 'attributes' => 'object', + 'integrationId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'attributes' => null, + 'integrationId' => 'string' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'description' => 'description', + 'attributes' => 'attributes', + 'integrationId' => 'integrationId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'attributes' => 'setAttributes', + 'integrationId' => 'setIntegrationId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'attributes' => 'getAttributes', + 'integrationId' => 'getIntegrationId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['integrationId'] = isset($data['integrationId']) ? $data['integrationId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 200)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 200."; + } + + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['integrationId'] === null) { + $invalidProperties[] = "'integrationId' can't be null"; + } + if ((mb_strlen($this->container['integrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'integrationId', the character length must be smaller than or equal to 1000."; + } + + if ((mb_strlen($this->container['integrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'integrationId', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the store. + * + * @return $this + */ + public function setName($name) + { + if ((mb_strlen($name) > 200)) { + throw new \InvalidArgumentException('invalid length for $name when calling NewStore., must be smaller than or equal to 200.'); + } + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling NewStore., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description The description of the store. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets attributes + * + * @return object|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object|null $attributes The attributes of the store. + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets integrationId + * + * @return string + */ + public function getIntegrationId() + { + return $this->container['integrationId']; + } + + /** + * Sets integrationId + * + * @param string $integrationId The integration ID of the store. You choose this ID when you create a store. + * + * @return $this + */ + public function setIntegrationId($integrationId) + { + if ((mb_strlen($integrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $integrationId when calling NewStore., must be smaller than or equal to 1000.'); + } + if ((mb_strlen($integrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $integrationId when calling NewStore., must be bigger than or equal to 1.'); + } + + $this->container['integrationId'] = $integrationId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/NotificationActivation.php b/lib/Model/NotificationActivation.php new file mode 100644 index 00000000..bc19aff4 --- /dev/null +++ b/lib/Model/NotificationActivation.php @@ -0,0 +1,311 @@ + 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'enabled' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['enabled'] === null) { + $invalidProperties[] = "'enabled' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets enabled + * + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool $enabled Indicates whether the notification is activated. + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OneTimeCode.php b/lib/Model/OneTimeCode.php new file mode 100644 index 00000000..d7227073 --- /dev/null +++ b/lib/Model/OneTimeCode.php @@ -0,0 +1,407 @@ + 'int', + 'accountId' => 'int', + 'token' => 'string', + 'code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'userId' => null, + 'accountId' => null, + 'token' => null, + 'code' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'userId' => 'userId', + 'accountId' => 'accountId', + 'token' => 'token', + 'code' => 'code' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'userId' => 'setUserId', + 'accountId' => 'setAccountId', + 'token' => 'setToken', + 'code' => 'setCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'userId' => 'getUserId', + 'accountId' => 'getAccountId', + 'token' => 'getToken', + 'code' => 'getCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['userId'] = isset($data['userId']) ? $data['userId'] : null; + $this->container['accountId'] = isset($data['accountId']) ? $data['accountId'] : null; + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['userId'] === null) { + $invalidProperties[] = "'userId' can't be null"; + } + if ($this->container['accountId'] === null) { + $invalidProperties[] = "'accountId' can't be null"; + } + if ($this->container['token'] === null) { + $invalidProperties[] = "'token' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets userId + * + * @return int + */ + public function getUserId() + { + return $this->container['userId']; + } + + /** + * Sets userId + * + * @param int $userId The ID of the user. + * + * @return $this + */ + public function setUserId($userId) + { + $this->container['userId'] = $userId; + + return $this; + } + + /** + * Gets accountId + * + * @return int + */ + public function getAccountId() + { + return $this->container['accountId']; + } + + /** + * Sets accountId + * + * @param int $accountId The ID of the account. + * + * @return $this + */ + public function setAccountId($accountId) + { + $this->container['accountId'] = $accountId; + + return $this; + } + + /** + * Gets token + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token The two-factor authentication token created during sign-in. This token is used to ensure that the correct user is trying to sign in with a given one-time security code. + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + + return $this; + } + + /** + * Gets code + * + * @return string|null + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code The one-time security code used for signing in. + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OutgoingIntegrationCleverTapPolicy.php b/lib/Model/OutgoingIntegrationCleverTapPolicy.php new file mode 100644 index 00000000..83452ea9 --- /dev/null +++ b/lib/Model/OutgoingIntegrationCleverTapPolicy.php @@ -0,0 +1,377 @@ + 'string', + 'accountId' => 'string', + 'passcode' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'baseUrl' => null, + 'accountId' => null, + 'passcode' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'baseUrl' => 'baseUrl', + 'accountId' => 'accountId', + 'passcode' => 'passcode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'baseUrl' => 'setBaseUrl', + 'accountId' => 'setAccountId', + 'passcode' => 'setPasscode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'baseUrl' => 'getBaseUrl', + 'accountId' => 'getAccountId', + 'passcode' => 'getPasscode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['baseUrl'] = isset($data['baseUrl']) ? $data['baseUrl'] : null; + $this->container['accountId'] = isset($data['accountId']) ? $data['accountId'] : null; + $this->container['passcode'] = isset($data['passcode']) ? $data['passcode'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['baseUrl'] === null) { + $invalidProperties[] = "'baseUrl' can't be null"; + } + if ($this->container['accountId'] === null) { + $invalidProperties[] = "'accountId' can't be null"; + } + if ($this->container['passcode'] === null) { + $invalidProperties[] = "'passcode' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets baseUrl + * + * @return string + */ + public function getBaseUrl() + { + return $this->container['baseUrl']; + } + + /** + * Sets baseUrl + * + * @param string $baseUrl The base URL that is based on the region key of your CleverTap account. + * + * @return $this + */ + public function setBaseUrl($baseUrl) + { + $this->container['baseUrl'] = $baseUrl; + + return $this; + } + + /** + * Gets accountId + * + * @return string + */ + public function getAccountId() + { + return $this->container['accountId']; + } + + /** + * Sets accountId + * + * @param string $accountId The CleverTap Project ID. + * + * @return $this + */ + public function setAccountId($accountId) + { + $this->container['accountId'] = $accountId; + + return $this; + } + + /** + * Gets passcode + * + * @return string + */ + public function getPasscode() + { + return $this->container['passcode']; + } + + /** + * Sets passcode + * + * @param string $passcode The CleverTap Project passcode. + * + * @return $this + */ + public function setPasscode($passcode) + { + $this->container['passcode'] = $passcode; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OutgoingIntegrationConfiguration.php b/lib/Model/OutgoingIntegrationConfiguration.php index b2b960c8..a4222f7e 100644 --- a/lib/Model/OutgoingIntegrationConfiguration.php +++ b/lib/Model/OutgoingIntegrationConfiguration.php @@ -319,7 +319,7 @@ public function getPolicy() /** * Sets policy * - * @param object $policy policy + * @param object $policy The outgoing integration policy specific to each integration type. * * @return $this */ diff --git a/lib/Model/OutgoingIntegrationIterablePolicy.php b/lib/Model/OutgoingIntegrationIterablePolicy.php new file mode 100644 index 00000000..e9da0a23 --- /dev/null +++ b/lib/Model/OutgoingIntegrationIterablePolicy.php @@ -0,0 +1,344 @@ + 'string', + 'apiKey' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'baseUrl' => null, + 'apiKey' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'baseUrl' => 'baseUrl', + 'apiKey' => 'apiKey' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'baseUrl' => 'setBaseUrl', + 'apiKey' => 'setApiKey' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'baseUrl' => 'getBaseUrl', + 'apiKey' => 'getApiKey' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['baseUrl'] = isset($data['baseUrl']) ? $data['baseUrl'] : null; + $this->container['apiKey'] = isset($data['apiKey']) ? $data['apiKey'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['baseUrl'] === null) { + $invalidProperties[] = "'baseUrl' can't be null"; + } + if ($this->container['apiKey'] === null) { + $invalidProperties[] = "'apiKey' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets baseUrl + * + * @return string + */ + public function getBaseUrl() + { + return $this->container['baseUrl']; + } + + /** + * Sets baseUrl + * + * @param string $baseUrl The base URL that is based on the region key of your Iterable account. + * + * @return $this + */ + public function setBaseUrl($baseUrl) + { + $this->container['baseUrl'] = $baseUrl; + + return $this; + } + + /** + * Gets apiKey + * + * @return string + */ + public function getApiKey() + { + return $this->container['apiKey']; + } + + /** + * Sets apiKey + * + * @param string $apiKey The API key generated from your Iterable account. See [Iterable API Key Guide](https://support.iterable.com/hc/en-us/articles/360043464871-API-Keys-) + * + * @return $this + */ + public function setApiKey($apiKey) + { + $this->container['apiKey'] = $apiKey; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OutgoingIntegrationMoEngagePolicy.php b/lib/Model/OutgoingIntegrationMoEngagePolicy.php new file mode 100644 index 00000000..44139357 --- /dev/null +++ b/lib/Model/OutgoingIntegrationMoEngagePolicy.php @@ -0,0 +1,410 @@ + 'string', + 'appId' => 'string', + 'dataApiId' => 'string', + 'dataApiKey' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'baseUrl' => null, + 'appId' => null, + 'dataApiId' => null, + 'dataApiKey' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'baseUrl' => 'baseUrl', + 'appId' => 'appId', + 'dataApiId' => 'dataApiId', + 'dataApiKey' => 'dataApiKey' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'baseUrl' => 'setBaseUrl', + 'appId' => 'setAppId', + 'dataApiId' => 'setDataApiId', + 'dataApiKey' => 'setDataApiKey' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'baseUrl' => 'getBaseUrl', + 'appId' => 'getAppId', + 'dataApiId' => 'getDataApiId', + 'dataApiKey' => 'getDataApiKey' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['baseUrl'] = isset($data['baseUrl']) ? $data['baseUrl'] : null; + $this->container['appId'] = isset($data['appId']) ? $data['appId'] : null; + $this->container['dataApiId'] = isset($data['dataApiId']) ? $data['dataApiId'] : null; + $this->container['dataApiKey'] = isset($data['dataApiKey']) ? $data['dataApiKey'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['baseUrl'] === null) { + $invalidProperties[] = "'baseUrl' can't be null"; + } + if ($this->container['appId'] === null) { + $invalidProperties[] = "'appId' can't be null"; + } + if ($this->container['dataApiId'] === null) { + $invalidProperties[] = "'dataApiId' can't be null"; + } + if ($this->container['dataApiKey'] === null) { + $invalidProperties[] = "'dataApiKey' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets baseUrl + * + * @return string + */ + public function getBaseUrl() + { + return $this->container['baseUrl']; + } + + /** + * Sets baseUrl + * + * @param string $baseUrl The base URL of your MoEngage deployment, containing the MoEngage data center number (represented by `0X`). + * + * @return $this + */ + public function setBaseUrl($baseUrl) + { + $this->container['baseUrl'] = $baseUrl; + + return $this; + } + + /** + * Gets appId + * + * @return string + */ + public function getAppId() + { + return $this->container['appId']; + } + + /** + * Sets appId + * + * @param string $appId MoEngage APP ID. See [MoEngage Developer Guide](https://developers.moengage.com/hc/en-us/articles/4404674776724-Overview). + * + * @return $this + */ + public function setAppId($appId) + { + $this->container['appId'] = $appId; + + return $this; + } + + /** + * Gets dataApiId + * + * @return string + */ + public function getDataApiId() + { + return $this->container['dataApiId']; + } + + /** + * Sets dataApiId + * + * @param string $dataApiId MoEngage DATA API ID. See [MoEngage Developer Guide](https://developers.moengage.com/hc/en-us/articles/4404674776724-Overview). + * + * @return $this + */ + public function setDataApiId($dataApiId) + { + $this->container['dataApiId'] = $dataApiId; + + return $this; + } + + /** + * Gets dataApiKey + * + * @return string + */ + public function getDataApiKey() + { + return $this->container['dataApiKey']; + } + + /** + * Sets dataApiKey + * + * @param string $dataApiKey MoEngage DATA API Key. See [MoEngage Developer Guide](https://developers.moengage.com/hc/en-us/articles/4404674776724-Overview). + * + * @return $this + */ + public function setDataApiKey($dataApiKey) + { + $this->container['dataApiKey'] = $dataApiKey; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OutgoingIntegrationTemplate.php b/lib/Model/OutgoingIntegrationTemplate.php new file mode 100644 index 00000000..6679b635 --- /dev/null +++ b/lib/Model/OutgoingIntegrationTemplate.php @@ -0,0 +1,610 @@ + 'int', + 'integrationType' => 'int', + 'title' => 'string', + 'description' => 'string', + 'payload' => 'string', + 'method' => 'string', + 'relativeUrl' => 'string', + 'headers' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'integrationType' => null, + 'title' => null, + 'description' => null, + 'payload' => null, + 'method' => null, + 'relativeUrl' => null, + 'headers' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'integrationType' => 'integrationType', + 'title' => 'title', + 'description' => 'description', + 'payload' => 'payload', + 'method' => 'method', + 'relativeUrl' => 'relativeUrl', + 'headers' => 'headers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'integrationType' => 'setIntegrationType', + 'title' => 'setTitle', + 'description' => 'setDescription', + 'payload' => 'setPayload', + 'method' => 'setMethod', + 'relativeUrl' => 'setRelativeUrl', + 'headers' => 'setHeaders' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'integrationType' => 'getIntegrationType', + 'title' => 'getTitle', + 'description' => 'getDescription', + 'payload' => 'getPayload', + 'method' => 'getMethod', + 'relativeUrl' => 'getRelativeUrl', + 'headers' => 'getHeaders' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const METHOD_POST = 'POST'; + const METHOD_PUT = 'PUT'; + const METHOD_GET = 'GET'; + const METHOD_DELETE = 'DELETE'; + const METHOD_PATCH = 'PATCH'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMethodAllowableValues() + { + return [ + self::METHOD_POST, + self::METHOD_PUT, + self::METHOD_GET, + self::METHOD_DELETE, + self::METHOD_PATCH, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['integrationType'] = isset($data['integrationType']) ? $data['integrationType'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['payload'] = isset($data['payload']) ? $data['payload'] : null; + $this->container['method'] = isset($data['method']) ? $data['method'] : null; + $this->container['relativeUrl'] = isset($data['relativeUrl']) ? $data['relativeUrl'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['integrationType'] === null) { + $invalidProperties[] = "'integrationType' can't be null"; + } + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if ((mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + if ((mb_strlen($this->container['title']) < 1)) { + $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; + } + + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ((mb_strlen($this->container['description']) > 1000)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1000."; + } + + if ((mb_strlen($this->container['description']) < 1)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 1."; + } + + if ($this->container['payload'] === null) { + $invalidProperties[] = "'payload' can't be null"; + } + if ($this->container['method'] === null) { + $invalidProperties[] = "'method' can't be null"; + } + $allowedValues = $this->getMethodAllowableValues(); + if (!is_null($this->container['method']) && !in_array($this->container['method'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'method', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['relativeUrl'] === null) { + $invalidProperties[] = "'relativeUrl' can't be null"; + } + if ($this->container['headers'] === null) { + $invalidProperties[] = "'headers' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Unique ID for this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets integrationType + * + * @return int + */ + public function getIntegrationType() + { + return $this->container['integrationType']; + } + + /** + * Sets integrationType + * + * @param int $integrationType Unique ID of outgoing integration type. + * + * @return $this + */ + public function setIntegrationType($integrationType) + { + $this->container['integrationType'] = $integrationType; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title The title of the integration template. + * + * @return $this + */ + public function setTitle($title) + { + if ((mb_strlen($title) > 255)) { + throw new \InvalidArgumentException('invalid length for $title when calling OutgoingIntegrationTemplate., must be smaller than or equal to 255.'); + } + if ((mb_strlen($title) < 1)) { + throw new \InvalidArgumentException('invalid length for $title when calling OutgoingIntegrationTemplate., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description The description of the specific outgoing integration template. + * + * @return $this + */ + public function setDescription($description) + { + if ((mb_strlen($description) > 1000)) { + throw new \InvalidArgumentException('invalid length for $description when calling OutgoingIntegrationTemplate., must be smaller than or equal to 1000.'); + } + if ((mb_strlen($description) < 1)) { + throw new \InvalidArgumentException('invalid length for $description when calling OutgoingIntegrationTemplate., must be bigger than or equal to 1.'); + } + + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets payload + * + * @return string + */ + public function getPayload() + { + return $this->container['payload']; + } + + /** + * Sets payload + * + * @param string $payload The API payload (supports templating using parameters) for this integration template. + * + * @return $this + */ + public function setPayload($payload) + { + $this->container['payload'] = $payload; + + return $this; + } + + /** + * Gets method + * + * @return string + */ + public function getMethod() + { + return $this->container['method']; + } + + /** + * Sets method + * + * @param string $method API method for this webhook. + * + * @return $this + */ + public function setMethod($method) + { + $allowedValues = $this->getMethodAllowableValues(); + if (!in_array($method, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'method', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['method'] = $method; + + return $this; + } + + /** + * Gets relativeUrl + * + * @return string + */ + public function getRelativeUrl() + { + return $this->container['relativeUrl']; + } + + /** + * Sets relativeUrl + * + * @param string $relativeUrl The relative URL corresponding to each integration template. + * + * @return $this + */ + public function setRelativeUrl($relativeUrl) + { + $this->container['relativeUrl'] = $relativeUrl; + + return $this; + } + + /** + * Gets headers + * + * @return string[] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param string[] $headers The list of HTTP headers for this integration template. + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OutgoingIntegrationTemplateWithConfigurationDetails.php b/lib/Model/OutgoingIntegrationTemplateWithConfigurationDetails.php new file mode 100644 index 00000000..3b609d43 --- /dev/null +++ b/lib/Model/OutgoingIntegrationTemplateWithConfigurationDetails.php @@ -0,0 +1,644 @@ + 'int', + 'integrationType' => 'int', + 'title' => 'string', + 'description' => 'string', + 'payload' => 'string', + 'method' => 'string', + 'relativeUrl' => 'string', + 'headers' => 'string[]', + 'policy' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'integrationType' => null, + 'title' => null, + 'description' => null, + 'payload' => null, + 'method' => null, + 'relativeUrl' => null, + 'headers' => null, + 'policy' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'integrationType' => 'integrationType', + 'title' => 'title', + 'description' => 'description', + 'payload' => 'payload', + 'method' => 'method', + 'relativeUrl' => 'relativeUrl', + 'headers' => 'headers', + 'policy' => 'policy' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'integrationType' => 'setIntegrationType', + 'title' => 'setTitle', + 'description' => 'setDescription', + 'payload' => 'setPayload', + 'method' => 'setMethod', + 'relativeUrl' => 'setRelativeUrl', + 'headers' => 'setHeaders', + 'policy' => 'setPolicy' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'integrationType' => 'getIntegrationType', + 'title' => 'getTitle', + 'description' => 'getDescription', + 'payload' => 'getPayload', + 'method' => 'getMethod', + 'relativeUrl' => 'getRelativeUrl', + 'headers' => 'getHeaders', + 'policy' => 'getPolicy' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const METHOD_POST = 'POST'; + const METHOD_PUT = 'PUT'; + const METHOD_GET = 'GET'; + const METHOD_DELETE = 'DELETE'; + const METHOD_PATCH = 'PATCH'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMethodAllowableValues() + { + return [ + self::METHOD_POST, + self::METHOD_PUT, + self::METHOD_GET, + self::METHOD_DELETE, + self::METHOD_PATCH, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['integrationType'] = isset($data['integrationType']) ? $data['integrationType'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['payload'] = isset($data['payload']) ? $data['payload'] : null; + $this->container['method'] = isset($data['method']) ? $data['method'] : null; + $this->container['relativeUrl'] = isset($data['relativeUrl']) ? $data['relativeUrl'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + $this->container['policy'] = isset($data['policy']) ? $data['policy'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['integrationType'] === null) { + $invalidProperties[] = "'integrationType' can't be null"; + } + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if ((mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + if ((mb_strlen($this->container['title']) < 1)) { + $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; + } + + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ((mb_strlen($this->container['description']) > 1000)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1000."; + } + + if ((mb_strlen($this->container['description']) < 1)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 1."; + } + + if ($this->container['payload'] === null) { + $invalidProperties[] = "'payload' can't be null"; + } + if ($this->container['method'] === null) { + $invalidProperties[] = "'method' can't be null"; + } + $allowedValues = $this->getMethodAllowableValues(); + if (!is_null($this->container['method']) && !in_array($this->container['method'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'method', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['relativeUrl'] === null) { + $invalidProperties[] = "'relativeUrl' can't be null"; + } + if ($this->container['headers'] === null) { + $invalidProperties[] = "'headers' can't be null"; + } + if ($this->container['policy'] === null) { + $invalidProperties[] = "'policy' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Unique ID for this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets integrationType + * + * @return int + */ + public function getIntegrationType() + { + return $this->container['integrationType']; + } + + /** + * Sets integrationType + * + * @param int $integrationType Unique ID of outgoing integration type. + * + * @return $this + */ + public function setIntegrationType($integrationType) + { + $this->container['integrationType'] = $integrationType; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title The title of the integration template. + * + * @return $this + */ + public function setTitle($title) + { + if ((mb_strlen($title) > 255)) { + throw new \InvalidArgumentException('invalid length for $title when calling OutgoingIntegrationTemplateWithConfigurationDetails., must be smaller than or equal to 255.'); + } + if ((mb_strlen($title) < 1)) { + throw new \InvalidArgumentException('invalid length for $title when calling OutgoingIntegrationTemplateWithConfigurationDetails., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description The description of the specific outgoing integration template. + * + * @return $this + */ + public function setDescription($description) + { + if ((mb_strlen($description) > 1000)) { + throw new \InvalidArgumentException('invalid length for $description when calling OutgoingIntegrationTemplateWithConfigurationDetails., must be smaller than or equal to 1000.'); + } + if ((mb_strlen($description) < 1)) { + throw new \InvalidArgumentException('invalid length for $description when calling OutgoingIntegrationTemplateWithConfigurationDetails., must be bigger than or equal to 1.'); + } + + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets payload + * + * @return string + */ + public function getPayload() + { + return $this->container['payload']; + } + + /** + * Sets payload + * + * @param string $payload The API payload (supports templating using parameters) for this integration template. + * + * @return $this + */ + public function setPayload($payload) + { + $this->container['payload'] = $payload; + + return $this; + } + + /** + * Gets method + * + * @return string + */ + public function getMethod() + { + return $this->container['method']; + } + + /** + * Sets method + * + * @param string $method API method for this webhook. + * + * @return $this + */ + public function setMethod($method) + { + $allowedValues = $this->getMethodAllowableValues(); + if (!in_array($method, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'method', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['method'] = $method; + + return $this; + } + + /** + * Gets relativeUrl + * + * @return string + */ + public function getRelativeUrl() + { + return $this->container['relativeUrl']; + } + + /** + * Sets relativeUrl + * + * @param string $relativeUrl The relative URL corresponding to each integration template. + * + * @return $this + */ + public function setRelativeUrl($relativeUrl) + { + $this->container['relativeUrl'] = $relativeUrl; + + return $this; + } + + /** + * Gets headers + * + * @return string[] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param string[] $headers The list of HTTP headers for this integration template. + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + + /** + * Gets policy + * + * @return object + */ + public function getPolicy() + { + return $this->container['policy']; + } + + /** + * Sets policy + * + * @param object $policy The outgoing integration policy specific to each integration type. + * + * @return $this + */ + public function setPolicy($policy) + { + $this->container['policy'] = $policy; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OutgoingIntegrationTemplates.php b/lib/Model/OutgoingIntegrationTemplates.php new file mode 100644 index 00000000..cf06db43 --- /dev/null +++ b/lib/Model/OutgoingIntegrationTemplates.php @@ -0,0 +1,308 @@ + '\TalonOne\Client\Model\OutgoingIntegrationTemplate[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \TalonOne\Client\Model\OutgoingIntegrationTemplate[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\OutgoingIntegrationTemplate[]|null $data The list of templates for a given outgoing integration type. + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PendingPointsNotificationPolicy.php b/lib/Model/PendingPointsNotificationPolicy.php new file mode 100644 index 00000000..926d7f85 --- /dev/null +++ b/lib/Model/PendingPointsNotificationPolicy.php @@ -0,0 +1,320 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Notification name. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling PendingPointsNotificationPolicy., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RemoveFromAudienceEffectProps.php b/lib/Model/RemoveFromAudienceEffectProps.php new file mode 100644 index 00000000..336f37d2 --- /dev/null +++ b/lib/Model/RemoveFromAudienceEffectProps.php @@ -0,0 +1,399 @@ + 'int', + 'audienceName' => 'string', + 'profileIntegrationId' => 'string', + 'profileId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'audienceId' => null, + 'audienceName' => null, + 'profileIntegrationId' => null, + 'profileId' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'audienceId' => 'audienceId', + 'audienceName' => 'audienceName', + 'profileIntegrationId' => 'profileIntegrationId', + 'profileId' => 'profileId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'audienceId' => 'setAudienceId', + 'audienceName' => 'setAudienceName', + 'profileIntegrationId' => 'setProfileIntegrationId', + 'profileId' => 'setProfileId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'audienceId' => 'getAudienceId', + 'audienceName' => 'getAudienceName', + 'profileIntegrationId' => 'getProfileIntegrationId', + 'profileId' => 'getProfileId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['audienceId'] = isset($data['audienceId']) ? $data['audienceId'] : null; + $this->container['audienceName'] = isset($data['audienceName']) ? $data['audienceName'] : null; + $this->container['profileIntegrationId'] = isset($data['profileIntegrationId']) ? $data['profileIntegrationId'] : null; + $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets audienceId + * + * @return int|null + */ + public function getAudienceId() + { + return $this->container['audienceId']; + } + + /** + * Sets audienceId + * + * @param int|null $audienceId The internal ID of the audience. + * + * @return $this + */ + public function setAudienceId($audienceId) + { + $this->container['audienceId'] = $audienceId; + + return $this; + } + + /** + * Gets audienceName + * + * @return string|null + */ + public function getAudienceName() + { + return $this->container['audienceName']; + } + + /** + * Sets audienceName + * + * @param string|null $audienceName The name of the audience. + * + * @return $this + */ + public function setAudienceName($audienceName) + { + $this->container['audienceName'] = $audienceName; + + return $this; + } + + /** + * Gets profileIntegrationId + * + * @return string|null + */ + public function getProfileIntegrationId() + { + return $this->container['profileIntegrationId']; + } + + /** + * Sets profileIntegrationId + * + * @param string|null $profileIntegrationId The ID of the customer profile in the third-party integration platform. + * + * @return $this + */ + public function setProfileIntegrationId($profileIntegrationId) + { + $this->container['profileIntegrationId'] = $profileIntegrationId; + + return $this; + } + + /** + * Gets profileId + * + * @return int|null + */ + public function getProfileId() + { + return $this->container['profileId']; + } + + /** + * Sets profileId + * + * @param int|null $profileId The internal ID of the customer profile. + * + * @return $this + */ + public function setProfileId($profileId) + { + $this->container['profileId'] = $profileId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ReturnedCartItem.php b/lib/Model/ReturnedCartItem.php index 036ec69b..8da9f614 100644 --- a/lib/Model/ReturnedCartItem.php +++ b/lib/Model/ReturnedCartItem.php @@ -250,7 +250,7 @@ public function getQuantity() /** * Sets quantity * - * @param int|null $quantity Number of cart items to return. It is only available when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. If cart item flattening is disabled, the cart item can only be returned in its entirety. + * @param int|null $quantity Number of cart items to return. * * @return $this */ diff --git a/lib/Model/Role.php b/lib/Model/Role.php index cac46dc0..14bbaf0b 100644 --- a/lib/Model/Role.php +++ b/lib/Model/Role.php @@ -380,7 +380,7 @@ public function getCampaignGroupID() /** * Sets campaignGroupID * - * @param int|null $campaignGroupID The ID of the [Campaign Group](https://docs.talon.one/docs/product/account/managing-campaign-groups) this role was created for. + * @param int|null $campaignGroupID The ID of the [Campaign Group](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups) this role was created for. * * @return $this */ diff --git a/lib/Model/RoleAssign.php b/lib/Model/RoleAssign.php index df240e16..95840670 100644 --- a/lib/Model/RoleAssign.php +++ b/lib/Model/RoleAssign.php @@ -230,7 +230,7 @@ public function getUsers() /** * Sets users * - * @param int[] $users An array of userIDs. + * @param int[] $users An array of user IDs. * * @return $this */ @@ -254,7 +254,7 @@ public function getRoles() /** * Sets roles * - * @param int[] $roles An array of roleIDs. + * @param int[] $roles An array of role IDs. * * @return $this */ diff --git a/lib/Model/RoleV2.php b/lib/Model/RoleV2.php index 5f02cdb1..bc6cbccb 100644 --- a/lib/Model/RoleV2.php +++ b/lib/Model/RoleV2.php @@ -36,6 +36,7 @@ * RoleV2 Class Doc Comment * * @category Class + * @description * @package TalonOne\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -57,9 +58,12 @@ class RoleV2 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ + 'id' => 'int', + 'created' => '\DateTime', + 'modified' => '\DateTime', + 'accountId' => 'int', 'name' => 'string', 'description' => 'string', - 'isAdmin' => 'bool', 'permissions' => '\TalonOne\Client\Model\RoleV2Permissions', 'members' => 'int[]' ]; @@ -70,9 +74,12 @@ class RoleV2 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ + 'id' => null, + 'created' => 'date-time', + 'modified' => 'date-time', + 'accountId' => null, 'name' => null, 'description' => null, - 'isAdmin' => null, 'permissions' => null, 'members' => null ]; @@ -104,9 +111,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'id' => 'id', + 'created' => 'created', + 'modified' => 'modified', + 'accountId' => 'accountId', 'name' => 'name', 'description' => 'description', - 'isAdmin' => 'isAdmin', 'permissions' => 'permissions', 'members' => 'members' ]; @@ -117,9 +127,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'id' => 'setId', + 'created' => 'setCreated', + 'modified' => 'setModified', + 'accountId' => 'setAccountId', 'name' => 'setName', 'description' => 'setDescription', - 'isAdmin' => 'setIsAdmin', 'permissions' => 'setPermissions', 'members' => 'setMembers' ]; @@ -130,9 +143,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'id' => 'getId', + 'created' => 'getCreated', + 'modified' => 'getModified', + 'accountId' => 'getAccountId', 'name' => 'getName', 'description' => 'getDescription', - 'isAdmin' => 'getIsAdmin', 'permissions' => 'getPermissions', 'members' => 'getMembers' ]; @@ -197,9 +213,12 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['modified'] = isset($data['modified']) ? $data['modified'] : null; + $this->container['accountId'] = isset($data['accountId']) ? $data['accountId'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['description'] = isset($data['description']) ? $data['description'] : null; - $this->container['isAdmin'] = isset($data['isAdmin']) ? $data['isAdmin'] : null; $this->container['permissions'] = isset($data['permissions']) ? $data['permissions'] : null; $this->container['members'] = isset($data['members']) ? $data['members'] : null; } @@ -213,6 +232,18 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['modified'] === null) { + $invalidProperties[] = "'modified' can't be null"; + } + if ($this->container['accountId'] === null) { + $invalidProperties[] = "'accountId' can't be null"; + } return $invalidProperties; } @@ -229,73 +260,145 @@ public function valid() /** - * Gets name + * Gets id * - * @return string|null + * @return int */ - public function getName() + public function getId() { - return $this->container['name']; + return $this->container['id']; } /** - * Sets name + * Sets id * - * @param string|null $name Name of the role. + * @param int $id Internal ID of this entity. * * @return $this */ - public function setName($name) + public function setId($id) { - $this->container['name'] = $name; + $this->container['id'] = $id; return $this; } /** - * Gets description + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The time this entity was created. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets modified + * + * @return \DateTime + */ + public function getModified() + { + return $this->container['modified']; + } + + /** + * Sets modified + * + * @param \DateTime $modified The time this entity was last modified. + * + * @return $this + */ + public function setModified($modified) + { + $this->container['modified'] = $modified; + + return $this; + } + + /** + * Gets accountId + * + * @return int + */ + public function getAccountId() + { + return $this->container['accountId']; + } + + /** + * Sets accountId + * + * @param int $accountId The ID of the account that owns this entity. + * + * @return $this + */ + public function setAccountId($accountId) + { + $this->container['accountId'] = $accountId; + + return $this; + } + + /** + * Gets name * * @return string|null */ - public function getDescription() + public function getName() { - return $this->container['description']; + return $this->container['name']; } /** - * Sets description + * Sets name * - * @param string|null $description Description of the role. + * @param string|null $name Name of the role. * * @return $this */ - public function setDescription($description) + public function setName($name) { - $this->container['description'] = $description; + $this->container['name'] = $name; return $this; } /** - * Gets isAdmin + * Gets description * - * @return bool|null + * @return string|null */ - public function getIsAdmin() + public function getDescription() { - return $this->container['isAdmin']; + return $this->container['description']; } /** - * Sets isAdmin + * Sets description * - * @param bool|null $isAdmin Indicates whether the role grants admin permissions. + * @param string|null $description Description of the role. * * @return $this */ - public function setIsAdmin($isAdmin) + public function setDescription($description) { - $this->container['isAdmin'] = $isAdmin; + $this->container['description'] = $description; return $this; } @@ -337,7 +440,7 @@ public function getMembers() /** * Sets members * - * @param int[]|null $members An array of user identifiers. + * @param int[]|null $members A list of user identifiers the role is assigned to. * * @return $this */ diff --git a/lib/Model/RoleV2ApplicationDetails.php b/lib/Model/RoleV2ApplicationDetails.php index bd282bc3..a1906ab2 100644 --- a/lib/Model/RoleV2ApplicationDetails.php +++ b/lib/Model/RoleV2ApplicationDetails.php @@ -59,7 +59,8 @@ class RoleV2ApplicationDetails implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'application' => 'string', 'campaign' => 'string', - 'draftCampaign' => 'string' + 'draftCampaign' => 'string', + 'tools' => 'string' ]; /** @@ -70,7 +71,8 @@ class RoleV2ApplicationDetails implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'application' => null, 'campaign' => null, - 'draftCampaign' => null + 'draftCampaign' => null, + 'tools' => null ]; /** @@ -102,7 +104,8 @@ public static function openAPIFormats() protected static $attributeMap = [ 'application' => 'application', 'campaign' => 'campaign', - 'draftCampaign' => 'draftCampaign' + 'draftCampaign' => 'draftCampaign', + 'tools' => 'tools' ]; /** @@ -113,7 +116,8 @@ public static function openAPIFormats() protected static $setters = [ 'application' => 'setApplication', 'campaign' => 'setCampaign', - 'draftCampaign' => 'setDraftCampaign' + 'draftCampaign' => 'setDraftCampaign', + 'tools' => 'setTools' ]; /** @@ -124,7 +128,8 @@ public static function openAPIFormats() protected static $getters = [ 'application' => 'getApplication', 'campaign' => 'getCampaign', - 'draftCampaign' => 'getDraftCampaign' + 'draftCampaign' => 'getDraftCampaign', + 'tools' => 'getTools' ]; /** @@ -190,6 +195,7 @@ public function __construct(array $data = null) $this->container['application'] = isset($data['application']) ? $data['application'] : null; $this->container['campaign'] = isset($data['campaign']) ? $data['campaign'] : null; $this->container['draftCampaign'] = isset($data['draftCampaign']) ? $data['draftCampaign'] : null; + $this->container['tools'] = isset($data['tools']) ? $data['tools'] : null; } /** @@ -229,7 +235,7 @@ public function getApplication() /** * Sets application * - * @param string|null $application Name of the Application-level permission set. + * @param string|null $application Name of the Application-related permission set for the given Application. * * @return $this */ @@ -253,7 +259,7 @@ public function getCampaign() /** * Sets campaign * - * @param string|null $campaign Name of the campaign-level permission set. + * @param string|null $campaign Name of the campaign-related permission set for the given Application. * * @return $this */ @@ -277,7 +283,7 @@ public function getDraftCampaign() /** * Sets draftCampaign * - * @param string|null $draftCampaign Name of the draft campaign-level permission set. + * @param string|null $draftCampaign Name of the draft campaign-related permission set for the given Application. * * @return $this */ @@ -287,6 +293,30 @@ public function setDraftCampaign($draftCampaign) return $this; } + + /** + * Gets tools + * + * @return string|null + */ + public function getTools() + { + return $this->container['tools']; + } + + /** + * Sets tools + * + * @param string|null $tools Name of the tools-related permission set. + * + * @return $this + */ + public function setTools($tools) + { + $this->container['tools'] = $tools; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/RoleV2Base.php b/lib/Model/RoleV2Base.php new file mode 100644 index 00000000..8b1187b5 --- /dev/null +++ b/lib/Model/RoleV2Base.php @@ -0,0 +1,398 @@ + 'string', + 'description' => 'string', + 'permissions' => '\TalonOne\Client\Model\RoleV2Permissions', + 'members' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'permissions' => null, + 'members' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'description' => 'description', + 'permissions' => 'permissions', + 'members' => 'members' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'permissions' => 'setPermissions', + 'members' => 'setMembers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'permissions' => 'getPermissions', + 'members' => 'getMembers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['permissions'] = isset($data['permissions']) ? $data['permissions'] : null; + $this->container['members'] = isset($data['members']) ? $data['members'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the role. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Description of the role. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets permissions + * + * @return \TalonOne\Client\Model\RoleV2Permissions|null + */ + public function getPermissions() + { + return $this->container['permissions']; + } + + /** + * Sets permissions + * + * @param \TalonOne\Client\Model\RoleV2Permissions|null $permissions permissions + * + * @return $this + */ + public function setPermissions($permissions) + { + $this->container['permissions'] = $permissions; + + return $this; + } + + /** + * Gets members + * + * @return int[]|null + */ + public function getMembers() + { + return $this->container['members']; + } + + /** + * Sets members + * + * @param int[]|null $members A list of user identifiers the role is assigned to. + * + * @return $this + */ + public function setMembers($members) + { + $this->container['members'] = $members; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RoleV2PermissionSet.php b/lib/Model/RoleV2PermissionSet.php index b123c736..d6579833 100644 --- a/lib/Model/RoleV2PermissionSet.php +++ b/lib/Model/RoleV2PermissionSet.php @@ -58,7 +58,7 @@ class RoleV2PermissionSet implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'name' => 'string', - 'operationIds' => 'string[]' + 'logicalOperations' => 'string[]' ]; /** @@ -68,7 +68,7 @@ class RoleV2PermissionSet implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'name' => null, - 'operationIds' => null + 'logicalOperations' => null ]; /** @@ -99,7 +99,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'name' => 'name', - 'operationIds' => 'operationIds' + 'logicalOperations' => 'logicalOperations' ]; /** @@ -109,7 +109,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'name' => 'setName', - 'operationIds' => 'setOperationIds' + 'logicalOperations' => 'setLogicalOperations' ]; /** @@ -119,7 +119,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'name' => 'getName', - 'operationIds' => 'getOperationIds' + 'logicalOperations' => 'getLogicalOperations' ]; /** @@ -183,7 +183,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['operationIds'] = isset($data['operationIds']) ? $data['operationIds'] : null; + $this->container['logicalOperations'] = isset($data['logicalOperations']) ? $data['logicalOperations'] : null; } /** @@ -198,8 +198,8 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['operationIds'] === null) { - $invalidProperties[] = "'operationIds' can't be null"; + if ($this->container['logicalOperations'] === null) { + $invalidProperties[] = "'logicalOperations' can't be null"; } return $invalidProperties; } @@ -241,25 +241,25 @@ public function setName($name) } /** - * Gets operationIds + * Gets logicalOperations * * @return string[] */ - public function getOperationIds() + public function getLogicalOperations() { - return $this->container['operationIds']; + return $this->container['logicalOperations']; } /** - * Sets operationIds + * Sets logicalOperations * - * @param string[] $operationIds operationIds + * @param string[] $logicalOperations List of logical operations in the permission set. Each logical operation must be shown under the `x-permission` tag on an endpoint level. * * @return $this */ - public function setOperationIds($operationIds) + public function setLogicalOperations($logicalOperations) { - $this->container['operationIds'] = $operationIds; + $this->container['logicalOperations'] = $logicalOperations; return $this; } diff --git a/lib/Model/RoleV2Permissions.php b/lib/Model/RoleV2Permissions.php index efc27f45..e50e08f5 100644 --- a/lib/Model/RoleV2Permissions.php +++ b/lib/Model/RoleV2Permissions.php @@ -58,7 +58,7 @@ class RoleV2Permissions implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'permissionSets' => '\TalonOne\Client\Model\RoleV2PermissionSet[]', - 'roles' => '\TalonOne\Client\Model\RoleV2PermissionsRoles' + 'roles' => '\TalonOne\Client\Model\RoleV2RolesGroup' ]; /** @@ -223,7 +223,7 @@ public function getPermissionSets() /** * Sets permissionSets * - * @param \TalonOne\Client\Model\RoleV2PermissionSet[]|null $permissionSets List of grouped operation IDs to use as a reference in the roles section. Each group of operation IDs has a name. + * @param \TalonOne\Client\Model\RoleV2PermissionSet[]|null $permissionSets List of grouped logical operations to use as a reference in the roles section. Each group of logical operations has a name. * * @return $this */ @@ -237,7 +237,7 @@ public function setPermissionSets($permissionSets) /** * Gets roles * - * @return \TalonOne\Client\Model\RoleV2PermissionsRoles|null + * @return \TalonOne\Client\Model\RoleV2RolesGroup|null */ public function getRoles() { @@ -247,7 +247,7 @@ public function getRoles() /** * Sets roles * - * @param \TalonOne\Client\Model\RoleV2PermissionsRoles|null $roles roles + * @param \TalonOne\Client\Model\RoleV2RolesGroup|null $roles roles * * @return $this */ diff --git a/lib/Model/RoleV2RolesGroup.php b/lib/Model/RoleV2RolesGroup.php new file mode 100644 index 00000000..b2f88523 --- /dev/null +++ b/lib/Model/RoleV2RolesGroup.php @@ -0,0 +1,368 @@ + 'map[string,\TalonOne\Client\Model\RoleV2ApplicationDetails]', + 'loyaltyPrograms' => 'map[string,string]', + 'campaignAccessGroups' => 'map[string,string]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'applications' => null, + 'loyaltyPrograms' => null, + 'campaignAccessGroups' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'applications' => 'applications', + 'loyaltyPrograms' => 'loyaltyPrograms', + 'campaignAccessGroups' => 'campaignAccessGroups' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'applications' => 'setApplications', + 'loyaltyPrograms' => 'setLoyaltyPrograms', + 'campaignAccessGroups' => 'setCampaignAccessGroups' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'applications' => 'getApplications', + 'loyaltyPrograms' => 'getLoyaltyPrograms', + 'campaignAccessGroups' => 'getCampaignAccessGroups' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['applications'] = isset($data['applications']) ? $data['applications'] : null; + $this->container['loyaltyPrograms'] = isset($data['loyaltyPrograms']) ? $data['loyaltyPrograms'] : null; + $this->container['campaignAccessGroups'] = isset($data['campaignAccessGroups']) ? $data['campaignAccessGroups'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets applications + * + * @return map[string,\TalonOne\Client\Model\RoleV2ApplicationDetails]|null + */ + public function getApplications() + { + return $this->container['applications']; + } + + /** + * Sets applications + * + * @param map[string,\TalonOne\Client\Model\RoleV2ApplicationDetails]|null $applications A map of the link between the Application, campaign, or draft campaign-related permission set and the Application ID the permissions apply to. + * + * @return $this + */ + public function setApplications($applications) + { + $this->container['applications'] = $applications; + + return $this; + } + + /** + * Gets loyaltyPrograms + * + * @return map[string,string]|null + */ + public function getLoyaltyPrograms() + { + return $this->container['loyaltyPrograms']; + } + + /** + * Sets loyaltyPrograms + * + * @param map[string,string]|null $loyaltyPrograms A map of the link between the loyalty program-related permission set and the Application ID the permissions apply to. + * + * @return $this + */ + public function setLoyaltyPrograms($loyaltyPrograms) + { + $this->container['loyaltyPrograms'] = $loyaltyPrograms; + + return $this; + } + + /** + * Gets campaignAccessGroups + * + * @return map[string,string]|null + */ + public function getCampaignAccessGroups() + { + return $this->container['campaignAccessGroups']; + } + + /** + * Sets campaignAccessGroups + * + * @param map[string,string]|null $campaignAccessGroups A map of the link between the campaign access group-related permission set and the Application ID the permissions apply to. + * + * @return $this + */ + public function setCampaignAccessGroups($campaignAccessGroups) + { + $this->container['campaignAccessGroups'] = $campaignAccessGroups; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RollbackAddedLoyaltyPointsEffectProps.php b/lib/Model/RollbackAddedLoyaltyPointsEffectProps.php index 29209be0..2198d273 100644 --- a/lib/Model/RollbackAddedLoyaltyPointsEffectProps.php +++ b/lib/Model/RollbackAddedLoyaltyPointsEffectProps.php @@ -431,7 +431,7 @@ public function getCartItemSubPosition() /** * Sets cartItemSubPosition * - * @param float|null $cartItemSubPosition The sub-position is returned when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. It indicates to which item the loyalty points were rolled back, for cart items with `quantity` > 1. + * @param float|null $cartItemSubPosition For cart items with `quantity` > 1, the sub-position indicates to which item the loyalty points were rolled back. * * @return $this */ diff --git a/lib/Model/RollbackDiscountEffectProps.php b/lib/Model/RollbackDiscountEffectProps.php index 3187f839..006a3265 100644 --- a/lib/Model/RollbackDiscountEffectProps.php +++ b/lib/Model/RollbackDiscountEffectProps.php @@ -332,7 +332,7 @@ public function getCartItemSubPosition() /** * Sets cartItemSubPosition * - * @param float|null $cartItemSubPosition The index of the item unit in its line item. It is only used for cart items with `quantity` > 1 and is only returned when cart item flattening is enabled. + * @param float|null $cartItemSubPosition For cart items with `quantity` > 1, the subposition returns the index of the item unit in its line item. * * @return $this */ diff --git a/lib/Model/SSOConfig.php b/lib/Model/SSOConfig.php new file mode 100644 index 00000000..ee799390 --- /dev/null +++ b/lib/Model/SSOConfig.php @@ -0,0 +1,311 @@ + 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'enforced' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'enforced' => 'enforced' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enforced' => 'setEnforced' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enforced' => 'getEnforced' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enforced'] = isset($data['enforced']) ? $data['enforced'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['enforced'] === null) { + $invalidProperties[] = "'enforced' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets enforced + * + * @return bool + */ + public function getEnforced() + { + return $this->container['enforced']; + } + + /** + * Sets enforced + * + * @param bool $enforced An indication of whether single sign-on is enforced for the account. When enforced, users cannot use their email and password to sign in to Talon.One. It is not possible to change this to `false` after it is set to `true`. + * + * @return $this + */ + public function setEnforced($enforced) + { + $this->container['enforced'] = $enforced; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SetDiscountPerAdditionalCostPerItemEffectProps.php b/lib/Model/SetDiscountPerAdditionalCostPerItemEffectProps.php index 3337172a..47f4fe9f 100644 --- a/lib/Model/SetDiscountPerAdditionalCostPerItemEffectProps.php +++ b/lib/Model/SetDiscountPerAdditionalCostPerItemEffectProps.php @@ -365,7 +365,7 @@ public function getSubPosition() /** * Sets subPosition * - * @param float|null $subPosition Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. + * @param float|null $subPosition For cart items with `quantity` > 1, the sub position indicates which item the discount applies to. * * @return $this */ diff --git a/lib/Model/SetDiscountPerItemEffectProps.php b/lib/Model/SetDiscountPerItemEffectProps.php index 675eeaa4..655350f4 100644 --- a/lib/Model/SetDiscountPerItemEffectProps.php +++ b/lib/Model/SetDiscountPerItemEffectProps.php @@ -67,7 +67,9 @@ class SetDiscountPerItemEffectProps implements ModelInterface, ArrayAccess 'totalDiscount' => 'float', 'desiredTotalDiscount' => 'float', 'bundleIndex' => 'int', - 'bundleName' => 'string' + 'bundleName' => 'string', + 'targetedItemPosition' => 'float', + 'targetedItemSubPosition' => 'float' ]; /** @@ -85,7 +87,9 @@ class SetDiscountPerItemEffectProps implements ModelInterface, ArrayAccess 'totalDiscount' => null, 'desiredTotalDiscount' => null, 'bundleIndex' => null, - 'bundleName' => null + 'bundleName' => null, + 'targetedItemPosition' => null, + 'targetedItemSubPosition' => null ]; /** @@ -124,7 +128,9 @@ public static function openAPIFormats() 'totalDiscount' => 'totalDiscount', 'desiredTotalDiscount' => 'desiredTotalDiscount', 'bundleIndex' => 'bundleIndex', - 'bundleName' => 'bundleName' + 'bundleName' => 'bundleName', + 'targetedItemPosition' => 'targetedItemPosition', + 'targetedItemSubPosition' => 'targetedItemSubPosition' ]; /** @@ -142,7 +148,9 @@ public static function openAPIFormats() 'totalDiscount' => 'setTotalDiscount', 'desiredTotalDiscount' => 'setDesiredTotalDiscount', 'bundleIndex' => 'setBundleIndex', - 'bundleName' => 'setBundleName' + 'bundleName' => 'setBundleName', + 'targetedItemPosition' => 'setTargetedItemPosition', + 'targetedItemSubPosition' => 'setTargetedItemSubPosition' ]; /** @@ -160,7 +168,9 @@ public static function openAPIFormats() 'totalDiscount' => 'getTotalDiscount', 'desiredTotalDiscount' => 'getDesiredTotalDiscount', 'bundleIndex' => 'getBundleIndex', - 'bundleName' => 'getBundleName' + 'bundleName' => 'getBundleName', + 'targetedItemPosition' => 'getTargetedItemPosition', + 'targetedItemSubPosition' => 'getTargetedItemSubPosition' ]; /** @@ -233,6 +243,8 @@ public function __construct(array $data = null) $this->container['desiredTotalDiscount'] = isset($data['desiredTotalDiscount']) ? $data['desiredTotalDiscount'] : null; $this->container['bundleIndex'] = isset($data['bundleIndex']) ? $data['bundleIndex'] : null; $this->container['bundleName'] = isset($data['bundleName']) ? $data['bundleName'] : null; + $this->container['targetedItemPosition'] = isset($data['targetedItemPosition']) ? $data['targetedItemPosition'] : null; + $this->container['targetedItemSubPosition'] = isset($data['targetedItemSubPosition']) ? $data['targetedItemSubPosition'] : null; } /** @@ -353,7 +365,7 @@ public function getSubPosition() /** * Sets subPosition * - * @param float|null $subPosition Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. + * @param float|null $subPosition For cart items with `quantity` > 1, the sub position indicates which item the discount applies to. * * @return $this */ @@ -507,6 +519,54 @@ public function setBundleName($bundleName) return $this; } + + /** + * Gets targetedItemPosition + * + * @return float|null + */ + public function getTargetedItemPosition() + { + return $this->container['targetedItemPosition']; + } + + /** + * Sets targetedItemPosition + * + * @param float|null $targetedItemPosition The index of the targeted bundle item on which the applied discount is based. + * + * @return $this + */ + public function setTargetedItemPosition($targetedItemPosition) + { + $this->container['targetedItemPosition'] = $targetedItemPosition; + + return $this; + } + + /** + * Gets targetedItemSubPosition + * + * @return float|null + */ + public function getTargetedItemSubPosition() + { + return $this->container['targetedItemSubPosition']; + } + + /** + * Sets targetedItemSubPosition + * + * @param float|null $targetedItemSubPosition The sub-position of the targeted bundle item on which the applied discount is based. + * + * @return $this + */ + public function setTargetedItemSubPosition($targetedItemSubPosition) + { + $this->container['targetedItemSubPosition'] = $targetedItemSubPosition; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Store.php b/lib/Model/Store.php new file mode 100644 index 00000000..289ea244 --- /dev/null +++ b/lib/Model/Store.php @@ -0,0 +1,600 @@ + 'int', + 'created' => '\DateTime', + 'name' => 'string', + 'description' => 'string', + 'attributes' => 'object', + 'integrationId' => 'string', + 'applicationId' => 'int', + 'updated' => '\DateTime', + 'linkedCampaignIds' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'created' => 'date-time', + 'name' => null, + 'description' => null, + 'attributes' => null, + 'integrationId' => 'string', + 'applicationId' => null, + 'updated' => 'date-time', + 'linkedCampaignIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'created' => 'created', + 'name' => 'name', + 'description' => 'description', + 'attributes' => 'attributes', + 'integrationId' => 'integrationId', + 'applicationId' => 'applicationId', + 'updated' => 'updated', + 'linkedCampaignIds' => 'linkedCampaignIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'created' => 'setCreated', + 'name' => 'setName', + 'description' => 'setDescription', + 'attributes' => 'setAttributes', + 'integrationId' => 'setIntegrationId', + 'applicationId' => 'setApplicationId', + 'updated' => 'setUpdated', + 'linkedCampaignIds' => 'setLinkedCampaignIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'created' => 'getCreated', + 'name' => 'getName', + 'description' => 'getDescription', + 'attributes' => 'getAttributes', + 'integrationId' => 'getIntegrationId', + 'applicationId' => 'getApplicationId', + 'updated' => 'getUpdated', + 'linkedCampaignIds' => 'getLinkedCampaignIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['integrationId'] = isset($data['integrationId']) ? $data['integrationId'] : null; + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + $this->container['linkedCampaignIds'] = isset($data['linkedCampaignIds']) ? $data['linkedCampaignIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 200)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 200."; + } + + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['integrationId'] === null) { + $invalidProperties[] = "'integrationId' can't be null"; + } + if ((mb_strlen($this->container['integrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'integrationId', the character length must be smaller than or equal to 1000."; + } + + if ((mb_strlen($this->container['integrationId']) < 1)) { + $invalidProperties[] = "invalid value for 'integrationId', the character length must be bigger than or equal to 1."; + } + + if ($this->container['applicationId'] === null) { + $invalidProperties[] = "'applicationId' can't be null"; + } + if ($this->container['updated'] === null) { + $invalidProperties[] = "'updated' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Internal ID of this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The time this entity was created. The time this entity was created. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the store. + * + * @return $this + */ + public function setName($name) + { + if ((mb_strlen($name) > 200)) { + throw new \InvalidArgumentException('invalid length for $name when calling Store., must be smaller than or equal to 200.'); + } + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling Store., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description The description of the store. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets attributes + * + * @return object|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object|null $attributes The attributes of the store. + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets integrationId + * + * @return string + */ + public function getIntegrationId() + { + return $this->container['integrationId']; + } + + /** + * Sets integrationId + * + * @param string $integrationId The integration ID of the store. You choose this ID when you create a store. + * + * @return $this + */ + public function setIntegrationId($integrationId) + { + if ((mb_strlen($integrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $integrationId when calling Store., must be smaller than or equal to 1000.'); + } + if ((mb_strlen($integrationId) < 1)) { + throw new \InvalidArgumentException('invalid length for $integrationId when calling Store., must be bigger than or equal to 1.'); + } + + $this->container['integrationId'] = $integrationId; + + return $this; + } + + /** + * Gets applicationId + * + * @return int + */ + public function getApplicationId() + { + return $this->container['applicationId']; + } + + /** + * Sets applicationId + * + * @param int $applicationId The ID of the application that owns this entity. + * + * @return $this + */ + public function setApplicationId($applicationId) + { + $this->container['applicationId'] = $applicationId; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime $updated Timestamp of the most recent update on this entity. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets linkedCampaignIds + * + * @return int[]|null + */ + public function getLinkedCampaignIds() + { + return $this->container['linkedCampaignIds']; + } + + /** + * Sets linkedCampaignIds + * + * @param int[]|null $linkedCampaignIds A list of IDs of the campaigns that are linked with current store. + * + * @return $this + */ + public function setLinkedCampaignIds($linkedCampaignIds) + { + $this->container['linkedCampaignIds'] = $linkedCampaignIds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TalangAttribute.php b/lib/Model/TalangAttribute.php index 2e0e1cdd..d4fcd50b 100644 --- a/lib/Model/TalangAttribute.php +++ b/lib/Model/TalangAttribute.php @@ -216,6 +216,7 @@ public function getModelName() const ENTITY_GIVEAWAY = 'Giveaway'; const ENTITY_REFERRAL = 'Referral'; const ENTITY_SESSION = 'Session'; + const ENTITY_STORE = 'Store'; const KIND_BUILT_IN = 'built-in'; const KIND_CUSTOM = 'custom'; @@ -246,6 +247,7 @@ public function getEntityAllowableValues() self::ENTITY_GIVEAWAY, self::ENTITY_REFERRAL, self::ENTITY_SESSION, + self::ENTITY_STORE, ]; } diff --git a/lib/Model/Tier.php b/lib/Model/Tier.php index e8c5dc88..973875be 100644 --- a/lib/Model/Tier.php +++ b/lib/Model/Tier.php @@ -58,7 +58,9 @@ class Tier implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'id' => 'int', - 'name' => 'string' + 'name' => 'string', + 'expiryDate' => '\DateTime', + 'downgradePolicy' => 'string' ]; /** @@ -68,7 +70,9 @@ class Tier implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'id' => null, - 'name' => null + 'name' => null, + 'expiryDate' => 'date-time', + 'downgradePolicy' => null ]; /** @@ -99,7 +103,9 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'id' => 'id', - 'name' => 'name' + 'name' => 'name', + 'expiryDate' => 'expiryDate', + 'downgradePolicy' => 'downgradePolicy' ]; /** @@ -109,7 +115,9 @@ public static function openAPIFormats() */ protected static $setters = [ 'id' => 'setId', - 'name' => 'setName' + 'name' => 'setName', + 'expiryDate' => 'setExpiryDate', + 'downgradePolicy' => 'setDowngradePolicy' ]; /** @@ -119,7 +127,9 @@ public static function openAPIFormats() */ protected static $getters = [ 'id' => 'getId', - 'name' => 'getName' + 'name' => 'getName', + 'expiryDate' => 'getExpiryDate', + 'downgradePolicy' => 'getDowngradePolicy' ]; /** @@ -163,9 +173,24 @@ public function getModelName() return self::$openAPIModelName; } + const DOWNGRADE_POLICY_ONE_DOWN = 'one_down'; + const DOWNGRADE_POLICY_BALANCE_BASED = 'balance_based'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDowngradePolicyAllowableValues() + { + return [ + self::DOWNGRADE_POLICY_ONE_DOWN, + self::DOWNGRADE_POLICY_BALANCE_BASED, + ]; + } + /** * Associative array for storing property values @@ -184,6 +209,8 @@ public function __construct(array $data = null) { $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; + $this->container['downgradePolicy'] = isset($data['downgradePolicy']) ? $data['downgradePolicy'] : null; } /** @@ -201,6 +228,14 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } + $allowedValues = $this->getDowngradePolicyAllowableValues(); + if (!is_null($this->container['downgradePolicy']) && !in_array($this->container['downgradePolicy'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'downgradePolicy', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -263,6 +298,63 @@ public function setName($name) return $this; } + + /** + * Gets expiryDate + * + * @return \DateTime|null + */ + public function getExpiryDate() + { + return $this->container['expiryDate']; + } + + /** + * Sets expiryDate + * + * @param \DateTime|null $expiryDate Date when tier level expires in the RFC3339 format (in the Loyalty Program's timezone). + * + * @return $this + */ + public function setExpiryDate($expiryDate) + { + $this->container['expiryDate'] = $expiryDate; + + return $this; + } + + /** + * Gets downgradePolicy + * + * @return string|null + */ + public function getDowngradePolicy() + { + return $this->container['downgradePolicy']; + } + + /** + * Sets downgradePolicy + * + * @param string|null $downgradePolicy Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. + * + * @return $this + */ + public function setDowngradePolicy($downgradePolicy) + { + $allowedValues = $this->getDowngradePolicyAllowableValues(); + if (!is_null($downgradePolicy) && !in_array($downgradePolicy, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'downgradePolicy', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['downgradePolicy'] = $downgradePolicy; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/TierDowngradeNotificationPolicy.php b/lib/Model/TierDowngradeNotificationPolicy.php new file mode 100644 index 00000000..263d7612 --- /dev/null +++ b/lib/Model/TierDowngradeNotificationPolicy.php @@ -0,0 +1,320 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the notification. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling TierDowngradeNotificationPolicy., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TierUpgradeNotificationPolicy.php b/lib/Model/TierUpgradeNotificationPolicy.php new file mode 100644 index 00000000..ed9e9ca2 --- /dev/null +++ b/lib/Model/TierUpgradeNotificationPolicy.php @@ -0,0 +1,320 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Notification name. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling TierUpgradeNotificationPolicy., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TierWillDowngradeNotificationPolicy.php b/lib/Model/TierWillDowngradeNotificationPolicy.php new file mode 100644 index 00000000..07ca63e2 --- /dev/null +++ b/lib/Model/TierWillDowngradeNotificationPolicy.php @@ -0,0 +1,353 @@ + 'string', + 'triggers' => '\TalonOne\Client\Model\TierWillDowngradeNotificationTrigger[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'triggers' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'triggers' => 'triggers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'triggers' => 'setTriggers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'triggers' => 'getTriggers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['triggers'] = isset($data['triggers']) ? $data['triggers'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['triggers'] === null) { + $invalidProperties[] = "'triggers' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the notification. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling TierWillDowngradeNotificationPolicy., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets triggers + * + * @return \TalonOne\Client\Model\TierWillDowngradeNotificationTrigger[] + */ + public function getTriggers() + { + return $this->container['triggers']; + } + + /** + * Sets triggers + * + * @param \TalonOne\Client\Model\TierWillDowngradeNotificationTrigger[] $triggers triggers + * + * @return $this + */ + public function setTriggers($triggers) + { + $this->container['triggers'] = $triggers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TierWillDowngradeNotificationTrigger.php b/lib/Model/TierWillDowngradeNotificationTrigger.php new file mode 100644 index 00000000..e8017aff --- /dev/null +++ b/lib/Model/TierWillDowngradeNotificationTrigger.php @@ -0,0 +1,376 @@ + 'int', + 'period' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'amount' => null, + 'period' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'amount' => 'amount', + 'period' => 'period' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'period' => 'setPeriod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'period' => 'getPeriod' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const PERIOD_W = 'w'; + const PERIOD_D = 'd'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPeriodAllowableValues() + { + return [ + self::PERIOD_W, + self::PERIOD_D, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['amount'] = isset($data['amount']) ? $data['amount'] : null; + $this->container['period'] = isset($data['period']) ? $data['period'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } + if ($this->container['period'] === null) { + $invalidProperties[] = "'period' can't be null"; + } + $allowedValues = $this->getPeriodAllowableValues(); + if (!is_null($this->container['period']) && !in_array($this->container['period'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'period', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets amount + * + * @return int + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param int $amount The amount of period. + * + * @return $this + */ + public function setAmount($amount) + { + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets period + * + * @return string + */ + public function getPeriod() + { + return $this->container['period']; + } + + /** + * Sets period + * + * @param string $period Notification period indicated by a letter; \"w\" means week, \"d\" means day. + * + * @return $this + */ + public function setPeriod($period) + { + $allowedValues = $this->getPeriodAllowableValues(); + if (!in_array($period, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'period', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['period'] = $period; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TrackEventV2Response.php b/lib/Model/TrackEventV2Response.php new file mode 100644 index 00000000..cf7236e6 --- /dev/null +++ b/lib/Model/TrackEventV2Response.php @@ -0,0 +1,558 @@ + '\TalonOne\Client\Model\CustomerProfile', + 'event' => '\TalonOne\Client\Model\Event', + 'loyalty' => '\TalonOne\Client\Model\Loyalty', + 'triggeredCampaigns' => '\TalonOne\Client\Model\Campaign[]', + 'ruleFailureReasons' => '\TalonOne\Client\Model\RuleFailureReason[]', + 'awardedGiveaways' => '\TalonOne\Client\Model\Giveaway[]', + 'effects' => '\TalonOne\Client\Model\Effect[]', + 'createdCoupons' => '\TalonOne\Client\Model\Coupon[]', + 'createdReferrals' => '\TalonOne\Client\Model\Referral[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'customerProfile' => null, + 'event' => null, + 'loyalty' => null, + 'triggeredCampaigns' => null, + 'ruleFailureReasons' => null, + 'awardedGiveaways' => null, + 'effects' => null, + 'createdCoupons' => null, + 'createdReferrals' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customerProfile' => 'customerProfile', + 'event' => 'event', + 'loyalty' => 'loyalty', + 'triggeredCampaigns' => 'triggeredCampaigns', + 'ruleFailureReasons' => 'ruleFailureReasons', + 'awardedGiveaways' => 'awardedGiveaways', + 'effects' => 'effects', + 'createdCoupons' => 'createdCoupons', + 'createdReferrals' => 'createdReferrals' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customerProfile' => 'setCustomerProfile', + 'event' => 'setEvent', + 'loyalty' => 'setLoyalty', + 'triggeredCampaigns' => 'setTriggeredCampaigns', + 'ruleFailureReasons' => 'setRuleFailureReasons', + 'awardedGiveaways' => 'setAwardedGiveaways', + 'effects' => 'setEffects', + 'createdCoupons' => 'setCreatedCoupons', + 'createdReferrals' => 'setCreatedReferrals' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customerProfile' => 'getCustomerProfile', + 'event' => 'getEvent', + 'loyalty' => 'getLoyalty', + 'triggeredCampaigns' => 'getTriggeredCampaigns', + 'ruleFailureReasons' => 'getRuleFailureReasons', + 'awardedGiveaways' => 'getAwardedGiveaways', + 'effects' => 'getEffects', + 'createdCoupons' => 'getCreatedCoupons', + 'createdReferrals' => 'getCreatedReferrals' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customerProfile'] = isset($data['customerProfile']) ? $data['customerProfile'] : null; + $this->container['event'] = isset($data['event']) ? $data['event'] : null; + $this->container['loyalty'] = isset($data['loyalty']) ? $data['loyalty'] : null; + $this->container['triggeredCampaigns'] = isset($data['triggeredCampaigns']) ? $data['triggeredCampaigns'] : null; + $this->container['ruleFailureReasons'] = isset($data['ruleFailureReasons']) ? $data['ruleFailureReasons'] : null; + $this->container['awardedGiveaways'] = isset($data['awardedGiveaways']) ? $data['awardedGiveaways'] : null; + $this->container['effects'] = isset($data['effects']) ? $data['effects'] : null; + $this->container['createdCoupons'] = isset($data['createdCoupons']) ? $data['createdCoupons'] : null; + $this->container['createdReferrals'] = isset($data['createdReferrals']) ? $data['createdReferrals'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['effects'] === null) { + $invalidProperties[] = "'effects' can't be null"; + } + if ($this->container['createdCoupons'] === null) { + $invalidProperties[] = "'createdCoupons' can't be null"; + } + if ($this->container['createdReferrals'] === null) { + $invalidProperties[] = "'createdReferrals' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customerProfile + * + * @return \TalonOne\Client\Model\CustomerProfile|null + */ + public function getCustomerProfile() + { + return $this->container['customerProfile']; + } + + /** + * Sets customerProfile + * + * @param \TalonOne\Client\Model\CustomerProfile|null $customerProfile customerProfile + * + * @return $this + */ + public function setCustomerProfile($customerProfile) + { + $this->container['customerProfile'] = $customerProfile; + + return $this; + } + + /** + * Gets event + * + * @return \TalonOne\Client\Model\Event|null + */ + public function getEvent() + { + return $this->container['event']; + } + + /** + * Sets event + * + * @param \TalonOne\Client\Model\Event|null $event event + * + * @return $this + */ + public function setEvent($event) + { + $this->container['event'] = $event; + + return $this; + } + + /** + * Gets loyalty + * + * @return \TalonOne\Client\Model\Loyalty|null + */ + public function getLoyalty() + { + return $this->container['loyalty']; + } + + /** + * Sets loyalty + * + * @param \TalonOne\Client\Model\Loyalty|null $loyalty loyalty + * + * @return $this + */ + public function setLoyalty($loyalty) + { + $this->container['loyalty'] = $loyalty; + + return $this; + } + + /** + * Gets triggeredCampaigns + * + * @return \TalonOne\Client\Model\Campaign[]|null + */ + public function getTriggeredCampaigns() + { + return $this->container['triggeredCampaigns']; + } + + /** + * Sets triggeredCampaigns + * + * @param \TalonOne\Client\Model\Campaign[]|null $triggeredCampaigns triggeredCampaigns + * + * @return $this + */ + public function setTriggeredCampaigns($triggeredCampaigns) + { + $this->container['triggeredCampaigns'] = $triggeredCampaigns; + + return $this; + } + + /** + * Gets ruleFailureReasons + * + * @return \TalonOne\Client\Model\RuleFailureReason[]|null + */ + public function getRuleFailureReasons() + { + return $this->container['ruleFailureReasons']; + } + + /** + * Sets ruleFailureReasons + * + * @param \TalonOne\Client\Model\RuleFailureReason[]|null $ruleFailureReasons ruleFailureReasons + * + * @return $this + */ + public function setRuleFailureReasons($ruleFailureReasons) + { + $this->container['ruleFailureReasons'] = $ruleFailureReasons; + + return $this; + } + + /** + * Gets awardedGiveaways + * + * @return \TalonOne\Client\Model\Giveaway[]|null + */ + public function getAwardedGiveaways() + { + return $this->container['awardedGiveaways']; + } + + /** + * Sets awardedGiveaways + * + * @param \TalonOne\Client\Model\Giveaway[]|null $awardedGiveaways awardedGiveaways + * + * @return $this + */ + public function setAwardedGiveaways($awardedGiveaways) + { + $this->container['awardedGiveaways'] = $awardedGiveaways; + + return $this; + } + + /** + * Gets effects + * + * @return \TalonOne\Client\Model\Effect[] + */ + public function getEffects() + { + return $this->container['effects']; + } + + /** + * Sets effects + * + * @param \TalonOne\Client\Model\Effect[] $effects The effects generated by the rules in your running campaigns. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). + * + * @return $this + */ + public function setEffects($effects) + { + $this->container['effects'] = $effects; + + return $this; + } + + /** + * Gets createdCoupons + * + * @return \TalonOne\Client\Model\Coupon[] + */ + public function getCreatedCoupons() + { + return $this->container['createdCoupons']; + } + + /** + * Sets createdCoupons + * + * @param \TalonOne\Client\Model\Coupon[] $createdCoupons createdCoupons + * + * @return $this + */ + public function setCreatedCoupons($createdCoupons) + { + $this->container['createdCoupons'] = $createdCoupons; + + return $this; + } + + /** + * Gets createdReferrals + * + * @return \TalonOne\Client\Model\Referral[] + */ + public function getCreatedReferrals() + { + return $this->container['createdReferrals']; + } + + /** + * Sets createdReferrals + * + * @param \TalonOne\Client\Model\Referral[] $createdReferrals createdReferrals + * + * @return $this + */ + public function setCreatedReferrals($createdReferrals) + { + $this->container['createdReferrals'] = $createdReferrals; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TwoFAConfig.php b/lib/Model/TwoFAConfig.php new file mode 100644 index 00000000..49b11081 --- /dev/null +++ b/lib/Model/TwoFAConfig.php @@ -0,0 +1,341 @@ + 'bool', + 'requireEverySignIn' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'enabled' => null, + 'requireEverySignIn' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled', + 'requireEverySignIn' => 'requireEverySignIn' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled', + 'requireEverySignIn' => 'setRequireEverySignIn' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled', + 'requireEverySignIn' => 'getRequireEverySignIn' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['requireEverySignIn'] = isset($data['requireEverySignIn']) ? $data['requireEverySignIn'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['enabled'] === null) { + $invalidProperties[] = "'enabled' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets enabled + * + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool $enabled An indication of whether two-factor authentication is enabled for the account. + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets requireEverySignIn + * + * @return bool|null + */ + public function getRequireEverySignIn() + { + return $this->container['requireEverySignIn']; + } + + /** + * Sets requireEverySignIn + * + * @param bool|null $requireEverySignIn Can be `true` or `false`. - `true`: Two-factor authentication is required each time a user signs in to their Talon.One account. - `false`: Two-factor authentication is only required when a user signs in to their Talon.One account on a new device, and every 30 days after that. + * + * @return $this + */ + public function setRequireEverySignIn($requireEverySignIn) + { + $this->container['requireEverySignIn'] = $requireEverySignIn; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/UpdateApplication.php b/lib/Model/UpdateApplication.php index c64d0f0b..71bf2190 100644 --- a/lib/Model/UpdateApplication.php +++ b/lib/Model/UpdateApplication.php @@ -64,15 +64,14 @@ class UpdateApplication implements ModelInterface, ArrayAccess 'caseSensitivity' => 'string', 'attributes' => 'object', 'limits' => '\TalonOne\Client\Model\LimitConfig[]', - 'campaignPriority' => 'string', - 'exclusiveCampaignsStrategy' => 'string', 'defaultDiscountScope' => 'string', 'enableCascadingDiscounts' => 'bool', 'enableFlattenedCartItems' => 'bool', 'attributesSettings' => '\TalonOne\Client\Model\AttributesSettings', 'sandbox' => 'bool', 'enablePartialDiscounts' => 'bool', - 'defaultDiscountAdditionalCostPerItemScope' => 'string' + 'defaultDiscountAdditionalCostPerItemScope' => 'string', + 'defaultEvaluationGroupId' => 'int' ]; /** @@ -88,15 +87,14 @@ class UpdateApplication implements ModelInterface, ArrayAccess 'caseSensitivity' => null, 'attributes' => null, 'limits' => null, - 'campaignPriority' => null, - 'exclusiveCampaignsStrategy' => null, 'defaultDiscountScope' => null, 'enableCascadingDiscounts' => null, 'enableFlattenedCartItems' => null, 'attributesSettings' => null, 'sandbox' => null, 'enablePartialDiscounts' => null, - 'defaultDiscountAdditionalCostPerItemScope' => null + 'defaultDiscountAdditionalCostPerItemScope' => null, + 'defaultEvaluationGroupId' => null ]; /** @@ -133,15 +131,14 @@ public static function openAPIFormats() 'caseSensitivity' => 'caseSensitivity', 'attributes' => 'attributes', 'limits' => 'limits', - 'campaignPriority' => 'campaignPriority', - 'exclusiveCampaignsStrategy' => 'exclusiveCampaignsStrategy', 'defaultDiscountScope' => 'defaultDiscountScope', 'enableCascadingDiscounts' => 'enableCascadingDiscounts', 'enableFlattenedCartItems' => 'enableFlattenedCartItems', 'attributesSettings' => 'attributesSettings', 'sandbox' => 'sandbox', 'enablePartialDiscounts' => 'enablePartialDiscounts', - 'defaultDiscountAdditionalCostPerItemScope' => 'defaultDiscountAdditionalCostPerItemScope' + 'defaultDiscountAdditionalCostPerItemScope' => 'defaultDiscountAdditionalCostPerItemScope', + 'defaultEvaluationGroupId' => 'defaultEvaluationGroupId' ]; /** @@ -157,15 +154,14 @@ public static function openAPIFormats() 'caseSensitivity' => 'setCaseSensitivity', 'attributes' => 'setAttributes', 'limits' => 'setLimits', - 'campaignPriority' => 'setCampaignPriority', - 'exclusiveCampaignsStrategy' => 'setExclusiveCampaignsStrategy', 'defaultDiscountScope' => 'setDefaultDiscountScope', 'enableCascadingDiscounts' => 'setEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'setEnableFlattenedCartItems', 'attributesSettings' => 'setAttributesSettings', 'sandbox' => 'setSandbox', 'enablePartialDiscounts' => 'setEnablePartialDiscounts', - 'defaultDiscountAdditionalCostPerItemScope' => 'setDefaultDiscountAdditionalCostPerItemScope' + 'defaultDiscountAdditionalCostPerItemScope' => 'setDefaultDiscountAdditionalCostPerItemScope', + 'defaultEvaluationGroupId' => 'setDefaultEvaluationGroupId' ]; /** @@ -181,15 +177,14 @@ public static function openAPIFormats() 'caseSensitivity' => 'getCaseSensitivity', 'attributes' => 'getAttributes', 'limits' => 'getLimits', - 'campaignPriority' => 'getCampaignPriority', - 'exclusiveCampaignsStrategy' => 'getExclusiveCampaignsStrategy', 'defaultDiscountScope' => 'getDefaultDiscountScope', 'enableCascadingDiscounts' => 'getEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'getEnableFlattenedCartItems', 'attributesSettings' => 'getAttributesSettings', 'sandbox' => 'getSandbox', 'enablePartialDiscounts' => 'getEnablePartialDiscounts', - 'defaultDiscountAdditionalCostPerItemScope' => 'getDefaultDiscountAdditionalCostPerItemScope' + 'defaultDiscountAdditionalCostPerItemScope' => 'getDefaultDiscountAdditionalCostPerItemScope', + 'defaultEvaluationGroupId' => 'getDefaultEvaluationGroupId' ]; /** @@ -236,12 +231,6 @@ public function getModelName() const CASE_SENSITIVITY_SENSITIVE = 'sensitive'; const CASE_SENSITIVITY_INSENSITIVE_UPPERCASE = 'insensitive-uppercase'; const CASE_SENSITIVITY_INSENSITIVE_LOWERCASE = 'insensitive-lowercase'; - const CAMPAIGN_PRIORITY_UNIVERSAL = 'universal'; - const CAMPAIGN_PRIORITY_STACKABLE = 'stackable'; - const CAMPAIGN_PRIORITY_EXCLUSIVE = 'exclusive'; - const EXCLUSIVE_CAMPAIGNS_STRATEGY_LIST_ORDER = 'listOrder'; - const EXCLUSIVE_CAMPAIGNS_STRATEGY_LOWEST_DISCOUNT = 'lowestDiscount'; - const EXCLUSIVE_CAMPAIGNS_STRATEGY_HIGHEST_DISCOUNT = 'highestDiscount'; const DEFAULT_DISCOUNT_SCOPE_SESSION_TOTAL = 'sessionTotal'; const DEFAULT_DISCOUNT_SCOPE_CART_ITEMS = 'cartItems'; const DEFAULT_DISCOUNT_SCOPE_ADDITIONAL_COSTS = 'additionalCosts'; @@ -265,34 +254,6 @@ public function getCaseSensitivityAllowableValues() ]; } - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getCampaignPriorityAllowableValues() - { - return [ - self::CAMPAIGN_PRIORITY_UNIVERSAL, - self::CAMPAIGN_PRIORITY_STACKABLE, - self::CAMPAIGN_PRIORITY_EXCLUSIVE, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getExclusiveCampaignsStrategyAllowableValues() - { - return [ - self::EXCLUSIVE_CAMPAIGNS_STRATEGY_LIST_ORDER, - self::EXCLUSIVE_CAMPAIGNS_STRATEGY_LOWEST_DISCOUNT, - self::EXCLUSIVE_CAMPAIGNS_STRATEGY_HIGHEST_DISCOUNT, - ]; - } - /** * Gets allowable values of the enum * @@ -344,8 +305,6 @@ public function __construct(array $data = null) $this->container['caseSensitivity'] = isset($data['caseSensitivity']) ? $data['caseSensitivity'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; - $this->container['campaignPriority'] = isset($data['campaignPriority']) ? $data['campaignPriority'] : 'universal'; - $this->container['exclusiveCampaignsStrategy'] = isset($data['exclusiveCampaignsStrategy']) ? $data['exclusiveCampaignsStrategy'] : 'listOrder'; $this->container['defaultDiscountScope'] = isset($data['defaultDiscountScope']) ? $data['defaultDiscountScope'] : null; $this->container['enableCascadingDiscounts'] = isset($data['enableCascadingDiscounts']) ? $data['enableCascadingDiscounts'] : null; $this->container['enableFlattenedCartItems'] = isset($data['enableFlattenedCartItems']) ? $data['enableFlattenedCartItems'] : null; @@ -353,6 +312,7 @@ public function __construct(array $data = null) $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; $this->container['enablePartialDiscounts'] = isset($data['enablePartialDiscounts']) ? $data['enablePartialDiscounts'] : null; $this->container['defaultDiscountAdditionalCostPerItemScope'] = isset($data['defaultDiscountAdditionalCostPerItemScope']) ? $data['defaultDiscountAdditionalCostPerItemScope'] : null; + $this->container['defaultEvaluationGroupId'] = isset($data['defaultEvaluationGroupId']) ? $data['defaultEvaluationGroupId'] : null; } /** @@ -393,22 +353,6 @@ public function listInvalidProperties() ); } - $allowedValues = $this->getCampaignPriorityAllowableValues(); - if (!is_null($this->container['campaignPriority']) && !in_array($this->container['campaignPriority'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'campaignPriority', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getExclusiveCampaignsStrategyAllowableValues(); - if (!is_null($this->container['exclusiveCampaignsStrategy']) && !in_array($this->container['exclusiveCampaignsStrategy'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'exclusiveCampaignsStrategy', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - $allowedValues = $this->getDefaultDiscountScopeAllowableValues(); if (!is_null($this->container['defaultDiscountScope']) && !in_array($this->container['defaultDiscountScope'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -632,72 +576,6 @@ public function setLimits($limits) return $this; } - /** - * Gets campaignPriority - * - * @return string|null - */ - public function getCampaignPriority() - { - return $this->container['campaignPriority']; - } - - /** - * Sets campaignPriority - * - * @param string|null $campaignPriority Default [priority](https://docs.talon.one/docs/product/applications/setting-up-campaign-priorities) for campaigns created in this Application. - * - * @return $this - */ - public function setCampaignPriority($campaignPriority) - { - $allowedValues = $this->getCampaignPriorityAllowableValues(); - if (!is_null($campaignPriority) && !in_array($campaignPriority, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'campaignPriority', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['campaignPriority'] = $campaignPriority; - - return $this; - } - - /** - * Gets exclusiveCampaignsStrategy - * - * @return string|null - */ - public function getExclusiveCampaignsStrategy() - { - return $this->container['exclusiveCampaignsStrategy']; - } - - /** - * Sets exclusiveCampaignsStrategy - * - * @param string|null $exclusiveCampaignsStrategy The strategy used when choosing exclusive campaigns for evaluation. - * - * @return $this - */ - public function setExclusiveCampaignsStrategy($exclusiveCampaignsStrategy) - { - $allowedValues = $this->getExclusiveCampaignsStrategyAllowableValues(); - if (!is_null($exclusiveCampaignsStrategy) && !in_array($exclusiveCampaignsStrategy, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'exclusiveCampaignsStrategy', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['exclusiveCampaignsStrategy'] = $exclusiveCampaignsStrategy; - - return $this; - } - /** * Gets defaultDiscountScope * @@ -768,7 +646,7 @@ public function getEnableFlattenedCartItems() /** * Sets enableFlattenedCartItems * - * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). + * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. * * @return $this */ @@ -883,6 +761,30 @@ public function setDefaultDiscountAdditionalCostPerItemScope($defaultDiscountAdd return $this; } + + /** + * Gets defaultEvaluationGroupId + * + * @return int|null + */ + public function getDefaultEvaluationGroupId() + { + return $this->container['defaultEvaluationGroupId']; + } + + /** + * Sets defaultEvaluationGroupId + * + * @param int|null $defaultEvaluationGroupId The ID of the default campaign evaluation group to which new campaigns will be added unless a different group is selected when creating the campaign. + * + * @return $this + */ + public function setDefaultEvaluationGroupId($defaultEvaluationGroupId) + { + $this->container['defaultEvaluationGroupId'] = $defaultEvaluationGroupId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/UpdateCampaign.php b/lib/Model/UpdateCampaign.php index 5a936765..e88c677c 100644 --- a/lib/Model/UpdateCampaign.php +++ b/lib/Model/UpdateCampaign.php @@ -69,7 +69,10 @@ class UpdateCampaign implements ModelInterface, ArrayAccess 'couponSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', 'referralSettings' => '\TalonOne\Client\Model\CodeGeneratorSettings', 'limits' => '\TalonOne\Client\Model\LimitConfig[]', - 'campaignGroups' => 'int[]' + 'campaignGroups' => 'int[]', + 'evaluationGroupId' => 'int', + 'type' => 'string', + 'linkedStoreIds' => 'int[]' ]; /** @@ -90,7 +93,10 @@ class UpdateCampaign implements ModelInterface, ArrayAccess 'couponSettings' => null, 'referralSettings' => null, 'limits' => null, - 'campaignGroups' => null + 'campaignGroups' => null, + 'evaluationGroupId' => null, + 'type' => null, + 'linkedStoreIds' => null ]; /** @@ -132,7 +138,10 @@ public static function openAPIFormats() 'couponSettings' => 'couponSettings', 'referralSettings' => 'referralSettings', 'limits' => 'limits', - 'campaignGroups' => 'campaignGroups' + 'campaignGroups' => 'campaignGroups', + 'evaluationGroupId' => 'evaluationGroupId', + 'type' => 'type', + 'linkedStoreIds' => 'linkedStoreIds' ]; /** @@ -153,7 +162,10 @@ public static function openAPIFormats() 'couponSettings' => 'setCouponSettings', 'referralSettings' => 'setReferralSettings', 'limits' => 'setLimits', - 'campaignGroups' => 'setCampaignGroups' + 'campaignGroups' => 'setCampaignGroups', + 'evaluationGroupId' => 'setEvaluationGroupId', + 'type' => 'setType', + 'linkedStoreIds' => 'setLinkedStoreIds' ]; /** @@ -174,7 +186,10 @@ public static function openAPIFormats() 'couponSettings' => 'getCouponSettings', 'referralSettings' => 'getReferralSettings', 'limits' => 'getLimits', - 'campaignGroups' => 'getCampaignGroups' + 'campaignGroups' => 'getCampaignGroups', + 'evaluationGroupId' => 'getEvaluationGroupId', + 'type' => 'getType', + 'linkedStoreIds' => 'getLinkedStoreIds' ]; /** @@ -226,6 +241,8 @@ public function getModelName() const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; const FEATURES_STRIKETHROUGH = 'strikethrough'; + const TYPE_CART_ITEM = 'cartItem'; + const TYPE_ADVANCED = 'advanced'; @@ -259,6 +276,19 @@ public function getFeaturesAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CART_ITEM, + self::TYPE_ADVANCED, + ]; + } + /** * Associative array for storing property values @@ -288,6 +318,9 @@ public function __construct(array $data = null) $this->container['referralSettings'] = isset($data['referralSettings']) ? $data['referralSettings'] : null; $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; $this->container['campaignGroups'] = isset($data['campaignGroups']) ? $data['campaignGroups'] : null; + $this->container['evaluationGroupId'] = isset($data['evaluationGroupId']) ? $data['evaluationGroupId'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : 'advanced'; + $this->container['linkedStoreIds'] = isset($data['linkedStoreIds']) ? $data['linkedStoreIds'] : null; } /** @@ -323,6 +356,14 @@ public function listInvalidProperties() if ($this->container['limits'] === null) { $invalidProperties[] = "'limits' can't be null"; } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -509,7 +550,7 @@ public function getActiveRulesetId() /** * Sets activeRulesetId * - * @param int|null $activeRulesetId ID of Ruleset this campaign applies on customer session evaluation. + * @param int|null $activeRulesetId [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. * * @return $this */ @@ -662,7 +703,7 @@ public function getCampaignGroups() /** * Sets campaignGroups * - * @param int[]|null $campaignGroups The IDs of the campaign groups that own this entity. + * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups) this campaign belongs to. * * @return $this */ @@ -672,6 +713,87 @@ public function setCampaignGroups($campaignGroups) return $this; } + + /** + * Gets evaluationGroupId + * + * @return int|null + */ + public function getEvaluationGroupId() + { + return $this->container['evaluationGroupId']; + } + + /** + * Sets evaluationGroupId + * + * @param int|null $evaluationGroupId The ID of the campaign evaluation group the campaign belongs to. + * + * @return $this + */ + public function setEvaluationGroupId($evaluationGroupId) + { + $this->container['evaluationGroupId'] = $evaluationGroupId; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets linkedStoreIds + * + * @return int[]|null + */ + public function getLinkedStoreIds() + { + return $this->container['linkedStoreIds']; + } + + /** + * Sets linkedStoreIds + * + * @param int[]|null $linkedStoreIds A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. + * + * @return $this + */ + public function setLinkedStoreIds($linkedStoreIds) + { + $this->container['linkedStoreIds'] = $linkedStoreIds; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/UpdateCampaignEvaluationGroup.php b/lib/Model/UpdateCampaignEvaluationGroup.php new file mode 100644 index 00000000..3527b5dc --- /dev/null +++ b/lib/Model/UpdateCampaignEvaluationGroup.php @@ -0,0 +1,551 @@ + 'string', + 'parentId' => 'int', + 'description' => 'string', + 'evaluationMode' => 'string', + 'evaluationScope' => 'string', + 'locked' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'parentId' => null, + 'description' => null, + 'evaluationMode' => null, + 'evaluationScope' => null, + 'locked' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'parentId' => 'parentId', + 'description' => 'description', + 'evaluationMode' => 'evaluationMode', + 'evaluationScope' => 'evaluationScope', + 'locked' => 'locked' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'parentId' => 'setParentId', + 'description' => 'setDescription', + 'evaluationMode' => 'setEvaluationMode', + 'evaluationScope' => 'setEvaluationScope', + 'locked' => 'setLocked' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'parentId' => 'getParentId', + 'description' => 'getDescription', + 'evaluationMode' => 'getEvaluationMode', + 'evaluationScope' => 'getEvaluationScope', + 'locked' => 'getLocked' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const EVALUATION_MODE_STACKABLE = 'stackable'; + const EVALUATION_MODE_LIST_ORDER = 'listOrder'; + const EVALUATION_MODE_LOWEST_DISCOUNT = 'lowestDiscount'; + const EVALUATION_MODE_HIGHEST_DISCOUNT = 'highestDiscount'; + const EVALUATION_SCOPE_CART_ITEM = 'cartItem'; + const EVALUATION_SCOPE_SESSION = 'session'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEvaluationModeAllowableValues() + { + return [ + self::EVALUATION_MODE_STACKABLE, + self::EVALUATION_MODE_LIST_ORDER, + self::EVALUATION_MODE_LOWEST_DISCOUNT, + self::EVALUATION_MODE_HIGHEST_DISCOUNT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEvaluationScopeAllowableValues() + { + return [ + self::EVALUATION_SCOPE_CART_ITEM, + self::EVALUATION_SCOPE_SESSION, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['evaluationMode'] = isset($data['evaluationMode']) ? $data['evaluationMode'] : null; + $this->container['evaluationScope'] = isset($data['evaluationScope']) ? $data['evaluationScope'] : null; + $this->container['locked'] = isset($data['locked']) ? $data['locked'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['parentId'] === null) { + $invalidProperties[] = "'parentId' can't be null"; + } + if (($this->container['parentId'] < 1)) { + $invalidProperties[] = "invalid value for 'parentId', must be bigger than or equal to 1."; + } + + if ($this->container['evaluationMode'] === null) { + $invalidProperties[] = "'evaluationMode' can't be null"; + } + $allowedValues = $this->getEvaluationModeAllowableValues(); + if (!is_null($this->container['evaluationMode']) && !in_array($this->container['evaluationMode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'evaluationMode', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['evaluationScope'] === null) { + $invalidProperties[] = "'evaluationScope' can't be null"; + } + $allowedValues = $this->getEvaluationScopeAllowableValues(); + if (!is_null($this->container['evaluationScope']) && !in_array($this->container['evaluationScope'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'evaluationScope', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['locked'] === null) { + $invalidProperties[] = "'locked' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the campaign evaluation group. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets parentId + * + * @return int + */ + public function getParentId() + { + return $this->container['parentId']; + } + + /** + * Sets parentId + * + * @param int $parentId The ID of the parent group that contains the campaign evaluation group. + * + * @return $this + */ + public function setParentId($parentId) + { + + if (($parentId < 1)) { + throw new \InvalidArgumentException('invalid value for $parentId when calling UpdateCampaignEvaluationGroup., must be bigger than or equal to 1.'); + } + + $this->container['parentId'] = $parentId; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A description of the campaign evaluation group. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets evaluationMode + * + * @return string + */ + public function getEvaluationMode() + { + return $this->container['evaluationMode']; + } + + /** + * Sets evaluationMode + * + * @param string $evaluationMode The mode by which campaigns in the campaign evaluation group are evaluated. + * + * @return $this + */ + public function setEvaluationMode($evaluationMode) + { + $allowedValues = $this->getEvaluationModeAllowableValues(); + if (!in_array($evaluationMode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'evaluationMode', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['evaluationMode'] = $evaluationMode; + + return $this; + } + + /** + * Gets evaluationScope + * + * @return string + */ + public function getEvaluationScope() + { + return $this->container['evaluationScope']; + } + + /** + * Sets evaluationScope + * + * @param string $evaluationScope The evaluation scope of the campaign evaluation group. + * + * @return $this + */ + public function setEvaluationScope($evaluationScope) + { + $allowedValues = $this->getEvaluationScopeAllowableValues(); + if (!in_array($evaluationScope, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'evaluationScope', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['evaluationScope'] = $evaluationScope; + + return $this; + } + + /** + * Gets locked + * + * @return bool + */ + public function getLocked() + { + return $this->container['locked']; + } + + /** + * Sets locked + * + * @param bool $locked An indicator of whether the campaign evaluation group is locked for modification. + * + * @return $this + */ + public function setLocked($locked) + { + $this->container['locked'] = $locked; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/UpdateCampaignGroup.php b/lib/Model/UpdateCampaignGroup.php index 7e4852ff..6e172ef8 100644 --- a/lib/Model/UpdateCampaignGroup.php +++ b/lib/Model/UpdateCampaignGroup.php @@ -243,7 +243,7 @@ public function getName() /** * Sets name * - * @param string $name The name of this campaign group. + * @param string $name The name of this campaign access group. * * @return $this */ @@ -272,7 +272,7 @@ public function getDescription() /** * Sets description * - * @param string|null $description A longer description of the campaign group. + * @param string|null $description A longer description of the campaign access group. * * @return $this */ @@ -296,7 +296,7 @@ public function getSubscribedApplicationsIds() /** * Sets subscribedApplicationsIds * - * @param int[]|null $subscribedApplicationsIds A list of the IDs of the applications that this campaign group is enabled for. + * @param int[]|null $subscribedApplicationsIds A list of IDs of the Applications that this campaign access group is enabled for. * * @return $this */ @@ -320,7 +320,7 @@ public function getCampaignIds() /** * Sets campaignIds * - * @param int[]|null $campaignIds A list of the IDs of the campaigns that this campaign group owns. + * @param int[]|null $campaignIds A list of IDs of the campaigns that are part of the campaign access group. * * @return $this */ diff --git a/lib/Model/UpdateCampaignTemplate.php b/lib/Model/UpdateCampaignTemplate.php index 9d73b3b1..05ea3a27 100644 --- a/lib/Model/UpdateCampaignTemplate.php +++ b/lib/Model/UpdateCampaignTemplate.php @@ -72,7 +72,8 @@ class UpdateCampaignTemplate implements ModelInterface, ArrayAccess 'templateParams' => '\TalonOne\Client\Model\CampaignTemplateParams[]', 'applicationsIds' => 'int[]', 'campaignCollections' => '\TalonOne\Client\Model\CampaignTemplateCollection[]', - 'defaultCampaignGroupId' => 'int' + 'defaultCampaignGroupId' => 'int', + 'campaignType' => 'string' ]; /** @@ -96,7 +97,8 @@ class UpdateCampaignTemplate implements ModelInterface, ArrayAccess 'templateParams' => null, 'applicationsIds' => null, 'campaignCollections' => null, - 'defaultCampaignGroupId' => null + 'defaultCampaignGroupId' => null, + 'campaignType' => null ]; /** @@ -141,7 +143,8 @@ public static function openAPIFormats() 'templateParams' => 'templateParams', 'applicationsIds' => 'applicationsIds', 'campaignCollections' => 'campaignCollections', - 'defaultCampaignGroupId' => 'defaultCampaignGroupId' + 'defaultCampaignGroupId' => 'defaultCampaignGroupId', + 'campaignType' => 'campaignType' ]; /** @@ -165,7 +168,8 @@ public static function openAPIFormats() 'templateParams' => 'setTemplateParams', 'applicationsIds' => 'setApplicationsIds', 'campaignCollections' => 'setCampaignCollections', - 'defaultCampaignGroupId' => 'setDefaultCampaignGroupId' + 'defaultCampaignGroupId' => 'setDefaultCampaignGroupId', + 'campaignType' => 'setCampaignType' ]; /** @@ -189,7 +193,8 @@ public static function openAPIFormats() 'templateParams' => 'getTemplateParams', 'applicationsIds' => 'getApplicationsIds', 'campaignCollections' => 'getCampaignCollections', - 'defaultCampaignGroupId' => 'getDefaultCampaignGroupId' + 'defaultCampaignGroupId' => 'getDefaultCampaignGroupId', + 'campaignType' => 'getCampaignType' ]; /** @@ -241,6 +246,8 @@ public function getModelName() const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; const FEATURES_STRIKETHROUGH = 'strikethrough'; + const CAMPAIGN_TYPE_CART_ITEM = 'cartItem'; + const CAMPAIGN_TYPE_ADVANCED = 'advanced'; @@ -274,6 +281,19 @@ public function getFeaturesAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCampaignTypeAllowableValues() + { + return [ + self::CAMPAIGN_TYPE_CART_ITEM, + self::CAMPAIGN_TYPE_ADVANCED, + ]; + } + /** * Associative array for storing property values @@ -306,6 +326,7 @@ public function __construct(array $data = null) $this->container['applicationsIds'] = isset($data['applicationsIds']) ? $data['applicationsIds'] : null; $this->container['campaignCollections'] = isset($data['campaignCollections']) ? $data['campaignCollections'] : null; $this->container['defaultCampaignGroupId'] = isset($data['defaultCampaignGroupId']) ? $data['defaultCampaignGroupId'] : null; + $this->container['campaignType'] = isset($data['campaignType']) ? $data['campaignType'] : 'advanced'; } /** @@ -344,6 +365,14 @@ public function listInvalidProperties() if ($this->container['applicationsIds'] === null) { $invalidProperties[] = "'applicationsIds' can't be null"; } + $allowedValues = $this->getCampaignTypeAllowableValues(); + if (!is_null($this->container['campaignType']) && !in_array($this->container['campaignType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'campaignType', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -765,6 +794,39 @@ public function setDefaultCampaignGroupId($defaultCampaignGroupId) return $this; } + + /** + * Gets campaignType + * + * @return string|null + */ + public function getCampaignType() + { + return $this->container['campaignType']; + } + + /** + * Sets campaignType + * + * @param string|null $campaignType The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. + * + * @return $this + */ + public function setCampaignType($campaignType) + { + $allowedValues = $this->getCampaignTypeAllowableValues(); + if (!is_null($campaignType) && !in_array($campaignType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'campaignType', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['campaignType'] = $campaignType; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/UpdateCoupon.php b/lib/Model/UpdateCoupon.php index ce835a8a..0e406556 100644 --- a/lib/Model/UpdateCoupon.php +++ b/lib/Model/UpdateCoupon.php @@ -66,7 +66,8 @@ class UpdateCoupon implements ModelInterface, ArrayAccess 'limits' => '\TalonOne\Client\Model\LimitConfig[]', 'recipientIntegrationId' => 'string', 'attributes' => 'object', - 'isReservationMandatory' => 'bool' + 'isReservationMandatory' => 'bool', + 'implicitlyReserved' => 'bool' ]; /** @@ -83,7 +84,8 @@ class UpdateCoupon implements ModelInterface, ArrayAccess 'limits' => null, 'recipientIntegrationId' => null, 'attributes' => null, - 'isReservationMandatory' => null + 'isReservationMandatory' => null, + 'implicitlyReserved' => null ]; /** @@ -121,7 +123,8 @@ public static function openAPIFormats() 'limits' => 'limits', 'recipientIntegrationId' => 'recipientIntegrationId', 'attributes' => 'attributes', - 'isReservationMandatory' => 'isReservationMandatory' + 'isReservationMandatory' => 'isReservationMandatory', + 'implicitlyReserved' => 'implicitlyReserved' ]; /** @@ -138,7 +141,8 @@ public static function openAPIFormats() 'limits' => 'setLimits', 'recipientIntegrationId' => 'setRecipientIntegrationId', 'attributes' => 'setAttributes', - 'isReservationMandatory' => 'setIsReservationMandatory' + 'isReservationMandatory' => 'setIsReservationMandatory', + 'implicitlyReserved' => 'setImplicitlyReserved' ]; /** @@ -155,7 +159,8 @@ public static function openAPIFormats() 'limits' => 'getLimits', 'recipientIntegrationId' => 'getRecipientIntegrationId', 'attributes' => 'getAttributes', - 'isReservationMandatory' => 'getIsReservationMandatory' + 'isReservationMandatory' => 'getIsReservationMandatory', + 'implicitlyReserved' => 'getImplicitlyReserved' ]; /** @@ -227,6 +232,7 @@ public function __construct(array $data = null) $this->container['recipientIntegrationId'] = isset($data['recipientIntegrationId']) ? $data['recipientIntegrationId'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['isReservationMandatory'] = isset($data['isReservationMandatory']) ? $data['isReservationMandatory'] : true; + $this->container['implicitlyReserved'] = isset($data['implicitlyReserved']) ? $data['implicitlyReserved'] : null; } /** @@ -524,6 +530,30 @@ public function setIsReservationMandatory($isReservationMandatory) return $this; } + + /** + * Gets implicitlyReserved + * + * @return bool|null + */ + public function getImplicitlyReserved() + { + return $this->container['implicitlyReserved']; + } + + /** + * Sets implicitlyReserved + * + * @param bool|null $implicitlyReserved An indication of whether the coupon is implicitly reserved for all customers. + * + * @return $this + */ + public function setImplicitlyReserved($implicitlyReserved) + { + $this->container['implicitlyReserved'] = $implicitlyReserved; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/UpdateCouponBatch.php b/lib/Model/UpdateCouponBatch.php index 07e398ff..722252f5 100644 --- a/lib/Model/UpdateCouponBatch.php +++ b/lib/Model/UpdateCouponBatch.php @@ -422,7 +422,7 @@ public function getAttributes() /** * Sets attributes * - * @param object|null $attributes Arbitrary properties associated with this item. + * @param object|null $attributes Optional property to set the value of custom coupon attributes. They are defined in the Campaign Manager, see [Managing attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes). Coupon attributes can also be set to _mandatory_ in your Application [settings](https://docs.talon.one/docs/product/applications/using-attributes#making-attributes-mandatory). If your Application uses mandatory attributes, you must use this property to set their value. * * @return $this */ @@ -446,7 +446,7 @@ public function getBatchID() /** * Sets batchID * - * @param string|null $batchID The id of the batch the coupon belongs to. + * @param string|null $batchID The ID of the batch the coupon(s) belong to. * * @return $this */ diff --git a/lib/Model/UpdateLoyaltyProgram.php b/lib/Model/UpdateLoyaltyProgram.php index 530cc416..604965ef 100644 --- a/lib/Model/UpdateLoyaltyProgram.php +++ b/lib/Model/UpdateLoyaltyProgram.php @@ -66,6 +66,8 @@ class UpdateLoyaltyProgram implements ModelInterface, ArrayAccess 'allowSubledger' => 'bool', 'usersPerCardLimit' => 'int', 'sandbox' => 'bool', + 'tiersExpireIn' => 'string', + 'tiersDowngradePolicy' => 'string', 'tiers' => '\TalonOne\Client\Model\NewLoyaltyTier[]' ]; @@ -83,6 +85,8 @@ class UpdateLoyaltyProgram implements ModelInterface, ArrayAccess 'allowSubledger' => null, 'usersPerCardLimit' => null, 'sandbox' => null, + 'tiersExpireIn' => null, + 'tiersDowngradePolicy' => null, 'tiers' => null ]; @@ -121,6 +125,8 @@ public static function openAPIFormats() 'allowSubledger' => 'allowSubledger', 'usersPerCardLimit' => 'usersPerCardLimit', 'sandbox' => 'sandbox', + 'tiersExpireIn' => 'tiersExpireIn', + 'tiersDowngradePolicy' => 'tiersDowngradePolicy', 'tiers' => 'tiers' ]; @@ -138,6 +144,8 @@ public static function openAPIFormats() 'allowSubledger' => 'setAllowSubledger', 'usersPerCardLimit' => 'setUsersPerCardLimit', 'sandbox' => 'setSandbox', + 'tiersExpireIn' => 'setTiersExpireIn', + 'tiersDowngradePolicy' => 'setTiersDowngradePolicy', 'tiers' => 'setTiers' ]; @@ -155,6 +163,8 @@ public static function openAPIFormats() 'allowSubledger' => 'getAllowSubledger', 'usersPerCardLimit' => 'getUsersPerCardLimit', 'sandbox' => 'getSandbox', + 'tiersExpireIn' => 'getTiersExpireIn', + 'tiersDowngradePolicy' => 'getTiersDowngradePolicy', 'tiers' => 'getTiers' ]; @@ -199,9 +209,24 @@ public function getModelName() return self::$openAPIModelName; } + const TIERS_DOWNGRADE_POLICY_ONE_DOWN = 'one_down'; + const TIERS_DOWNGRADE_POLICY_BALANCE_BASED = 'balance_based'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTiersDowngradePolicyAllowableValues() + { + return [ + self::TIERS_DOWNGRADE_POLICY_ONE_DOWN, + self::TIERS_DOWNGRADE_POLICY_BALANCE_BASED, + ]; + } + /** * Associative array for storing property values @@ -226,6 +251,8 @@ public function __construct(array $data = null) $this->container['allowSubledger'] = isset($data['allowSubledger']) ? $data['allowSubledger'] : null; $this->container['usersPerCardLimit'] = isset($data['usersPerCardLimit']) ? $data['usersPerCardLimit'] : null; $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; + $this->container['tiersExpireIn'] = isset($data['tiersExpireIn']) ? $data['tiersExpireIn'] : null; + $this->container['tiersDowngradePolicy'] = isset($data['tiersDowngradePolicy']) ? $data['tiersDowngradePolicy'] : null; $this->container['tiers'] = isset($data['tiers']) ? $data['tiers'] : null; } @@ -242,6 +269,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'usersPerCardLimit', must be bigger than or equal to 0."; } + $allowedValues = $this->getTiersDowngradePolicyAllowableValues(); + if (!is_null($this->container['tiersDowngradePolicy']) && !in_array($this->container['tiersDowngradePolicy'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'tiersDowngradePolicy', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -454,6 +489,63 @@ public function setSandbox($sandbox) return $this; } + /** + * Gets tiersExpireIn + * + * @return string|null + */ + public function getTiersExpireIn() + { + return $this->container['tiersExpireIn']; + } + + /** + * Sets tiersExpireIn + * + * @param string|null $tiersExpireIn The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. + * + * @return $this + */ + public function setTiersExpireIn($tiersExpireIn) + { + $this->container['tiersExpireIn'] = $tiersExpireIn; + + return $this; + } + + /** + * Gets tiersDowngradePolicy + * + * @return string|null + */ + public function getTiersDowngradePolicy() + { + return $this->container['tiersDowngradePolicy']; + } + + /** + * Sets tiersDowngradePolicy + * + * @param string|null $tiersDowngradePolicy Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. + * + * @return $this + */ + public function setTiersDowngradePolicy($tiersDowngradePolicy) + { + $allowedValues = $this->getTiersDowngradePolicyAllowableValues(); + if (!is_null($tiersDowngradePolicy) && !in_array($tiersDowngradePolicy, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'tiersDowngradePolicy', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['tiersDowngradePolicy'] = $tiersDowngradePolicy; + + return $this; + } + /** * Gets tiers * diff --git a/lib/Model/UpdateStore.php b/lib/Model/UpdateStore.php new file mode 100644 index 00000000..a7c7d997 --- /dev/null +++ b/lib/Model/UpdateStore.php @@ -0,0 +1,389 @@ + 'string', + 'description' => 'string', + 'attributes' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'attributes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'description' => 'description', + 'attributes' => 'attributes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'attributes' => 'setAttributes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'attributes' => 'getAttributes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 200)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 200."; + } + + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the store. + * + * @return $this + */ + public function setName($name) + { + if ((mb_strlen($name) > 200)) { + throw new \InvalidArgumentException('invalid length for $name when calling UpdateStore., must be smaller than or equal to 200.'); + } + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling UpdateStore., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description The description of the store. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets attributes + * + * @return object|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object|null $attributes The attributes of the store. + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/UpdateUser.php b/lib/Model/UpdateUser.php index b1968f2b..9c156a52 100644 --- a/lib/Model/UpdateUser.php +++ b/lib/Model/UpdateUser.php @@ -61,7 +61,8 @@ class UpdateUser implements ModelInterface, ArrayAccess 'policy' => 'string', 'state' => 'string', 'roles' => 'int[]', - 'applicationNotificationSubscriptions' => 'object' + 'applicationNotificationSubscriptions' => 'object', + 'isAdmin' => 'bool' ]; /** @@ -74,7 +75,8 @@ class UpdateUser implements ModelInterface, ArrayAccess 'policy' => null, 'state' => null, 'roles' => null, - 'applicationNotificationSubscriptions' => null + 'applicationNotificationSubscriptions' => null, + 'isAdmin' => null ]; /** @@ -108,7 +110,8 @@ public static function openAPIFormats() 'policy' => 'policy', 'state' => 'state', 'roles' => 'roles', - 'applicationNotificationSubscriptions' => 'applicationNotificationSubscriptions' + 'applicationNotificationSubscriptions' => 'applicationNotificationSubscriptions', + 'isAdmin' => 'isAdmin' ]; /** @@ -121,7 +124,8 @@ public static function openAPIFormats() 'policy' => 'setPolicy', 'state' => 'setState', 'roles' => 'setRoles', - 'applicationNotificationSubscriptions' => 'setApplicationNotificationSubscriptions' + 'applicationNotificationSubscriptions' => 'setApplicationNotificationSubscriptions', + 'isAdmin' => 'setIsAdmin' ]; /** @@ -134,7 +138,8 @@ public static function openAPIFormats() 'policy' => 'getPolicy', 'state' => 'getState', 'roles' => 'getRoles', - 'applicationNotificationSubscriptions' => 'getApplicationNotificationSubscriptions' + 'applicationNotificationSubscriptions' => 'getApplicationNotificationSubscriptions', + 'isAdmin' => 'getIsAdmin' ]; /** @@ -217,6 +222,7 @@ public function __construct(array $data = null) $this->container['state'] = isset($data['state']) ? $data['state'] : null; $this->container['roles'] = isset($data['roles']) ? $data['roles'] : null; $this->container['applicationNotificationSubscriptions'] = isset($data['applicationNotificationSubscriptions']) ? $data['applicationNotificationSubscriptions'] : null; + $this->container['isAdmin'] = isset($data['isAdmin']) ? $data['isAdmin'] : null; } /** @@ -379,6 +385,30 @@ public function setApplicationNotificationSubscriptions($applicationNotification return $this; } + + /** + * Gets isAdmin + * + * @return bool|null + */ + public function getIsAdmin() + { + return $this->container['isAdmin']; + } + + /** + * Sets isAdmin + * + * @param bool|null $isAdmin An indication of whether the user has admin permissions. + * + * @return $this + */ + public function setIsAdmin($isAdmin) + { + $this->container['isAdmin'] = $isAdmin; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/User.php b/lib/Model/User.php index b455c6fd..f5f49ac1 100644 --- a/lib/Model/User.php +++ b/lib/Model/User.php @@ -70,7 +70,10 @@ class User implements ModelInterface, ArrayAccess 'latestFeedTimestamp' => '\DateTime', 'roles' => 'int[]', 'applicationNotificationSubscriptions' => 'object', - 'authMethod' => 'string' + 'authMethod' => 'string', + 'isAdmin' => 'bool', + 'lastSignedIn' => '\DateTime', + 'lastAccessed' => '\DateTime' ]; /** @@ -91,7 +94,10 @@ class User implements ModelInterface, ArrayAccess 'latestFeedTimestamp' => 'date-time', 'roles' => null, 'applicationNotificationSubscriptions' => null, - 'authMethod' => null + 'authMethod' => null, + 'isAdmin' => null, + 'lastSignedIn' => 'date-time', + 'lastAccessed' => 'date-time' ]; /** @@ -133,7 +139,10 @@ public static function openAPIFormats() 'latestFeedTimestamp' => 'latestFeedTimestamp', 'roles' => 'roles', 'applicationNotificationSubscriptions' => 'applicationNotificationSubscriptions', - 'authMethod' => 'authMethod' + 'authMethod' => 'authMethod', + 'isAdmin' => 'isAdmin', + 'lastSignedIn' => 'lastSignedIn', + 'lastAccessed' => 'lastAccessed' ]; /** @@ -154,7 +163,10 @@ public static function openAPIFormats() 'latestFeedTimestamp' => 'setLatestFeedTimestamp', 'roles' => 'setRoles', 'applicationNotificationSubscriptions' => 'setApplicationNotificationSubscriptions', - 'authMethod' => 'setAuthMethod' + 'authMethod' => 'setAuthMethod', + 'isAdmin' => 'setIsAdmin', + 'lastSignedIn' => 'setLastSignedIn', + 'lastAccessed' => 'setLastAccessed' ]; /** @@ -175,7 +187,10 @@ public static function openAPIFormats() 'latestFeedTimestamp' => 'getLatestFeedTimestamp', 'roles' => 'getRoles', 'applicationNotificationSubscriptions' => 'getApplicationNotificationSubscriptions', - 'authMethod' => 'getAuthMethod' + 'authMethod' => 'getAuthMethod', + 'isAdmin' => 'getIsAdmin', + 'lastSignedIn' => 'getLastSignedIn', + 'lastAccessed' => 'getLastAccessed' ]; /** @@ -268,6 +283,9 @@ public function __construct(array $data = null) $this->container['roles'] = isset($data['roles']) ? $data['roles'] : null; $this->container['applicationNotificationSubscriptions'] = isset($data['applicationNotificationSubscriptions']) ? $data['applicationNotificationSubscriptions'] : null; $this->container['authMethod'] = isset($data['authMethod']) ? $data['authMethod'] : null; + $this->container['isAdmin'] = isset($data['isAdmin']) ? $data['isAdmin'] : null; + $this->container['lastSignedIn'] = isset($data['lastSignedIn']) ? $data['lastSignedIn'] : null; + $this->container['lastAccessed'] = isset($data['lastAccessed']) ? $data['lastAccessed'] : null; } /** @@ -649,6 +667,78 @@ public function setAuthMethod($authMethod) return $this; } + + /** + * Gets isAdmin + * + * @return bool|null + */ + public function getIsAdmin() + { + return $this->container['isAdmin']; + } + + /** + * Sets isAdmin + * + * @param bool|null $isAdmin An indication of whether the user has admin permissions. + * + * @return $this + */ + public function setIsAdmin($isAdmin) + { + $this->container['isAdmin'] = $isAdmin; + + return $this; + } + + /** + * Gets lastSignedIn + * + * @return \DateTime|null + */ + public function getLastSignedIn() + { + return $this->container['lastSignedIn']; + } + + /** + * Sets lastSignedIn + * + * @param \DateTime|null $lastSignedIn Date and time when the user last signed in to Talon.One. + * + * @return $this + */ + public function setLastSignedIn($lastSignedIn) + { + $this->container['lastSignedIn'] = $lastSignedIn; + + return $this; + } + + /** + * Gets lastAccessed + * + * @return \DateTime|null + */ + public function getLastAccessed() + { + return $this->container['lastAccessed']; + } + + /** + * Sets lastAccessed + * + * @param \DateTime|null $lastAccessed Date and time of the user's last activity after signing in to Talon.One. + * + * @return $this + */ + public function setLastAccessed($lastAccessed) + { + $this->container['lastAccessed'] = $lastAccessed; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/WebhookWithOutgoingIntegrationDetails.php b/lib/Model/WebhookWithOutgoingIntegrationDetails.php new file mode 100644 index 00000000..a7db831d --- /dev/null +++ b/lib/Model/WebhookWithOutgoingIntegrationDetails.php @@ -0,0 +1,776 @@ + 'int', + 'created' => '\DateTime', + 'modified' => '\DateTime', + 'applicationIds' => 'int[]', + 'title' => 'string', + 'verb' => 'string', + 'url' => 'string', + 'headers' => 'string[]', + 'payload' => 'string', + 'params' => '\TalonOne\Client\Model\TemplateArgDef[]', + 'enabled' => 'bool', + 'outgoingIntegrationTemplateId' => 'int', + 'outgoingIntegrationTypeId' => 'int', + 'outgoingIntegrationTypeName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'created' => 'date-time', + 'modified' => 'date-time', + 'applicationIds' => null, + 'title' => null, + 'verb' => null, + 'url' => null, + 'headers' => null, + 'payload' => null, + 'params' => null, + 'enabled' => null, + 'outgoingIntegrationTemplateId' => null, + 'outgoingIntegrationTypeId' => null, + 'outgoingIntegrationTypeName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'created' => 'created', + 'modified' => 'modified', + 'applicationIds' => 'applicationIds', + 'title' => 'title', + 'verb' => 'verb', + 'url' => 'url', + 'headers' => 'headers', + 'payload' => 'payload', + 'params' => 'params', + 'enabled' => 'enabled', + 'outgoingIntegrationTemplateId' => 'outgoingIntegrationTemplateId', + 'outgoingIntegrationTypeId' => 'outgoingIntegrationTypeId', + 'outgoingIntegrationTypeName' => 'outgoingIntegrationTypeName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'created' => 'setCreated', + 'modified' => 'setModified', + 'applicationIds' => 'setApplicationIds', + 'title' => 'setTitle', + 'verb' => 'setVerb', + 'url' => 'setUrl', + 'headers' => 'setHeaders', + 'payload' => 'setPayload', + 'params' => 'setParams', + 'enabled' => 'setEnabled', + 'outgoingIntegrationTemplateId' => 'setOutgoingIntegrationTemplateId', + 'outgoingIntegrationTypeId' => 'setOutgoingIntegrationTypeId', + 'outgoingIntegrationTypeName' => 'setOutgoingIntegrationTypeName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'created' => 'getCreated', + 'modified' => 'getModified', + 'applicationIds' => 'getApplicationIds', + 'title' => 'getTitle', + 'verb' => 'getVerb', + 'url' => 'getUrl', + 'headers' => 'getHeaders', + 'payload' => 'getPayload', + 'params' => 'getParams', + 'enabled' => 'getEnabled', + 'outgoingIntegrationTemplateId' => 'getOutgoingIntegrationTemplateId', + 'outgoingIntegrationTypeId' => 'getOutgoingIntegrationTypeId', + 'outgoingIntegrationTypeName' => 'getOutgoingIntegrationTypeName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const VERB_POST = 'POST'; + const VERB_PUT = 'PUT'; + const VERB_GET = 'GET'; + const VERB_DELETE = 'DELETE'; + const VERB_PATCH = 'PATCH'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVerbAllowableValues() + { + return [ + self::VERB_POST, + self::VERB_PUT, + self::VERB_GET, + self::VERB_DELETE, + self::VERB_PATCH, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['modified'] = isset($data['modified']) ? $data['modified'] : null; + $this->container['applicationIds'] = isset($data['applicationIds']) ? $data['applicationIds'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + $this->container['verb'] = isset($data['verb']) ? $data['verb'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + $this->container['payload'] = isset($data['payload']) ? $data['payload'] : null; + $this->container['params'] = isset($data['params']) ? $data['params'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['outgoingIntegrationTemplateId'] = isset($data['outgoingIntegrationTemplateId']) ? $data['outgoingIntegrationTemplateId'] : null; + $this->container['outgoingIntegrationTypeId'] = isset($data['outgoingIntegrationTypeId']) ? $data['outgoingIntegrationTypeId'] : null; + $this->container['outgoingIntegrationTypeName'] = isset($data['outgoingIntegrationTypeName']) ? $data['outgoingIntegrationTypeName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['modified'] === null) { + $invalidProperties[] = "'modified' can't be null"; + } + if ($this->container['applicationIds'] === null) { + $invalidProperties[] = "'applicationIds' can't be null"; + } + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if (!preg_match("/^[A-Za-z][A-Za-z0-9_.!~*'() -]*$/", $this->container['title'])) { + $invalidProperties[] = "invalid value for 'title', must be conform to the pattern /^[A-Za-z][A-Za-z0-9_.!~*'() -]*$/."; + } + + if ($this->container['verb'] === null) { + $invalidProperties[] = "'verb' can't be null"; + } + $allowedValues = $this->getVerbAllowableValues(); + if (!is_null($this->container['verb']) && !in_array($this->container['verb'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'verb', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + if ($this->container['headers'] === null) { + $invalidProperties[] = "'headers' can't be null"; + } + if ($this->container['params'] === null) { + $invalidProperties[] = "'params' can't be null"; + } + if ($this->container['enabled'] === null) { + $invalidProperties[] = "'enabled' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Internal ID of this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The time this entity was created. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets modified + * + * @return \DateTime + */ + public function getModified() + { + return $this->container['modified']; + } + + /** + * Sets modified + * + * @param \DateTime $modified The time this entity was last modified. + * + * @return $this + */ + public function setModified($modified) + { + $this->container['modified'] = $modified; + + return $this; + } + + /** + * Gets applicationIds + * + * @return int[] + */ + public function getApplicationIds() + { + return $this->container['applicationIds']; + } + + /** + * Sets applicationIds + * + * @param int[] $applicationIds The IDs of the Applications that are related to this entity. The IDs of the Applications that are related to this entity. + * + * @return $this + */ + public function setApplicationIds($applicationIds) + { + $this->container['applicationIds'] = $applicationIds; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title Name or title for this webhook. + * + * @return $this + */ + public function setTitle($title) + { + + if ((!preg_match("/^[A-Za-z][A-Za-z0-9_.!~*'() -]*$/", $title))) { + throw new \InvalidArgumentException("invalid value for $title when calling WebhookWithOutgoingIntegrationDetails., must conform to the pattern /^[A-Za-z][A-Za-z0-9_.!~*'() -]*$/."); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets verb + * + * @return string + */ + public function getVerb() + { + return $this->container['verb']; + } + + /** + * Sets verb + * + * @param string $verb API method for this webhook. + * + * @return $this + */ + public function setVerb($verb) + { + $allowedValues = $this->getVerbAllowableValues(); + if (!in_array($verb, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'verb', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['verb'] = $verb; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url API URL (supports templating using parameters) for this webhook. + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets headers + * + * @return string[] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param string[] $headers List of API HTTP headers for this webhook. + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + + /** + * Gets payload + * + * @return string|null + */ + public function getPayload() + { + return $this->container['payload']; + } + + /** + * Sets payload + * + * @param string|null $payload API payload (supports templating using parameters) for this webhook. + * + * @return $this + */ + public function setPayload($payload) + { + $this->container['payload'] = $payload; + + return $this; + } + + /** + * Gets params + * + * @return \TalonOne\Client\Model\TemplateArgDef[] + */ + public function getParams() + { + return $this->container['params']; + } + + /** + * Sets params + * + * @param \TalonOne\Client\Model\TemplateArgDef[] $params Array of template argument definitions. + * + * @return $this + */ + public function setParams($params) + { + $this->container['params'] = $params; + + return $this; + } + + /** + * Gets enabled + * + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool $enabled Enables or disables webhook from showing in the Rule Builder. + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets outgoingIntegrationTemplateId + * + * @return int|null + */ + public function getOutgoingIntegrationTemplateId() + { + return $this->container['outgoingIntegrationTemplateId']; + } + + /** + * Sets outgoingIntegrationTemplateId + * + * @param int|null $outgoingIntegrationTemplateId Identifier of the outgoing integration template. + * + * @return $this + */ + public function setOutgoingIntegrationTemplateId($outgoingIntegrationTemplateId) + { + $this->container['outgoingIntegrationTemplateId'] = $outgoingIntegrationTemplateId; + + return $this; + } + + /** + * Gets outgoingIntegrationTypeId + * + * @return int|null + */ + public function getOutgoingIntegrationTypeId() + { + return $this->container['outgoingIntegrationTypeId']; + } + + /** + * Sets outgoingIntegrationTypeId + * + * @param int|null $outgoingIntegrationTypeId Identifier of the outgoing integration type. + * + * @return $this + */ + public function setOutgoingIntegrationTypeId($outgoingIntegrationTypeId) + { + $this->container['outgoingIntegrationTypeId'] = $outgoingIntegrationTypeId; + + return $this; + } + + /** + * Gets outgoingIntegrationTypeName + * + * @return string|null + */ + public function getOutgoingIntegrationTypeName() + { + return $this->container['outgoingIntegrationTypeName']; + } + + /** + * Sets outgoingIntegrationTypeName + * + * @param string|null $outgoingIntegrationTypeName Name of the outgoing integration. + * + * @return $this + */ + public function setOutgoingIntegrationTypeName($outgoingIntegrationTypeName) + { + $this->container['outgoingIntegrationTypeName'] = $outgoingIntegrationTypeName; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/test/Api/IntegrationApiTest.php b/test/Api/IntegrationApiTest.php index 19e8566b..40210d7f 100644 --- a/test/Api/IntegrationApiTest.php +++ b/test/Api/IntegrationApiTest.php @@ -192,6 +192,16 @@ public function testGetLoyaltyCardBalances() { } + /** + * Test case for getLoyaltyCardPoints + * + * List card's unused loyalty points. + * + */ + public function testGetLoyaltyCardPoints() + { + } + /** * Test case for getLoyaltyCardTransactions * @@ -202,6 +212,16 @@ public function testGetLoyaltyCardTransactions() { } + /** + * Test case for getLoyaltyProgramProfilePoints + * + * List customer's unused loyalty points. + * + */ + public function testGetLoyaltyProgramProfilePoints() + { + } + /** * Test case for getLoyaltyProgramProfileTransactions * @@ -262,20 +282,10 @@ public function testSyncCatalog() { } - /** - * Test case for trackEvent - * - * Track event. - * - */ - public function testTrackEvent() - { - } - /** * Test case for trackEventV2 * - * Track event V2. + * Track event. * */ public function testTrackEventV2() diff --git a/test/Api/ManagementApiTest.php b/test/Api/ManagementApiTest.php index cb034dbe..12d339a2 100644 --- a/test/Api/ManagementApiTest.php +++ b/test/Api/ManagementApiTest.php @@ -145,7 +145,7 @@ public function testCreateCampaignFromTemplate() /** * Test case for createCollection * - * Create collection. + * Create campaign-level collection. * */ public function testCreateCollection() @@ -183,32 +183,32 @@ public function testCreateCouponsForMultipleRecipients() } /** - * Test case for createNotificationWebhook + * Test case for createPasswordRecoveryEmail * - * Create notification about campaign-related changes. + * Request a password reset. * */ - public function testCreateNotificationWebhook() + public function testCreatePasswordRecoveryEmail() { } /** - * Test case for createPasswordRecoveryEmail + * Test case for createSession * - * Request a password reset. + * Create session. * */ - public function testCreatePasswordRecoveryEmail() + public function testCreateSession() { } /** - * Test case for createSession + * Test case for createStore * - * Create session. + * Create store. * */ - public function testCreateSession() + public function testCreateStore() { } @@ -245,7 +245,7 @@ public function testDeleteCampaign() /** * Test case for deleteCollection * - * Delete collection. + * Delete campaign-level collection. * */ public function testDeleteCollection() @@ -283,22 +283,22 @@ public function testDeleteLoyaltyCard() } /** - * Test case for deleteNotificationWebhook + * Test case for deleteReferral * - * Delete notification about campaign-related changes. + * Delete referral. * */ - public function testDeleteNotificationWebhook() + public function testDeleteReferral() { } /** - * Test case for deleteReferral + * Test case for deleteStore * - * Delete referral. + * Delete store. * */ - public function testDeleteReferral() + public function testDeleteStore() { } @@ -325,7 +325,7 @@ public function testExportAccountCollectionItems() /** * Test case for exportCollectionItems * - * Export a collection's items. + * Export campaign-level collection's items. * */ public function testExportCollectionItems() @@ -352,6 +352,16 @@ public function testExportCustomerSessions() { } + /** + * Test case for exportCustomersTiers + * + * Export customers' tier data. + * + */ + public function testExportCustomersTiers() + { + } + /** * Test case for exportEffects * @@ -412,6 +422,16 @@ public function testExportLoyaltyLedger() { } + /** + * Test case for exportPoolGiveaways + * + * Export giveaway codes of a giveaway pool. + * + */ + public function testExportPoolGiveaways() + { + } + /** * Test case for exportReferrals * @@ -705,7 +725,7 @@ public function testGetChanges() /** * Test case for getCollection * - * Get collection. + * Get campaign-level collection. * */ public function testGetCollection() @@ -892,26 +912,6 @@ public function testGetLoyaltyStatistics() { } - /** - * Test case for getNotificationWebhook - * - * Get notification about campaign-related changes. - * - */ - public function testGetNotificationWebhook() - { - } - - /** - * Test case for getNotificationWebhooks - * - * List notifications about campaign-related changes. - * - */ - public function testGetNotificationWebhooks() - { - } - /** * Test case for getReferralsWithoutTotalCount * @@ -952,6 +952,16 @@ public function testGetRulesets() { } + /** + * Test case for getStore + * + * Get store. + * + */ + public function testGetStore() + { + } + /** * Test case for getUser * @@ -1015,7 +1025,7 @@ public function testGetWebhooks() /** * Test case for importAccountCollection * - * Import data in existing account-level collection. + * Import data into existing account-level collection. * */ public function testImportAccountCollection() @@ -1035,7 +1045,7 @@ public function testImportAllowedList() /** * Test case for importCollection * - * Import data in existing collection. + * Import data into existing campaign-level collection. * */ public function testImportCollection() @@ -1062,6 +1072,16 @@ public function testImportLoyaltyCards() { } + /** + * Test case for importLoyaltyCustomersTiers + * + * Import customers into loyalty tiers. + * + */ + public function testImportLoyaltyCustomersTiers() + { + } + /** * Test case for importLoyaltyPoints * @@ -1102,10 +1122,20 @@ public function testListAccountCollections() { } + /** + * Test case for listCatalogItems + * + * List items in a catalog. + * + */ + public function testListCatalogItems() + { + } + /** * Test case for listCollections * - * List collections. + * List collections in campaign. * */ public function testListCollections() @@ -1115,13 +1145,33 @@ public function testListCollections() /** * Test case for listCollectionsInApplication * - * List collections in application. + * List collections in Application. * */ public function testListCollectionsInApplication() { } + /** + * Test case for listStores + * + * List stores. + * + */ + public function testListStores() + { + } + + /** + * Test case for notificationActivation + * + * Activate or deactivate notification. + * + */ + public function testNotificationActivation() + { + } + /** * Test case for postAddedDeductedPointsNotification * @@ -1142,6 +1192,16 @@ public function testPostCatalogsStrikethroughNotification() { } + /** + * Test case for postPendingPointsNotification + * + * Create notification about pending loyalty points. + * + */ + public function testPostPendingPointsNotification() + { + } + /** * Test case for removeLoyaltyPoints * @@ -1235,7 +1295,7 @@ public function testUpdateCampaign() /** * Test case for updateCollection * - * Update collection description. + * Update campaign-level collection's description. * */ public function testUpdateCollection() @@ -1273,22 +1333,22 @@ public function testUpdateLoyaltyCard() } /** - * Test case for updateNotificationWebhook + * Test case for updateReferral * - * Update notification about campaign-related changes. + * Update referral. * */ - public function testUpdateNotificationWebhook() + public function testUpdateReferral() { } /** - * Test case for updateReferral + * Test case for updateStore * - * Update referral. + * Update store. * */ - public function testUpdateReferral() + public function testUpdateStore() { } } diff --git a/test/Model/AccountAnalyticsTest.php b/test/Model/AccountAnalyticsTest.php index 3088a109..46a27b36 100644 --- a/test/Model/AccountAnalyticsTest.php +++ b/test/Model/AccountAnalyticsTest.php @@ -210,4 +210,11 @@ public function testPropertyLoyaltyPrograms() public function testPropertyLiveLoyaltyPrograms() { } + + /** + * Test attribute "lastUpdatedAt" + */ + public function testPropertyLastUpdatedAt() + { + } } diff --git a/test/Model/AccountDashboardStatisticCampaignsTest.php b/test/Model/AccountDashboardStatisticCampaignsTest.php index d0284662..e3cc0a89 100644 --- a/test/Model/AccountDashboardStatisticCampaignsTest.php +++ b/test/Model/AccountDashboardStatisticCampaignsTest.php @@ -91,4 +91,11 @@ public function testPropertyLive() public function testPropertyEndingSoon() { } + + /** + * Test attribute "lowOnBudget" + */ + public function testPropertyLowOnBudget() + { + } } diff --git a/test/Model/AddToAudienceEffectPropsTest.php b/test/Model/AddToAudienceEffectPropsTest.php new file mode 100644 index 00000000..608d6253 --- /dev/null +++ b/test/Model/AddToAudienceEffectPropsTest.php @@ -0,0 +1,108 @@ +