diff --git a/README.md b/README.md index 81e67956..ecfb90a5 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The API is available at the same hostname as these docs. For example, if you are This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: 3.3.0 +- Package version: 3.4.0 - Build package: org.openapitools.codegen.languages.PhpClientCodegen ## Requirements @@ -235,8 +235,8 @@ Class | Method | HTTP request | Description *IntegrationApi* | [**createCouponReservation**](docs/Api/IntegrationApi.md#createcouponreservation) | **POST** /v1/coupon_reservations/{couponValue} | Create a new coupon reservation *IntegrationApi* | [**createReferral**](docs/Api/IntegrationApi.md#createreferral) | **POST** /v1/referrals | Create a referral code for an advocate *IntegrationApi* | [**deleteCouponReservation**](docs/Api/IntegrationApi.md#deletecouponreservation) | **DELETE** /v1/coupon_reservations/{couponValue} | Delete coupon reservations -*IntegrationApi* | [**deleteCustomerData**](docs/Api/IntegrationApi.md#deletecustomerdata) | **DELETE** /v1/customer_data/{integrationId} | Delete the personal data of a customer. -*IntegrationApi* | [**getCustomerInventory**](docs/Api/IntegrationApi.md#getcustomerinventory) | **GET** /v1/customer_profiles/{integrationId}/inventory | Get an inventory of all data associated with a specific customer profile. +*IntegrationApi* | [**deleteCustomerData**](docs/Api/IntegrationApi.md#deletecustomerdata) | **DELETE** /v1/customer_data/{integrationId} | Delete the personal data of a customer +*IntegrationApi* | [**getCustomerInventory**](docs/Api/IntegrationApi.md#getcustomerinventory) | **GET** /v1/customer_profiles/{integrationId}/inventory | Get an inventory of all data associated with a specific customer profile *IntegrationApi* | [**getReservedCustomers**](docs/Api/IntegrationApi.md#getreservedcustomers) | **GET** /v1/coupon_reservations/customerprofiles/{couponValue} | Get the users that have this coupon reserved *IntegrationApi* | [**trackEvent**](docs/Api/IntegrationApi.md#trackevent) | **POST** /v1/events | Track an Event *IntegrationApi* | [**updateCustomerProfile**](docs/Api/IntegrationApi.md#updatecustomerprofile) | **PUT** /v1/customer_profiles/{integrationId} | Update a Customer Profile V1 @@ -251,6 +251,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**createAttribute**](docs/Api/ManagementApi.md#createattribute) | **POST** /v1/attributes | Define a new custom attribute *ManagementApi* | [**createCampaign**](docs/Api/ManagementApi.md#createcampaign) | **POST** /v1/applications/{applicationId}/campaigns | Create a Campaign *ManagementApi* | [**createCoupons**](docs/Api/ManagementApi.md#createcoupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create Coupons +*ManagementApi* | [**createCouponsForMultipleRecipients**](docs/Api/ManagementApi.md#createcouponsformultiplerecipients) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients | Create Coupons for Multiple Recipients *ManagementApi* | [**createPasswordRecoveryEmail**](docs/Api/ManagementApi.md#createpasswordrecoveryemail) | **POST** /v1/password_recovery_emails | Request a password reset *ManagementApi* | [**createRuleset**](docs/Api/ManagementApi.md#createruleset) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets | Create a Ruleset *ManagementApi* | [**createSession**](docs/Api/ManagementApi.md#createsession) | **POST** /v1/sessions | Create a Session @@ -259,6 +260,12 @@ Class | Method | HTTP request | Description *ManagementApi* | [**deleteCoupons**](docs/Api/ManagementApi.md#deletecoupons) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Delete Coupons *ManagementApi* | [**deleteReferral**](docs/Api/ManagementApi.md#deletereferral) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Delete one Referral *ManagementApi* | [**deleteRuleset**](docs/Api/ManagementApi.md#deleteruleset) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Delete a Ruleset +*ManagementApi* | [**destroySession**](docs/Api/ManagementApi.md#destroysession) | **DELETE** /v1/sessions | Destroy a Session +*ManagementApi* | [**exportCoupons**](docs/Api/ManagementApi.md#exportcoupons) | **GET** /v1/applications/{applicationId}/export_coupons | Export Coupons to a CSV file +*ManagementApi* | [**exportCustomerSessions**](docs/Api/ManagementApi.md#exportcustomersessions) | **GET** /v1/applications/{applicationId}/export_customer_sessions | Export Customer Sessions to a CSV file +*ManagementApi* | [**exportEffects**](docs/Api/ManagementApi.md#exporteffects) | **GET** /v1/applications/{applicationId}/export_effects | Export triggered Effects to a CSV file +*ManagementApi* | [**exportLoyaltyBalance**](docs/Api/ManagementApi.md#exportloyaltybalance) | **GET** /v1/loyalty_programs/{programID}/export_customer_balance | Export customer loyalty balance to a CSV file +*ManagementApi* | [**exportLoyaltyLedger**](docs/Api/ManagementApi.md#exportloyaltyledger) | **GET** /v1/loyalty_programs/{programID}/profile/{integrationID}/export_log | Export a customer's loyalty ledger log to a CSV file *ManagementApi* | [**getAccessLogs**](docs/Api/ManagementApi.md#getaccesslogs) | **GET** /v1/applications/{applicationId}/access_logs | Get access logs for application (with total count) *ManagementApi* | [**getAccessLogsWithoutTotalCount**](docs/Api/ManagementApi.md#getaccesslogswithouttotalcount) | **GET** /v1/applications/{applicationId}/access_logs/no_total | Get access logs for application *ManagementApi* | [**getAccount**](docs/Api/ManagementApi.md#getaccount) | **GET** /v1/accounts/{accountId} | Get Account Details @@ -266,7 +273,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**getAdditionalCost**](docs/Api/ManagementApi.md#getadditionalcost) | **GET** /v1/additional_costs/{additionalCostId} | Get an additional cost *ManagementApi* | [**getAdditionalCosts**](docs/Api/ManagementApi.md#getadditionalcosts) | **GET** /v1/additional_costs | List additional costs *ManagementApi* | [**getAllAccessLogs**](docs/Api/ManagementApi.md#getallaccesslogs) | **GET** /v1/access_logs | Get all access logs -*ManagementApi* | [**getAllRoles**](docs/Api/ManagementApi.md#getallroles) | **GET** /v1/roles | Get all roles. +*ManagementApi* | [**getAllRoles**](docs/Api/ManagementApi.md#getallroles) | **GET** /v1/roles | Get all roles *ManagementApi* | [**getApplication**](docs/Api/ManagementApi.md#getapplication) | **GET** /v1/applications/{applicationId} | Get Application *ManagementApi* | [**getApplicationApiHealth**](docs/Api/ManagementApi.md#getapplicationapihealth) | **GET** /v1/applications/{applicationId}/health_report | Get report of health of application API *ManagementApi* | [**getApplicationCustomer**](docs/Api/ManagementApi.md#getapplicationcustomer) | **GET** /v1/applications/{applicationId}/customers/{customerId} | Get Application Customer @@ -280,6 +287,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**getApplications**](docs/Api/ManagementApi.md#getapplications) | **GET** /v1/applications | List Applications *ManagementApi* | [**getAttribute**](docs/Api/ManagementApi.md#getattribute) | **GET** /v1/attributes/{attributeId} | Get a custom attribute *ManagementApi* | [**getAttributes**](docs/Api/ManagementApi.md#getattributes) | **GET** /v1/attributes | List custom attributes +*ManagementApi* | [**getAudiences**](docs/Api/ManagementApi.md#getaudiences) | **GET** /v1/audiences | Get all audiences *ManagementApi* | [**getCampaign**](docs/Api/ManagementApi.md#getcampaign) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId} | Get a Campaign *ManagementApi* | [**getCampaignAnalytics**](docs/Api/ManagementApi.md#getcampaignanalytics) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/analytics | Get analytics of campaigns *ManagementApi* | [**getCampaignByAttributes**](docs/Api/ManagementApi.md#getcampaignbyattributes) | **POST** /v1/applications/{applicationId}/campaigns_search | Get a list of all campaigns that match the given attributes @@ -298,14 +306,13 @@ Class | Method | HTTP request | Description *ManagementApi* | [**getCustomersByAttributes**](docs/Api/ManagementApi.md#getcustomersbyattributes) | **POST** /v1/customer_search/no_total | Get a list of the customer profiles that match the given attributes *ManagementApi* | [**getEventTypes**](docs/Api/ManagementApi.md#geteventtypes) | **GET** /v1/event_types | List Event Types *ManagementApi* | [**getExports**](docs/Api/ManagementApi.md#getexports) | **GET** /v1/exports | Get Exports -*ManagementApi* | [**getImports**](docs/Api/ManagementApi.md#getimports) | **GET** /v1/imports | Get Imports *ManagementApi* | [**getLoyaltyPoints**](docs/Api/ManagementApi.md#getloyaltypoints) | **GET** /v1/loyalty_programs/{programID}/profile/{integrationID} | get the Loyalty Ledger for this integrationID *ManagementApi* | [**getLoyaltyProgram**](docs/Api/ManagementApi.md#getloyaltyprogram) | **GET** /v1/loyalty_programs/{programID} | Get a loyalty program *ManagementApi* | [**getLoyaltyPrograms**](docs/Api/ManagementApi.md#getloyaltyprograms) | **GET** /v1/loyalty_programs | List all loyalty Programs *ManagementApi* | [**getLoyaltyStatistics**](docs/Api/ManagementApi.md#getloyaltystatistics) | **GET** /v1/loyalty_programs/{programID}/statistics | Get loyalty program statistics by loyalty program ID *ManagementApi* | [**getReferrals**](docs/Api/ManagementApi.md#getreferrals) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals | List Referrals (with total count) *ManagementApi* | [**getReferralsWithoutTotalCount**](docs/Api/ManagementApi.md#getreferralswithouttotalcount) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total | List Referrals -*ManagementApi* | [**getRole**](docs/Api/ManagementApi.md#getrole) | **GET** /v1/roles/{roleId} | Get information for the specified role. +*ManagementApi* | [**getRole**](docs/Api/ManagementApi.md#getrole) | **GET** /v1/roles/{roleId} | Get information for the specified role *ManagementApi* | [**getRuleset**](docs/Api/ManagementApi.md#getruleset) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Get a Ruleset *ManagementApi* | [**getRulesets**](docs/Api/ManagementApi.md#getrulesets) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets | List Campaign Rulesets *ManagementApi* | [**getUser**](docs/Api/ManagementApi.md#getuser) | **GET** /v1/users/{userId} | Get a single User @@ -371,7 +378,6 @@ Class | Method | HTTP request | Description - [CampaignSetLeafNode](docs/Model/CampaignSetLeafNode.md) - [CampaignSetNode](docs/Model/CampaignSetNode.md) - [CartItem](docs/Model/CartItem.md) - - [CartItemAdjustment](docs/Model/CartItemAdjustment.md) - [Change](docs/Model/Change.md) - [ChangeProfilePassword](docs/Model/ChangeProfilePassword.md) - [CodeGeneratorSettings](docs/Model/CodeGeneratorSettings.md) @@ -413,7 +419,6 @@ Class | Method | HTTP request | Description - [FuncArgDef](docs/Model/FuncArgDef.md) - [FunctionDef](docs/Model/FunctionDef.md) - [Import](docs/Model/Import.md) - - [ImportCoupons](docs/Model/ImportCoupons.md) - [InlineResponse200](docs/Model/InlineResponse200.md) - [InlineResponse2001](docs/Model/InlineResponse2001.md) - [InlineResponse20010](docs/Model/InlineResponse20010.md) @@ -483,13 +488,13 @@ Class | Method | HTTP request | Description - [NewCampaignGroup](docs/Model/NewCampaignGroup.md) - [NewCampaignSet](docs/Model/NewCampaignSet.md) - [NewCoupons](docs/Model/NewCoupons.md) + - [NewCouponsForMultipleRecipients](docs/Model/NewCouponsForMultipleRecipients.md) - [NewCustomerProfile](docs/Model/NewCustomerProfile.md) - [NewCustomerSession](docs/Model/NewCustomerSession.md) - [NewCustomerSessionV2](docs/Model/NewCustomerSessionV2.md) - [NewEvent](docs/Model/NewEvent.md) - [NewEventType](docs/Model/NewEventType.md) - [NewFeatureFlags](docs/Model/NewFeatureFlags.md) - - [NewImport](docs/Model/NewImport.md) - [NewInvitation](docs/Model/NewInvitation.md) - [NewInviteEmail](docs/Model/NewInviteEmail.md) - [NewLoyaltyProgram](docs/Model/NewLoyaltyProgram.md) @@ -503,6 +508,7 @@ Class | Method | HTTP request | Description - [NewUser](docs/Model/NewUser.md) - [NewWebhook](docs/Model/NewWebhook.md) - [Notification](docs/Model/Notification.md) + - [ProfileAudiencesChanges](docs/Model/ProfileAudiencesChanges.md) - [RedeemReferralEffectProps](docs/Model/RedeemReferralEffectProps.md) - [Referral](docs/Model/Referral.md) - [ReferralCreatedEffectProps](docs/Model/ReferralCreatedEffectProps.md) @@ -512,9 +518,13 @@ Class | Method | HTTP request | Description - [Role](docs/Model/Role.md) - [RoleAssign](docs/Model/RoleAssign.md) - [RoleMembership](docs/Model/RoleMembership.md) + - [RollbackAddedLoyaltyPointsEffectProps](docs/Model/RollbackAddedLoyaltyPointsEffectProps.md) - [RollbackCouponEffectProps](docs/Model/RollbackCouponEffectProps.md) + - [RollbackDeductedLoyaltyPointsEffectProps](docs/Model/RollbackDeductedLoyaltyPointsEffectProps.md) - [RollbackDiscountEffectProps](docs/Model/RollbackDiscountEffectProps.md) + - [RollbackReferralEffectProps](docs/Model/RollbackReferralEffectProps.md) - [Rule](docs/Model/Rule.md) + - [RuleFailureReason](docs/Model/RuleFailureReason.md) - [Ruleset](docs/Model/Ruleset.md) - [SamlConnection](docs/Model/SamlConnection.md) - [SamlConnectionMetadata](docs/Model/SamlConnectionMetadata.md) diff --git a/composer.json b/composer.json index b075c807..7e7f66ab 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "talon-one/talon-one-client", "type": "library", - "version": "3.3.0", + "version": "3.4.0", "description": "The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns.", "keywords": [ "talon-one", diff --git a/docs/Api/IntegrationApi.md b/docs/Api/IntegrationApi.md index 067ab34c..d27ca036 100644 --- a/docs/Api/IntegrationApi.md +++ b/docs/Api/IntegrationApi.md @@ -7,8 +7,8 @@ Method | HTTP request | Description [**createCouponReservation**](IntegrationApi.md#createCouponReservation) | **POST** /v1/coupon_reservations/{couponValue} | Create a new coupon reservation [**createReferral**](IntegrationApi.md#createReferral) | **POST** /v1/referrals | Create a referral code for an advocate [**deleteCouponReservation**](IntegrationApi.md#deleteCouponReservation) | **DELETE** /v1/coupon_reservations/{couponValue} | Delete coupon reservations -[**deleteCustomerData**](IntegrationApi.md#deleteCustomerData) | **DELETE** /v1/customer_data/{integrationId} | Delete the personal data of a customer. -[**getCustomerInventory**](IntegrationApi.md#getCustomerInventory) | **GET** /v1/customer_profiles/{integrationId}/inventory | Get an inventory of all data associated with a specific customer profile. +[**deleteCustomerData**](IntegrationApi.md#deleteCustomerData) | **DELETE** /v1/customer_data/{integrationId} | Delete the personal data of a customer +[**getCustomerInventory**](IntegrationApi.md#getCustomerInventory) | **GET** /v1/customer_profiles/{integrationId}/inventory | Get an inventory of all data associated with a specific customer profile [**getReservedCustomers**](IntegrationApi.md#getReservedCustomers) | **GET** /v1/coupon_reservations/customerprofiles/{couponValue} | Get the users that have this coupon reserved [**trackEvent**](IntegrationApi.md#trackEvent) | **POST** /v1/events | Track an Event [**updateCustomerProfile**](IntegrationApi.md#updateCustomerProfile) | **PUT** /v1/customer_profiles/{integrationId} | Update a Customer Profile V1 @@ -231,7 +231,7 @@ void (empty response body) > deleteCustomerData($integrationId) -Delete the personal data of a customer. +Delete the personal data of a customer Delete all attributes on the customer profile and on entities that reference that customer profile. @@ -298,7 +298,7 @@ void (empty response body) > \TalonOne\Client\Model\CustomerInventory getCustomerInventory($integrationId, $profile, $referrals, $coupons, $loyalty) -Get an inventory of all data associated with a specific customer profile. +Get an inventory of all data associated with a specific customer profile Get information regarding entities referencing this customer profile's integrationId. Currently we support customer profile information, referral codes and reserved coupons. In the future, this will be expanded with loyalty points. @@ -471,7 +471,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( $config ); $body = new \TalonOne\Client\Model\NewEvent(); // \TalonOne\Client\Model\NewEvent | -$dry = True; // bool | Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). +$dry = True; // bool | Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). try { $result = $apiInstance->trackEvent($body, $dry); @@ -488,7 +488,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**\TalonOne\Client\Model\NewEvent**](../Model/NewEvent.md)| | - **dry** | **bool**| Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). | [optional] + **dry** | **bool**| Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). | [optional] ### Return type @@ -514,7 +514,7 @@ Name | Type | Description | Notes Update a Customer Profile V1 -⚠️ Deprecation Notice: Support for requests to this endpoint will end on 15.07.2021. We will not remove the endpoint, and it will still be accessible for you to use. For new features support, please migrate to [API V2.0](/Getting-Started/APIV2). Update (or create) a [Customer Profile][]. This profile information can then be matched and/or updated by campaign [Rules][]. The `integrationId` may be any identifier that will remain stable for the customer. For example, you might use a database ID, an email, or a phone number as the `integrationId`. It is vital that this ID **not** change over time, so **don't** use any identifier that the customer can update themselves. E.g. if your application allows a customer to update their e-mail address, you should instead use a database ID. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. [Customer Profile]: /Getting-Started/entities#customer-profile [Rules]: /Getting-Started/entities#campaigns-rulesets-and-coupons +⚠️ Deprecation Notice: Support for requests to this endpoint will end on 15.07.2021. We will not remove the endpoint, and it will still be accessible for you to use. For new features support, migrate to [API V2.0](/Getting-Started/APIV2). Update (or create) a [Customer Profile](https://developers.talon.one/Getting-Started/entities#customer-profile). This profile information can then be matched and/or updated by campaign [Rules][]. The `integrationId` may be any identifier that will remain stable for the customer. For example, you might use a database ID, an email, or a phone number as the `integrationId`. It is vital that this ID **not** change over time, so **don't** use any identifier that the customer can update themselves. E.g. if your application allows a customer to update their e-mail address, you should instead use a database ID. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. [Customer Profile]: /Getting-Started/entities#customer-profile [Rules]: /Getting-Started/entities#campaigns-rulesets-and-coupons ### Example @@ -542,7 +542,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( ); $integrationId = 'integrationId_example'; // string | The custom identifier for this profile, must be unique within the account. $body = new \TalonOne\Client\Model\NewCustomerProfile(); // \TalonOne\Client\Model\NewCustomerProfile | -$dry = True; // bool | Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). +$dry = True; // bool | Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). try { $result = $apiInstance->updateCustomerProfile($integrationId, $body, $dry); @@ -560,7 +560,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **integrationId** | **string**| The custom identifier for this profile, must be unique within the account. | **body** | [**\TalonOne\Client\Model\NewCustomerProfile**](../Model/NewCustomerProfile.md)| | - **dry** | **bool**| Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). | [optional] + **dry** | **bool**| Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). | [optional] ### Return type @@ -648,7 +648,7 @@ void (empty response body) Update a Customer Profile -Update (or create) a [Customer Profile][]. The `integrationId` may be any identifier that will remain stable for the customer. For example, you might use a database ID, an email, or a phone number as the `integrationId`. It is vital that this ID **not** change over time, so **don't** use any identifier that the customer can update themselves. E.g. if your application allows a customer to update their e-mail address, you should instead use a database ID. [Customer Profile]: /Getting-Started/entities#customer-profile +Update (or create) a [Customer Profile](https://developers.talon.one/Getting-Started/entities#customer-profile). 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. Updating a customer profile returns a response with the requested integration state. If `runRuleEngine` is set to `true`, the response includes: - The effects generated by the triggered campaigns. - The created coupons and referral objects. - Any entity that was requested in the `responseContent` request parameter. ### Example @@ -669,10 +669,10 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$integrationId = 'integrationId_example'; // string | The custom identifier for this profile, must be unique within the account. +$integrationId = 'integrationId_example'; // string | The custom identifier for this profile. Must be unique within the account. $body = new \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2(); // \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 | -$runRuleEngine = True; // bool | Flag to indicate whether to run the rule engine (Defaults to false). -$dry = True; // bool | Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'. Only used when 'runRuleEngine' is set to 'true'). +$runRuleEngine = false; // bool | Indicates whether to run the rule engine. +$dry = True; // bool | Indicates whether to persist the changes. Changes are persisted with `true`. Only used when `runRuleEngine` is set to `true`. try { $result = $apiInstance->updateCustomerProfileV2($integrationId, $body, $runRuleEngine, $dry); @@ -688,10 +688,10 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **integrationId** | **string**| The custom identifier for this profile, must be unique within the account. | + **integrationId** | **string**| The custom identifier for this profile. Must be unique within the account. | **body** | [**\TalonOne\Client\Model\CustomerProfileIntegrationRequestV2**](../Model/CustomerProfileIntegrationRequestV2.md)| | - **runRuleEngine** | **bool**| Flag to indicate whether to run the rule engine (Defaults to false). | [optional] - **dry** | **bool**| Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'. Only used when 'runRuleEngine' is set to 'true'). | [optional] + **runRuleEngine** | **bool**| Indicates whether to run the rule engine. | [optional] [default to false] + **dry** | **bool**| Indicates whether to persist the changes. Changes are persisted with `true`. Only used when `runRuleEngine` is set to `true`. | [optional] ### Return type @@ -717,7 +717,7 @@ Name | Type | Description | Notes Update multiple Customer Profiles -Update (or create) up to 1000 [Customer Profiles][] in 1 request. The `integrationId` may be any identifier that will remain stable for the customer. For example, you might use a database ID, an email, or a phone number as the `integrationId`. It is vital that this ID **not** change over time, so **don't** use any identifier that the customer can update themselves. E.g. if your application allows a customer to update their e-mail address, you should instead use a database ID. [Customer Profiles]: /Getting-Started/entities#customer-profile +Update (or create) up to 1000 [Customer Profiles](https://developers.talon.one/Getting-Started/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://developers.talon.one/Integration-API/API-Reference#updateCustomerSessionV2). ### Example @@ -739,7 +739,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( $config ); $body = new \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest(); // \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest | -$silent = 'silent_example'; // string | If set to 'yes', response will be an empty 204, otherwise a list of the IntegrationStateV2 generated. +$silent = 'silent_example'; // string | If set to `yes`, response will be an empty 204, otherwise a list of integration states will be generated (up to 1000). try { $result = $apiInstance->updateCustomerProfilesV2($body, $silent); @@ -756,7 +756,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**\TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest**](../Model/MultipleCustomerProfileIntegrationRequest.md)| | - **silent** | **string**| If set to 'yes', response will be an empty 204, otherwise a list of the IntegrationStateV2 generated. | [optional] + **silent** | **string**| If set to `yes`, response will be an empty 204, otherwise a list of integration states will be generated (up to 1000). | [optional] ### Return type @@ -782,7 +782,7 @@ Name | Type | Description | Notes Update a Customer Session V1 -⚠️ Deprecation Notice: Support for requests to this endpoint will end on 15.07.2021. We will not remove the endpoint, and it will still be accessible for you to use. For new features support, please migrate to [API V2.0](/Getting-Started/APIV2). Update (or create) a [Customer Session][]. For example, the items in a customers cart are part of a session. The Talon.One platform supports multiple simultaneous sessions for the same profile, so if you have multiple ways of accessing the same application you have the option of either tracking multiple independent sessions or using the same session across all of them. You should share sessions when application access points share other state, such as the users cart. If two points of access to the application have independent state (e.g. a user can have different items in their cart across the two) they should use independent customer session ID's. The `profileId` parameter in the request body should correspond to an `integrationId` for a customer profile, to track an anonymous session use the empty string (`\"\"`) as the `profileId`. Note that you do **not** need to create a customer profile first: if the specified profile does not yet exist, an empty profile will be created automatically. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. The currency for the session and the cart items in the session is the same as that of the application with which the session is associated. [Customer Session]: /Getting-Started/entities#customer-session +⚠️ Deprecation Notice: Support for requests to this endpoint will end on 15.07.2021. We will not remove the endpoint, and it will still be accessible for you to use. For new features support, migrate to [API V2.0](https://developers.talon.one/Getting-Started/APIV2). Update (or create) a [Customer Session](https://developers.talon.one/Getting-Started/entities#customer-session). For example, use this endpoint to represent which items are in the customer's cart. The Talon.One platform supports multiple simultaneous sessions for the same profile. If you have multiple ways of accessing the same application you can either: - Track multiple independent sessions or, - Use the same session across all of them. You should share sessions when application access points share other state, such as the user's cart. If two points of access to the application have independent states, for example a user can have different items in their cart across the two) they should use independent customer session ID's. To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. To track an anonymous session use the empty string (`\"\"`) as the `profileId`. **Note:** You do **not** have to create a customer profile first. If the specified profile does not exist, an empty profile is created automatically. Updating a customer profile returns a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. The currency for the session and the cart items in the session is the same as that of the application with which the session is associated. ### Example @@ -810,7 +810,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( ); $customerSessionId = 'customerSessionId_example'; // string | The custom identifier for this session, must be unique within the account. $body = new \TalonOne\Client\Model\NewCustomerSession(); // \TalonOne\Client\Model\NewCustomerSession | -$dry = True; // bool | Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). +$dry = True; // bool | Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). try { $result = $apiInstance->updateCustomerSession($customerSessionId, $body, $dry); @@ -828,7 +828,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **customerSessionId** | **string**| The custom identifier for this session, must be unique within the account. | **body** | [**\TalonOne\Client\Model\NewCustomerSession**](../Model/NewCustomerSession.md)| | - **dry** | **bool**| Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). | [optional] + **dry** | **bool**| Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). | [optional] ### Return type @@ -854,7 +854,7 @@ Name | Type | Description | Notes Update a Customer Session -Update (or create) a [Customer Session][]. For example, the items in a customers cart are part of a session. The Talon.One platform supports multiple simultaneous sessions for the same profile, so if you have multiple ways of accessing the same application you have the option of either tracking multiple independent sessions or using the same session across all of them. You should share sessions when application access points share other state, such as the users cart. If two points of access to the application have independent state (e.g. a user can have different items in their cart across the two) they should use independent customer session ID's. The `profileId` parameter in the request body should correspond to an `integrationId` for a customer profile, to track an anonymous session use the empty string (`\"\"`) as the `profileId`. Note that you do **not** need to create a customer profile first: if the specified profile does not yet exist, an empty profile will be created automatically. Updating a customer profile will return a response with the requested integration state. This includes the effects that were generated due to triggered campaigns, the created coupons and referral objects, as well as any entity that was requested in the request parameter \"responseContent\". The currency for the session and the cart items in the session is the same as that of the application with which the session is associated. [Customer Session]: /Getting-Started/entities#customer-session +Update (or create) a [Customer Session](https://developers.talon.one/Getting-Started/entities#customer-session). For example, use this endpoint to represent which items are in the customer's cart. The Talon.One platform supports multiple simultaneous sessions for the same profile. If you have multiple ways of accessing the same application you can either: - Track multiple independent sessions or, - Use the same session across all of them. You should share sessions when application access points share other state, such as the user's cart. If two points of access to the application have independent states, for example a user can have different items in their cart across the two) they should use independent customer session ID's. To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. To track an anonymous session use the empty string (`\"\"`) as the `profileId`. **Note:** You do **not** have to create a customer profile first. If the specified profile does not exist, an empty profile is created automatically. Updating a customer session returns a response with the requested integration state. If `runRuleEngine` is set to `true`, the response includes: - The effects generated by the triggered campaigns. - The created coupons and referral objects. - Any entity that was requested in the `responseContent` request parameter. The currency for the session and the cart items in the session is the same as that of the application with which the session is associated. ### Example @@ -877,7 +877,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( ); $customerSessionId = 'customerSessionId_example'; // string | The custom identifier for this session, must be unique within the account. $body = new \TalonOne\Client\Model\IntegrationRequest(); // \TalonOne\Client\Model\IntegrationRequest | -$dry = True; // bool | Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). +$dry = True; // bool | Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). try { $result = $apiInstance->updateCustomerSessionV2($customerSessionId, $body, $dry); @@ -895,7 +895,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **customerSessionId** | **string**| The custom identifier for this session, must be unique within the account. | **body** | [**\TalonOne\Client\Model\IntegrationRequest**](../Model/IntegrationRequest.md)| | - **dry** | **bool**| Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). | [optional] + **dry** | **bool**| Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). | [optional] ### Return type diff --git a/docs/Api/ManagementApi.md b/docs/Api/ManagementApi.md index ecd9e830..c910a5c3 100644 --- a/docs/Api/ManagementApi.md +++ b/docs/Api/ManagementApi.md @@ -10,6 +10,7 @@ Method | HTTP request | Description [**createAttribute**](ManagementApi.md#createAttribute) | **POST** /v1/attributes | Define a new custom attribute [**createCampaign**](ManagementApi.md#createCampaign) | **POST** /v1/applications/{applicationId}/campaigns | Create a Campaign [**createCoupons**](ManagementApi.md#createCoupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create Coupons +[**createCouponsForMultipleRecipients**](ManagementApi.md#createCouponsForMultipleRecipients) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients | Create Coupons for Multiple Recipients [**createPasswordRecoveryEmail**](ManagementApi.md#createPasswordRecoveryEmail) | **POST** /v1/password_recovery_emails | Request a password reset [**createRuleset**](ManagementApi.md#createRuleset) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets | Create a Ruleset [**createSession**](ManagementApi.md#createSession) | **POST** /v1/sessions | Create a Session @@ -18,6 +19,12 @@ Method | HTTP request | Description [**deleteCoupons**](ManagementApi.md#deleteCoupons) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Delete Coupons [**deleteReferral**](ManagementApi.md#deleteReferral) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Delete one Referral [**deleteRuleset**](ManagementApi.md#deleteRuleset) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Delete a Ruleset +[**destroySession**](ManagementApi.md#destroySession) | **DELETE** /v1/sessions | Destroy a Session +[**exportCoupons**](ManagementApi.md#exportCoupons) | **GET** /v1/applications/{applicationId}/export_coupons | Export Coupons to a CSV file +[**exportCustomerSessions**](ManagementApi.md#exportCustomerSessions) | **GET** /v1/applications/{applicationId}/export_customer_sessions | Export Customer Sessions to a CSV file +[**exportEffects**](ManagementApi.md#exportEffects) | **GET** /v1/applications/{applicationId}/export_effects | Export triggered Effects to a CSV file +[**exportLoyaltyBalance**](ManagementApi.md#exportLoyaltyBalance) | **GET** /v1/loyalty_programs/{programID}/export_customer_balance | Export customer loyalty balance to a CSV file +[**exportLoyaltyLedger**](ManagementApi.md#exportLoyaltyLedger) | **GET** /v1/loyalty_programs/{programID}/profile/{integrationID}/export_log | Export a customer's loyalty ledger log to a CSV file [**getAccessLogs**](ManagementApi.md#getAccessLogs) | **GET** /v1/applications/{applicationId}/access_logs | Get access logs for application (with total count) [**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 @@ -25,7 +32,7 @@ Method | HTTP request | Description [**getAdditionalCost**](ManagementApi.md#getAdditionalCost) | **GET** /v1/additional_costs/{additionalCostId} | Get an additional cost [**getAdditionalCosts**](ManagementApi.md#getAdditionalCosts) | **GET** /v1/additional_costs | List additional costs [**getAllAccessLogs**](ManagementApi.md#getAllAccessLogs) | **GET** /v1/access_logs | Get all access logs -[**getAllRoles**](ManagementApi.md#getAllRoles) | **GET** /v1/roles | Get all roles. +[**getAllRoles**](ManagementApi.md#getAllRoles) | **GET** /v1/roles | Get all roles [**getApplication**](ManagementApi.md#getApplication) | **GET** /v1/applications/{applicationId} | Get Application [**getApplicationApiHealth**](ManagementApi.md#getApplicationApiHealth) | **GET** /v1/applications/{applicationId}/health_report | Get report of health of application API [**getApplicationCustomer**](ManagementApi.md#getApplicationCustomer) | **GET** /v1/applications/{applicationId}/customers/{customerId} | Get Application Customer @@ -39,6 +46,7 @@ Method | HTTP request | Description [**getApplications**](ManagementApi.md#getApplications) | **GET** /v1/applications | List Applications [**getAttribute**](ManagementApi.md#getAttribute) | **GET** /v1/attributes/{attributeId} | Get a custom attribute [**getAttributes**](ManagementApi.md#getAttributes) | **GET** /v1/attributes | List custom attributes +[**getAudiences**](ManagementApi.md#getAudiences) | **GET** /v1/audiences | Get all audiences [**getCampaign**](ManagementApi.md#getCampaign) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId} | Get a Campaign [**getCampaignAnalytics**](ManagementApi.md#getCampaignAnalytics) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/analytics | Get analytics of campaigns [**getCampaignByAttributes**](ManagementApi.md#getCampaignByAttributes) | **POST** /v1/applications/{applicationId}/campaigns_search | Get a list of all campaigns that match the given attributes @@ -57,14 +65,13 @@ Method | HTTP request | Description [**getCustomersByAttributes**](ManagementApi.md#getCustomersByAttributes) | **POST** /v1/customer_search/no_total | Get a list of the customer profiles that match the given attributes [**getEventTypes**](ManagementApi.md#getEventTypes) | **GET** /v1/event_types | List Event Types [**getExports**](ManagementApi.md#getExports) | **GET** /v1/exports | Get Exports -[**getImports**](ManagementApi.md#getImports) | **GET** /v1/imports | Get Imports [**getLoyaltyPoints**](ManagementApi.md#getLoyaltyPoints) | **GET** /v1/loyalty_programs/{programID}/profile/{integrationID} | get the Loyalty Ledger for this integrationID [**getLoyaltyProgram**](ManagementApi.md#getLoyaltyProgram) | **GET** /v1/loyalty_programs/{programID} | Get a loyalty program [**getLoyaltyPrograms**](ManagementApi.md#getLoyaltyPrograms) | **GET** /v1/loyalty_programs | List all loyalty Programs [**getLoyaltyStatistics**](ManagementApi.md#getLoyaltyStatistics) | **GET** /v1/loyalty_programs/{programID}/statistics | Get loyalty program statistics by loyalty program ID [**getReferrals**](ManagementApi.md#getReferrals) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals | List Referrals (with total count) [**getReferralsWithoutTotalCount**](ManagementApi.md#getReferralsWithoutTotalCount) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total | List Referrals -[**getRole**](ManagementApi.md#getRole) | **GET** /v1/roles/{roleId} | Get information for the specified role. +[**getRole**](ManagementApi.md#getRole) | **GET** /v1/roles/{roleId} | Get information for the specified role [**getRuleset**](ManagementApi.md#getRuleset) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Get a Ruleset [**getRulesets**](ManagementApi.md#getRulesets) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets | List Campaign Rulesets [**getUser**](ManagementApi.md#getUser) | **GET** /v1/users/{userId} | Get a single User @@ -477,6 +484,75 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) +## createCouponsForMultipleRecipients + +> \TalonOne\Client\Model\InlineResponse2004 createCouponsForMultipleRecipients($applicationId, $campaignId, $body, $silent) + +Create Coupons for Multiple Recipients + +Create coupons according to some pattern for up to 1000 recipients. + +### 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\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 | +$campaignId = 56; // int | +$body = new \TalonOne\Client\Model\NewCouponsForMultipleRecipients(); // \TalonOne\Client\Model\NewCouponsForMultipleRecipients | +$silent = 'silent_example'; // string | If set to 'yes', response will be an empty 204, otherwise a list of the coupons generated (to to 1000). + +try { + $result = $apiInstance->createCouponsForMultipleRecipients($applicationId, $campaignId, $body, $silent); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->createCouponsForMultipleRecipients: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| | + **campaignId** | **int**| | + **body** | [**\TalonOne\Client\Model\NewCouponsForMultipleRecipients**](../Model/NewCouponsForMultipleRecipients.md)| | + **silent** | **string**| If set to 'yes', response will be an empty 204, otherwise a list of the coupons generated (to to 1000). | [optional] + +### Return type + +[**\TalonOne\Client\Model\InlineResponse2004**](../Model/InlineResponse2004.md) + +### Authorization + +[manager_auth](../../README.md#manager_auth) + +### 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) + + ## createPasswordRecoveryEmail > \TalonOne\Client\Model\NewPasswordEmail createPasswordRecoveryEmail($body) @@ -650,7 +726,405 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\Session**](../Model/Session.md) +[**\TalonOne\Client\Model\Session**](../Model/Session.md) + +### Authorization + +[manager_auth](../../README.md#manager_auth) + +### 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) + + +## deleteCampaign + +> deleteCampaign($applicationId, $campaignId) + +Delete a Campaign + +### 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\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 | +$campaignId = 56; // int | + +try { + $apiInstance->deleteCampaign($applicationId, $campaignId); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->deleteCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| | + **campaignId** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## deleteCoupon + +> deleteCoupon($applicationId, $campaignId, $couponId) + +Delete one Coupon + +### 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\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 | +$campaignId = 56; // int | +$couponId = 'couponId_example'; // string | The ID of the coupon code to delete + +try { + $apiInstance->deleteCoupon($applicationId, $campaignId, $couponId); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->deleteCoupon: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| | + **campaignId** | **int**| | + **couponId** | **string**| The ID of the coupon code to delete | + +### Return type + +void (empty response body) + +### Authorization + +[manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## deleteCoupons + +> deleteCoupons($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch) + +Delete Coupons + +### 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\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 | +$campaignId = 56; // int | +$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. +$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 coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. +$startsAfter = 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. +$startsBefore = 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. +$expiresAfter = 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. +$expiresBefore = 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. +$valid = 'valid_example'; // string | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. +$batchId = 'batchId_example'; // string | Filter results by batches of coupons +$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, that meaning the coupons that had been created as an effect of the usage of a referral code. +$recipientIntegrationId = 'recipientIntegrationId_example'; // string | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field +$exactMatch = false; // bool | Filter results to an exact case-insensitive matching against the coupon code + +try { + $apiInstance->deleteCoupons($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->deleteCoupons: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| | + **campaignId** | **int**| | + **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] + **createdAfter** | **\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] + **startsAfter** | **\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] + **startsBefore** | **\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] + **expiresAfter** | **\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] + **expiresBefore** | **\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] + **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. | [optional] + **batchId** | **string**| Filter results by batches of coupons | [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, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] + **recipientIntegrationId** | **string**| Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field | [optional] + **exactMatch** | **bool**| Filter results to an exact case-insensitive matching against the coupon code | [optional] [default to false] + +### Return type + +void (empty response body) + +### Authorization + +[manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## deleteReferral + +> deleteReferral($applicationId, $campaignId, $referralId) + +Delete one Referral + +### 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\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 | +$campaignId = 56; // int | +$referralId = 'referralId_example'; // string | The ID of the referral code to delete + +try { + $apiInstance->deleteReferral($applicationId, $campaignId, $referralId); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->deleteReferral: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| | + **campaignId** | **int**| | + **referralId** | **string**| The ID of the referral code to delete | + +### Return type + +void (empty response body) + +### Authorization + +[manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## deleteRuleset + +> deleteRuleset($applicationId, $campaignId, $rulesetId) + +Delete a Ruleset + +### 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\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 | +$campaignId = 56; // int | +$rulesetId = 56; // int | + +try { + $apiInstance->deleteRuleset($applicationId, $campaignId, $rulesetId); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->deleteRuleset: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| | + **campaignId** | **int**| | + **rulesetId** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## destroySession + +> destroySession() + +Destroy a Session + +### 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\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 +); + +try { + $apiInstance->destroySession(); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->destroySession: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) ### Authorization @@ -658,19 +1132,21 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json -- **Accept**: application/json +- **Content-Type**: Not defined +- **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) -## deleteCampaign +## exportCoupons -> deleteCampaign($applicationId, $campaignId) +> string exportCoupons($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState) -Delete a Campaign +Export Coupons to a CSV file + +Download a file with the coupons that match the given attributes. ### Example @@ -692,12 +1168,25 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | -$campaignId = 56; // int | +$campaignId = 3.4; // float | Filter results by campaign. +$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$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. +$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 coupon 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 coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. +$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 +$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. try { - $apiInstance->deleteCampaign($applicationId, $campaignId); + $result = $apiInstance->exportCoupons($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->deleteCampaign: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->exportCoupons: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -708,11 +1197,23 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| | - **campaignId** | **int**| | + **campaignId** | **float**| Filter results by campaign. | [optional] + **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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] + **createdAfter** | **\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] + **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. | [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] + **dateFormat** | **string**| Determines the format of dates in the export document. | [optional] + **campaignState** | **string**| Filter results by the state of the campaign. | [optional] ### Return type -void (empty response body) +**string** ### Authorization @@ -721,18 +1222,20 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: 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) -## deleteCoupon +## exportCustomerSessions -> deleteCoupon($applicationId, $campaignId, $couponId) +> string exportCustomerSessions($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState) -Delete one Coupon +Export Customer Sessions to a CSV file + +Download a file with the customer sessions that match the request. ### Example @@ -754,13 +1257,17 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | -$campaignId = 56; // int | -$couponId = 'couponId_example'; // string | The ID of the coupon code to delete +$createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. +$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. +$profileIntegrationId = 'profileIntegrationId_example'; // string | Only return sessions for the customer that matches this customer integration ID. +$dateFormat = 'dateFormat_example'; // string | Determines the format of dates in the export document. +$customerSessionState = 'customerSessionState_example'; // string | Filter results by state. try { - $apiInstance->deleteCoupon($applicationId, $campaignId, $couponId); + $result = $apiInstance->exportCustomerSessions($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->deleteCoupon: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->exportCustomerSessions: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -771,12 +1278,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| | - **campaignId** | **int**| | - **couponId** | **string**| The ID of the coupon code to delete | + **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. | [optional] + **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. | [optional] + **profileIntegrationId** | **string**| Only return sessions for the customer that matches this customer integration ID. | [optional] + **dateFormat** | **string**| Determines the format of dates in the export document. | [optional] + **customerSessionState** | **string**| Filter results by state. | [optional] ### Return type -void (empty response body) +**string** ### Authorization @@ -785,18 +1295,20 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: 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) -## deleteCoupons +## exportEffects -> deleteCoupons($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch) +> string exportEffects($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat) -Delete Coupons +Export triggered Effects to a CSV file + +Download a file with the triggered effects that match the given attributes. ### Example @@ -818,25 +1330,16 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | -$campaignId = 56; // int | -$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. -$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 coupon creation timestamp. -$startsAfter = 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. -$startsBefore = 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. -$expiresAfter = 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. -$expiresBefore = 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. -$valid = 'valid_example'; // string | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. -$batchId = 'batchId_example'; // string | Filter results by batches of coupons -$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, that meaning the coupons that had been created as an effect of the usage of a referral code. -$recipientIntegrationId = 'recipientIntegrationId_example'; // string | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field -$exactMatch = false; // bool | Filter results to an exact case-insensitive matching against the coupon code +$campaignId = 3.4; // float | Filter results by campaign. +$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. +$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 coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. +$dateFormat = 'dateFormat_example'; // string | Determines the format of dates in the export document. try { - $apiInstance->deleteCoupons($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); + $result = $apiInstance->exportEffects($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->deleteCoupons: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->exportEffects: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -847,24 +1350,14 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| | - **campaignId** | **int**| | - **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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [optional] - **startsAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [optional] - **startsBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [optional] - **expiresAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [optional] - **expiresBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [optional] - **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. | [optional] - **batchId** | **string**| Filter results by batches of coupons | [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, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] - **recipientIntegrationId** | **string**| Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field | [optional] - **exactMatch** | **bool**| Filter results to an exact case-insensitive matching against the coupon code | [optional] [default to false] + **campaignId** | **float**| Filter results by campaign. | [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] + **createdAfter** | **\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] + **dateFormat** | **string**| Determines the format of dates in the export document. | [optional] ### Return type -void (empty response body) +**string** ### Authorization @@ -873,18 +1366,20 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: 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) -## deleteReferral +## exportLoyaltyBalance -> deleteReferral($applicationId, $campaignId, $referralId) +> string exportLoyaltyBalance($programID) -Delete one Referral +Export customer loyalty balance to a CSV file + +Download a file with the balance of each customer in the loyalty program ### Example @@ -905,14 +1400,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | -$campaignId = 56; // int | -$referralId = 'referralId_example'; // string | The ID of the referral code to delete +$programID = 'programID_example'; // string | try { - $apiInstance->deleteReferral($applicationId, $campaignId, $referralId); + $result = $apiInstance->exportLoyaltyBalance($programID); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->deleteReferral: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->exportLoyaltyBalance: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -922,13 +1416,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| | - **campaignId** | **int**| | - **referralId** | **string**| The ID of the referral code to delete | + **programID** | **string**| | ### Return type -void (empty response body) +**string** ### Authorization @@ -937,18 +1429,20 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: 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) -## deleteRuleset +## exportLoyaltyLedger -> deleteRuleset($applicationId, $campaignId, $rulesetId) +> string exportLoyaltyLedger($rangeStart, $rangeEnd, $programID, $integrationID, $dateFormat) -Delete a Ruleset +Export a customer's loyalty ledger log to a CSV file + +Download a file with a customer's ledger log in the loyalty program ### Example @@ -969,14 +1463,17 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | -$campaignId = 56; // int | -$rulesetId = 56; // int | +$rangeStart = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from after this timestamp, must be an RFC3339 timestamp string +$rangeEnd = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from before this timestamp, must be an RFC3339 timestamp string +$programID = 'programID_example'; // string | +$integrationID = 'integrationID_example'; // string | +$dateFormat = 'dateFormat_example'; // string | Determines the format of dates in the export document. try { - $apiInstance->deleteRuleset($applicationId, $campaignId, $rulesetId); + $result = $apiInstance->exportLoyaltyLedger($rangeStart, $rangeEnd, $programID, $integrationID, $dateFormat); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->deleteRuleset: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->exportLoyaltyLedger: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -986,13 +1483,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| | - **campaignId** | **int**| | - **rulesetId** | **int**| | + **rangeStart** | **\DateTime**| Only return results from after this timestamp, must be an RFC3339 timestamp string | + **rangeEnd** | **\DateTime**| Only return results from before this timestamp, must be an RFC3339 timestamp string | + **programID** | **string**| | + **integrationID** | **string**| | + **dateFormat** | **string**| Determines the format of dates in the export document. | [optional] ### Return type -void (empty response body) +**string** ### Authorization @@ -1001,7 +1500,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: 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) @@ -1353,7 +1852,7 @@ Name | Type | Description | Notes ## getAdditionalCosts -> \TalonOne\Client\Model\InlineResponse20021 getAdditionalCosts($pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20022 getAdditionalCosts($pageSize, $skip, $sort) List additional costs @@ -1402,7 +1901,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20021**](../Model/InlineResponse20021.md) +[**\TalonOne\Client\Model\InlineResponse20022**](../Model/InlineResponse20022.md) ### Authorization @@ -1499,7 +1998,7 @@ Name | Type | Description | Notes > \TalonOne\Client\Model\InlineResponse20030 getAllRoles() -Get all roles. +Get all roles ### Example @@ -1972,8 +2471,8 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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 -$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return events created after this date +$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. +$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. $session = 'session_example'; // string | Session integration ID filter for events. Must be exact match. $profile = 'profile_example'; // string | Profile integration ID filter for events. Must be exact match. $customerName = 'customerName_example'; // string | Customer name filter for events. Will match substrings case-insensitively. @@ -2002,8 +2501,8 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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 | [optional] - **createdAfter** | **\DateTime**| Only return events created after this date | [optional] + **createdBefore** | **\DateTime**| Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. | [optional] + **createdAfter** | **\DateTime**| Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. | [optional] **session** | **string**| Session integration ID filter for events. Must be exact match. | [optional] **profile** | **string**| Profile integration ID filter for events. Must be exact match. | [optional] **customerName** | **string**| Customer name filter for events. Will match substrings case-insensitively. | [optional] @@ -2063,8 +2562,8 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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 -$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return events created after this date +$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. +$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. $session = 'session_example'; // string | Session integration ID filter for events. Must be exact match. $profile = 'profile_example'; // string | Profile integration ID filter for events. Must be exact match. $customerName = 'customerName_example'; // string | Customer name filter for events. Will match substrings case-insensitively. @@ -2093,8 +2592,8 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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 | [optional] - **createdAfter** | **\DateTime**| Only return events created after this date | [optional] + **createdBefore** | **\DateTime**| Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. | [optional] + **createdAfter** | **\DateTime**| Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. | [optional] **session** | **string**| Session integration ID filter for events. Must be exact match. | [optional] **profile** | **string**| Profile integration ID filter for events. Must be exact match. | [optional] **customerName** | **string**| Customer name filter for events. Will match substrings case-insensitively. | [optional] @@ -2216,8 +2715,8 @@ $skip = 56; // int | Skips the given number of items when paging through large r $sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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. -$createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return events created before this date -$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return events created after this date +$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. +$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. $coupon = 'coupon_example'; // string | Filter by sessions with this coupon. Must be exact match. $referral = 'referral_example'; // string | Filter by sessions with this referral. Must be exact match. $integrationId = 'integrationId_example'; // string | Filter by sessions with this integrationId. Must be exact match. @@ -2242,8 +2741,8 @@ Name | Type | Description | Notes **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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] - **createdBefore** | **\DateTime**| Only return events created before this date | [optional] - **createdAfter** | **\DateTime**| Only return events created after this date | [optional] + **createdBefore** | **\DateTime**| Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. | [optional] + **createdAfter** | **\DateTime**| Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. | [optional] **coupon** | **string**| Filter by sessions with this coupon. Must be exact match. | [optional] **referral** | **string**| Filter by sessions with this referral. Must be exact match. | [optional] **integrationId** | **string**| Filter by sessions with this integrationId. Must be exact match. | [optional] @@ -2398,7 +2897,7 @@ Name | Type | Description | Notes ## getAttributes -> \TalonOne\Client\Model\InlineResponse20020 getAttributes($pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20021 getAttributes($pageSize, $skip, $sort) List custom attributes @@ -2447,6 +2946,75 @@ Name | Type | Description | Notes ### Return type +[**\TalonOne\Client\Model\InlineResponse20021**](../Model/InlineResponse20021.md) + +### Authorization + +[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) + + +## getAudiences + +> \TalonOne\Client\Model\InlineResponse20020 getAudiences($pageSize, $skip, $sort, $withTotalResultSize) + +Get all audiences + +Get All audiences created in the account. + +### 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\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 +); +$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$withTotalResultSize = True; // bool | When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. + +try { + $result = $apiInstance->getAudiences($pageSize, $skip, $sort, $withTotalResultSize); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->getAudiences: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] + **withTotalResultSize** | **bool**| When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. | [optional] + +### Return type + [**\TalonOne\Client\Model\InlineResponse20020**](../Model/InlineResponse20020.md) ### Authorization @@ -2700,8 +3268,8 @@ $sort = 'sort_example'; // string | The field by which results should be sorted. $campaignState = 'campaignState_example'; // string | Filter results by the state of the campaign. $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. -$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. +$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. try { @@ -2725,8 +3293,8 @@ Name | Type | Description | Notes **campaignState** | **string**| Filter results by the state of the campaign. | [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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. | [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] ### Return type @@ -2749,7 +3317,7 @@ Name | Type | Description | Notes ## getChanges -> \TalonOne\Client\Model\InlineResponse20027 getChanges($pageSize, $skip, $sort, $applicationId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld) +> \TalonOne\Client\Model\InlineResponse20028 getChanges($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld) Get audit log for an account @@ -2778,13 +3346,15 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $applicationId = 56; // int | -$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 change creation timestamp. -$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 change creation timestamp. +$entityPath = 'entityPath_example'; // string | Filter results on a case insensitive matching of the url path of the entity +$userId = 56; // int | +$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 change 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 change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. $withTotalResultSize = True; // bool | When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. $includeOld = True; // bool | When this flag is set to false, the state without the change will not be returned. The default value is true. try { - $result = $apiInstance->getChanges($pageSize, $skip, $sort, $applicationId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); + $result = $apiInstance->getChanges($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); print_r($result); } catch (Exception $e) { echo 'Exception when calling ManagementApi->getChanges: ', $e->getMessage(), PHP_EOL; @@ -2801,14 +3371,16 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] **applicationId** | **int**| | [optional] - **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. | [optional] + **entityPath** | **string**| Filter results on a case insensitive matching of the url path of the entity | [optional] + **userId** | **int**| | [optional] + **createdBefore** | **\DateTime**| 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] + **createdAfter** | **\DateTime**| 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] **withTotalResultSize** | **bool**| When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. | [optional] **includeOld** | **bool**| When this flag is set to false, the state without the change will not be returned. The default value is true. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20027**](../Model/InlineResponse20027.md) +[**\TalonOne\Client\Model\InlineResponse20028**](../Model/InlineResponse20028.md) ### Authorization @@ -2855,12 +3427,12 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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. -$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 coupon creation timestamp. -$startsAfter = 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. -$startsBefore = 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. -$expiresAfter = 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. -$expiresBefore = 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. +$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. +$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 coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. +$startsAfter = 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. +$startsBefore = 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. +$expiresAfter = 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. +$expiresBefore = 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. $valid = 'valid_example'; // string | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. $batchId = 'batchId_example'; // string | Filter results by batches of coupons $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`. @@ -2888,12 +3460,12 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [optional] - **startsAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [optional] - **startsBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [optional] - **expiresAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [optional] - **expiresBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [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] + **createdAfter** | **\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] + **startsAfter** | **\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] + **startsBefore** | **\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] + **expiresAfter** | **\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] + **expiresBefore** | **\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] **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. | [optional] **batchId** | **string**| Filter results by batches of coupons | [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] @@ -2953,8 +3525,8 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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. -$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 coupon creation timestamp. +$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. +$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 coupon 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 coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. @@ -2983,8 +3555,8 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [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] + **createdAfter** | **\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] **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] @@ -3043,8 +3615,8 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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. -$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 coupon creation timestamp. +$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. +$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 coupon 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 coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. @@ -3073,8 +3645,8 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [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] + **createdAfter** | **\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] **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] @@ -3132,8 +3704,8 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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. -$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 coupon creation timestamp. +$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. +$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 coupon 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 coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. @@ -3161,8 +3733,8 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [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] + **createdAfter** | **\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] **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] @@ -3687,7 +4259,7 @@ Name | Type | Description | Notes ## getEventTypes -> \TalonOne\Client\Model\InlineResponse20025 getEventTypes($applicationIds, $name, $includeOldVersions, $pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20026 getEventTypes($applicationIds, $name, $includeOldVersions, $pageSize, $skip, $sort) List Event Types @@ -3742,7 +4314,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20025**](../Model/InlineResponse20025.md) +[**\TalonOne\Client\Model\InlineResponse20026**](../Model/InlineResponse20026.md) ### Authorization @@ -3760,7 +4332,7 @@ Name | Type | Description | Notes ## getExports -> \TalonOne\Client\Model\InlineResponse20028 getExports($pageSize, $skip, $applicationId, $campaignId, $entity) +> \TalonOne\Client\Model\InlineResponse20029 getExports($pageSize, $skip, $applicationId, $campaignId, $entity) Get Exports @@ -3813,71 +4385,6 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20028**](../Model/InlineResponse20028.md) - -### Authorization - -[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) - - -## getImports - -> \TalonOne\Client\Model\InlineResponse20029 getImports($pageSize, $skip) - -Get Imports - -Get a list of all past imports - -### 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\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 -); -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. -$skip = 56; // int | Skips the given number of items when paging through large result sets. - -try { - $result = $apiInstance->getImports($pageSize, $skip); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ManagementApi->getImports: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] - **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - -### Return type - [**\TalonOne\Client\Model\InlineResponse20029**](../Model/InlineResponse20029.md) ### Authorization @@ -4169,8 +4676,8 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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. -$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. +$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 expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry 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 @@ -4195,8 +4702,8 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. | [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 expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry 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] @@ -4250,8 +4757,8 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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. -$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. +$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 expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry 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 @@ -4276,8 +4783,8 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. | [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 expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry 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] @@ -4304,7 +4811,7 @@ Name | Type | Description | Notes > \TalonOne\Client\Model\Role getRole($roleId) -Get information for the specified role. +Get information for the specified role ### Example @@ -4560,7 +5067,7 @@ Name | Type | Description | Notes ## getUsers -> \TalonOne\Client\Model\InlineResponse20026 getUsers($pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20027 getUsers($pageSize, $skip, $sort) List Users in your account @@ -4609,7 +5116,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20026**](../Model/InlineResponse20026.md) +[**\TalonOne\Client\Model\InlineResponse20027**](../Model/InlineResponse20027.md) ### Authorization @@ -4690,7 +5197,7 @@ Name | Type | Description | Notes ## getWebhookActivationLogs -> \TalonOne\Client\Model\InlineResponse20023 getWebhookActivationLogs($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter) +> \TalonOne\Client\Model\InlineResponse20024 getWebhookActivationLogs($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter) List Webhook activation Log Entries @@ -4722,8 +5229,8 @@ $integrationRequestUuid = 'integrationRequestUuid_example'; // string | Filter r $webhookId = 3.4; // float | Filter results by Webhook. $applicationId = 3.4; // float | $campaignId = 3.4; // float | Filter results by campaign. -$createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return events created before this date. -$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. +$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. +$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. try { $result = $apiInstance->getWebhookActivationLogs($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); @@ -4746,12 +5253,12 @@ Name | Type | Description | Notes **webhookId** | **float**| Filter results by Webhook. | [optional] **applicationId** | **float**| | [optional] **campaignId** | **float**| Filter results by campaign. | [optional] - **createdBefore** | **\DateTime**| Only return events created before this date. | [optional] - **createdAfter** | **\DateTime**| Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. | [optional] + **createdBefore** | **\DateTime**| Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. | [optional] + **createdAfter** | **\DateTime**| Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20023**](../Model/InlineResponse20023.md) +[**\TalonOne\Client\Model\InlineResponse20024**](../Model/InlineResponse20024.md) ### Authorization @@ -4769,7 +5276,7 @@ Name | Type | Description | Notes ## getWebhookLogs -> \TalonOne\Client\Model\InlineResponse20024 getWebhookLogs($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter) +> \TalonOne\Client\Model\InlineResponse20025 getWebhookLogs($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter) List Webhook Log Entries @@ -4800,8 +5307,8 @@ $webhookId = 3.4; // float | Filter results by Webhook. $applicationId = 3.4; // float | $campaignId = 3.4; // float | Filter results by campaign. $requestUuid = 'requestUuid_example'; // string | Filter results by request UUID. -$createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. -$createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. +$createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. 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 where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. try { $result = $apiInstance->getWebhookLogs($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter); @@ -4825,12 +5332,12 @@ Name | Type | Description | Notes **applicationId** | **float**| | [optional] **campaignId** | **float**| Filter results by campaign. | [optional] **requestUuid** | **string**| Filter results by request UUID. | [optional] - **createdBefore** | **\DateTime**| Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. | [optional] - **createdAfter** | **\DateTime**| Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. | [optional] + **createdBefore** | **\DateTime**| Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. | [optional] + **createdAfter** | **\DateTime**| Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20024**](../Model/InlineResponse20024.md) +[**\TalonOne\Client\Model\InlineResponse20025**](../Model/InlineResponse20025.md) ### Authorization @@ -4848,7 +5355,7 @@ Name | Type | Description | Notes ## getWebhooks -> \TalonOne\Client\Model\InlineResponse20022 getWebhooks($applicationIds, $sort, $pageSize, $skip) +> \TalonOne\Client\Model\InlineResponse20023 getWebhooks($applicationIds, $sort, $pageSize, $skip) List Webhooks @@ -4897,7 +5404,7 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20022**](../Model/InlineResponse20022.md) +[**\TalonOne\Client\Model\InlineResponse20023**](../Model/InlineResponse20023.md) ### Authorization @@ -5074,8 +5581,8 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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. -$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 coupon creation timestamp. +$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. +$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 coupon 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 coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. @@ -5104,8 +5611,8 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [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] + **createdAfter** | **\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] **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] @@ -5164,8 +5671,8 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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. -$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 coupon creation timestamp. +$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. +$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 coupon 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 coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. @@ -5194,8 +5701,8 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [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] + **createdAfter** | **\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] **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] @@ -5255,8 +5762,8 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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. -$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 coupon creation timestamp. +$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. +$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 coupon 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 coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. @@ -5285,8 +5792,8 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [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] + **createdAfter** | **\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] **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] @@ -5347,8 +5854,8 @@ $pageSize = 56; // int | The number of items to include in this response. When o $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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. $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. -$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 coupon creation timestamp. +$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. +$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 coupon 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 coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. @@ -5377,8 +5884,8 @@ Name | Type | Description | Notes **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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [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. | [optional] - **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. | [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] + **createdAfter** | **\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] **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] diff --git a/docs/Model/AddLoyaltyPointsEffectProps.md b/docs/Model/AddLoyaltyPointsEffectProps.md index 64b91858..e34ef062 100644 --- a/docs/Model/AddLoyaltyPointsEffectProps.md +++ b/docs/Model/AddLoyaltyPointsEffectProps.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **recipientIntegrationId** | **string** | The user for whom these points were added | **startDate** | [**\DateTime**](\DateTime.md) | Date after which points will be valid | [optional] **expiryDate** | [**\DateTime**](\DateTime.md) | Date after which points will expire | [optional] +**transactionUUID** | **string** | The identifier of this addition in the loyalty ledger | [[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 8afce148..105d4330 100644 --- a/docs/Model/Application.md +++ b/docs/Model/Application.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Default limits for campaigns created in this application | [optional] **campaignPriority** | **string** | Default priority for campaigns created in this application, can be one of (universal, stackable, exclusive). If no value is provided, this is set to \"universal\" | [optional] **exclusiveCampaignsStrategy** | **string** | The strategy used when choosing exclusive campaigns for evaluation, can be one of (listOrder, lowestDiscount, highestDiscount). If no value is provided, this is set to \"listOrder\" | [optional] +**defaultDiscountScope** | **string** | The default scope to apply \"setDiscount\" effects on if no scope was provided with the effect. | [optional] **enableCascadingDiscounts** | **bool** | Flag indicating if discounts should cascade for this application | [optional] **enableFlattenedCartItems** | **bool** | Flag indicating 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] diff --git a/docs/Model/ApplicationEvent.md b/docs/Model/ApplicationEvent.md index 7ec0b729..c835d6b4 100644 --- a/docs/Model/ApplicationEvent.md +++ b/docs/Model/ApplicationEvent.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **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. | **effects** | **object[]** | An array containing the effects that were applied as a result of this event. | +**ruleFailureReasons** | [**\TalonOne\Client\Model\RuleFailureReason[]**](RuleFailureReason.md) | An array containing the rule failure reasons which happened during this 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/Binding.md b/docs/Model/Binding.md index 25ef7d38..77ae0015 100644 --- a/docs/Model/Binding.md +++ b/docs/Model/Binding.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | A descriptive name for the value to be bound. | +**type** | **string** | The kind of binding. Possible values are cartItemFilter, subledgerBalance. | [optional] **expression** | **object[]** | A Talang expression that will be evaluated and its result attached to the name of the binding. | [[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 f6aa9ade..bb336fc3 100644 --- a/docs/Model/Campaign.md +++ b/docs/Model/Campaign.md @@ -23,9 +23,14 @@ Name | Type | Description | Notes **campaignGroups** | **int[]** | The IDs of the campaign groups that own this entity. | [optional] **couponRedemptionCount** | **int** | Number of coupons redeemed in the campaign. | [optional] **referralRedemptionCount** | **int** | Number of referral codes redeemed in the campaign. | [optional] -**discountCount** | **int** | Total amount of discounts 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] +**referralCreationCount** | **int** | Total number of referrals created 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] **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 or any of its elements. | [optional] **createdBy** | **string** | Name of the user who created this campaign if available. | [optional] diff --git a/docs/Model/CartItem.md b/docs/Model/CartItem.md index 356c196a..1ab04397 100644 --- a/docs/Model/CartItem.md +++ b/docs/Model/CartItem.md @@ -15,7 +15,6 @@ Name | Type | Description | Notes **length** | **float** | Length of item in mm | [optional] **position** | **float** | Position of the Cart Item in the Cart (calculated internally) | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this item | [optional] -**adjustment** | [**\TalonOne\Client\Model\CartItemAdjustment**](CartItemAdjustment.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/CartItemAdjustment.md b/docs/Model/CartItemAdjustment.md deleted file mode 100644 index d71fd6e6..00000000 --- a/docs/Model/CartItemAdjustment.md +++ /dev/null @@ -1,13 +0,0 @@ -# # CartItemAdjustment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payFromLoyaltyProgram** | **int** | Loyalty Program to be used for payment | -**pointPayment** | **int** | Amount of points to be spend | -**remainingPrice** | **float** | Remaining price in currency after payment in points has been made | [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/Change.md b/docs/Model/Change.md index e4083f05..577c5f55 100644 --- a/docs/Model/Change.md +++ b/docs/Model/Change.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **id** | **int** | Unique ID for this entity. | **created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | **userId** | **int** | The ID of the account that owns this entity. | +**applicationId** | **int** | ID of application associated with change | [optional] **entity** | **string** | API endpoint on which the change was initiated. | **old** | [**object**](.md) | Resource before the change occurred. | [optional] **new** | [**object**](.md) | Resource after the change occurred. | [optional] diff --git a/docs/Model/CustomerProfileIntegrationRequestV2.md b/docs/Model/CustomerProfileIntegrationRequestV2.md index e5cfe17b..cbc65edd 100644 --- a/docs/Model/CustomerProfileIntegrationRequestV2.md +++ b/docs/Model/CustomerProfileIntegrationRequestV2.md @@ -5,7 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **attributes** | [**object**](.md) | Arbitrary properties associated with this item | [optional] -**responseContent** | **string[]** | Optional list of requested information to be present on the response related to the customer profile update. Currently supported: \"customerProfile\", \"triggeredCampaigns\", \"loyalty\" and \"event\". | [optional] +**audiencesChanges** | [**\TalonOne\Client\Model\ProfileAudiencesChanges**](ProfileAudiencesChanges.md) | | [optional] +**responseContent** | **string[]** | Optional list of requested information to be present on the response related to the customer profile update. Currently supported: \"customerProfile\", \"triggeredCampaigns\", \"loyalty\", \"event\" and \"ruleFailureReasons\". | [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/DeductLoyaltyPointsEffectProps.md b/docs/Model/DeductLoyaltyPointsEffectProps.md index ae7efada..4abe75c1 100644 --- a/docs/Model/DeductLoyaltyPointsEffectProps.md +++ b/docs/Model/DeductLoyaltyPointsEffectProps.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **programId** | **int** | The ID of the loyalty program where these points were added | **subLedgerId** | **string** | The ID of the subledger within the loyalty program where these points were added | **value** | **float** | The amount of points that were deducted | +**transactionUUID** | **string** | The identifier of this deduction in the loyalty ledger | [[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 071d8688..d2660298 100644 --- a/docs/Model/Effect.md +++ b/docs/Model/Effect.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **ruleIndex** | **int** | The position of the rule that triggered this effect within the ruleset | **ruleName** | **string** | The name of the rule that triggered this effect | **effectType** | **string** | The type of effect that was triggered | +**triggeredByCoupon** | **int** | The ID of the coupon that was being evaluated when this effect was triggered | [optional] **props** | [**object**](.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/EffectEntity.md b/docs/Model/EffectEntity.md index f2ce7469..7083d05a 100644 --- a/docs/Model/EffectEntity.md +++ b/docs/Model/EffectEntity.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **ruleIndex** | **int** | The position of the rule that triggered this effect within the ruleset | **ruleName** | **string** | The name of the rule that triggered this effect | **effectType** | **string** | The type of effect that was triggered | +**triggeredByCoupon** | **int** | The ID of the coupon that was being evaluated when this effect 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/Import.md b/docs/Model/Import.md index 9488f8af..f0bbc260 100644 --- a/docs/Model/Import.md +++ b/docs/Model/Import.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | **accountId** | **int** | The ID of the account that owns this entity. | **userId** | **int** | The ID of the account that owns this entity. | -**entity** | **string** | The name of the entity that was imported. | +**entity** | **string** | The name of the entity that was imported. Possible values are Coupons and LoyaltyPoints. | **amount** | **int** | The number of members that imported. | [[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 f37971ef..57bf8b22 100644 --- a/docs/Model/InlineResponse20020.md +++ b/docs/Model/InlineResponse20020.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Attribute[]**](Attribute.md) | | +**totalResultSize** | **int** | | [optional] +**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/InlineResponse20021.md b/docs/Model/InlineResponse20021.md index 0c0d5991..cae74d74 100644 --- a/docs/Model/InlineResponse20021.md +++ b/docs/Model/InlineResponse20021.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/InlineResponse20022.md b/docs/Model/InlineResponse20022.md index 75d864d8..4f950993 100644 --- a/docs/Model/InlineResponse20022.md +++ b/docs/Model/InlineResponse20022.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Webhook[]**](Webhook.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/InlineResponse20023.md b/docs/Model/InlineResponse20023.md index 308ce1dc..500cf3fe 100644 --- a/docs/Model/InlineResponse20023.md +++ b/docs/Model/InlineResponse20023.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\WebhookActivationLogEntry[]**](WebhookActivationLogEntry.md) | | +**data** | [**\TalonOne\Client\Model\Webhook[]**](Webhook.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 d779c6b7..d071f988 100644 --- a/docs/Model/InlineResponse20024.md +++ b/docs/Model/InlineResponse20024.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\WebhookLogEntry[]**](WebhookLogEntry.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/InlineResponse20025.md b/docs/Model/InlineResponse20025.md index aed56130..95a0ccd1 100644 --- a/docs/Model/InlineResponse20025.md +++ b/docs/Model/InlineResponse20025.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\EventType[]**](EventType.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/InlineResponse20026.md b/docs/Model/InlineResponse20026.md index 7b0d3983..1cfc1f80 100644 --- a/docs/Model/InlineResponse20026.md +++ b/docs/Model/InlineResponse20026.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\User[]**](User.md) | | +**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/InlineResponse20027.md b/docs/Model/InlineResponse20027.md index b997f98d..b8239dfc 100644 --- a/docs/Model/InlineResponse20027.md +++ b/docs/Model/InlineResponse20027.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\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/InlineResponse20028.md b/docs/Model/InlineResponse20028.md index 2d04d3d1..6b4ee6eb 100644 --- a/docs/Model/InlineResponse20028.md +++ b/docs/Model/InlineResponse20028.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Export[]**](Export.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/InlineResponse20029.md b/docs/Model/InlineResponse20029.md index 1f7eb142..255d9fa5 100644 --- a/docs/Model/InlineResponse20029.md +++ b/docs/Model/InlineResponse20029.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Import[]**](Import.md) | | +**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/IntegrationRequest.md b/docs/Model/IntegrationRequest.md index 7035cb58..220d39c2 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[]** | Optional list of requested information to be present on the response related to the customer session update. Currently supported: \"customerSession\", \"customerProfile\", \"coupons\", \"triggeredCampaigns\", \"referral\", \"loyalty\" and \"event\". | [optional] +**responseContent** | **string[]** | Optional list of requested information to be present on the response related to the customer session update. Currently supported: \"customerSession\", \"customerProfile\", \"coupons\", \"triggeredCampaigns\", \"referral\", \"loyalty\", \"event\" and \"ruleFailureReasons\". | [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/IntegrationStateV2.md b/docs/Model/IntegrationStateV2.md index d1b1d4c8..93c9fa86 100644 --- a/docs/Model/IntegrationStateV2.md +++ b/docs/Model/IntegrationStateV2.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **coupons** | [**\TalonOne\Client\Model\Coupon[]**](Coupon.md) | | [optional] **triggeredCampaigns** | [**\TalonOne\Client\Model\Campaign[]**](Campaign.md) | | [optional] **effects** | [**\TalonOne\Client\Model\Effect[]**](Effect.md) | | +**ruleFailureReasons** | [**\TalonOne\Client\Model\RuleFailureReason[]**](RuleFailureReason.md) | | [optional] **createdCoupons** | [**\TalonOne\Client\Model\Coupon[]**](Coupon.md) | | **createdReferrals** | [**\TalonOne\Client\Model\Referral[]**](Referral.md) | | diff --git a/docs/Model/LoyaltyProgramBalance.md b/docs/Model/LoyaltyProgramBalance.md index 5af07eb7..bac1151d 100644 --- a/docs/Model/LoyaltyProgramBalance.md +++ b/docs/Model/LoyaltyProgramBalance.md @@ -4,7 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currentBalance** | **float** | | +**currentBalance** | **float** | Sum of current active points amounts | +**pendingBalance** | **float** | Sum of pending points amounts | +**expiredBalance** | **float** | Sum of expired points amounts | +**spentBalance** | **float** | Sum of spent points amounts | +**tentativeCurrentBalance** | **float** | Sum of current active points amounts, including additions and deductions on open sessions | [[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/LoyaltyProgramLedgers.md b/docs/Model/LoyaltyProgramLedgers.md index 635e63bb..bebe5dcc 100644 --- a/docs/Model/LoyaltyProgramLedgers.md +++ b/docs/Model/LoyaltyProgramLedgers.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **int** | The internal ID of loyalty program | **title** | **string** | Visible name of loyalty program | **name** | **string** | Internal name of loyalty program | **ledger** | [**\TalonOne\Client\Model\LoyaltyProgramBalance**](LoyaltyProgramBalance.md) | | diff --git a/docs/Model/LoyaltySubLedger.md b/docs/Model/LoyaltySubLedger.md index bad2de9b..d78decee 100644 --- a/docs/Model/LoyaltySubLedger.md +++ b/docs/Model/LoyaltySubLedger.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **float** | ⚠️ Deprecated: Please use 'totalActivePoints' property instead. Total amount of currently active and available points in the customer's balance | +**total** | **float** | ⚠️ Deprecated: Use 'totalActivePoints' property instead. Total amount of currently active and available points in the customer's balance | **totalActivePoints** | **float** | Total amount of currently active and available points in the customer's balance | **totalPendingPoints** | **float** | Total amount of pending points, which are not active yet but will become active in the future | **totalSpentPoints** | **float** | Total amount of points already spent by this customer | diff --git a/docs/Model/NewApplication.md b/docs/Model/NewApplication.md index c8a2ec5f..4da376d3 100644 --- a/docs/Model/NewApplication.md +++ b/docs/Model/NewApplication.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Default limits for campaigns created in this application | [optional] **campaignPriority** | **string** | Default priority for campaigns created in this application, can be one of (universal, stackable, exclusive). If no value is provided, this is set to \"universal\" | [optional] **exclusiveCampaignsStrategy** | **string** | The strategy used when choosing exclusive campaigns for evaluation, can be one of (listOrder, lowestDiscount, highestDiscount). If no value is provided, this is set to \"listOrder\" | [optional] +**defaultDiscountScope** | **string** | The default scope to apply \"setDiscount\" effects on if no scope was provided with the effect. | [optional] **enableCascadingDiscounts** | **bool** | Flag indicating if discounts should cascade for this application | [optional] **enableFlattenedCartItems** | **bool** | Flag indicating 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] diff --git a/docs/Model/NewCoupons.md b/docs/Model/NewCoupons.md index 274fe3c4..d3ad6a6e 100644 --- a/docs/Model/NewCoupons.md +++ b/docs/Model/NewCoupons.md @@ -8,12 +8,12 @@ Name | Type | Description | Notes **discountLimit** | **float** | The amount of discounts that can be given with this coupon code. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] **expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] -**validCharacters** | **string[]** | Set of characters to be used when generating random part of code. Defaults to [A-Z, 0-9] (in terms of RegExp). | -**couponPattern** | **string** | The pattern that will be used to generate coupon codes. The character `#` acts as a placeholder and will be replaced by a random character from the `validCharacters` set. | **numberOfCoupons** | **int** | The number of new coupon codes to generate for the campaign. Must be at least 1. | **uniquePrefix** | **string** | A unique prefix to prepend to all generated coupons. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this item | [optional] **recipientIntegrationId** | **string** | The integration ID for this coupon's beneficiary's profile | [optional] +**validCharacters** | **string[]** | Set of characters to be used when generating random part of code. Defaults to [A-Z, 0-9] (in terms of RegExp). | [optional] +**couponPattern** | **string** | The pattern that will be used to generate coupon codes. The character `#` acts as a placeholder and will be replaced by a random character from the `validCharacters` 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/NewCouponsForMultipleRecipients.md b/docs/Model/NewCouponsForMultipleRecipients.md new file mode 100644 index 00000000..2c486f88 --- /dev/null +++ b/docs/Model/NewCouponsForMultipleRecipients.md @@ -0,0 +1,18 @@ +# # NewCouponsForMultipleRecipients + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**usageLimit** | **int** | The number of times a coupon code can be redeemed. This can be set to 0 for no limit, but any campaign usage limits will still apply. | +**discountLimit** | **float** | The amount of discounts that can be given with this coupon code. | [optional] +**startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry 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] +**recipientsIntegrationIds** | **string[]** | The integration IDs for recipients | +**validCharacters** | **string[]** | Set of characters to be used when generating random part of code. Defaults to [A-Z, 0-9] (in terms of RegExp). | [optional] +**couponPattern** | **string** | The pattern that will be used to generate coupon codes. The character `#` acts as a placeholder and will be replaced by a random character from the `validCharacters` 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/NewImport.md b/docs/Model/ProfileAudiencesChanges.md similarity index 60% rename from docs/Model/NewImport.md rename to docs/Model/ProfileAudiencesChanges.md index 6e6372f6..031f3759 100644 --- a/docs/Model/NewImport.md +++ b/docs/Model/ProfileAudiencesChanges.md @@ -1,10 +1,11 @@ -# # NewImport +# # ProfileAudiencesChanges ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**entity** | **string** | The name of the entity that was imported. | +**adds** | **int[]** | The IDs of the audiences for the customer to join. | +**deletes** | **int[]** | The IDs of the audiences for the customer to leave. | [[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/RejectCouponEffectProps.md b/docs/Model/RejectCouponEffectProps.md index 99f2a7a3..982b4300 100644 --- a/docs/Model/RejectCouponEffectProps.md +++ b/docs/Model/RejectCouponEffectProps.md @@ -6,6 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **string** | The coupon code that was rejected | **rejectionReason** | **string** | The reason why this coupon was rejected | +**conditionIndex** | **int** | The index of the condition that caused the rejection of the coupon | [optional] +**effectIndex** | **int** | The index of the effect that caused the rejection of the coupon | [optional] +**details** | **string** | More details about the failure | [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/RejectReferralEffectProps.md b/docs/Model/RejectReferralEffectProps.md index 63c83a26..316901c9 100644 --- a/docs/Model/RejectReferralEffectProps.md +++ b/docs/Model/RejectReferralEffectProps.md @@ -6,6 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **string** | The referral code that was rejected | **rejectionReason** | **string** | The reason why this referral code was rejected | +**conditionIndex** | **int** | The index of the condition that caused the rejection of the referral | [optional] +**effectIndex** | **int** | The index of the effect that caused the rejection of the referral | [optional] +**details** | **string** | More details about the failure | [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 new file mode 100644 index 00000000..a54dc692 --- /dev/null +++ b/docs/Model/RollbackAddedLoyaltyPointsEffectProps.md @@ -0,0 +1,15 @@ +# # RollbackAddedLoyaltyPointsEffectProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**programId** | **int** | The ID of the loyalty program where the points were originally added | +**subLedgerId** | **string** | The ID of the subledger within the loyalty program where these points were originally added | +**value** | **float** | The amount of points that were rolled back | +**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. | + +[[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/RollbackDeductedLoyaltyPointsEffectProps.md b/docs/Model/RollbackDeductedLoyaltyPointsEffectProps.md new file mode 100644 index 00000000..d01db067 --- /dev/null +++ b/docs/Model/RollbackDeductedLoyaltyPointsEffectProps.md @@ -0,0 +1,17 @@ +# # RollbackDeductedLoyaltyPointsEffectProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**programId** | **int** | The ID of the loyalty program where these points were reimbursed | +**subLedgerId** | **string** | The ID of the subledger within the loyalty program where these points were reimbursed | +**value** | **float** | The amount of reimbursed points that were added | +**recipientIntegrationId** | **string** | The user for whom these points were reimbursed | +**startDate** | [**\DateTime**](\DateTime.md) | Date after which the reimbursed points will be valid | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Date after which the reimbursed points will expire | [optional] +**transactionUUID** | **string** | The identifier of 'addition' entries added to the ledger as the `deductLoyaltyPoints` effect is rolled back | + +[[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/ImportCoupons.md b/docs/Model/RollbackReferralEffectProps.md similarity index 71% rename from docs/Model/ImportCoupons.md rename to docs/Model/RollbackReferralEffectProps.md index 4a0724fb..4b2c740e 100644 --- a/docs/Model/ImportCoupons.md +++ b/docs/Model/RollbackReferralEffectProps.md @@ -1,10 +1,10 @@ -# # ImportCoupons +# # RollbackReferralEffectProps ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**coupons** | **string** | | +**value** | **string** | The referral code whose usage has been rolled back | [[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/RuleFailureReason.md b/docs/Model/RuleFailureReason.md new file mode 100644 index 00000000..947fbbed --- /dev/null +++ b/docs/Model/RuleFailureReason.md @@ -0,0 +1,22 @@ +# # RuleFailureReason + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignID** | **int** | The ID of the campaign that contains the rule that failed | +**campaignName** | **string** | The name of the campaign that contains the rule that failed | +**rulesetID** | **int** | The ID of the ruleset that contains the rule that failed | +**couponID** | **int** | The ID of the coupon that was being evaluated at the time of the rule failure | [optional] +**couponValue** | **string** | The value of the coupon that was being evaluated at the time of the rule failure | [optional] +**referralID** | **int** | The ID of the referral that was being evaluated at the time of the rule failure | [optional] +**referralValue** | **string** | The value of the referral that was being evaluated at the time of the rule failure | [optional] +**ruleIndex** | **int** | The index of the rule that failed within the ruleset | +**ruleName** | **string** | The name of the rule that failed within the ruleset | +**conditionIndex** | **int** | The index of the condition that failed | [optional] +**effectIndex** | **int** | The index of the effect that failed | [optional] +**details** | **string** | More details about the failure | [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 b4b4497f..c4ef991f 100644 --- a/docs/Model/UpdateApplication.md +++ b/docs/Model/UpdateApplication.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Default limits for campaigns created in this application | [optional] **campaignPriority** | **string** | Default priority for campaigns created in this application, can be one of (universal, stackable, exclusive). If no value is provided, this is set to \"universal\" | [optional] **exclusiveCampaignsStrategy** | **string** | The strategy used when choosing exclusive campaigns for evaluation, can be one of (listOrder, lowestDiscount, highestDiscount). If no value is provided, this is set to \"listOrder\" | [optional] +**defaultDiscountScope** | **string** | The default scope to apply \"setDiscount\" effects on if no scope was provided with the effect. | [optional] **enableCascadingDiscounts** | **bool** | Flag indicating if discounts should cascade for this application | [optional] **enableFlattenedCartItems** | **bool** | Flag indicating 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] diff --git a/lib/Api/IntegrationApi.php b/lib/Api/IntegrationApi.php index 6413c341..ead8eeb1 100644 --- a/lib/Api/IntegrationApi.php +++ b/lib/Api/IntegrationApi.php @@ -942,7 +942,7 @@ protected function deleteCouponReservationRequest($couponValue, $body) /** * Operation deleteCustomerData * - * Delete the personal data of a customer. + * Delete the personal data of a customer * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @@ -958,7 +958,7 @@ public function deleteCustomerData($integrationId) /** * Operation deleteCustomerDataWithHttpInfo * - * Delete the personal data of a customer. + * Delete the personal data of a customer * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @@ -1010,7 +1010,7 @@ public function deleteCustomerDataWithHttpInfo($integrationId) /** * Operation deleteCustomerDataAsync * - * Delete the personal data of a customer. + * Delete the personal data of a customer * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @@ -1030,7 +1030,7 @@ function ($response) { /** * Operation deleteCustomerDataAsyncWithHttpInfo * - * Delete the personal data of a customer. + * Delete the personal data of a customer * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @@ -1177,7 +1177,7 @@ protected function deleteCustomerDataRequest($integrationId) /** * Operation getCustomerInventory * - * Get an inventory of all data associated with a specific customer profile. + * Get an inventory of all data associated with a specific customer profile * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @param bool $profile optional flag to decide if you would like customer profile information in the response (optional) @@ -1198,7 +1198,7 @@ public function getCustomerInventory($integrationId, $profile = null, $referrals /** * Operation getCustomerInventoryWithHttpInfo * - * Get an inventory of all data associated with a specific customer profile. + * Get an inventory of all data associated with a specific customer profile * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @param bool $profile optional flag to decide if you would like customer profile information in the response (optional) @@ -1290,7 +1290,7 @@ public function getCustomerInventoryWithHttpInfo($integrationId, $profile = null /** * Operation getCustomerInventoryAsync * - * Get an inventory of all data associated with a specific customer profile. + * Get an inventory of all data associated with a specific customer profile * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @param bool $profile optional flag to decide if you would like customer profile information in the response (optional) @@ -1314,7 +1314,7 @@ function ($response) { /** * Operation getCustomerInventoryAsyncWithHttpInfo * - * Get an inventory of all data associated with a specific customer profile. + * Get an inventory of all data associated with a specific customer profile * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @param bool $profile optional flag to decide if you would like customer profile information in the response (optional) @@ -1794,7 +1794,7 @@ protected function getReservedCustomersRequest($couponValue) * Track an Event * * @param \TalonOne\Client\Model\NewEvent $body body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1812,7 +1812,7 @@ public function trackEvent($body, $dry = null) * Track an Event * * @param \TalonOne\Client\Model\NewEvent $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1901,7 +1901,7 @@ public function trackEventWithHttpInfo($body, $dry = null) * Track an Event * * @param \TalonOne\Client\Model\NewEvent $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1922,7 +1922,7 @@ function ($response) { * Track an Event * * @param \TalonOne\Client\Model\NewEvent $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1970,7 +1970,7 @@ function ($exception) { * Create request for operation 'trackEvent' * * @param \TalonOne\Client\Model\NewEvent $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2085,7 +2085,7 @@ protected function trackEventRequest($body, $dry = null) * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @param \TalonOne\Client\Model\NewCustomerProfile $body body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2104,7 +2104,7 @@ public function updateCustomerProfile($integrationId, $body, $dry = null) * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @param \TalonOne\Client\Model\NewCustomerProfile $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2194,7 +2194,7 @@ public function updateCustomerProfileWithHttpInfo($integrationId, $body, $dry = * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @param \TalonOne\Client\Model\NewCustomerProfile $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2216,7 +2216,7 @@ function ($response) { * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @param \TalonOne\Client\Model\NewCustomerProfile $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2265,7 +2265,7 @@ function ($exception) { * * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) * @param \TalonOne\Client\Model\NewCustomerProfile $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2617,16 +2617,16 @@ protected function updateCustomerProfileAudiencesRequest($body) * * Update a Customer Profile * - * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) + * @param string $integrationId The custom identifier for this profile. Must be unique within the account. (required) * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body body (required) - * @param bool $runRuleEngine Flag to indicate whether to run the rule engine (Defaults to false). (optional) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'. Only used when 'runRuleEngine' is set to 'true'). (optional) + * @param bool $runRuleEngine Indicates whether to run the rule engine. (optional, default to false) + * @param bool $dry Indicates whether to persist the changes. Changes are persisted with `true`. Only used when `runRuleEngine` is set to `true`. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \TalonOne\Client\Model\IntegrationStateV2 */ - public function updateCustomerProfileV2($integrationId, $body, $runRuleEngine = null, $dry = null) + public function updateCustomerProfileV2($integrationId, $body, $runRuleEngine = false, $dry = null) { list($response) = $this->updateCustomerProfileV2WithHttpInfo($integrationId, $body, $runRuleEngine, $dry); return $response; @@ -2637,16 +2637,16 @@ public function updateCustomerProfileV2($integrationId, $body, $runRuleEngine = * * Update a Customer Profile * - * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) + * @param string $integrationId The custom identifier for this profile. Must be unique within the account. (required) * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body (required) - * @param bool $runRuleEngine Flag to indicate whether to run the rule engine (Defaults to false). (optional) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'. Only used when 'runRuleEngine' is set to 'true'). (optional) + * @param bool $runRuleEngine Indicates whether to run the rule engine. (optional, default to false) + * @param bool $dry Indicates whether to persist the changes. Changes are persisted with `true`. Only used when `runRuleEngine` is set to `true`. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \TalonOne\Client\Model\IntegrationStateV2, HTTP status code, HTTP response headers (array of strings) */ - public function updateCustomerProfileV2WithHttpInfo($integrationId, $body, $runRuleEngine = null, $dry = null) + public function updateCustomerProfileV2WithHttpInfo($integrationId, $body, $runRuleEngine = false, $dry = null) { $request = $this->updateCustomerProfileV2Request($integrationId, $body, $runRuleEngine, $dry); @@ -2728,15 +2728,15 @@ public function updateCustomerProfileV2WithHttpInfo($integrationId, $body, $runR * * Update a Customer Profile * - * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) + * @param string $integrationId The custom identifier for this profile. Must be unique within the account. (required) * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body (required) - * @param bool $runRuleEngine Flag to indicate whether to run the rule engine (Defaults to false). (optional) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'. Only used when 'runRuleEngine' is set to 'true'). (optional) + * @param bool $runRuleEngine Indicates whether to run the rule engine. (optional, default to false) + * @param bool $dry Indicates whether to persist the changes. Changes are persisted with `true`. Only used when `runRuleEngine` is set to `true`. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCustomerProfileV2Async($integrationId, $body, $runRuleEngine = null, $dry = null) + public function updateCustomerProfileV2Async($integrationId, $body, $runRuleEngine = false, $dry = null) { return $this->updateCustomerProfileV2AsyncWithHttpInfo($integrationId, $body, $runRuleEngine, $dry) ->then( @@ -2751,15 +2751,15 @@ function ($response) { * * Update a Customer Profile * - * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) + * @param string $integrationId The custom identifier for this profile. Must be unique within the account. (required) * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body (required) - * @param bool $runRuleEngine Flag to indicate whether to run the rule engine (Defaults to false). (optional) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'. Only used when 'runRuleEngine' is set to 'true'). (optional) + * @param bool $runRuleEngine Indicates whether to run the rule engine. (optional, default to false) + * @param bool $dry Indicates whether to persist the changes. Changes are persisted with `true`. Only used when `runRuleEngine` is set to `true`. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCustomerProfileV2AsyncWithHttpInfo($integrationId, $body, $runRuleEngine = null, $dry = null) + public function updateCustomerProfileV2AsyncWithHttpInfo($integrationId, $body, $runRuleEngine = false, $dry = null) { $returnType = '\TalonOne\Client\Model\IntegrationStateV2'; $request = $this->updateCustomerProfileV2Request($integrationId, $body, $runRuleEngine, $dry); @@ -2801,15 +2801,15 @@ function ($exception) { /** * Create request for operation 'updateCustomerProfileV2' * - * @param string $integrationId The custom identifier for this profile, must be unique within the account. (required) + * @param string $integrationId The custom identifier for this profile. Must be unique within the account. (required) * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body (required) - * @param bool $runRuleEngine Flag to indicate whether to run the rule engine (Defaults to false). (optional) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'. Only used when 'runRuleEngine' is set to 'true'). (optional) + * @param bool $runRuleEngine Indicates whether to run the rule engine. (optional, default to false) + * @param bool $dry Indicates whether to persist the changes. Changes are persisted with `true`. Only used when `runRuleEngine` is set to `true`. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateCustomerProfileV2Request($integrationId, $body, $runRuleEngine = null, $dry = null) + protected function updateCustomerProfileV2Request($integrationId, $body, $runRuleEngine = false, $dry = null) { // verify the required parameter 'integrationId' is set if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { @@ -2934,7 +2934,7 @@ protected function updateCustomerProfileV2Request($integrationId, $body, $runRul * Update multiple Customer Profiles * * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body body (required) - * @param string $silent If set to 'yes', response will be an empty 204, otherwise a list of the IntegrationStateV2 generated. (optional) + * @param string $silent If set to `yes`, response will be an empty 204, otherwise a list of integration states will be generated (up to 1000). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2952,7 +2952,7 @@ public function updateCustomerProfilesV2($body, $silent = null) * Update multiple Customer Profiles * * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body (required) - * @param string $silent If set to 'yes', response will be an empty 204, otherwise a list of the IntegrationStateV2 generated. (optional) + * @param string $silent If set to `yes`, response will be an empty 204, otherwise a list of integration states will be generated (up to 1000). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3041,7 +3041,7 @@ public function updateCustomerProfilesV2WithHttpInfo($body, $silent = null) * Update multiple Customer Profiles * * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body (required) - * @param string $silent If set to 'yes', response will be an empty 204, otherwise a list of the IntegrationStateV2 generated. (optional) + * @param string $silent If set to `yes`, response will be an empty 204, otherwise a list of integration states will be generated (up to 1000). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3062,7 +3062,7 @@ function ($response) { * Update multiple Customer Profiles * * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body (required) - * @param string $silent If set to 'yes', response will be an empty 204, otherwise a list of the IntegrationStateV2 generated. (optional) + * @param string $silent If set to `yes`, response will be an empty 204, otherwise a list of integration states will be generated (up to 1000). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3110,7 +3110,7 @@ function ($exception) { * Create request for operation 'updateCustomerProfilesV2' * * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body (required) - * @param string $silent If set to 'yes', response will be an empty 204, otherwise a list of the IntegrationStateV2 generated. (optional) + * @param string $silent If set to `yes`, response will be an empty 204, otherwise a list of integration states will be generated (up to 1000). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -3220,7 +3220,7 @@ protected function updateCustomerProfilesV2Request($body, $silent = null) * * @param string $customerSessionId The custom identifier for this session, must be unique within the account. (required) * @param \TalonOne\Client\Model\NewCustomerSession $body body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3239,7 +3239,7 @@ public function updateCustomerSession($customerSessionId, $body, $dry = null) * * @param string $customerSessionId The custom identifier for this session, must be unique within the account. (required) * @param \TalonOne\Client\Model\NewCustomerSession $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3329,7 +3329,7 @@ public function updateCustomerSessionWithHttpInfo($customerSessionId, $body, $dr * * @param string $customerSessionId The custom identifier for this session, must be unique within the account. (required) * @param \TalonOne\Client\Model\NewCustomerSession $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3351,7 +3351,7 @@ function ($response) { * * @param string $customerSessionId The custom identifier for this session, must be unique within the account. (required) * @param \TalonOne\Client\Model\NewCustomerSession $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3400,7 +3400,7 @@ function ($exception) { * * @param string $customerSessionId The custom identifier for this session, must be unique within the account. (required) * @param \TalonOne\Client\Model\NewCustomerSession $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -3529,7 +3529,7 @@ protected function updateCustomerSessionRequest($customerSessionId, $body, $dry * * @param string $customerSessionId The custom identifier for this session, must be unique within the account. (required) * @param \TalonOne\Client\Model\IntegrationRequest $body body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3548,7 +3548,7 @@ public function updateCustomerSessionV2($customerSessionId, $body, $dry = null) * * @param string $customerSessionId The custom identifier for this session, must be unique within the account. (required) * @param \TalonOne\Client\Model\IntegrationRequest $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3638,7 +3638,7 @@ public function updateCustomerSessionV2WithHttpInfo($customerSessionId, $body, $ * * @param string $customerSessionId The custom identifier for this session, must be unique within the account. (required) * @param \TalonOne\Client\Model\IntegrationRequest $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3660,7 +3660,7 @@ function ($response) { * * @param string $customerSessionId The custom identifier for this session, must be unique within the account. (required) * @param \TalonOne\Client\Model\IntegrationRequest $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3709,7 +3709,7 @@ function ($exception) { * * @param string $customerSessionId The custom identifier for this session, must be unique within the account. (required) * @param \TalonOne\Client\Model\IntegrationRequest $body (required) - * @param bool $dry Flag to indicate whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) + * @param bool $dry Indicates whether to skip persisting the changes or not (Will not persist if set to 'true'). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request diff --git a/lib/Api/ManagementApi.php b/lib/Api/ManagementApi.php index cd7281b5..79fe4407 100644 --- a/lib/Api/ManagementApi.php +++ b/lib/Api/ManagementApi.php @@ -1851,36 +1851,42 @@ protected function createCouponsRequest($applicationId, $campaignId, $body, $sil } /** - * Operation createPasswordRecoveryEmail + * Operation createCouponsForMultipleRecipients * - * Request a password reset + * Create Coupons for Multiple Recipients * - * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) + * @param int $applicationId applicationId (required) + * @param int $campaignId campaignId (required) + * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body body (required) + * @param string $silent If set to 'yes', response will be an empty 204, otherwise a list of the coupons generated (to to 1000). (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\NewPasswordEmail + * @return \TalonOne\Client\Model\InlineResponse2004 */ - public function createPasswordRecoveryEmail($body) + public function createCouponsForMultipleRecipients($applicationId, $campaignId, $body, $silent = null) { - list($response) = $this->createPasswordRecoveryEmailWithHttpInfo($body); + list($response) = $this->createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $campaignId, $body, $silent); return $response; } /** - * Operation createPasswordRecoveryEmailWithHttpInfo + * Operation createCouponsForMultipleRecipientsWithHttpInfo * - * Request a password reset + * Create Coupons for Multiple Recipients * - * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body (required) + * @param string $silent If set to 'yes', response will be an empty 204, otherwise a list of the coupons generated (to to 1000). (optional) * * @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\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) */ - public function createPasswordRecoveryEmailWithHttpInfo($body) + public function createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $campaignId, $body, $silent = null) { - $request = $this->createPasswordRecoveryEmailRequest($body); + $request = $this->createCouponsForMultipleRecipientsRequest($applicationId, $campaignId, $body, $silent); try { $options = $this->createHttpClientOption(); @@ -1912,21 +1918,21 @@ public function createPasswordRecoveryEmailWithHttpInfo($body) $responseBody = $response->getBody(); switch($statusCode) { - case 204: - if ('\TalonOne\Client\Model\NewPasswordEmail' === '\SplFileObject') { + 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\NewPasswordEmail', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2004', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -1942,10 +1948,10 @@ public function createPasswordRecoveryEmailWithHttpInfo($body) } catch (ApiException $e) { switch ($e->getCode()) { - case 204: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\NewPasswordEmail', + '\TalonOne\Client\Model\InlineResponse2004', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1956,18 +1962,21 @@ public function createPasswordRecoveryEmailWithHttpInfo($body) } /** - * Operation createPasswordRecoveryEmailAsync + * Operation createCouponsForMultipleRecipientsAsync * - * Request a password reset + * Create Coupons for Multiple Recipients * - * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body (required) + * @param string $silent If set to 'yes', response will be an empty 204, otherwise a list of the coupons generated (to to 1000). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createPasswordRecoveryEmailAsync($body) + public function createCouponsForMultipleRecipientsAsync($applicationId, $campaignId, $body, $silent = null) { - return $this->createPasswordRecoveryEmailAsyncWithHttpInfo($body) + return $this->createCouponsForMultipleRecipientsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent) ->then( function ($response) { return $response[0]; @@ -1976,19 +1985,22 @@ function ($response) { } /** - * Operation createPasswordRecoveryEmailAsyncWithHttpInfo + * Operation createCouponsForMultipleRecipientsAsyncWithHttpInfo * - * Request a password reset + * Create Coupons for Multiple Recipients * - * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body (required) + * @param string $silent If set to 'yes', response will be an empty 204, otherwise a list of the coupons generated (to to 1000). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createPasswordRecoveryEmailAsyncWithHttpInfo($body) + public function createCouponsForMultipleRecipientsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent = null) { - $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; - $request = $this->createPasswordRecoveryEmailRequest($body); + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; + $request = $this->createCouponsForMultipleRecipientsRequest($applicationId, $campaignId, $body, $silent); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2025,31 +2037,69 @@ function ($exception) { } /** - * Create request for operation 'createPasswordRecoveryEmail' + * Create request for operation 'createCouponsForMultipleRecipients' * - * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body (required) + * @param string $silent If set to 'yes', response will be an empty 204, otherwise a list of the coupons generated (to to 1000). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createPasswordRecoveryEmailRequest($body) + protected function createCouponsForMultipleRecipientsRequest($applicationId, $campaignId, $body, $silent = 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 createCouponsForMultipleRecipients' + ); + } + // 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 createCouponsForMultipleRecipients' + ); + } // 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 createCouponsForMultipleRecipients' ); } - $resourcePath = '/v1/password_recovery_emails'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($silent)) { + $silent = ObjectSerializer::serializeCollection($silent, '', true); + } + if ($silent !== null) { + $queryParams['silent'] = $silent; + } + // 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; @@ -2124,40 +2174,36 @@ protected function createPasswordRecoveryEmailRequest($body) } /** - * Operation createRuleset + * Operation createPasswordRecoveryEmail * - * Create a Ruleset + * Request a password reset * - * @param int $applicationId applicationId (required) - * @param int $campaignId campaignId (required) - * @param \TalonOne\Client\Model\NewRuleset $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\Ruleset + * @return \TalonOne\Client\Model\NewPasswordEmail */ - public function createRuleset($applicationId, $campaignId, $body) + public function createPasswordRecoveryEmail($body) { - list($response) = $this->createRulesetWithHttpInfo($applicationId, $campaignId, $body); + list($response) = $this->createPasswordRecoveryEmailWithHttpInfo($body); return $response; } /** - * Operation createRulesetWithHttpInfo + * Operation createPasswordRecoveryEmailWithHttpInfo * - * Create a Ruleset + * Request a password reset * - * @param int $applicationId (required) - * @param int $campaignId (required) - * @param \TalonOne\Client\Model\NewRuleset $body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Ruleset, 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 createRulesetWithHttpInfo($applicationId, $campaignId, $body) + public function createPasswordRecoveryEmailWithHttpInfo($body) { - $request = $this->createRulesetRequest($applicationId, $campaignId, $body); + $request = $this->createPasswordRecoveryEmailRequest($body); try { $options = $this->createHttpClientOption(); @@ -2189,21 +2235,21 @@ public function createRulesetWithHttpInfo($applicationId, $campaignId, $body) $responseBody = $response->getBody(); switch($statusCode) { - case 201: - if ('\TalonOne\Client\Model\Ruleset' === '\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\Ruleset', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\NewPasswordEmail', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Ruleset'; + $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -2219,10 +2265,10 @@ public function createRulesetWithHttpInfo($applicationId, $campaignId, $body) } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 204: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Ruleset', + '\TalonOne\Client\Model\NewPasswordEmail', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2233,20 +2279,18 @@ public function createRulesetWithHttpInfo($applicationId, $campaignId, $body) } /** - * Operation createRulesetAsync + * Operation createPasswordRecoveryEmailAsync * - * Create a Ruleset + * Request a password reset * - * @param int $applicationId (required) - * @param int $campaignId (required) - * @param \TalonOne\Client\Model\NewRuleset $body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createRulesetAsync($applicationId, $campaignId, $body) + public function createPasswordRecoveryEmailAsync($body) { - return $this->createRulesetAsyncWithHttpInfo($applicationId, $campaignId, $body) + return $this->createPasswordRecoveryEmailAsyncWithHttpInfo($body) ->then( function ($response) { return $response[0]; @@ -2255,21 +2299,19 @@ function ($response) { } /** - * Operation createRulesetAsyncWithHttpInfo + * Operation createPasswordRecoveryEmailAsyncWithHttpInfo * - * Create a Ruleset + * Request a password reset * - * @param int $applicationId (required) - * @param int $campaignId (required) - * @param \TalonOne\Client\Model\NewRuleset $body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createRulesetAsyncWithHttpInfo($applicationId, $campaignId, $body) + public function createPasswordRecoveryEmailAsyncWithHttpInfo($body) { - $returnType = '\TalonOne\Client\Model\Ruleset'; - $request = $this->createRulesetRequest($applicationId, $campaignId, $body); + $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; + $request = $this->createPasswordRecoveryEmailRequest($body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2306,37 +2348,23 @@ function ($exception) { } /** - * Create request for operation 'createRuleset' + * Create request for operation 'createPasswordRecoveryEmail' * - * @param int $applicationId (required) - * @param int $campaignId (required) - * @param \TalonOne\Client\Model\NewRuleset $body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createRulesetRequest($applicationId, $campaignId, $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 createRuleset' - ); - } - // 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 createRuleset' - ); - } // 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 createRuleset' + 'Missing the required parameter $body when calling createPasswordRecoveryEmail' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets'; + $resourcePath = '/v1/password_recovery_emails'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2345,22 +2373,6 @@ protected function createRulesetRequest($applicationId, $campaignId, $body) - // 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; @@ -2435,36 +2447,40 @@ protected function createRulesetRequest($applicationId, $campaignId, $body) } /** - * Operation createSession + * Operation createRuleset * - * Create a Session + * Create a Ruleset * - * @param \TalonOne\Client\Model\LoginParams $body body (required) + * @param int $applicationId applicationId (required) + * @param int $campaignId campaignId (required) + * @param \TalonOne\Client\Model\NewRuleset $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Session + * @return \TalonOne\Client\Model\Ruleset */ - public function createSession($body) + public function createRuleset($applicationId, $campaignId, $body) { - list($response) = $this->createSessionWithHttpInfo($body); + list($response) = $this->createRulesetWithHttpInfo($applicationId, $campaignId, $body); return $response; } /** - * Operation createSessionWithHttpInfo + * Operation createRulesetWithHttpInfo * - * Create a Session + * Create a Ruleset * - * @param \TalonOne\Client\Model\LoginParams $body (required) + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param \TalonOne\Client\Model\NewRuleset $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\Ruleset, HTTP status code, HTTP response headers (array of strings) */ - public function createSessionWithHttpInfo($body) + public function createRulesetWithHttpInfo($applicationId, $campaignId, $body) { - $request = $this->createSessionRequest($body); + $request = $this->createRulesetRequest($applicationId, $campaignId, $body); try { $options = $this->createHttpClientOption(); @@ -2497,20 +2513,20 @@ public function createSessionWithHttpInfo($body) $responseBody = $response->getBody(); switch($statusCode) { case 201: - if ('\TalonOne\Client\Model\Session' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Ruleset' === '\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\Ruleset', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Session'; + $returnType = '\TalonOne\Client\Model\Ruleset'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -2529,7 +2545,7 @@ public function createSessionWithHttpInfo($body) case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Session', + '\TalonOne\Client\Model\Ruleset', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2540,18 +2556,20 @@ public function createSessionWithHttpInfo($body) } /** - * Operation createSessionAsync + * Operation createRulesetAsync * - * Create a Session + * Create a Ruleset * - * @param \TalonOne\Client\Model\LoginParams $body (required) + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param \TalonOne\Client\Model\NewRuleset $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSessionAsync($body) + public function createRulesetAsync($applicationId, $campaignId, $body) { - return $this->createSessionAsyncWithHttpInfo($body) + return $this->createRulesetAsyncWithHttpInfo($applicationId, $campaignId, $body) ->then( function ($response) { return $response[0]; @@ -2560,19 +2578,21 @@ function ($response) { } /** - * Operation createSessionAsyncWithHttpInfo + * Operation createRulesetAsyncWithHttpInfo * - * Create a Session + * Create a Ruleset * - * @param \TalonOne\Client\Model\LoginParams $body (required) + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param \TalonOne\Client\Model\NewRuleset $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSessionAsyncWithHttpInfo($body) + public function createRulesetAsyncWithHttpInfo($applicationId, $campaignId, $body) { - $returnType = '\TalonOne\Client\Model\Session'; - $request = $this->createSessionRequest($body); + $returnType = '\TalonOne\Client\Model\Ruleset'; + $request = $this->createRulesetRequest($applicationId, $campaignId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2609,23 +2629,37 @@ function ($exception) { } /** - * Create request for operation 'createSession' + * Create request for operation 'createRuleset' * - * @param \TalonOne\Client\Model\LoginParams $body (required) + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param \TalonOne\Client\Model\NewRuleset $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createSessionRequest($body) + protected function createRulesetRequest($applicationId, $campaignId, $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 createRuleset' + ); + } + // 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 createRuleset' + ); + } // 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 createRuleset' ); } - $resourcePath = '/v1/sessions'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2634,6 +2668,22 @@ protected function createSessionRequest($body) + // 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; @@ -2708,37 +2758,36 @@ protected function createSessionRequest($body) } /** - * Operation deleteCampaign + * Operation createSession * - * Delete a Campaign + * Create a Session * - * @param int $applicationId applicationId (required) - * @param int $campaignId campaignId (required) + * @param \TalonOne\Client\Model\LoginParams $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return void + * @return \TalonOne\Client\Model\Session */ - public function deleteCampaign($applicationId, $campaignId) + public function createSession($body) { - $this->deleteCampaignWithHttpInfo($applicationId, $campaignId); + list($response) = $this->createSessionWithHttpInfo($body); + return $response; } /** - * Operation deleteCampaignWithHttpInfo + * Operation createSessionWithHttpInfo * - * Delete a Campaign + * Create a Session * - * @param int $applicationId (required) - * @param int $campaignId (required) + * @param \TalonOne\Client\Model\LoginParams $body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of null, 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 deleteCampaignWithHttpInfo($applicationId, $campaignId) + public function createSessionWithHttpInfo($body) { - $request = $this->deleteCampaignRequest($applicationId, $campaignId); + $request = $this->createSessionRequest($body); try { $options = $this->createHttpClientOption(); @@ -2768,29 +2817,64 @@ public function deleteCampaignWithHttpInfo($applicationId, $campaignId) ); } - return [null, $statusCode, $response->getHeaders()]; + $responseBody = $response->getBody(); + switch($statusCode) { + 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\Session', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Session'; + $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 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Session', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation deleteCampaignAsync + * Operation createSessionAsync * - * Delete a Campaign + * Create a Session * - * @param int $applicationId (required) - * @param int $campaignId (required) + * @param \TalonOne\Client\Model\LoginParams $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCampaignAsync($applicationId, $campaignId) + public function createSessionAsync($body) { - return $this->deleteCampaignAsyncWithHttpInfo($applicationId, $campaignId) + return $this->createSessionAsyncWithHttpInfo($body) ->then( function ($response) { return $response[0]; @@ -2799,26 +2883,36 @@ function ($response) { } /** - * Operation deleteCampaignAsyncWithHttpInfo + * Operation createSessionAsyncWithHttpInfo * - * Delete a Campaign + * Create a Session * - * @param int $applicationId (required) - * @param int $campaignId (required) + * @param \TalonOne\Client\Model\LoginParams $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCampaignAsyncWithHttpInfo($applicationId, $campaignId) + public function createSessionAsyncWithHttpInfo($body) { - $returnType = ''; - $request = $this->deleteCampaignRequest($applicationId, $campaignId); + $returnType = '\TalonOne\Client\Model\Session'; + $request = $this->createSessionRequest($body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + $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(); @@ -2838,30 +2932,23 @@ function ($exception) { } /** - * Create request for operation 'deleteCampaign' + * Create request for operation 'createSession' * - * @param int $applicationId (required) - * @param int $campaignId (required) + * @param \TalonOne\Client\Model\LoginParams $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteCampaignRequest($applicationId, $campaignId) + protected function createSessionRequest($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 deleteCampaign' - ); - } - // 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 deleteCampaign' + 'Missing the required parameter $body when calling createSession' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}'; + $resourcePath = '/v1/sessions'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2870,34 +2957,21 @@ protected function deleteCampaignRequest($applicationId, $campaignId) - // 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; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - [] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - [], - [] + ['application/json'], + ['application/json'] ); } @@ -2949,7 +3023,7 @@ protected function deleteCampaignRequest($applicationId, $campaignId) $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( - 'DELETE', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -2957,39 +3031,37 @@ protected function deleteCampaignRequest($applicationId, $campaignId) } /** - * Operation deleteCoupon + * Operation deleteCampaign * - * Delete one Coupon + * Delete a Campaign * * @param int $applicationId applicationId (required) * @param int $campaignId campaignId (required) - * @param string $couponId The ID of the coupon code to delete (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteCoupon($applicationId, $campaignId, $couponId) + public function deleteCampaign($applicationId, $campaignId) { - $this->deleteCouponWithHttpInfo($applicationId, $campaignId, $couponId); + $this->deleteCampaignWithHttpInfo($applicationId, $campaignId); } /** - * Operation deleteCouponWithHttpInfo + * Operation deleteCampaignWithHttpInfo * - * Delete one Coupon + * Delete a Campaign * * @param int $applicationId (required) * @param int $campaignId (required) - * @param string $couponId The ID of the coupon code to delete (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 deleteCouponWithHttpInfo($applicationId, $campaignId, $couponId) + public function deleteCampaignWithHttpInfo($applicationId, $campaignId) { - $request = $this->deleteCouponRequest($applicationId, $campaignId, $couponId); + $request = $this->deleteCampaignRequest($applicationId, $campaignId); try { $options = $this->createHttpClientOption(); @@ -3029,20 +3101,19 @@ public function deleteCouponWithHttpInfo($applicationId, $campaignId, $couponId) } /** - * Operation deleteCouponAsync + * Operation deleteCampaignAsync * - * Delete one Coupon + * Delete a Campaign * * @param int $applicationId (required) * @param int $campaignId (required) - * @param string $couponId The ID of the coupon code to delete (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCouponAsync($applicationId, $campaignId, $couponId) + public function deleteCampaignAsync($applicationId, $campaignId) { - return $this->deleteCouponAsyncWithHttpInfo($applicationId, $campaignId, $couponId) + return $this->deleteCampaignAsyncWithHttpInfo($applicationId, $campaignId) ->then( function ($response) { return $response[0]; @@ -3051,21 +3122,20 @@ function ($response) { } /** - * Operation deleteCouponAsyncWithHttpInfo + * Operation deleteCampaignAsyncWithHttpInfo * - * Delete one Coupon + * Delete a Campaign * * @param int $applicationId (required) * @param int $campaignId (required) - * @param string $couponId The ID of the coupon code to delete (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCouponAsyncWithHttpInfo($applicationId, $campaignId, $couponId) + public function deleteCampaignAsyncWithHttpInfo($applicationId, $campaignId) { $returnType = ''; - $request = $this->deleteCouponRequest($applicationId, $campaignId, $couponId); + $request = $this->deleteCampaignRequest($applicationId, $campaignId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3091,37 +3161,30 @@ function ($exception) { } /** - * Create request for operation 'deleteCoupon' + * Create request for operation 'deleteCampaign' * * @param int $applicationId (required) * @param int $campaignId (required) - * @param string $couponId The ID of the coupon code to delete (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteCouponRequest($applicationId, $campaignId, $couponId) + protected function deleteCampaignRequest($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 deleteCoupon' + 'Missing the required parameter $applicationId when calling deleteCampaign' ); } // 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 deleteCoupon' - ); - } - // verify the required parameter 'couponId' is set - if ($couponId === null || (is_array($couponId) && count($couponId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $couponId when calling deleteCoupon' + 'Missing the required parameter $campaignId when calling deleteCampaign' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3146,14 +3209,6 @@ protected function deleteCouponRequest($applicationId, $campaignId, $couponId) $resourcePath ); } - // path params - if ($couponId !== null) { - $resourcePath = str_replace( - '{' . 'couponId' . '}', - ObjectSerializer::toPathValue($couponId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -3225,63 +3280,39 @@ protected function deleteCouponRequest($applicationId, $campaignId, $couponId) } /** - * Operation deleteCoupons + * Operation deleteCoupon * - * Delete Coupons + * Delete one Coupon * * @param int $applicationId applicationId (required) * @param int $campaignId campaignId (required) - * @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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $couponId The ID of the coupon code to delete (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteCoupons($applicationId, $campaignId, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) + public function deleteCoupon($applicationId, $campaignId, $couponId) { - $this->deleteCouponsWithHttpInfo($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); + $this->deleteCouponWithHttpInfo($applicationId, $campaignId, $couponId); } /** - * Operation deleteCouponsWithHttpInfo + * Operation deleteCouponWithHttpInfo * - * Delete Coupons + * Delete one Coupon * * @param int $applicationId (required) * @param int $campaignId (required) - * @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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $couponId The ID of the coupon code to delete (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 deleteCouponsWithHttpInfo($applicationId, $campaignId, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) + public function deleteCouponWithHttpInfo($applicationId, $campaignId, $couponId) { - $request = $this->deleteCouponsRequest($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); + $request = $this->deleteCouponRequest($applicationId, $campaignId, $couponId); try { $options = $this->createHttpClientOption(); @@ -3321,32 +3352,20 @@ public function deleteCouponsWithHttpInfo($applicationId, $campaignId, $value = } /** - * Operation deleteCouponsAsync + * Operation deleteCouponAsync * - * Delete Coupons + * Delete one Coupon * * @param int $applicationId (required) * @param int $campaignId (required) - * @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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $couponId The ID of the coupon code to delete (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCouponsAsync($applicationId, $campaignId, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) + public function deleteCouponAsync($applicationId, $campaignId, $couponId) { - return $this->deleteCouponsAsyncWithHttpInfo($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch) + return $this->deleteCouponAsyncWithHttpInfo($applicationId, $campaignId, $couponId) ->then( function ($response) { return $response[0]; @@ -3355,33 +3374,21 @@ function ($response) { } /** - * Operation deleteCouponsAsyncWithHttpInfo + * Operation deleteCouponAsyncWithHttpInfo * - * Delete Coupons + * Delete one Coupon * * @param int $applicationId (required) * @param int $campaignId (required) - * @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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $couponId The ID of the coupon code to delete (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCouponsAsyncWithHttpInfo($applicationId, $campaignId, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) + public function deleteCouponAsyncWithHttpInfo($applicationId, $campaignId, $couponId) { $returnType = ''; - $request = $this->deleteCouponsRequest($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); + $request = $this->deleteCouponRequest($applicationId, $campaignId, $couponId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3407,140 +3414,43 @@ function ($exception) { } /** - * Create request for operation 'deleteCoupons' + * Create request for operation 'deleteCoupon' * * @param int $applicationId (required) * @param int $campaignId (required) - * @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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $couponId The ID of the coupon code to delete (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteCouponsRequest($applicationId, $campaignId, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) + protected function deleteCouponRequest($applicationId, $campaignId, $couponId) { // 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 deleteCoupons' + 'Missing the required parameter $applicationId when calling deleteCoupon' ); } // 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 deleteCoupons' + 'Missing the required parameter $campaignId when calling deleteCoupon' + ); + } + // verify the required parameter 'couponId' is set + if ($couponId === null || (is_array($couponId) && count($couponId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $couponId when calling deleteCoupon' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // 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($startsAfter)) { - $startsAfter = ObjectSerializer::serializeCollection($startsAfter, '', true); - } - if ($startsAfter !== null) { - $queryParams['startsAfter'] = $startsAfter; - } - // query params - if (is_array($startsBefore)) { - $startsBefore = ObjectSerializer::serializeCollection($startsBefore, '', true); - } - if ($startsBefore !== null) { - $queryParams['startsBefore'] = $startsBefore; - } - // query params - if (is_array($expiresAfter)) { - $expiresAfter = ObjectSerializer::serializeCollection($expiresAfter, '', true); - } - if ($expiresAfter !== null) { - $queryParams['expiresAfter'] = $expiresAfter; - } - // query params - if (is_array($expiresBefore)) { - $expiresBefore = ObjectSerializer::serializeCollection($expiresBefore, '', true); - } - if ($expiresBefore !== null) { - $queryParams['expiresBefore'] = $expiresBefore; - } - // query params - if (is_array($valid)) { - $valid = ObjectSerializer::serializeCollection($valid, '', true); - } - if ($valid !== null) { - $queryParams['valid'] = $valid; - } - // query params - if (is_array($batchId)) { - $batchId = ObjectSerializer::serializeCollection($batchId, '', true); - } - if ($batchId !== null) { - $queryParams['batchId'] = $batchId; - } - // 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($exactMatch)) { - $exactMatch = ObjectSerializer::serializeCollection($exactMatch, '', true); - } - if ($exactMatch !== null) { - $queryParams['exactMatch'] = $exactMatch; - } // path params @@ -3559,6 +3469,14 @@ protected function deleteCouponsRequest($applicationId, $campaignId, $value = nu $resourcePath ); } + // path params + if ($couponId !== null) { + $resourcePath = str_replace( + '{' . 'couponId' . '}', + ObjectSerializer::toPathValue($couponId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -3630,39 +3548,63 @@ protected function deleteCouponsRequest($applicationId, $campaignId, $value = nu } /** - * Operation deleteReferral + * Operation deleteCoupons * - * Delete one Referral + * Delete Coupons * * @param int $applicationId applicationId (required) * @param int $campaignId campaignId (required) - * @param string $referralId The ID of the referral code to delete (required) + * @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 \DateTime $startsAfter 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 $startsBefore 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 $expiresAfter 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 $expiresBefore 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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (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 void */ - public function deleteReferral($applicationId, $campaignId, $referralId) + public function deleteCoupons($applicationId, $campaignId, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) { - $this->deleteReferralWithHttpInfo($applicationId, $campaignId, $referralId); + $this->deleteCouponsWithHttpInfo($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); } /** - * Operation deleteReferralWithHttpInfo + * Operation deleteCouponsWithHttpInfo * - * Delete one Referral + * Delete Coupons * * @param int $applicationId (required) * @param int $campaignId (required) - * @param string $referralId The ID of the referral code to delete (required) + * @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 \DateTime $startsAfter 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 $startsBefore 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 $expiresAfter 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 $expiresBefore 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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (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 null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteReferralWithHttpInfo($applicationId, $campaignId, $referralId) + public function deleteCouponsWithHttpInfo($applicationId, $campaignId, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) { - $request = $this->deleteReferralRequest($applicationId, $campaignId, $referralId); + $request = $this->deleteCouponsRequest($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); try { $options = $this->createHttpClientOption(); @@ -3702,20 +3644,32 @@ public function deleteReferralWithHttpInfo($applicationId, $campaignId, $referra } /** - * Operation deleteReferralAsync + * Operation deleteCouponsAsync * - * Delete one Referral + * Delete Coupons * * @param int $applicationId (required) * @param int $campaignId (required) - * @param string $referralId The ID of the referral code to delete (required) + * @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 \DateTime $startsAfter 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 $startsBefore 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 $expiresAfter 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 $expiresBefore 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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (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 deleteReferralAsync($applicationId, $campaignId, $referralId) + public function deleteCouponsAsync($applicationId, $campaignId, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) { - return $this->deleteReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId) + return $this->deleteCouponsAsyncWithHttpInfo($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch) ->then( function ($response) { return $response[0]; @@ -3724,21 +3678,33 @@ function ($response) { } /** - * Operation deleteReferralAsyncWithHttpInfo + * Operation deleteCouponsAsyncWithHttpInfo * - * Delete one Referral + * Delete Coupons * * @param int $applicationId (required) * @param int $campaignId (required) - * @param string $referralId The ID of the referral code to delete (required) + * @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 \DateTime $startsAfter 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 $startsBefore 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 $expiresAfter 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 $expiresBefore 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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (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 deleteReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId) + public function deleteCouponsAsyncWithHttpInfo($applicationId, $campaignId, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) { $returnType = ''; - $request = $this->deleteReferralRequest($applicationId, $campaignId, $referralId); + $request = $this->deleteCouponsRequest($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3764,43 +3730,140 @@ function ($exception) { } /** - * Create request for operation 'deleteReferral' + * Create request for operation 'deleteCoupons' * * @param int $applicationId (required) * @param int $campaignId (required) - * @param string $referralId The ID of the referral code to delete (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function deleteReferralRequest($applicationId, $campaignId, $referralId) + * @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 \DateTime $startsAfter 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 $startsBefore 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 $expiresAfter 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 $expiresBefore 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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (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 deleteCouponsRequest($applicationId, $campaignId, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) { // 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' + 'Missing the required parameter $applicationId when calling deleteCoupons' ); } // 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' - ); - } - // 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' + 'Missing the required parameter $campaignId when calling deleteCoupons' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // 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($startsAfter)) { + $startsAfter = ObjectSerializer::serializeCollection($startsAfter, '', true); + } + if ($startsAfter !== null) { + $queryParams['startsAfter'] = $startsAfter; + } + // query params + if (is_array($startsBefore)) { + $startsBefore = ObjectSerializer::serializeCollection($startsBefore, '', true); + } + if ($startsBefore !== null) { + $queryParams['startsBefore'] = $startsBefore; + } + // query params + if (is_array($expiresAfter)) { + $expiresAfter = ObjectSerializer::serializeCollection($expiresAfter, '', true); + } + if ($expiresAfter !== null) { + $queryParams['expiresAfter'] = $expiresAfter; + } + // query params + if (is_array($expiresBefore)) { + $expiresBefore = ObjectSerializer::serializeCollection($expiresBefore, '', true); + } + if ($expiresBefore !== null) { + $queryParams['expiresBefore'] = $expiresBefore; + } + // query params + if (is_array($valid)) { + $valid = ObjectSerializer::serializeCollection($valid, '', true); + } + if ($valid !== null) { + $queryParams['valid'] = $valid; + } + // query params + if (is_array($batchId)) { + $batchId = ObjectSerializer::serializeCollection($batchId, '', true); + } + if ($batchId !== null) { + $queryParams['batchId'] = $batchId; + } + // 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($exactMatch)) { + $exactMatch = ObjectSerializer::serializeCollection($exactMatch, '', true); + } + if ($exactMatch !== null) { + $queryParams['exactMatch'] = $exactMatch; + } // path params @@ -3819,11 +3882,2126 @@ protected function deleteReferralRequest($applicationId, $campaignId, $referralI $resourcePath ); } - // path params - if ($referralId !== null) { - $resourcePath = str_replace( - '{' . 'referralId' . '}', - ObjectSerializer::toPathValue($referralId), + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\build_query($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 = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteReferral + * + * Delete one Referral + * + * @param int $applicationId applicationId (required) + * @param int $campaignId campaignId (required) + * @param string $referralId The ID of the referral code to delete (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteReferral($applicationId, $campaignId, $referralId) + { + $this->deleteReferralWithHttpInfo($applicationId, $campaignId, $referralId); + } + + /** + * Operation deleteReferralWithHttpInfo + * + * Delete one Referral + * + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param string $referralId The ID of the referral code to delete (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) + { + $request = $this->deleteReferralRequest($applicationId, $campaignId, $referralId); + + 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() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation deleteReferralAsync + * + * Delete one Referral + * + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param string $referralId The ID of the referral code to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteReferralAsync($applicationId, $campaignId, $referralId) + { + return $this->deleteReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteReferralAsyncWithHttpInfo + * + * Delete one Referral + * + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param string $referralId The ID of the referral code to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId) + { + $returnType = ''; + $request = $this->deleteReferralRequest($applicationId, $campaignId, $referralId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $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 'deleteReferral' + * + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param string $referralId The ID of the referral code to delete (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + 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 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' + ); + } + // 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}/campaigns/{campaignId}/referrals/{referralId}'; + $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 ($referralId !== null) { + $resourcePath = str_replace( + '{' . 'referralId' . '}', + ObjectSerializer::toPathValue($referralId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\build_query($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 = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteRuleset + * + * Delete a Ruleset + * + * @param int $applicationId applicationId (required) + * @param int $campaignId campaignId (required) + * @param int $rulesetId rulesetId (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteRuleset($applicationId, $campaignId, $rulesetId) + { + $this->deleteRulesetWithHttpInfo($applicationId, $campaignId, $rulesetId); + } + + /** + * Operation deleteRulesetWithHttpInfo + * + * Delete a Ruleset + * + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param int $rulesetId (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 deleteRulesetWithHttpInfo($applicationId, $campaignId, $rulesetId) + { + $request = $this->deleteRulesetRequest($applicationId, $campaignId, $rulesetId); + + 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() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation deleteRulesetAsync + * + * Delete a Ruleset + * + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param int $rulesetId (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteRulesetAsync($applicationId, $campaignId, $rulesetId) + { + return $this->deleteRulesetAsyncWithHttpInfo($applicationId, $campaignId, $rulesetId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteRulesetAsyncWithHttpInfo + * + * Delete a Ruleset + * + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param int $rulesetId (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteRulesetAsyncWithHttpInfo($applicationId, $campaignId, $rulesetId) + { + $returnType = ''; + $request = $this->deleteRulesetRequest($applicationId, $campaignId, $rulesetId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $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 'deleteRuleset' + * + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param int $rulesetId (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteRulesetRequest($applicationId, $campaignId, $rulesetId) + { + // 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 deleteRuleset' + ); + } + // 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 deleteRuleset' + ); + } + // verify the required parameter 'rulesetId' is set + if ($rulesetId === null || (is_array($rulesetId) && count($rulesetId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rulesetId when calling deleteRuleset' + ); + } + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}'; + $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 ($rulesetId !== null) { + $resourcePath = str_replace( + '{' . 'rulesetId' . '}', + ObjectSerializer::toPathValue($rulesetId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\build_query($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 = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation destroySession + * + * Destroy a Session + * + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function destroySession() + { + $this->destroySessionWithHttpInfo(); + } + + /** + * Operation destroySessionWithHttpInfo + * + * Destroy a Session + * + * + * @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 destroySessionWithHttpInfo() + { + $request = $this->destroySessionRequest(); + + 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() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation destroySessionAsync + * + * Destroy a Session + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function destroySessionAsync() + { + return $this->destroySessionAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation destroySessionAsyncWithHttpInfo + * + * Destroy a Session + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function destroySessionAsyncWithHttpInfo() + { + $returnType = ''; + $request = $this->destroySessionRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $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 'destroySession' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function destroySessionRequest() + { + + $resourcePath = '/v1/sessions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\build_query($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 = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation exportCoupons + * + * Export Coupons to a CSV file + * + * @param int $applicationId applicationId (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $campaignState Filter results by the state of the campaign. (optional) + * + * @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) + { + list($response) = $this->exportCouponsWithHttpInfo($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); + return $response; + } + + /** + * Operation exportCouponsWithHttpInfo + * + * Export Coupons to a CSV file + * + * @param int $applicationId (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $campaignState Filter results by the state of the campaign. (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 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) + { + $request = $this->exportCouponsRequest($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); + + 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 ('string' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + $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(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation exportCouponsAsync + * + * Export Coupons to a CSV file + * + * @param int $applicationId (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $campaignState Filter results by the state of the campaign. (optional) + * + * @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) + { + return $this->exportCouponsAsyncWithHttpInfo($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation exportCouponsAsyncWithHttpInfo + * + * Export Coupons to a CSV file + * + * @param int $applicationId (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $campaignState Filter results by the state of the campaign. (optional) + * + * @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) + { + $returnType = 'string'; + $request = $this->exportCouponsRequest($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); + + 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 'exportCoupons' + * + * @param int $applicationId (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $campaignState Filter results by the state of the campaign. (optional) + * + * @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) + { + // 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 exportCoupons' + ); + } + + $resourcePath = '/v1/applications/{applicationId}/export_coupons'; + $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($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; + } + // query params + if (is_array($dateFormat)) { + $dateFormat = ObjectSerializer::serializeCollection($dateFormat, '', true); + } + if ($dateFormat !== null) { + $queryParams['dateFormat'] = $dateFormat; + } + // query params + if (is_array($campaignState)) { + $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); + } + if ($campaignState !== null) { + $queryParams['campaignState'] = $campaignState; + } + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/csv'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/csv'], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\build_query($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 = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation exportCustomerSessions + * + * Export Customer Sessions to a CSV file + * + * @param int $applicationId applicationId (required) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param string $profileIntegrationId Only return sessions for the customer that matches this customer integration ID. (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $customerSessionState Filter results by state. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function exportCustomerSessions($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) + { + list($response) = $this->exportCustomerSessionsWithHttpInfo($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState); + return $response; + } + + /** + * Operation exportCustomerSessionsWithHttpInfo + * + * Export Customer Sessions to a CSV file + * + * @param int $applicationId (required) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param string $profileIntegrationId Only return sessions for the customer that matches this customer integration ID. (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $customerSessionState Filter results by state. (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 exportCustomerSessionsWithHttpInfo($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) + { + $request = $this->exportCustomerSessionsRequest($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState); + + 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 ('string' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + $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(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation exportCustomerSessionsAsync + * + * Export Customer Sessions to a CSV file + * + * @param int $applicationId (required) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param string $profileIntegrationId Only return sessions for the customer that matches this customer integration ID. (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $customerSessionState Filter results by state. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function exportCustomerSessionsAsync($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) + { + return $this->exportCustomerSessionsAsyncWithHttpInfo($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation exportCustomerSessionsAsyncWithHttpInfo + * + * Export Customer Sessions to a CSV file + * + * @param int $applicationId (required) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param string $profileIntegrationId Only return sessions for the customer that matches this customer integration ID. (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $customerSessionState Filter results by state. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function exportCustomerSessionsAsyncWithHttpInfo($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) + { + $returnType = 'string'; + $request = $this->exportCustomerSessionsRequest($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState); + + 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 'exportCustomerSessions' + * + * @param int $applicationId (required) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param string $profileIntegrationId Only return sessions for the customer that matches this customer integration ID. (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $customerSessionState Filter results by state. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function exportCustomerSessionsRequest($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = 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 exportCustomerSessions' + ); + } + + $resourcePath = '/v1/applications/{applicationId}/export_customer_sessions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // 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($profileIntegrationId)) { + $profileIntegrationId = ObjectSerializer::serializeCollection($profileIntegrationId, '', true); + } + if ($profileIntegrationId !== null) { + $queryParams['profileIntegrationId'] = $profileIntegrationId; + } + // query params + if (is_array($dateFormat)) { + $dateFormat = ObjectSerializer::serializeCollection($dateFormat, '', true); + } + if ($dateFormat !== null) { + $queryParams['dateFormat'] = $dateFormat; + } + // query params + if (is_array($customerSessionState)) { + $customerSessionState = ObjectSerializer::serializeCollection($customerSessionState, '', true); + } + if ($customerSessionState !== null) { + $queryParams['customerSessionState'] = $customerSessionState; + } + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/csv'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/csv'], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\build_query($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 = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation exportEffects + * + * Export triggered Effects to a CSV file + * + * @param int $applicationId applicationId (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 + */ + public function exportEffects($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + { + list($response) = $this->exportEffectsWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); + return $response; + } + + /** + * Operation exportEffectsWithHttpInfo + * + * Export triggered Effects to a CSV file + * + * @param int $applicationId (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, HTTP status code, HTTP response headers (array of strings) + */ + public function exportEffectsWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + { + $request = $this->exportEffectsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); + + 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 ('string' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + $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(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation exportEffectsAsync + * + * Export triggered Effects to a CSV file + * + * @param int $applicationId (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 exportEffectsAsync($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + { + return $this->exportEffectsAsyncWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation exportEffectsAsyncWithHttpInfo + * + * Export triggered Effects to a CSV file + * + * @param int $applicationId (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 exportEffectsAsyncWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + { + $returnType = 'string'; + $request = $this->exportEffectsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); + + 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 'exportEffects' + * + * @param int $applicationId (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 exportEffectsRequest($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = 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 exportEffects' + ); + } + + $resourcePath = '/v1/applications/{applicationId}/export_effects'; + $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($dateFormat)) { + $dateFormat = ObjectSerializer::serializeCollection($dateFormat, '', true); + } + if ($dateFormat !== null) { + $queryParams['dateFormat'] = $dateFormat; + } + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/csv'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/csv'], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\build_query($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 = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation exportLoyaltyBalance + * + * Export customer loyalty balance to a CSV file + * + * @param string $programID programID (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function exportLoyaltyBalance($programID) + { + list($response) = $this->exportLoyaltyBalanceWithHttpInfo($programID); + return $response; + } + + /** + * Operation exportLoyaltyBalanceWithHttpInfo + * + * Export customer loyalty balance to a CSV file + * + * @param string $programID (required) + * + * @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 exportLoyaltyBalanceWithHttpInfo($programID) + { + $request = $this->exportLoyaltyBalanceRequest($programID); + + 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 ('string' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + $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(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation exportLoyaltyBalanceAsync + * + * Export customer loyalty balance to a CSV file + * + * @param string $programID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function exportLoyaltyBalanceAsync($programID) + { + return $this->exportLoyaltyBalanceAsyncWithHttpInfo($programID) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation exportLoyaltyBalanceAsyncWithHttpInfo + * + * Export customer loyalty balance to a CSV file + * + * @param string $programID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function exportLoyaltyBalanceAsyncWithHttpInfo($programID) + { + $returnType = 'string'; + $request = $this->exportLoyaltyBalanceRequest($programID); + + 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 'exportLoyaltyBalance' + * + * @param string $programID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function exportLoyaltyBalanceRequest($programID) + { + // verify the required parameter 'programID' is set + if ($programID === null || (is_array($programID) && count($programID) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $programID when calling exportLoyaltyBalance' + ); + } + + $resourcePath = '/v1/loyalty_programs/{programID}/export_customer_balance'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($programID !== null) { + $resourcePath = str_replace( + '{' . 'programID' . '}', + ObjectSerializer::toPathValue($programID), $resourcePath ); } @@ -3833,11 +6011,11 @@ protected function deleteReferralRequest($applicationId, $campaignId, $referralI if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - [] + ['application/csv'] ); } else { $headers = $this->headerSelector->selectHeaders( - [], + ['application/csv'], [] ); } @@ -3890,7 +6068,7 @@ protected function deleteReferralRequest($applicationId, $campaignId, $referralI $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( - 'DELETE', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3898,39 +6076,44 @@ protected function deleteReferralRequest($applicationId, $campaignId, $referralI } /** - * Operation deleteRuleset + * Operation exportLoyaltyLedger * - * Delete a Ruleset + * Export a customer's loyalty ledger log to a CSV file * - * @param int $applicationId applicationId (required) - * @param int $campaignId campaignId (required) - * @param int $rulesetId rulesetId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) + * @param string $programID programID (required) + * @param string $integrationID integrationID (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 void + * @return string */ - public function deleteRuleset($applicationId, $campaignId, $rulesetId) + public function exportLoyaltyLedger($rangeStart, $rangeEnd, $programID, $integrationID, $dateFormat = null) { - $this->deleteRulesetWithHttpInfo($applicationId, $campaignId, $rulesetId); + list($response) = $this->exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $programID, $integrationID, $dateFormat); + return $response; } /** - * Operation deleteRulesetWithHttpInfo + * Operation exportLoyaltyLedgerWithHttpInfo * - * Delete a Ruleset + * Export a customer's loyalty ledger log to a CSV file * - * @param int $applicationId (required) - * @param int $campaignId (required) - * @param int $rulesetId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) + * @param string $programID (required) + * @param string $integrationID (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 null, HTTP status code, HTTP response headers (array of strings) + * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function deleteRulesetWithHttpInfo($applicationId, $campaignId, $rulesetId) + public function exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $programID, $integrationID, $dateFormat = null) { - $request = $this->deleteRulesetRequest($applicationId, $campaignId, $rulesetId); + $request = $this->exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $programID, $integrationID, $dateFormat); try { $options = $this->createHttpClientOption(); @@ -3960,30 +6143,68 @@ public function deleteRulesetWithHttpInfo($applicationId, $campaignId, $rulesetI ); } - return [null, $statusCode, $response->getHeaders()]; + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + $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(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation deleteRulesetAsync + * Operation exportLoyaltyLedgerAsync * - * Delete a Ruleset + * Export a customer's loyalty ledger log to a CSV file * - * @param int $applicationId (required) - * @param int $campaignId (required) - * @param int $rulesetId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) + * @param string $programID (required) + * @param string $integrationID (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteRulesetAsync($applicationId, $campaignId, $rulesetId) + public function exportLoyaltyLedgerAsync($rangeStart, $rangeEnd, $programID, $integrationID, $dateFormat = null) { - return $this->deleteRulesetAsyncWithHttpInfo($applicationId, $campaignId, $rulesetId) + return $this->exportLoyaltyLedgerAsyncWithHttpInfo($rangeStart, $rangeEnd, $programID, $integrationID, $dateFormat) ->then( function ($response) { return $response[0]; @@ -3992,27 +6213,40 @@ function ($response) { } /** - * Operation deleteRulesetAsyncWithHttpInfo + * Operation exportLoyaltyLedgerAsyncWithHttpInfo * - * Delete a Ruleset + * Export a customer's loyalty ledger log to a CSV file * - * @param int $applicationId (required) - * @param int $campaignId (required) - * @param int $rulesetId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) + * @param string $programID (required) + * @param string $integrationID (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteRulesetAsyncWithHttpInfo($applicationId, $campaignId, $rulesetId) + public function exportLoyaltyLedgerAsyncWithHttpInfo($rangeStart, $rangeEnd, $programID, $integrationID, $dateFormat = null) { - $returnType = ''; - $request = $this->deleteRulesetRequest($applicationId, $campaignId, $rulesetId); + $returnType = 'string'; + $request = $this->exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $programID, $integrationID, $dateFormat); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + $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(); @@ -4032,66 +6266,87 @@ function ($exception) { } /** - * Create request for operation 'deleteRuleset' + * Create request for operation 'exportLoyaltyLedger' * - * @param int $applicationId (required) - * @param int $campaignId (required) - * @param int $rulesetId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) + * @param string $programID (required) + * @param string $integrationID (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteRulesetRequest($applicationId, $campaignId, $rulesetId) + protected function exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $programID, $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 deleteRuleset' + 'Missing the required parameter $rangeStart when calling exportLoyaltyLedger' ); } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling deleteRuleset' + 'Missing the required parameter $rangeEnd when calling exportLoyaltyLedger' ); } - // verify the required parameter 'rulesetId' is set - if ($rulesetId === null || (is_array($rulesetId) && count($rulesetId) === 0)) { + // verify the required parameter 'programID' is set + if ($programID === null || (is_array($programID) && count($programID) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $rulesetId when calling deleteRuleset' + 'Missing the required parameter $programID 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}/campaigns/{campaignId}/rulesets/{rulesetId}'; + $resourcePath = '/v1/loyalty_programs/{programID}/profile/{integrationID}/export_log'; $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($dateFormat)) { + $dateFormat = ObjectSerializer::serializeCollection($dateFormat, '', true); + } + if ($dateFormat !== null) { + $queryParams['dateFormat'] = $dateFormat; + } // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($campaignId !== null) { + if ($programID !== null) { $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + '{' . 'programID' . '}', + ObjectSerializer::toPathValue($programID), $resourcePath ); } // path params - if ($rulesetId !== null) { + if ($integrationID !== null) { $resourcePath = str_replace( - '{' . 'rulesetId' . '}', - ObjectSerializer::toPathValue($rulesetId), + '{' . 'integrationID' . '}', + ObjectSerializer::toPathValue($integrationID), $resourcePath ); } @@ -4101,11 +6356,11 @@ protected function deleteRulesetRequest($applicationId, $campaignId, $rulesetId) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - [] + ['application/csv'] ); } else { $headers = $this->headerSelector->selectHeaders( - [], + ['application/csv'], [] ); } @@ -4158,7 +6413,7 @@ protected function deleteRulesetRequest($applicationId, $campaignId, $rulesetId) $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( - 'DELETE', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -5782,7 +8037,7 @@ protected function getAdditionalCostRequest($additionalCostId) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20021 + * @return \TalonOne\Client\Model\InlineResponse20022 */ public function getAdditionalCosts($pageSize = null, $skip = null, $sort = null) { @@ -5801,7 +8056,7 @@ public function getAdditionalCosts($pageSize = null, $skip = null, $sort = null) * * @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\InlineResponse20022, HTTP status code, HTTP response headers (array of strings) */ public function getAdditionalCostsWithHttpInfo($pageSize = null, $skip = null, $sort = null) { @@ -5838,20 +8093,20 @@ public function getAdditionalCostsWithHttpInfo($pageSize = null, $skip = null, $ $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20021' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20022' === '\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\InlineResponse20022', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20021'; + $returnType = '\TalonOne\Client\Model\InlineResponse20022'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -5870,7 +8125,7 @@ public function getAdditionalCostsWithHttpInfo($pageSize = null, $skip = null, $ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20021', + '\TalonOne\Client\Model\InlineResponse20022', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -5916,7 +8171,7 @@ function ($response) { */ public function getAdditionalCostsAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20021'; + $returnType = '\TalonOne\Client\Model\InlineResponse20022'; $request = $this->getAdditionalCostsRequest($pageSize, $skip, $sort); return $this->client @@ -6436,7 +8691,7 @@ protected function getAllAccessLogsRequest($rangeStart, $rangeEnd, $path = null, /** * Operation getAllRoles * - * Get all roles. + * Get all roles * * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -6452,7 +8707,7 @@ public function getAllRoles() /** * Operation getAllRolesWithHttpInfo * - * Get all roles. + * Get all roles * * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -6539,7 +8794,7 @@ public function getAllRolesWithHttpInfo() /** * Operation getAllRolesAsync * - * Get all roles. + * Get all roles * * * @throws \InvalidArgumentException @@ -6558,7 +8813,7 @@ function ($response) { /** * Operation getAllRolesAsyncWithHttpInfo * - * Get all roles. + * Get all roles * * * @throws \InvalidArgumentException @@ -8468,8 +10723,8 @@ protected function getApplicationEventTypesRequest($applicationId, $pageSize = n * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -8499,8 +10754,8 @@ public function getApplicationEvents($applicationId, $pageSize = null, $skip = n * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -8601,8 +10856,8 @@ public function getApplicationEventsWithHttpInfo($applicationId, $pageSize = nul * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -8635,8 +10890,8 @@ function ($response) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -8696,8 +10951,8 @@ function ($exception) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -8922,8 +11177,8 @@ protected function getApplicationEventsRequest($applicationId, $pageSize = null, * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -8953,8 +11208,8 @@ public function getApplicationEventsWithoutTotalCount($applicationId, $pageSize * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -9055,8 +11310,8 @@ public function getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -9089,8 +11344,8 @@ function ($response) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -9150,8 +11405,8 @@ function ($exception) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -9674,8 +11929,8 @@ protected function getApplicationSessionRequest($applicationId, $sessionId) * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -9701,8 +11956,8 @@ public function getApplicationSessions($applicationId, $pageSize = null, $skip = * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -9799,8 +12054,8 @@ public function getApplicationSessionsWithHttpInfo($applicationId, $pageSize = n * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -9829,8 +12084,8 @@ function ($response) { * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -9886,8 +12141,8 @@ function ($exception) { * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 (optional) - * @param \DateTime $createdAfter Only return events created after this date (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) @@ -10645,7 +12900,7 @@ protected function getAttributeRequest($attributeId) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20020 + * @return \TalonOne\Client\Model\InlineResponse20021 */ public function getAttributes($pageSize = null, $skip = null, $sort = null) { @@ -10664,7 +12919,7 @@ public function getAttributes($pageSize = null, $skip = null, $sort = null) * * @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\InlineResponse20021, HTTP status code, HTTP response headers (array of strings) */ public function getAttributesWithHttpInfo($pageSize = null, $skip = null, $sort = null) { @@ -10701,20 +12956,20 @@ public function getAttributesWithHttpInfo($pageSize = null, $skip = null, $sort $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20020' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20021' === '\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\InlineResponse20021', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20020'; + $returnType = '\TalonOne\Client\Model\InlineResponse20021'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -10733,7 +12988,7 @@ public function getAttributesWithHttpInfo($pageSize = null, $skip = null, $sort case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20020', + '\TalonOne\Client\Model\InlineResponse20021', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -10779,7 +13034,7 @@ function ($response) { */ public function getAttributesAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20020'; + $returnType = '\TalonOne\Client\Model\InlineResponse20021'; $request = $this->getAttributesRequest($pageSize, $skip, $sort); return $this->client @@ -10930,38 +13185,42 @@ protected function getAttributesRequest($pageSize = null, $skip = null, $sort = } /** - * Operation getCampaign + * Operation getAudiences * - * Get a Campaign + * Get all audiences * - * @param int $applicationId applicationId (required) - * @param int $campaignId campaignId (required) + * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param bool $withTotalResultSize When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Campaign + * @return \TalonOne\Client\Model\InlineResponse20020 */ - public function getCampaign($applicationId, $campaignId) + public function getAudiences($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) { - list($response) = $this->getCampaignWithHttpInfo($applicationId, $campaignId); + list($response) = $this->getAudiencesWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize); return $response; } /** - * Operation getCampaignWithHttpInfo + * Operation getAudiencesWithHttpInfo * - * Get a Campaign + * Get all audiences * - * @param int $applicationId (required) - * @param int $campaignId (required) + * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param bool $withTotalResultSize When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain 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\Campaign, 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 getCampaignWithHttpInfo($applicationId, $campaignId) + public function getAudiencesWithHttpInfo($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) { - $request = $this->getCampaignRequest($applicationId, $campaignId); + $request = $this->getAudiencesRequest($pageSize, $skip, $sort, $withTotalResultSize); try { $options = $this->createHttpClientOption(); @@ -10994,20 +13253,20 @@ public function getCampaignWithHttpInfo($applicationId, $campaignId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Campaign' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20020' === '\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\InlineResponse20020', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Campaign'; + $returnType = '\TalonOne\Client\Model\InlineResponse20020'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -11026,7 +13285,7 @@ public function getCampaignWithHttpInfo($applicationId, $campaignId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Campaign', + '\TalonOne\Client\Model\InlineResponse20020', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -11037,19 +13296,21 @@ public function getCampaignWithHttpInfo($applicationId, $campaignId) } /** - * Operation getCampaignAsync + * Operation getAudiencesAsync * - * Get a Campaign + * Get all audiences * - * @param int $applicationId (required) - * @param int $campaignId (required) + * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param bool $withTotalResultSize When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAsync($applicationId, $campaignId) + public function getAudiencesAsync($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) { - return $this->getCampaignAsyncWithHttpInfo($applicationId, $campaignId) + return $this->getAudiencesAsyncWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize) ->then( function ($response) { return $response[0]; @@ -11058,20 +13319,22 @@ function ($response) { } /** - * Operation getCampaignAsyncWithHttpInfo + * Operation getAudiencesAsyncWithHttpInfo * - * Get a Campaign + * Get all audiences * - * @param int $applicationId (required) - * @param int $campaignId (required) + * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param bool $withTotalResultSize When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAsyncWithHttpInfo($applicationId, $campaignId) + public function getAudiencesAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) { - $returnType = '\TalonOne\Client\Model\Campaign'; - $request = $this->getCampaignRequest($applicationId, $campaignId); + $returnType = '\TalonOne\Client\Model\InlineResponse20020'; + $request = $this->getAudiencesRequest($pageSize, $skip, $sort, $withTotalResultSize); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11108,55 +13371,57 @@ function ($exception) { } /** - * Create request for operation 'getCampaign' + * Create request for operation 'getAudiences' * - * @param int $applicationId (required) - * @param int $campaignId (required) + * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param bool $withTotalResultSize When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCampaignRequest($applicationId, $campaignId) + protected function getAudiencesRequest($pageSize = null, $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 getCampaign' - ); - } - // 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' - ); - } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}'; + $resourcePath = '/v1/audiences'; $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($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + } + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; } + + // body params $_tempBody = null; @@ -11227,44 +13492,38 @@ protected function getCampaignRequest($applicationId, $campaignId) } /** - * Operation getCampaignAnalytics + * Operation getCampaign * - * Get analytics of campaigns + * Get a Campaign * * @param int $applicationId applicationId (required) * @param int $campaignId campaignId (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp, 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\InlineResponse20011 + * @return \TalonOne\Client\Model\Campaign */ - public function getCampaignAnalytics($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getCampaign($applicationId, $campaignId) { - list($response) = $this->getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); + list($response) = $this->getCampaignWithHttpInfo($applicationId, $campaignId); return $response; } /** - * Operation getCampaignAnalyticsWithHttpInfo + * Operation getCampaignWithHttpInfo * - * Get analytics of campaigns + * Get a Campaign * * @param int $applicationId (required) * @param int $campaignId (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp, 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\InlineResponse20011, 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 getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getCampaignWithHttpInfo($applicationId, $campaignId) { - $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); + $request = $this->getCampaignRequest($applicationId, $campaignId); try { $options = $this->createHttpClientOption(); @@ -11297,20 +13556,20 @@ public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $r $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20011' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Campaign' === '\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\Campaign', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20011'; + $returnType = '\TalonOne\Client\Model\Campaign'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -11329,7 +13588,7 @@ public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $r case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20011', + '\TalonOne\Client\Model\Campaign', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -11340,22 +13599,19 @@ public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $r } /** - * Operation getCampaignAnalyticsAsync + * Operation getCampaignAsync * - * Get analytics of campaigns + * Get a Campaign * * @param int $applicationId (required) * @param int $campaignId (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp, 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 getCampaignAnalyticsAsync($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getCampaignAsync($applicationId, $campaignId) { - return $this->getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity) + return $this->getCampaignAsyncWithHttpInfo($applicationId, $campaignId) ->then( function ($response) { return $response[0]; @@ -11364,23 +13620,20 @@ function ($response) { } /** - * Operation getCampaignAnalyticsAsyncWithHttpInfo + * Operation getCampaignAsyncWithHttpInfo * - * Get analytics of campaigns + * Get a Campaign * * @param int $applicationId (required) * @param int $campaignId (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp, 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 getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getCampaignAsyncWithHttpInfo($applicationId, $campaignId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20011'; - $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); + $returnType = '\TalonOne\Client\Model\Campaign'; + $request = $this->getCampaignRequest($applicationId, $campaignId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11417,72 +13670,36 @@ function ($exception) { } /** - * Create request for operation 'getCampaignAnalytics' + * Create request for operation 'getCampaign' * * @param int $applicationId (required) * @param int $campaignId (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp, 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 getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = 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 getCampaignAnalytics' + 'Missing the required parameter $applicationId when calling getCampaign' ); } // 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' + 'Missing the required parameter $campaignId when calling getCampaign' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/analytics'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}'; $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($granularity)) { - $granularity = ObjectSerializer::serializeCollection($granularity, '', true); - } - if ($granularity !== null) { - $queryParams['granularity'] = $granularity; - } // path params @@ -11572,46 +13789,44 @@ protected function getCampaignAnalyticsRequest($applicationId, $campaignId, $ran } /** - * Operation getCampaignByAttributes + * Operation getCampaignAnalytics * - * Get a list of all campaigns that match the given attributes + * Get analytics of campaigns * * @param int $applicationId applicationId (required) - * @param \TalonOne\Client\Model\CampaignSearch $body body (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) - * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $campaignState Filter results by the state of the campaign. (optional) + * @param int $campaignId campaignId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, 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\InlineResponse2002 + * @return \TalonOne\Client\Model\InlineResponse20011 */ - public function getCampaignByAttributes($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) + public function getCampaignAnalytics($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - list($response) = $this->getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState); + list($response) = $this->getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); return $response; } /** - * Operation getCampaignByAttributesWithHttpInfo + * Operation getCampaignAnalyticsWithHttpInfo * - * Get a list of all campaigns that match the given attributes + * Get analytics of campaigns * * @param int $applicationId (required) - * @param \TalonOne\Client\Model\CampaignSearch $body (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) - * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $campaignState Filter results by the state of the campaign. (optional) + * @param int $campaignId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, 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\InlineResponse2002, 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 getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) + public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); + $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); try { $options = $this->createHttpClientOption(); @@ -11644,20 +13859,20 @@ public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $page $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2002' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20011' === '\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\InlineResponse20011', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2002'; + $returnType = '\TalonOne\Client\Model\InlineResponse20011'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -11676,7 +13891,7 @@ public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $page case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2002', + '\TalonOne\Client\Model\InlineResponse20011', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -11687,23 +13902,22 @@ public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $page } /** - * Operation getCampaignByAttributesAsync + * Operation getCampaignAnalyticsAsync * - * Get a list of all campaigns that match the given attributes + * Get analytics of campaigns * * @param int $applicationId (required) - * @param \TalonOne\Client\Model\CampaignSearch $body (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) - * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $campaignState Filter results by the state of the campaign. (optional) + * @param int $campaignId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, 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 getCampaignByAttributesAsync($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) + public function getCampaignAnalyticsAsync($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - return $this->getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState) + return $this->getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity) ->then( function ($response) { return $response[0]; @@ -11712,24 +13926,23 @@ function ($response) { } /** - * Operation getCampaignByAttributesAsyncWithHttpInfo + * Operation getCampaignAnalyticsAsyncWithHttpInfo * - * Get a list of all campaigns that match the given attributes + * Get analytics of campaigns * * @param int $applicationId (required) - * @param \TalonOne\Client\Model\CampaignSearch $body (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) - * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $campaignState Filter results by the state of the campaign. (optional) + * @param int $campaignId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, 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 getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) + public function getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2002'; - $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); + $returnType = '\TalonOne\Client\Model\InlineResponse20011'; + $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11766,34 +13979,45 @@ function ($exception) { } /** - * Create request for operation 'getCampaignByAttributes' - * - * @param int $applicationId (required) - * @param \TalonOne\Client\Model\CampaignSearch $body (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) - * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $campaignState Filter results by the state of the campaign. (optional) + * Create request for operation 'getCampaignAnalytics' + * + * @param int $applicationId (required) + * @param int $campaignId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, 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 getCampaignByAttributesRequest($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) + protected function getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = 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 getCampaignByAttributes' + 'Missing the required parameter $applicationId when calling getCampaignAnalytics' ); } - // 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 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/applications/{applicationId}/campaigns_search'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/analytics'; $formParams = []; $queryParams = []; $headerParams = []; @@ -11801,32 +14025,25 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi $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 (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); } - if ($skip !== null) { - $queryParams['skip'] = $skip; + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; } // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); } - if ($sort !== null) { - $queryParams['sort'] = $sort; + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; } // query params - if (is_array($campaignState)) { - $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); + if (is_array($granularity)) { + $granularity = ObjectSerializer::serializeCollection($granularity, '', true); } - if ($campaignState !== null) { - $queryParams['campaignState'] = $campaignState; + if ($granularity !== null) { + $queryParams['granularity'] = $granularity; } @@ -11838,12 +14055,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( @@ -11852,7 +14074,7 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -11904,7 +14126,7 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -11912,54 +14134,46 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi } /** - * Operation getCampaigns + * Operation getCampaignByAttributes * - * List your Campaigns + * Get a list of all campaigns that match the given attributes * * @param int $applicationId applicationId (required) + * @param \TalonOne\Client\Model\CampaignSearch $body body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * @param string $campaignState Filter results by the state of the campaign. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \TalonOne\Client\Model\InlineResponse2002 */ - public function getCampaigns($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null) + public function getCampaignByAttributes($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) { - list($response) = $this->getCampaignsWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId); + list($response) = $this->getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState); return $response; } /** - * Operation getCampaignsWithHttpInfo + * Operation getCampaignByAttributesWithHttpInfo * - * List your Campaigns + * Get a list of all campaigns that match the given attributes * * @param int $applicationId (required) + * @param \TalonOne\Client\Model\CampaignSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * @param string $campaignState Filter results by the state of the campaign. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \TalonOne\Client\Model\InlineResponse2002, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignsWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null) + public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) { - $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId); + $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); try { $options = $this->createHttpClientOption(); @@ -12035,27 +14249,23 @@ public function getCampaignsWithHttpInfo($applicationId, $pageSize = null, $skip } /** - * Operation getCampaignsAsync + * Operation getCampaignByAttributesAsync * - * List your Campaigns + * Get a list of all campaigns that match the given attributes * * @param int $applicationId (required) + * @param \TalonOne\Client\Model\CampaignSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * @param string $campaignState Filter results by the state of the campaign. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignsAsync($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null) + public function getCampaignByAttributesAsync($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) { - return $this->getCampaignsAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId) + return $this->getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState) ->then( function ($response) { return $response[0]; @@ -12064,28 +14274,24 @@ function ($response) { } /** - * Operation getCampaignsAsyncWithHttpInfo + * Operation getCampaignByAttributesAsyncWithHttpInfo * - * List your Campaigns + * Get a list of all campaigns that match the given attributes * * @param int $applicationId (required) + * @param \TalonOne\Client\Model\CampaignSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * @param string $campaignState Filter results by the state of the campaign. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignsAsyncWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null) + public function getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) { $returnType = '\TalonOne\Client\Model\InlineResponse2002'; - $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId); + $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12122,32 +14328,34 @@ function ($exception) { } /** - * Create request for operation 'getCampaigns' + * Create request for operation 'getCampaignByAttributes' * * @param int $applicationId (required) + * @param \TalonOne\Client\Model\CampaignSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * @param string $campaignState Filter results by the state of the campaign. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCampaignsRequest($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null) + protected function getCampaignByAttributesRequest($applicationId, $body, $pageSize = null, $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' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns'; + $resourcePath = '/v1/applications/{applicationId}/campaigns_search'; $formParams = []; $queryParams = []; $headerParams = []; @@ -12182,41 +14390,6 @@ protected function getCampaignsRequest($applicationId, $pageSize = null, $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; - } // path params @@ -12230,6 +14403,9 @@ protected function getCampaignsRequest($applicationId, $pageSize = null, $skip = // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -12238,7 +14414,7 @@ protected function getCampaignsRequest($applicationId, $pageSize = null, $skip = } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -12290,7 +14466,7 @@ protected function getCampaignsRequest($applicationId, $pageSize = null, $skip = $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -12298,50 +14474,54 @@ protected function getCampaignsRequest($applicationId, $pageSize = null, $skip = } /** - * Operation getChanges + * Operation getCampaigns * - * Get audit log for an account + * List your Campaigns * + * @param int $applicationId applicationId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param int $applicationId applicationId (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. (optional) - * @param bool $withTotalResultSize When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (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) + * @param string $campaignState Filter results by the state of the campaign. (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) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20027 + * @return \TalonOne\Client\Model\InlineResponse2002 */ - public function getChanges($pageSize = null, $skip = null, $sort = null, $applicationId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) + public function getCampaigns($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null) { - list($response) = $this->getChangesWithHttpInfo($pageSize, $skip, $sort, $applicationId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); + list($response) = $this->getCampaignsWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId); return $response; } /** - * Operation getChangesWithHttpInfo + * Operation getCampaignsWithHttpInfo * - * Get audit log for an account + * List your Campaigns * + * @param int $applicationId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param int $applicationId (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. (optional) - * @param bool $withTotalResultSize When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (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) + * @param string $campaignState Filter results by the state of the campaign. (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) * * @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\InlineResponse2002, HTTP status code, HTTP response headers (array of strings) */ - public function getChangesWithHttpInfo($pageSize = null, $skip = null, $sort = null, $applicationId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) + public function getCampaignsWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null) { - $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); + $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId); try { $options = $this->createHttpClientOption(); @@ -12374,20 +14554,20 @@ public function getChangesWithHttpInfo($pageSize = null, $skip = null, $sort = n $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20027' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2002' === '\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\InlineResponse2002', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20027'; + $returnType = '\TalonOne\Client\Model\InlineResponse2002'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -12406,7 +14586,7 @@ public function getChangesWithHttpInfo($pageSize = null, $skip = null, $sort = n case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20027', + '\TalonOne\Client\Model\InlineResponse2002', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -12417,25 +14597,27 @@ public function getChangesWithHttpInfo($pageSize = null, $skip = null, $sort = n } /** - * Operation getChangesAsync + * Operation getCampaignsAsync * - * Get audit log for an account + * List your Campaigns * + * @param int $applicationId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param int $applicationId (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. (optional) - * @param bool $withTotalResultSize When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (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) + * @param string $campaignState Filter results by the state of the campaign. (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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChangesAsync($pageSize = null, $skip = null, $sort = null, $applicationId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) + public function getCampaignsAsync($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null) { - return $this->getChangesAsyncWithHttpInfo($pageSize, $skip, $sort, $applicationId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld) + return $this->getCampaignsAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId) ->then( function ($response) { return $response[0]; @@ -12444,26 +14626,28 @@ function ($response) { } /** - * Operation getChangesAsyncWithHttpInfo + * Operation getCampaignsAsyncWithHttpInfo * - * Get audit log for an account + * List your Campaigns * + * @param int $applicationId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param int $applicationId (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. (optional) - * @param bool $withTotalResultSize When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (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) + * @param string $campaignState Filter results by the state of the campaign. (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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChangesAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null, $applicationId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) + public function getCampaignsAsyncWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20027'; - $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); + $returnType = '\TalonOne\Client\Model\InlineResponse2002'; + $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12500,24 +14684,32 @@ function ($exception) { } /** - * Create request for operation 'getChanges' + * Create request for operation 'getCampaigns' * + * @param int $applicationId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param int $applicationId (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. (optional) - * @param bool $withTotalResultSize When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (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) + * @param string $campaignState Filter results by the state of the campaign. (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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getChangesRequest($pageSize = null, $skip = null, $sort = null, $applicationId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) + protected function getCampaignsRequest($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = 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' + ); + } - $resourcePath = '/v1/changes'; + $resourcePath = '/v1/applications/{applicationId}/campaigns'; $formParams = []; $queryParams = []; $headerParams = []; @@ -12546,11 +14738,25 @@ protected function getChangesRequest($pageSize = null, $skip = null, $sort = nul $queryParams['sort'] = $sort; } // query params - if (is_array($applicationId)) { - $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); + if (is_array($campaignState)) { + $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); } - if ($applicationId !== null) { - $queryParams['applicationId'] = $applicationId; + 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)) { @@ -12567,21 +14773,22 @@ protected function getChangesRequest($pageSize = null, $skip = null, $sort = nul $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($includeOld)) { - $includeOld = ObjectSerializer::serializeCollection($includeOld, '', true); + if (is_array($campaignGroupId)) { + $campaignGroupId = ObjectSerializer::serializeCollection($campaignGroupId, '', true); } - if ($includeOld !== null) { - $queryParams['includeOld'] = $includeOld; + if ($campaignGroupId !== null) { + $queryParams['campaignGroupId'] = $campaignGroupId; } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -12653,70 +14860,54 @@ protected function getChangesRequest($pageSize = null, $skip = null, $sort = nul } /** - * Operation getCoupons + * Operation getChanges * - * List Coupons (with total count) + * Get audit log for an account * - * @param int $applicationId applicationId (required) - * @param int $campaignId campaignId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param int $applicationId applicationId (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId userId (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 will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (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\InlineResponse2004 + * @return \TalonOne\Client\Model\InlineResponse20028 */ - public function getCoupons($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) + public function getChanges($pageSize = null, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) { - list($response) = $this->getCouponsWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); + list($response) = $this->getChangesWithHttpInfo($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); return $response; } /** - * Operation getCouponsWithHttpInfo + * Operation getChangesWithHttpInfo * - * List Coupons (with total count) + * Get audit log for an account * - * @param int $applicationId (required) - * @param int $campaignId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param int $applicationId (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId (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 will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (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\InlineResponse2004, 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 getCouponsWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) + public function getChangesWithHttpInfo($pageSize = null, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) { - $request = $this->getCouponsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); + $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); try { $options = $this->createHttpClientOption(); @@ -12749,20 +14940,20 @@ public function getCouponsWithHttpInfo($applicationId, $campaignId, $pageSize = $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2004' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20028' === '\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\InlineResponse20028', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2004'; + $returnType = '\TalonOne\Client\Model\InlineResponse20028'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -12781,7 +14972,7 @@ public function getCouponsWithHttpInfo($applicationId, $campaignId, $pageSize = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2004', + '\TalonOne\Client\Model\InlineResponse20028', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -12792,35 +14983,27 @@ public function getCouponsWithHttpInfo($applicationId, $campaignId, $pageSize = } /** - * Operation getCouponsAsync + * Operation getChangesAsync * - * List Coupons (with total count) + * Get audit log for an account * - * @param int $applicationId (required) - * @param int $campaignId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param int $applicationId (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId (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 will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (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 getCouponsAsync($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) + public function getChangesAsync($pageSize = null, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) { - return $this->getCouponsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch) + return $this->getChangesAsyncWithHttpInfo($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld) ->then( function ($response) { return $response[0]; @@ -12829,36 +15012,28 @@ function ($response) { } /** - * Operation getCouponsAsyncWithHttpInfo + * Operation getChangesAsyncWithHttpInfo * - * List Coupons (with total count) + * Get audit log for an account * - * @param int $applicationId (required) - * @param int $campaignId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param int $applicationId (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId (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 will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (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 getCouponsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) + public function getChangesAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2004'; - $request = $this->getCouponsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); + $returnType = '\TalonOne\Client\Model\InlineResponse20028'; + $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12895,46 +15070,26 @@ function ($exception) { } /** - * Create request for operation 'getCoupons' + * Create request for operation 'getChanges' * - * @param int $applicationId (required) - * @param int $campaignId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $startsBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param \DateTime $expiresBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (optional) - * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) - * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) - * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) - * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param int $applicationId (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId (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 will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. (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 getCouponsRequest($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) + protected function getChangesRequest($pageSize = null, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = 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 getCoupons' - ); - } - // 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 getCoupons' - ); - } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'; + $resourcePath = '/v1/changes'; $formParams = []; $queryParams = []; $headerParams = []; @@ -12963,11 +15118,25 @@ protected function getCouponsRequest($applicationId, $campaignId, $pageSize = nu $queryParams['sort'] = $sort; } // query params - if (is_array($value)) { - $value = ObjectSerializer::serializeCollection($value, '', true); + if (is_array($applicationId)) { + $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); } - if ($value !== null) { - $queryParams['value'] = $value; + 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)) { @@ -12984,93 +15153,21 @@ protected function getCouponsRequest($applicationId, $campaignId, $pageSize = nu $queryParams['createdAfter'] = $createdAfter; } // query params - if (is_array($startsAfter)) { - $startsAfter = ObjectSerializer::serializeCollection($startsAfter, '', true); - } - if ($startsAfter !== null) { - $queryParams['startsAfter'] = $startsAfter; - } - // query params - if (is_array($startsBefore)) { - $startsBefore = ObjectSerializer::serializeCollection($startsBefore, '', true); - } - if ($startsBefore !== null) { - $queryParams['startsBefore'] = $startsBefore; - } - // query params - if (is_array($expiresAfter)) { - $expiresAfter = ObjectSerializer::serializeCollection($expiresAfter, '', true); - } - if ($expiresAfter !== null) { - $queryParams['expiresAfter'] = $expiresAfter; - } - // query params - if (is_array($expiresBefore)) { - $expiresBefore = ObjectSerializer::serializeCollection($expiresBefore, '', true); - } - if ($expiresBefore !== null) { - $queryParams['expiresBefore'] = $expiresBefore; - } - // query params - if (is_array($valid)) { - $valid = ObjectSerializer::serializeCollection($valid, '', true); - } - if ($valid !== null) { - $queryParams['valid'] = $valid; - } - // query params - if (is_array($batchId)) { - $batchId = ObjectSerializer::serializeCollection($batchId, '', true); - } - if ($batchId !== null) { - $queryParams['batchId'] = $batchId; - } - // 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 (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); } - if ($recipientIntegrationId !== null) { - $queryParams['recipientIntegrationId'] = $recipientIntegrationId; + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; } // query params - if (is_array($exactMatch)) { - $exactMatch = ObjectSerializer::serializeCollection($exactMatch, '', true); + if (is_array($includeOld)) { + $includeOld = ObjectSerializer::serializeCollection($includeOld, '', true); } - if ($exactMatch !== null) { - $queryParams['exactMatch'] = $exactMatch; + if ($includeOld !== null) { + $queryParams['includeOld'] = $includeOld; } - // 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; @@ -13142,64 +15239,70 @@ protected function getCouponsRequest($applicationId, $campaignId, $pageSize = nu } /** - * Operation getCouponsByAttributes + * Operation getCoupons * - * Get a list of the coupons that match the given attributes + * List Coupons (with total count) * * @param int $applicationId applicationId (required) * @param int $campaignId campaignId (required) - * @param \TalonOne\Client\Model\CouponSearch $body body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 \DateTime $startsAfter 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 $startsBefore 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 $expiresAfter 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 $expiresBefore 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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) - * @param string $batchId Filter results by batches of coupons (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \TalonOne\Client\Model\InlineResponse2004 */ - public function getCouponsByAttributes($applicationId, $campaignId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) + public function getCoupons($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) { - list($response) = $this->getCouponsByAttributesWithHttpInfo($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); + list($response) = $this->getCouponsWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); return $response; } /** - * Operation getCouponsByAttributesWithHttpInfo + * Operation getCouponsWithHttpInfo * - * Get a list of the coupons that match the given attributes + * List Coupons (with total count) * * @param int $applicationId (required) * @param int $campaignId (required) - * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 \DateTime $startsAfter 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 $startsBefore 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 $expiresAfter 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 $expiresBefore 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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) - * @param string $batchId Filter results by batches of coupons (optional) * * @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) */ - public function getCouponsByAttributesWithHttpInfo($applicationId, $campaignId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) + public function getCouponsWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) { - $request = $this->getCouponsByAttributesRequest($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); + $request = $this->getCouponsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); try { $options = $this->createHttpClientOption(); @@ -13275,32 +15378,35 @@ public function getCouponsByAttributesWithHttpInfo($applicationId, $campaignId, } /** - * Operation getCouponsByAttributesAsync + * Operation getCouponsAsync * - * Get a list of the coupons that match the given attributes + * List Coupons (with total count) * * @param int $applicationId (required) * @param int $campaignId (required) - * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 \DateTime $startsAfter 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 $startsBefore 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 $expiresAfter 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 $expiresBefore 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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) - * @param string $batchId Filter results by batches of coupons (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCouponsByAttributesAsync($applicationId, $campaignId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) + public function getCouponsAsync($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) { - return $this->getCouponsByAttributesAsyncWithHttpInfo($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId) + return $this->getCouponsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch) ->then( function ($response) { return $response[0]; @@ -13309,33 +15415,36 @@ function ($response) { } /** - * Operation getCouponsByAttributesAsyncWithHttpInfo + * Operation getCouponsAsyncWithHttpInfo * - * Get a list of the coupons that match the given attributes + * List Coupons (with total count) * * @param int $applicationId (required) * @param int $campaignId (required) - * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 \DateTime $startsAfter 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 $startsBefore 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 $expiresAfter 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 $expiresBefore 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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) - * @param string $batchId Filter results by batches of coupons (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCouponsByAttributesAsyncWithHttpInfo($applicationId, $campaignId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) + public function getCouponsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) { $returnType = '\TalonOne\Client\Model\InlineResponse2004'; - $request = $this->getCouponsByAttributesRequest($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); + $request = $this->getCouponsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13372,49 +15481,46 @@ function ($exception) { } /** - * Create request for operation 'getCouponsByAttributes' + * Create request for operation 'getCoupons' * * @param int $applicationId (required) * @param int $campaignId (required) - * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 \DateTime $startsAfter 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 $startsBefore 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 $expiresAfter 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 $expiresBefore 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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $batchId Filter results by batches of coupons (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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) - * @param string $batchId Filter results by batches of coupons (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCouponsByAttributesRequest($applicationId, $campaignId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) + protected function getCouponsRequest($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $startsAfter = null, $startsBefore = null, $expiresAfter = null, $expiresBefore = null, $valid = null, $batchId = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false) { // 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 getCouponsByAttributes' + 'Missing the required parameter $applicationId when calling getCoupons' ); } // 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 getCouponsByAttributes' - ); - } - // 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 getCouponsByAttributes' + 'Missing the required parameter $campaignId when calling getCoupons' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'; $formParams = []; $queryParams = []; $headerParams = []; @@ -13464,6 +15570,34 @@ protected function getCouponsByAttributesRequest($applicationId, $campaignId, $b $queryParams['createdAfter'] = $createdAfter; } // query params + if (is_array($startsAfter)) { + $startsAfter = ObjectSerializer::serializeCollection($startsAfter, '', true); + } + if ($startsAfter !== null) { + $queryParams['startsAfter'] = $startsAfter; + } + // query params + if (is_array($startsBefore)) { + $startsBefore = ObjectSerializer::serializeCollection($startsBefore, '', true); + } + if ($startsBefore !== null) { + $queryParams['startsBefore'] = $startsBefore; + } + // query params + if (is_array($expiresAfter)) { + $expiresAfter = ObjectSerializer::serializeCollection($expiresAfter, '', true); + } + if ($expiresAfter !== null) { + $queryParams['expiresAfter'] = $expiresAfter; + } + // query params + if (is_array($expiresBefore)) { + $expiresBefore = ObjectSerializer::serializeCollection($expiresBefore, '', true); + } + if ($expiresBefore !== null) { + $queryParams['expiresBefore'] = $expiresBefore; + } + // query params if (is_array($valid)) { $valid = ObjectSerializer::serializeCollection($valid, '', true); } @@ -13471,6 +15605,13 @@ protected function getCouponsByAttributesRequest($applicationId, $campaignId, $b $queryParams['valid'] = $valid; } // query params + if (is_array($batchId)) { + $batchId = ObjectSerializer::serializeCollection($batchId, '', true); + } + if ($batchId !== null) { + $queryParams['batchId'] = $batchId; + } + // query params if (is_array($usable)) { $usable = ObjectSerializer::serializeCollection($usable, '', true); } @@ -13498,13 +15639,6 @@ protected function getCouponsByAttributesRequest($applicationId, $campaignId, $b if ($exactMatch !== null) { $queryParams['exactMatch'] = $exactMatch; } - // query params - if (is_array($batchId)) { - $batchId = ObjectSerializer::serializeCollection($batchId, '', true); - } - if ($batchId !== null) { - $queryParams['batchId'] = $batchId; - } // path params @@ -13526,9 +15660,6 @@ protected function getCouponsByAttributesRequest($applicationId, $campaignId, $b // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -13537,7 +15668,7 @@ protected function getCouponsByAttributesRequest($applicationId, $campaignId, $b } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -13589,7 +15720,7 @@ protected function getCouponsByAttributesRequest($applicationId, $campaignId, $b $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -13597,64 +15728,64 @@ protected function getCouponsByAttributesRequest($applicationId, $campaignId, $b } /** - * Operation getCouponsByAttributesApplicationWide + * Operation getCouponsByAttributes * - * Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) + * Get a list of the coupons that match the given attributes * * @param int $applicationId applicationId (required) + * @param int $campaignId campaignId (required) * @param \TalonOne\Client\Model\CouponSearch $body body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $campaignState Filter results by the state of the campaign. (optional) + * @param string $batchId Filter results by batches of coupons (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \TalonOne\Client\Model\InlineResponse2004 */ - public function getCouponsByAttributesApplicationWide($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) + public function getCouponsByAttributes($applicationId, $campaignId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) { - list($response) = $this->getCouponsByAttributesApplicationWideWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState); + list($response) = $this->getCouponsByAttributesWithHttpInfo($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); return $response; } /** - * Operation getCouponsByAttributesApplicationWideWithHttpInfo + * Operation getCouponsByAttributesWithHttpInfo * - * Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) + * Get a list of the coupons that match the given attributes * * @param int $applicationId (required) + * @param int $campaignId (required) * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $campaignState Filter results by the state of the campaign. (optional) + * @param string $batchId Filter results by batches of coupons (optional) * * @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) */ - public function getCouponsByAttributesApplicationWideWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) + public function getCouponsByAttributesWithHttpInfo($applicationId, $campaignId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) { - $request = $this->getCouponsByAttributesApplicationWideRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState); + $request = $this->getCouponsByAttributesRequest($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); try { $options = $this->createHttpClientOption(); @@ -13730,32 +15861,32 @@ public function getCouponsByAttributesApplicationWideWithHttpInfo($applicationId } /** - * Operation getCouponsByAttributesApplicationWideAsync + * Operation getCouponsByAttributesAsync * - * Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) + * Get a list of the coupons that match the given attributes * * @param int $applicationId (required) + * @param int $campaignId (required) * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $campaignState Filter results by the state of the campaign. (optional) + * @param string $batchId Filter results by batches of coupons (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCouponsByAttributesApplicationWideAsync($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) + public function getCouponsByAttributesAsync($applicationId, $campaignId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) { - return $this->getCouponsByAttributesApplicationWideAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState) + return $this->getCouponsByAttributesAsyncWithHttpInfo($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId) ->then( function ($response) { return $response[0]; @@ -13764,33 +15895,33 @@ function ($response) { } /** - * Operation getCouponsByAttributesApplicationWideAsyncWithHttpInfo + * Operation getCouponsByAttributesAsyncWithHttpInfo * - * Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) + * Get a list of the coupons that match the given attributes * * @param int $applicationId (required) + * @param int $campaignId (required) * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $campaignState Filter results by the state of the campaign. (optional) + * @param string $batchId Filter results by batches of coupons (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCouponsByAttributesApplicationWideAsyncWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) + public function getCouponsByAttributesAsyncWithHttpInfo($applicationId, $campaignId, $body, $pageSize = null, $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\InlineResponse2004'; - $request = $this->getCouponsByAttributesApplicationWideRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState); + $request = $this->getCouponsByAttributesRequest($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13827,43 +15958,49 @@ function ($exception) { } /** - * Create request for operation 'getCouponsByAttributesApplicationWide' + * Create request for operation 'getCouponsByAttributes' * * @param int $applicationId (required) + * @param int $campaignId (required) * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $campaignState Filter results by the state of the campaign. (optional) + * @param string $batchId Filter results by batches of coupons (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCouponsByAttributesApplicationWideRequest($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) + protected function getCouponsByAttributesRequest($applicationId, $campaignId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = 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 getCouponsByAttributesApplicationWide' + 'Missing the required parameter $applicationId when calling getCouponsByAttributes' + ); + } + // 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 getCouponsByAttributes' ); } // 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 getCouponsByAttributesApplicationWide' + 'Missing the required parameter $body when calling getCouponsByAttributes' ); } - $resourcePath = '/v1/applications/{applicationId}/coupons_search'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search'; $formParams = []; $queryParams = []; $headerParams = []; @@ -13941,13 +16078,6 @@ protected function getCouponsByAttributesApplicationWideRequest($applicationId, $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); } @@ -13955,11 +16085,11 @@ protected function getCouponsByAttributesApplicationWideRequest($applicationId, $queryParams['exactMatch'] = $exactMatch; } // query params - if (is_array($campaignState)) { - $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); + if (is_array($batchId)) { + $batchId = ObjectSerializer::serializeCollection($batchId, '', true); } - if ($campaignState !== null) { - $queryParams['campaignState'] = $campaignState; + if ($batchId !== null) { + $queryParams['batchId'] = $batchId; } @@ -13971,6 +16101,14 @@ protected function getCouponsByAttributesApplicationWideRequest($applicationId, $resourcePath ); } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -14045,62 +16183,64 @@ protected function getCouponsByAttributesApplicationWideRequest($applicationId, } /** - * Operation getCouponsWithoutTotalCount + * Operation getCouponsByAttributesApplicationWide * - * List Coupons + * Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) * * @param int $applicationId applicationId (required) - * @param int $campaignId campaignId (required) + * @param \TalonOne\Client\Model\CouponSearch $body body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $campaignState Filter results by the state of the campaign. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2005 + * @return \TalonOne\Client\Model\InlineResponse2004 */ - public function getCouponsWithoutTotalCount($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) + public function getCouponsByAttributesApplicationWide($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) { - list($response) = $this->getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); + list($response) = $this->getCouponsByAttributesApplicationWideWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState); return $response; } /** - * Operation getCouponsWithoutTotalCountWithHttpInfo + * Operation getCouponsByAttributesApplicationWideWithHttpInfo * - * List Coupons + * Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) * * @param int $applicationId (required) - * @param int $campaignId (required) + * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $campaignState Filter results by the state of the campaign. (optional) * * @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\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) */ - public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) + public function getCouponsByAttributesApplicationWideWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) { - $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); + $request = $this->getCouponsByAttributesApplicationWideRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState); try { $options = $this->createHttpClientOption(); @@ -14133,20 +16273,20 @@ public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaig $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2005' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2004' === '\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\InlineResponse2004', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2005'; + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -14165,7 +16305,7 @@ public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaig case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2005', + '\TalonOne\Client\Model\InlineResponse2004', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -14176,31 +16316,32 @@ public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaig } /** - * Operation getCouponsWithoutTotalCountAsync + * Operation getCouponsByAttributesApplicationWideAsync * - * List Coupons + * Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) * * @param int $applicationId (required) - * @param int $campaignId (required) + * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $campaignState Filter results by the state of the campaign. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCouponsWithoutTotalCountAsync($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) + public function getCouponsByAttributesApplicationWideAsync($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) { - return $this->getCouponsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch) + return $this->getCouponsByAttributesApplicationWideAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState) ->then( function ($response) { return $response[0]; @@ -14209,32 +16350,33 @@ function ($response) { } /** - * Operation getCouponsWithoutTotalCountAsyncWithHttpInfo + * Operation getCouponsByAttributesApplicationWideAsyncWithHttpInfo * - * List Coupons + * Get a list of the coupons that match the given attributes in all active campaigns of an application (with total count) * * @param int $applicationId (required) - * @param int $campaignId (required) + * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $campaignState Filter results by the state of the campaign. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCouponsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) + public function getCouponsByAttributesApplicationWideAsyncWithHttpInfo($applicationId, $body, $pageSize = null, $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\InlineResponse2005'; - $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; + $request = $this->getCouponsByAttributesApplicationWideRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14271,42 +16413,43 @@ function ($exception) { } /** - * Create request for operation 'getCouponsWithoutTotalCount' + * Create request for operation 'getCouponsByAttributesApplicationWide' * * @param int $applicationId (required) - * @param int $campaignId (required) + * @param \TalonOne\Client\Model\CouponSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 string $campaignState Filter results by the state of the campaign. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) + protected function getCouponsByAttributesApplicationWideRequest($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $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 getCouponsWithoutTotalCount' + 'Missing the required parameter $applicationId when calling getCouponsByAttributesApplicationWide' ); } - // 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 getCouponsWithoutTotalCount' + 'Missing the required parameter $body when calling getCouponsByAttributesApplicationWide' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_total'; + $resourcePath = '/v1/applications/{applicationId}/coupons_search'; $formParams = []; $queryParams = []; $headerParams = []; @@ -14397,6 +16540,13 @@ protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignI if ($exactMatch !== null) { $queryParams['exactMatch'] = $exactMatch; } + // query params + if (is_array($campaignState)) { + $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); + } + if ($campaignState !== null) { + $queryParams['campaignState'] = $campaignState; + } // path params @@ -14407,17 +16557,12 @@ protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignI $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( @@ -14426,7 +16571,7 @@ protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignI } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -14478,7 +16623,7 @@ protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignI $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -14486,46 +16631,62 @@ protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignI } /** - * Operation getCustomerActivityReport + * Operation getCouponsWithoutTotalCount * - * Get Activity Report for Single Customer + * List Coupons * - * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId applicationId (required) - * @param int $customerId customerId (required) + * @param int $campaignId campaignId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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\CustomerActivityReport + * @return \TalonOne\Client\Model\InlineResponse2005 */ - public function getCustomerActivityReport($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) + public function getCouponsWithoutTotalCount($applicationId, $campaignId, $pageSize = null, $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->getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); + list($response) = $this->getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); return $response; } /** - * Operation getCustomerActivityReportWithHttpInfo + * Operation getCouponsWithoutTotalCountWithHttpInfo * - * Get Activity Report for Single Customer + * List Coupons * - * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) - * @param int $customerId (required) + * @param int $campaignId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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\CustomerActivityReport, 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 getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) + public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { - $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); + $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); try { $options = $this->createHttpClientOption(); @@ -14558,20 +16719,20 @@ public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $a $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\CustomerActivityReport' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2005' === '\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\InlineResponse2005', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\CustomerActivityReport'; + $returnType = '\TalonOne\Client\Model\InlineResponse2005'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -14590,7 +16751,7 @@ public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $a case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\CustomerActivityReport', + '\TalonOne\Client\Model\InlineResponse2005', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -14601,23 +16762,31 @@ public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $a } /** - * Operation getCustomerActivityReportAsync + * Operation getCouponsWithoutTotalCountAsync * - * Get Activity Report for Single Customer + * List Coupons * - * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) - * @param int $customerId (required) + * @param int $campaignId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 getCustomerActivityReportAsync($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) + public function getCouponsWithoutTotalCountAsync($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { - return $this->getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip) + return $this->getCouponsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch) ->then( function ($response) { return $response[0]; @@ -14626,24 +16795,32 @@ function ($response) { } /** - * Operation getCustomerActivityReportAsyncWithHttpInfo + * Operation getCouponsWithoutTotalCountAsyncWithHttpInfo * - * Get Activity Report for Single Customer + * List Coupons * - * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) - * @param int $customerId (required) + * @param int $campaignId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) + public function getCouponsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = null, $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\CustomerActivityReport'; - $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\InlineResponse2005'; + $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14680,79 +16857,131 @@ function ($exception) { } /** - * Create request for operation 'getCustomerActivityReport' + * Create request for operation 'getCouponsWithoutTotalCount' * - * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) - * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) - * @param int $customerId (required) + * @param int $campaignId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of 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 getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) + protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize = null, $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)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling getCustomerActivityReport' + 'Missing the required parameter $applicationId when calling getCouponsWithoutTotalCount' ); } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling getCustomerActivityReport' + 'Missing the required parameter $campaignId when calling getCouponsWithoutTotalCount' ); } - // 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' - ); + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/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($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); } - // 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 getCustomerActivityReport' - ); + if ($usable !== null) { + $queryParams['usable'] = $usable; } - - $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/{customerId}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + if (is_array($referralId)) { + $referralId = ObjectSerializer::serializeCollection($referralId, '', true); } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; + if ($referralId !== null) { + $queryParams['referralId'] = $referralId; } // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); + if (is_array($recipientIntegrationId)) { + $recipientIntegrationId = ObjectSerializer::serializeCollection($recipientIntegrationId, '', true); } - if ($skip !== null) { - $queryParams['skip'] = $skip; + if ($recipientIntegrationId !== null) { + $queryParams['recipientIntegrationId'] = $recipientIntegrationId; } // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); + if (is_array($batchId)) { + $batchId = ObjectSerializer::serializeCollection($batchId, '', true); } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; + if ($batchId !== null) { + $queryParams['batchId'] = $batchId; } // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + if (is_array($exactMatch)) { + $exactMatch = ObjectSerializer::serializeCollection($exactMatch, '', true); } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; + if ($exactMatch !== null) { + $queryParams['exactMatch'] = $exactMatch; } @@ -14765,10 +16994,10 @@ protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $app ); } // path params - if ($customerId !== null) { + if ($campaignId !== null) { $resourcePath = str_replace( - '{' . 'customerId' . '}', - ObjectSerializer::toPathValue($customerId), + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), $resourcePath ); } @@ -14843,54 +17072,46 @@ protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $app } /** - * Operation getCustomerActivityReports + * Operation getCustomerActivityReport * - * Get Activity Reports for Application Customers (with total count) + * Get Activity Report for Single Customer * * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId applicationId (required) + * @param int $customerId customerId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $name Only return reports matching the customer name (optional) - * @param string $integrationId Only return reports matching the integrationId (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\InlineResponse20014 + * @return \TalonOne\Client\Model\CustomerActivityReport */ - public function getCustomerActivityReports($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCustomerActivityReport($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) { - list($response) = $this->getCustomerActivityReportsWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + list($response) = $this->getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); return $response; } /** - * Operation getCustomerActivityReportsWithHttpInfo + * Operation getCustomerActivityReportWithHttpInfo * - * Get Activity Reports for Application Customers (with total count) + * Get Activity Report for Single Customer * * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) + * @param int $customerId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $name Only return reports matching the customer name (optional) - * @param string $integrationId Only return reports matching the integrationId (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\InlineResponse20014, 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 getCustomerActivityReportsWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) { - $request = $this->getCustomerActivityReportsRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -14923,20 +17144,20 @@ public function getCustomerActivityReportsWithHttpInfo($rangeStart, $rangeEnd, $ $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20014' === '\SplFileObject') { + if ('\TalonOne\Client\Model\CustomerActivityReport' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20014', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerActivityReport', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20014'; + $returnType = '\TalonOne\Client\Model\CustomerActivityReport'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -14955,7 +17176,7 @@ public function getCustomerActivityReportsWithHttpInfo($rangeStart, $rangeEnd, $ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20014', + '\TalonOne\Client\Model\CustomerActivityReport', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -14966,27 +17187,23 @@ public function getCustomerActivityReportsWithHttpInfo($rangeStart, $rangeEnd, $ } /** - * Operation getCustomerActivityReportsAsync + * Operation getCustomerActivityReportAsync * - * Get Activity Reports for Application Customers (with total count) + * Get Activity Report for Single Customer * * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) + * @param int $customerId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $name Only return reports matching the customer name (optional) - * @param string $integrationId Only return reports matching the integrationId (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 getCustomerActivityReportsAsync($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCustomerActivityReportAsync($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) { - return $this->getCustomerActivityReportsAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) + return $this->getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -14995,28 +17212,24 @@ function ($response) { } /** - * Operation getCustomerActivityReportsAsyncWithHttpInfo + * Operation getCustomerActivityReportAsyncWithHttpInfo * - * Get Activity Reports for Application Customers (with total count) + * Get Activity Report for Single Customer * * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) + * @param int $customerId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $name Only return reports matching the customer name (optional) - * @param string $integrationId Only return reports matching the integrationId (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 getCustomerActivityReportsAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20014'; - $request = $this->getCustomerActivityReportsRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + $returnType = '\TalonOne\Client\Model\CustomerActivityReport'; + $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15053,44 +17266,46 @@ function ($exception) { } /** - * Create request for operation 'getCustomerActivityReports' + * Create request for operation 'getCustomerActivityReport' * * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) + * @param int $customerId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $name Only return reports matching the customer name (optional) - * @param string $integrationId Only return reports matching the integrationId (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 getCustomerActivityReportsRequest($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $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 getCustomerActivityReports' + '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 getCustomerActivityReports' + '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 getCustomerActivityReports' + '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 getCustomerActivityReport' ); } - $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports'; + $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/{customerId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -15112,13 +17327,6 @@ protected function getCustomerActivityReportsRequest($rangeStart, $rangeEnd, $ap $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); } @@ -15132,34 +17340,6 @@ protected function getCustomerActivityReportsRequest($rangeStart, $rangeEnd, $ap 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 @@ -15170,6 +17350,14 @@ protected function getCustomerActivityReportsRequest($rangeStart, $rangeEnd, $ap $resourcePath ); } + // path params + if ($customerId !== null) { + $resourcePath = str_replace( + '{' . 'customerId' . '}', + ObjectSerializer::toPathValue($customerId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -15241,9 +17429,9 @@ protected function getCustomerActivityReportsRequest($rangeStart, $rangeEnd, $ap } /** - * Operation getCustomerActivityReportsWithoutTotalCount + * Operation getCustomerActivityReports * - * Get Activity Reports for Application Customers + * Get Activity Reports for Application Customers (with total count) * * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) @@ -15258,18 +17446,18 @@ protected function getCustomerActivityReportsRequest($rangeStart, $rangeEnd, $ap * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20015 + * @return \TalonOne\Client\Model\InlineResponse20014 */ - public function getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCustomerActivityReports($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - list($response) = $this->getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + list($response) = $this->getCustomerActivityReportsWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); return $response; } /** - * Operation getCustomerActivityReportsWithoutTotalCountWithHttpInfo + * Operation getCustomerActivityReportsWithHttpInfo * - * Get Activity Reports for Application Customers + * Get Activity Reports for Application Customers (with total count) * * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) @@ -15284,11 +17472,11 @@ public function getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeE * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20015, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20014, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCustomerActivityReportsWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + $request = $this->getCustomerActivityReportsRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); try { $options = $this->createHttpClientOption(); @@ -15321,20 +17509,20 @@ public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeSt $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20015' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20014' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20015', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20014', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20015'; + $returnType = '\TalonOne\Client\Model\InlineResponse20014'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -15353,7 +17541,7 @@ public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeSt case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20015', + '\TalonOne\Client\Model\InlineResponse20014', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -15364,9 +17552,9 @@ public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeSt } /** - * Operation getCustomerActivityReportsWithoutTotalCountAsync + * Operation getCustomerActivityReportsAsync * - * Get Activity Reports for Application Customers + * Get Activity Reports for Application Customers (with total count) * * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) @@ -15382,9 +17570,9 @@ public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeSt * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerActivityReportsWithoutTotalCountAsync($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCustomerActivityReportsAsync($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - return $this->getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) + return $this->getCustomerActivityReportsAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) ->then( function ($response) { return $response[0]; @@ -15393,9 +17581,9 @@ function ($response) { } /** - * Operation getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo + * Operation getCustomerActivityReportsAsyncWithHttpInfo * - * Get Activity Reports for Application Customers + * Get Activity Reports for Application Customers (with total count) * * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) @@ -15411,10 +17599,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCustomerActivityReportsAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20015'; - $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + $returnType = '\TalonOne\Client\Model\InlineResponse20014'; + $request = $this->getCustomerActivityReportsRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15451,7 +17639,7 @@ function ($exception) { } /** - * Create request for operation 'getCustomerActivityReportsWithoutTotalCount' + * Create request for operation 'getCustomerActivityReports' * * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) @@ -15467,28 +17655,28 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + protected function getCustomerActivityReportsRequest($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = 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 getCustomerActivityReportsWithoutTotalCount' + 'Missing the required parameter $rangeStart when calling getCustomerActivityReports' ); } // 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' + 'Missing the required parameter $rangeEnd when calling getCustomerActivityReports' ); } // 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' + 'Missing the required parameter $applicationId when calling getCustomerActivityReports' ); } - $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/no_total'; + $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports'; $formParams = []; $queryParams = []; $headerParams = []; @@ -15639,44 +17827,54 @@ protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStar } /** - * Operation getCustomerAnalytics + * Operation getCustomerActivityReportsWithoutTotalCount * - * Get Analytics Report for a Customer + * Get Activity Reports for Application Customers * + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId applicationId (required) - * @param int $customerId customerId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Only return reports matching the integrationId (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\CustomerAnalytics + * @return \TalonOne\Client\Model\InlineResponse20015 */ - public function getCustomerAnalytics($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) + public function getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - list($response) = $this->getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort); + list($response) = $this->getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); return $response; } /** - * Operation getCustomerAnalyticsWithHttpInfo + * Operation getCustomerActivityReportsWithoutTotalCountWithHttpInfo * - * Get Analytics Report for a Customer + * Get Activity Reports for Application Customers * + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) - * @param int $customerId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Only return reports matching the integrationId (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\CustomerAnalytics, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20015, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) + public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); + $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); try { $options = $this->createHttpClientOption(); @@ -15709,20 +17907,20 @@ public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $p $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\CustomerAnalytics' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20015' === '\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\InlineResponse20015', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; + $returnType = '\TalonOne\Client\Model\InlineResponse20015'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -15741,7 +17939,7 @@ public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $p case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\CustomerAnalytics', + '\TalonOne\Client\Model\InlineResponse20015', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -15752,22 +17950,27 @@ public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $p } /** - * Operation getCustomerAnalyticsAsync + * Operation getCustomerActivityReportsWithoutTotalCountAsync * - * Get Analytics Report for a Customer + * Get Activity Reports for Application Customers * + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) - * @param int $customerId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Only return reports matching the integrationId (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 getCustomerAnalyticsAsync($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) + public function getCustomerActivityReportsWithoutTotalCountAsync($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - return $this->getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort) + return $this->getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) ->then( function ($response) { return $response[0]; @@ -15776,23 +17979,28 @@ function ($response) { } /** - * Operation getCustomerAnalyticsAsyncWithHttpInfo + * Operation getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo * - * Get Analytics Report for a Customer + * Get Activity Reports for Application Customers * + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) - * @param int $customerId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Only return reports matching the integrationId (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 getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) + public function getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; - $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\InlineResponse20015'; + $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15829,33 +18037,44 @@ function ($exception) { } /** - * Create request for operation 'getCustomerAnalytics' + * Create request for operation 'getCustomerActivityReportsWithoutTotalCount' * + * @param \DateTime $rangeStart Only return results from after this timestamp, must be an RFC3339 timestamp string (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp, must be an RFC3339 timestamp string (required) * @param int $applicationId (required) - * @param int $customerId (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Only return reports matching the integrationId (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 getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) + protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = 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 getCustomerAnalytics' + 'Missing the required parameter $rangeStart when calling getCustomerActivityReportsWithoutTotalCount' ); } - // verify the required parameter 'customerId' is set - if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $customerId when calling getCustomerAnalytics' + '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' ); } - $resourcePath = '/v1/applications/{applicationId}/customers/{customerId}/analytics'; + $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/no_total'; $formParams = []; $queryParams = []; $headerParams = []; @@ -15883,6 +18102,48 @@ protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pag 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 @@ -15893,14 +18154,6 @@ protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pag $resourcePath ); } - // path params - if ($customerId !== null) { - $resourcePath = str_replace( - '{' . 'customerId' . '}', - ObjectSerializer::toPathValue($customerId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -15972,36 +18225,44 @@ protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pag } /** - * Operation getCustomerProfile + * Operation getCustomerAnalytics * - * Get Customer Profile + * Get Analytics Report for a Customer * + * @param int $applicationId applicationId (required) * @param int $customerId customerId (required) + * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\ApplicationCustomer + * @return \TalonOne\Client\Model\CustomerAnalytics */ - public function getCustomerProfile($customerId) + public function getCustomerAnalytics($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) { - list($response) = $this->getCustomerProfileWithHttpInfo($customerId); + list($response) = $this->getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort); return $response; } /** - * Operation getCustomerProfileWithHttpInfo + * Operation getCustomerAnalyticsWithHttpInfo * - * Get Customer Profile + * Get Analytics Report for a Customer * + * @param int $applicationId (required) * @param int $customerId (required) + * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @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\CustomerAnalytics, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerProfileWithHttpInfo($customerId) + public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) { - $request = $this->getCustomerProfileRequest($customerId); + $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -16034,20 +18295,20 @@ public function getCustomerProfileWithHttpInfo($customerId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\ApplicationCustomer' === '\SplFileObject') { + if ('\TalonOne\Client\Model\CustomerAnalytics' === '\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\CustomerAnalytics', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; + $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -16066,7 +18327,7 @@ public function getCustomerProfileWithHttpInfo($customerId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ApplicationCustomer', + '\TalonOne\Client\Model\CustomerAnalytics', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -16077,18 +18338,22 @@ public function getCustomerProfileWithHttpInfo($customerId) } /** - * Operation getCustomerProfileAsync + * Operation getCustomerAnalyticsAsync * - * Get Customer Profile + * Get Analytics Report for a Customer * + * @param int $applicationId (required) * @param int $customerId (required) + * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfileAsync($customerId) + public function getCustomerAnalyticsAsync($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) { - return $this->getCustomerProfileAsyncWithHttpInfo($customerId) + return $this->getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -16097,19 +18362,23 @@ function ($response) { } /** - * Operation getCustomerProfileAsyncWithHttpInfo + * Operation getCustomerAnalyticsAsyncWithHttpInfo * - * Get Customer Profile + * Get Analytics Report for a Customer * + * @param int $applicationId (required) * @param int $customerId (required) + * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfileAsyncWithHttpInfo($customerId) + public function getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; - $request = $this->getCustomerProfileRequest($customerId); + $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; + $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16146,31 +18415,70 @@ function ($exception) { } /** - * Create request for operation 'getCustomerProfile' + * Create request for operation 'getCustomerAnalytics' * + * @param int $applicationId (required) * @param int $customerId (required) + * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerProfileRequest($customerId) + protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize = null, $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 getCustomerProfile' + 'Missing the required parameter $customerId when calling getCustomerAnalytics' ); } - $resourcePath = '/v1/customers/{customerId}'; + $resourcePath = '/v1/applications/{applicationId}/customers/{customerId}/analytics'; $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 ($customerId !== null) { $resourcePath = str_replace( @@ -16250,38 +18558,36 @@ protected function getCustomerProfileRequest($customerId) } /** - * Operation getCustomerProfiles + * Operation getCustomerProfile * - * List Customer Profiles + * Get Customer Profile * - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $customerId customerId (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20013 + * @return \TalonOne\Client\Model\ApplicationCustomer */ - public function getCustomerProfiles($pageSize = null, $skip = null) + public function getCustomerProfile($customerId) { - list($response) = $this->getCustomerProfilesWithHttpInfo($pageSize, $skip); + list($response) = $this->getCustomerProfileWithHttpInfo($customerId); return $response; } /** - * Operation getCustomerProfilesWithHttpInfo + * Operation getCustomerProfileWithHttpInfo * - * List Customer Profiles + * Get Customer Profile * - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $customerId (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20013, 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 getCustomerProfilesWithHttpInfo($pageSize = null, $skip = null) + public function getCustomerProfileWithHttpInfo($customerId) { - $request = $this->getCustomerProfilesRequest($pageSize, $skip); + $request = $this->getCustomerProfileRequest($customerId); try { $options = $this->createHttpClientOption(); @@ -16314,20 +18620,20 @@ public function getCustomerProfilesWithHttpInfo($pageSize = null, $skip = null) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20013' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ApplicationCustomer' === '\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\ApplicationCustomer', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20013'; + $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -16346,7 +18652,7 @@ public function getCustomerProfilesWithHttpInfo($pageSize = null, $skip = null) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20013', + '\TalonOne\Client\Model\ApplicationCustomer', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -16357,19 +18663,18 @@ public function getCustomerProfilesWithHttpInfo($pageSize = null, $skip = null) } /** - * Operation getCustomerProfilesAsync + * Operation getCustomerProfileAsync * - * List Customer Profiles + * Get Customer Profile * - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $customerId (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfilesAsync($pageSize = null, $skip = null) + public function getCustomerProfileAsync($customerId) { - return $this->getCustomerProfilesAsyncWithHttpInfo($pageSize, $skip) + return $this->getCustomerProfileAsyncWithHttpInfo($customerId) ->then( function ($response) { return $response[0]; @@ -16378,20 +18683,19 @@ function ($response) { } /** - * Operation getCustomerProfilesAsyncWithHttpInfo + * Operation getCustomerProfileAsyncWithHttpInfo * - * List Customer Profiles + * Get Customer Profile * - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $customerId (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfilesAsyncWithHttpInfo($pageSize = null, $skip = null) + public function getCustomerProfileAsyncWithHttpInfo($customerId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20013'; - $request = $this->getCustomerProfilesRequest($pageSize, $skip); + $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; + $request = $this->getCustomerProfileRequest($customerId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16428,40 +18732,39 @@ function ($exception) { } /** - * Create request for operation 'getCustomerProfiles' + * Create request for operation 'getCustomerProfile' * - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) - * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $customerId (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerProfilesRequest($pageSize = null, $skip = null) + protected function getCustomerProfileRequest($customerId) { + // 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 getCustomerProfile' + ); + } - $resourcePath = '/v1/customers/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; - } + // path params + if ($customerId !== null) { + $resourcePath = str_replace( + '{' . 'customerId' . '}', + ObjectSerializer::toPathValue($customerId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -16533,11 +18836,10 @@ protected function getCustomerProfilesRequest($pageSize = null, $skip = null) } /** - * Operation getCustomersByAttributes + * Operation getCustomerProfiles * - * Get a list of the customer profiles that match the given attributes + * List Customer Profiles * - * @param \TalonOne\Client\Model\ApplicationCustomerSearch $body body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) * @@ -16545,18 +18847,17 @@ protected function getCustomerProfilesRequest($pageSize = null, $skip = null) * @throws \InvalidArgumentException * @return \TalonOne\Client\Model\InlineResponse20013 */ - public function getCustomersByAttributes($body, $pageSize = null, $skip = null) + public function getCustomerProfiles($pageSize = null, $skip = null) { - list($response) = $this->getCustomersByAttributesWithHttpInfo($body, $pageSize, $skip); + list($response) = $this->getCustomerProfilesWithHttpInfo($pageSize, $skip); return $response; } /** - * Operation getCustomersByAttributesWithHttpInfo + * Operation getCustomerProfilesWithHttpInfo * - * Get a list of the customer profiles that match the given attributes + * List Customer Profiles * - * @param \TalonOne\Client\Model\ApplicationCustomerSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) * @@ -16564,9 +18865,9 @@ public function getCustomersByAttributes($body, $pageSize = null, $skip = null) * @throws \InvalidArgumentException * @return array of \TalonOne\Client\Model\InlineResponse20013, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomersByAttributesWithHttpInfo($body, $pageSize = null, $skip = null) + public function getCustomerProfilesWithHttpInfo($pageSize = null, $skip = null) { - $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip); + $request = $this->getCustomerProfilesRequest($pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -16642,20 +18943,19 @@ public function getCustomersByAttributesWithHttpInfo($body, $pageSize = null, $s } /** - * Operation getCustomersByAttributesAsync + * Operation getCustomerProfilesAsync * - * Get a list of the customer profiles that match the given attributes + * List Customer Profiles * - * @param \TalonOne\Client\Model\ApplicationCustomerSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomersByAttributesAsync($body, $pageSize = null, $skip = null) + public function getCustomerProfilesAsync($pageSize = null, $skip = null) { - return $this->getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize, $skip) + return $this->getCustomerProfilesAsyncWithHttpInfo($pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -16664,21 +18964,20 @@ function ($response) { } /** - * Operation getCustomersByAttributesAsyncWithHttpInfo + * Operation getCustomerProfilesAsyncWithHttpInfo * - * Get a list of the customer profiles that match the given attributes + * List Customer Profiles * - * @param \TalonOne\Client\Model\ApplicationCustomerSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize = null, $skip = null) + public function getCustomerProfilesAsyncWithHttpInfo($pageSize = null, $skip = null) { $returnType = '\TalonOne\Client\Model\InlineResponse20013'; - $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip); + $request = $this->getCustomerProfilesRequest($pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16715,25 +19014,18 @@ function ($exception) { } /** - * Create request for operation 'getCustomersByAttributes' + * Create request for operation 'getCustomerProfiles' * - * @param \TalonOne\Client\Model\ApplicationCustomerSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomersByAttributesRequest($body, $pageSize = null, $skip = null) + protected function getCustomerProfilesRequest($pageSize = null, $skip = null) { - // 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' - ); - } - $resourcePath = '/v1/customer_search/no_total'; + $resourcePath = '/v1/customers/no_total'; $formParams = []; $queryParams = []; $headerParams = []; @@ -16759,9 +19051,6 @@ protected function getCustomersByAttributesRequest($body, $pageSize = null, $ski // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -16770,7 +19059,7 @@ protected function getCustomersByAttributesRequest($body, $pageSize = null, $ski } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -16822,7 +19111,7 @@ protected function getCustomersByAttributesRequest($body, $pageSize = null, $ski $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -16830,46 +19119,40 @@ protected function getCustomersByAttributesRequest($body, $pageSize = null, $ski } /** - * Operation getEventTypes + * Operation getCustomersByAttributes * - * List Event Types + * Get a list of the customer profiles that match the given attributes * - * @param string $applicationIds Filter by one or more application ids separated by comma (optional) - * @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 \TalonOne\Client\Model\ApplicationCustomerSearch $body body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20025 + * @return \TalonOne\Client\Model\InlineResponse20013 */ - public function getEventTypes($applicationIds = null, $name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) + public function getCustomersByAttributes($body, $pageSize = null, $skip = null) { - list($response) = $this->getEventTypesWithHttpInfo($applicationIds, $name, $includeOldVersions, $pageSize, $skip, $sort); + list($response) = $this->getCustomersByAttributesWithHttpInfo($body, $pageSize, $skip); return $response; } /** - * Operation getEventTypesWithHttpInfo + * Operation getCustomersByAttributesWithHttpInfo * - * List Event Types + * Get a list of the customer profiles that match the given attributes * - * @param string $applicationIds Filter by one or more application ids separated by comma (optional) - * @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 \TalonOne\Client\Model\ApplicationCustomerSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @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\InlineResponse20013, HTTP status code, HTTP response headers (array of strings) */ - public function getEventTypesWithHttpInfo($applicationIds = null, $name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) + public function getCustomersByAttributesWithHttpInfo($body, $pageSize = null, $skip = null) { - $request = $this->getEventTypesRequest($applicationIds, $name, $includeOldVersions, $pageSize, $skip, $sort); + $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -16902,20 +19185,20 @@ public function getEventTypesWithHttpInfo($applicationIds = null, $name = null, $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20025' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20013' === '\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\InlineResponse20013', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20025'; + $returnType = '\TalonOne\Client\Model\InlineResponse20013'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -16934,7 +19217,7 @@ public function getEventTypesWithHttpInfo($applicationIds = null, $name = null, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20025', + '\TalonOne\Client\Model\InlineResponse20013', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -16945,23 +19228,20 @@ public function getEventTypesWithHttpInfo($applicationIds = null, $name = null, } /** - * Operation getEventTypesAsync + * Operation getCustomersByAttributesAsync * - * List Event Types + * Get a list of the customer profiles that match the given attributes * - * @param string $applicationIds Filter by one or more application ids separated by comma (optional) - * @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 \TalonOne\Client\Model\ApplicationCustomerSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventTypesAsync($applicationIds = null, $name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) + public function getCustomersByAttributesAsync($body, $pageSize = null, $skip = null) { - return $this->getEventTypesAsyncWithHttpInfo($applicationIds, $name, $includeOldVersions, $pageSize, $skip, $sort) + return $this->getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -16970,24 +19250,21 @@ function ($response) { } /** - * Operation getEventTypesAsyncWithHttpInfo + * Operation getCustomersByAttributesAsyncWithHttpInfo * - * List Event Types + * Get a list of the customer profiles that match the given attributes * - * @param string $applicationIds Filter by one or more application ids separated by comma (optional) - * @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 \TalonOne\Client\Model\ApplicationCustomerSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventTypesAsyncWithHttpInfo($applicationIds = null, $name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) + public function getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize = null, $skip = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20025'; - $request = $this->getEventTypesRequest($applicationIds, $name, $includeOldVersions, $pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\InlineResponse20013'; + $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17024,49 +19301,31 @@ function ($exception) { } /** - * Create request for operation 'getEventTypes' + * Create request for operation 'getCustomersByAttributes' * - * @param string $applicationIds Filter by one or more application ids separated by comma (optional) - * @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 \TalonOne\Client\Model\ApplicationCustomerSearch $body (required) * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getEventTypesRequest($applicationIds = null, $name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) + protected function getCustomersByAttributesRequest($body, $pageSize = null, $skip = null) { + // 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' + ); + } - $resourcePath = '/v1/event_types'; + $resourcePath = '/v1/customer_search/no_total'; $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($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); @@ -17081,18 +19340,14 @@ protected function getEventTypesRequest($applicationIds = null, $name = null, $i 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; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -17101,7 +19356,7 @@ protected function getEventTypesRequest($applicationIds = null, $name = null, $i } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -17153,7 +19408,7 @@ protected function getEventTypesRequest($applicationIds = null, $name = null, $i $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -17161,44 +19416,46 @@ protected function getEventTypesRequest($applicationIds = null, $name = null, $i } /** - * Operation getExports + * Operation getEventTypes * - * Get Exports + * List Event Types * + * @param string $applicationIds Filter by one or more application ids separated by comma (optional) + * @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 to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param int $applicationId applicationId (optional) - * @param int $campaignId campaignId (optional) - * @param string $entity The name of the entity type that was exported. (optional) + * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20028 + * @return \TalonOne\Client\Model\InlineResponse20026 */ - public function getExports($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getEventTypes($applicationIds = null, $name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) { - list($response) = $this->getExportsWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity); + list($response) = $this->getEventTypesWithHttpInfo($applicationIds, $name, $includeOldVersions, $pageSize, $skip, $sort); return $response; } /** - * Operation getExportsWithHttpInfo + * Operation getEventTypesWithHttpInfo * - * Get Exports + * List Event Types * + * @param string $applicationIds Filter by one or more application ids separated by comma (optional) + * @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 to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param int $applicationId (optional) - * @param int $campaignId (optional) - * @param string $entity The name of the entity type that was exported. (optional) + * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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\InlineResponse20026, HTTP status code, HTTP response headers (array of strings) */ - public function getExportsWithHttpInfo($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getEventTypesWithHttpInfo($applicationIds = null, $name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) { - $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); + $request = $this->getEventTypesRequest($applicationIds, $name, $includeOldVersions, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -17231,20 +19488,20 @@ public function getExportsWithHttpInfo($pageSize = null, $skip = null, $applicat $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20028' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20026' === '\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\InlineResponse20026', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20028'; + $returnType = '\TalonOne\Client\Model\InlineResponse20026'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -17263,7 +19520,7 @@ public function getExportsWithHttpInfo($pageSize = null, $skip = null, $applicat case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20028', + '\TalonOne\Client\Model\InlineResponse20026', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -17274,22 +19531,23 @@ public function getExportsWithHttpInfo($pageSize = null, $skip = null, $applicat } /** - * Operation getExportsAsync + * Operation getEventTypesAsync * - * Get Exports + * List Event Types * + * @param string $applicationIds Filter by one or more application ids separated by comma (optional) + * @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 to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param int $applicationId (optional) - * @param int $campaignId (optional) - * @param string $entity The name of the entity type that was exported. (optional) + * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getExportsAsync($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getEventTypesAsync($applicationIds = null, $name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) { - return $this->getExportsAsyncWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity) + return $this->getEventTypesAsyncWithHttpInfo($applicationIds, $name, $includeOldVersions, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -17298,23 +19556,24 @@ function ($response) { } /** - * Operation getExportsAsyncWithHttpInfo + * Operation getEventTypesAsyncWithHttpInfo * - * Get Exports + * List Event Types * + * @param string $applicationIds Filter by one or more application ids separated by comma (optional) + * @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 to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param int $applicationId (optional) - * @param int $campaignId (optional) - * @param string $entity The name of the entity type that was exported. (optional) + * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getExportsAsyncWithHttpInfo($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getEventTypesAsyncWithHttpInfo($applicationIds = null, $name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20028'; - $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); + $returnType = '\TalonOne\Client\Model\InlineResponse20026'; + $request = $this->getEventTypesRequest($applicationIds, $name, $includeOldVersions, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17351,27 +19610,49 @@ function ($exception) { } /** - * Create request for operation 'getExports' + * Create request for operation 'getEventTypes' * + * @param string $applicationIds Filter by one or more application ids separated by comma (optional) + * @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 to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param int $applicationId (optional) - * @param int $campaignId (optional) - * @param string $entity The name of the entity type that was exported. (optional) + * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getExportsRequest($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + protected function getEventTypesRequest($applicationIds = null, $name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) { - $resourcePath = '/v1/exports'; + $resourcePath = '/v1/event_types'; $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($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); @@ -17387,25 +19668,11 @@ protected function getExportsRequest($pageSize = null, $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($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); } - if ($entity !== null) { - $queryParams['entity'] = $entity; + if ($sort !== null) { + $queryParams['sort'] = $sort; } @@ -17480,38 +19747,44 @@ protected function getExportsRequest($pageSize = null, $skip = null, $applicatio } /** - * Operation getImports + * Operation getExports * - * Get Imports + * Get Exports * * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $applicationId applicationId (optional) + * @param int $campaignId campaignId (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\InlineResponse20029 */ - public function getImports($pageSize = null, $skip = null) + public function getExports($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - list($response) = $this->getImportsWithHttpInfo($pageSize, $skip); + list($response) = $this->getExportsWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity); return $response; } /** - * Operation getImportsWithHttpInfo + * Operation getExportsWithHttpInfo * - * Get Imports + * Get Exports * * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $applicationId (optional) + * @param int $campaignId (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\InlineResponse20029, HTTP status code, HTTP response headers (array of strings) */ - public function getImportsWithHttpInfo($pageSize = null, $skip = null) + public function getExportsWithHttpInfo($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - $request = $this->getImportsRequest($pageSize, $skip); + $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); try { $options = $this->createHttpClientOption(); @@ -17587,19 +19860,22 @@ public function getImportsWithHttpInfo($pageSize = null, $skip = null) } /** - * Operation getImportsAsync + * Operation getExportsAsync * - * Get Imports + * Get Exports * * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $applicationId (optional) + * @param int $campaignId (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getImportsAsync($pageSize = null, $skip = null) + public function getExportsAsync($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - return $this->getImportsAsyncWithHttpInfo($pageSize, $skip) + return $this->getExportsAsyncWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity) ->then( function ($response) { return $response[0]; @@ -17608,20 +19884,23 @@ function ($response) { } /** - * Operation getImportsAsyncWithHttpInfo + * Operation getExportsAsyncWithHttpInfo * - * Get Imports + * Get Exports * * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $applicationId (optional) + * @param int $campaignId (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getImportsAsyncWithHttpInfo($pageSize = null, $skip = null) + public function getExportsAsyncWithHttpInfo($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { $returnType = '\TalonOne\Client\Model\InlineResponse20029'; - $request = $this->getImportsRequest($pageSize, $skip); + $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17658,18 +19937,21 @@ function ($exception) { } /** - * Create request for operation 'getImports' + * Create request for operation 'getExports' * * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param int $applicationId (optional) + * @param int $campaignId (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getImportsRequest($pageSize = null, $skip = null) + protected function getExportsRequest($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - $resourcePath = '/v1/imports'; + $resourcePath = '/v1/exports'; $formParams = []; $queryParams = []; $headerParams = []; @@ -17690,6 +19972,27 @@ protected function getImportsRequest($pageSize = null, $skip = null) if ($skip !== null) { $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 ($entity !== null) { + $queryParams['entity'] = $entity; + } @@ -18885,8 +21188,8 @@ protected function getLoyaltyStatisticsRequest($programID) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. (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 Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. (optional) * @param string $advocate Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field (optional) @@ -18912,8 +21215,8 @@ public function getReferrals($applicationId, $campaignId, $pageSize = null, $ski * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. (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 Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. (optional) * @param string $advocate Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field (optional) @@ -19010,8 +21313,8 @@ public function getReferralsWithHttpInfo($applicationId, $campaignId, $pageSize * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. (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 Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. (optional) * @param string $advocate Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field (optional) @@ -19040,8 +21343,8 @@ function ($response) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. (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 Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. (optional) * @param string $advocate Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field (optional) @@ -19097,8 +21400,8 @@ function ($exception) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. (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 Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. (optional) * @param string $advocate Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field (optional) @@ -19290,8 +21593,8 @@ protected function getReferralsRequest($applicationId, $campaignId, $pageSize = * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. (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 Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. (optional) * @param string $advocate Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field (optional) @@ -19317,8 +21620,8 @@ public function getReferralsWithoutTotalCount($applicationId, $campaignId, $page * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. (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 Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. (optional) * @param string $advocate Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field (optional) @@ -19415,8 +21718,8 @@ public function getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campa * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. (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 Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. (optional) * @param string $advocate Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field (optional) @@ -19445,8 +21748,8 @@ function ($response) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. (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 Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. (optional) * @param string $advocate Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field (optional) @@ -19502,8 +21805,8 @@ function ($exception) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. (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 Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiry date is set and in the past. The second matches referrals in which start date is null or in the past and expiry date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) * @param string $usable Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. (optional) * @param string $advocate Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field (optional) @@ -19687,7 +21990,7 @@ protected function getReferralsWithoutTotalCountRequest($applicationId, $campaig /** * Operation getRole * - * Get information for the specified role. + * Get information for the specified role * * @param int $roleId roleId (required) * @@ -19704,7 +22007,7 @@ public function getRole($roleId) /** * Operation getRoleWithHttpInfo * - * Get information for the specified role. + * Get information for the specified role * * @param int $roleId (required) * @@ -19792,7 +22095,7 @@ public function getRoleWithHttpInfo($roleId) /** * Operation getRoleAsync * - * Get information for the specified role. + * Get information for the specified role * * @param int $roleId (required) * @@ -19812,7 +22115,7 @@ function ($response) { /** * Operation getRoleAsyncWithHttpInfo * - * Get information for the specified role. + * Get information for the specified role * * @param int $roleId (required) * @@ -20900,7 +23203,7 @@ protected function getUserRequest($userId) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20026 + * @return \TalonOne\Client\Model\InlineResponse20027 */ public function getUsers($pageSize = null, $skip = null, $sort = null) { @@ -20919,7 +23222,7 @@ public function getUsers($pageSize = null, $skip = null, $sort = null) * * @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\InlineResponse20027, HTTP status code, HTTP response headers (array of strings) */ public function getUsersWithHttpInfo($pageSize = null, $skip = null, $sort = null) { @@ -20956,20 +23259,20 @@ public function getUsersWithHttpInfo($pageSize = null, $skip = null, $sort = nul $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20026' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20027' === '\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\InlineResponse20027', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20026'; + $returnType = '\TalonOne\Client\Model\InlineResponse20027'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -20988,7 +23291,7 @@ public function getUsersWithHttpInfo($pageSize = null, $skip = null, $sort = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20026', + '\TalonOne\Client\Model\InlineResponse20027', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -21034,7 +23337,7 @@ function ($response) { */ public function getUsersAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20026'; + $returnType = '\TalonOne\Client\Model\InlineResponse20027'; $request = $this->getUsersRequest($pageSize, $skip, $sort); return $this->client @@ -21474,12 +23777,12 @@ protected function getWebhookRequest($webhookId) * @param float $webhookId Filter results by Webhook. (optional) * @param float $applicationId applicationId (optional) * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. (optional) - * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. (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 Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. 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\InlineResponse20023 + * @return \TalonOne\Client\Model\InlineResponse20024 */ public function getWebhookActivationLogs($pageSize = null, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) { @@ -21499,12 +23802,12 @@ public function getWebhookActivationLogs($pageSize = null, $skip = null, $sort = * @param float $webhookId Filter results by Webhook. (optional) * @param float $applicationId (optional) * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. (optional) - * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. (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 Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. 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\InlineResponse20023, 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 getWebhookActivationLogsWithHttpInfo($pageSize = null, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) { @@ -21541,20 +23844,20 @@ public function getWebhookActivationLogsWithHttpInfo($pageSize = null, $skip = n $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20023' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20024' === '\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\InlineResponse20024', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20023'; + $returnType = '\TalonOne\Client\Model\InlineResponse20024'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -21573,7 +23876,7 @@ public function getWebhookActivationLogsWithHttpInfo($pageSize = null, $skip = n case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20023', + '\TalonOne\Client\Model\InlineResponse20024', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -21595,8 +23898,8 @@ public function getWebhookActivationLogsWithHttpInfo($pageSize = null, $skip = n * @param float $webhookId Filter results by Webhook. (optional) * @param float $applicationId (optional) * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. (optional) - * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. (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 Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -21623,15 +23926,15 @@ function ($response) { * @param float $webhookId Filter results by Webhook. (optional) * @param float $applicationId (optional) * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. (optional) - * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. (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 Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ public function getWebhookActivationLogsAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20023'; + $returnType = '\TalonOne\Client\Model\InlineResponse20024'; $request = $this->getWebhookActivationLogsRequest($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); return $this->client @@ -21678,8 +23981,8 @@ function ($exception) { * @param float $webhookId Filter results by Webhook. (optional) * @param float $applicationId (optional) * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. (optional) - * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. (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 Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -21842,12 +24145,12 @@ protected function getWebhookActivationLogsRequest($pageSize = null, $skip = nul * @param float $applicationId applicationId (optional) * @param float $campaignId Filter results by campaign. (optional) * @param string $requestUuid Filter results by request UUID. (optional) - * @param \DateTime $createdBefore Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. (optional) - * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdBefore Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. 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\InlineResponse20024 + * @return \TalonOne\Client\Model\InlineResponse20025 */ public function getWebhookLogs($pageSize = null, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) { @@ -21868,12 +24171,12 @@ public function getWebhookLogs($pageSize = null, $skip = null, $sort = null, $st * @param float $applicationId (optional) * @param float $campaignId Filter results by campaign. (optional) * @param string $requestUuid Filter results by request UUID. (optional) - * @param \DateTime $createdBefore Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. (optional) - * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdBefore Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. 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\InlineResponse20024, 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 getWebhookLogsWithHttpInfo($pageSize = null, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) { @@ -21910,20 +24213,20 @@ public function getWebhookLogsWithHttpInfo($pageSize = null, $skip = null, $sort $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20024' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20025' === '\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\InlineResponse20025', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20024'; + $returnType = '\TalonOne\Client\Model\InlineResponse20025'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -21942,7 +24245,7 @@ public function getWebhookLogsWithHttpInfo($pageSize = null, $skip = null, $sort case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20024', + '\TalonOne\Client\Model\InlineResponse20025', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -21965,8 +24268,8 @@ public function getWebhookLogsWithHttpInfo($pageSize = null, $skip = null, $sort * @param float $applicationId (optional) * @param float $campaignId Filter results by campaign. (optional) * @param string $requestUuid Filter results by request UUID. (optional) - * @param \DateTime $createdBefore Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. (optional) - * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdBefore Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -21994,15 +24297,15 @@ function ($response) { * @param float $applicationId (optional) * @param float $campaignId Filter results by campaign. (optional) * @param string $requestUuid Filter results by request UUID. (optional) - * @param \DateTime $createdBefore Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. (optional) - * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdBefore Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ public function getWebhookLogsAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20024'; + $returnType = '\TalonOne\Client\Model\InlineResponse20025'; $request = $this->getWebhookLogsRequest($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter); return $this->client @@ -22050,8 +24353,8 @@ function ($exception) { * @param float $applicationId (optional) * @param float $campaignId Filter results by campaign. (optional) * @param string $requestUuid Filter results by request UUID. (optional) - * @param \DateTime $createdBefore Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. (optional) - * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. (optional) + * @param \DateTime $createdBefore Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -22220,7 +24523,7 @@ protected function getWebhookLogsRequest($pageSize = null, $skip = null, $sort = * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20022 + * @return \TalonOne\Client\Model\InlineResponse20023 */ public function getWebhooks($applicationIds = null, $sort = null, $pageSize = null, $skip = null) { @@ -22240,7 +24543,7 @@ public function getWebhooks($applicationIds = null, $sort = null, $pageSize = nu * * @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\InlineResponse20023, HTTP status code, HTTP response headers (array of strings) */ public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $pageSize = null, $skip = null) { @@ -22277,20 +24580,20 @@ public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $p $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20022' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20023' === '\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\InlineResponse20023', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20022'; + $returnType = '\TalonOne\Client\Model\InlineResponse20023'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -22309,7 +24612,7 @@ public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $p case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20022', + '\TalonOne\Client\Model\InlineResponse20023', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -22357,7 +24660,7 @@ function ($response) { */ public function getWebhooksAsyncWithHttpInfo($applicationIds = null, $sort = null, $pageSize = null, $skip = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20022'; + $returnType = '\TalonOne\Client\Model\InlineResponse20023'; $request = $this->getWebhooksRequest($applicationIds, $sort, $pageSize, $skip); return $this->client @@ -23063,8 +25366,8 @@ protected function resetPasswordRequest($body) * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -23094,8 +25397,8 @@ public function searchCouponsAdvanced($applicationId, $campaignId, $body, $pageS * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -23196,8 +25499,8 @@ public function searchCouponsAdvancedWithHttpInfo($applicationId, $campaignId, $ * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -23230,8 +25533,8 @@ function ($response) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -23291,8 +25594,8 @@ function ($exception) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -23517,8 +25820,8 @@ protected function searchCouponsAdvancedRequest($applicationId, $campaignId, $bo * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -23548,8 +25851,8 @@ public function searchCouponsAdvancedApplicationWide($applicationId, $body, $pag * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -23650,8 +25953,8 @@ public function searchCouponsAdvancedApplicationWideWithHttpInfo($applicationId, * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -23684,8 +25987,8 @@ function ($response) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -23745,8 +26048,8 @@ function ($exception) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -23965,8 +26268,8 @@ protected function searchCouponsAdvancedApplicationWideRequest($applicationId, $ * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -23996,8 +26299,8 @@ public function searchCouponsAdvancedApplicationWideWithoutTotalCount($applicati * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -24098,8 +26401,8 @@ public function searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInf * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -24132,8 +26435,8 @@ function ($response) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -24193,8 +26496,8 @@ function ($exception) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -24414,8 +26717,8 @@ protected function searchCouponsAdvancedApplicationWideWithoutTotalCountRequest( * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -24445,8 +26748,8 @@ public function searchCouponsAdvancedWithoutTotalCount($applicationId, $campaign * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -24547,8 +26850,8 @@ public function searchCouponsAdvancedWithoutTotalCountWithHttpInfo($applicationI * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -24581,8 +26884,8 @@ function ($response) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) @@ -24642,8 +26945,8 @@ function ($exception) { * @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. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (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. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. (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 expiry date is set and in the past. The second matches coupons in which start date is null or in the past and expiry 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, that meaning the coupons that had been created as an effect of the usage of a referral code. (optional) diff --git a/lib/Configuration.php b/lib/Configuration.php index 12002c3a..0ad0adbc 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -88,7 +88,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/3.3.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/3.4.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: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 3.3.0' . PHP_EOL; + $report .= ' SDK Package Version: 3.4.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/AddLoyaltyPointsEffectProps.php b/lib/Model/AddLoyaltyPointsEffectProps.php index b4e547c1..03982935 100644 --- a/lib/Model/AddLoyaltyPointsEffectProps.php +++ b/lib/Model/AddLoyaltyPointsEffectProps.php @@ -64,7 +64,8 @@ class AddLoyaltyPointsEffectProps implements ModelInterface, ArrayAccess 'value' => 'float', 'recipientIntegrationId' => 'string', 'startDate' => '\DateTime', - 'expiryDate' => '\DateTime' + 'expiryDate' => '\DateTime', + 'transactionUUID' => 'string' ]; /** @@ -79,7 +80,8 @@ class AddLoyaltyPointsEffectProps implements ModelInterface, ArrayAccess 'value' => null, 'recipientIntegrationId' => null, 'startDate' => 'date-time', - 'expiryDate' => 'date-time' + 'expiryDate' => 'date-time', + 'transactionUUID' => null ]; /** @@ -115,7 +117,8 @@ public static function openAPIFormats() 'value' => 'value', 'recipientIntegrationId' => 'recipientIntegrationId', 'startDate' => 'startDate', - 'expiryDate' => 'expiryDate' + 'expiryDate' => 'expiryDate', + 'transactionUUID' => 'transactionUUID' ]; /** @@ -130,7 +133,8 @@ public static function openAPIFormats() 'value' => 'setValue', 'recipientIntegrationId' => 'setRecipientIntegrationId', 'startDate' => 'setStartDate', - 'expiryDate' => 'setExpiryDate' + 'expiryDate' => 'setExpiryDate', + 'transactionUUID' => 'setTransactionUUID' ]; /** @@ -145,7 +149,8 @@ public static function openAPIFormats() 'value' => 'getValue', 'recipientIntegrationId' => 'getRecipientIntegrationId', 'startDate' => 'getStartDate', - 'expiryDate' => 'getExpiryDate' + 'expiryDate' => 'getExpiryDate', + 'transactionUUID' => 'getTransactionUUID' ]; /** @@ -215,6 +220,7 @@ public function __construct(array $data = null) $this->container['recipientIntegrationId'] = isset($data['recipientIntegrationId']) ? $data['recipientIntegrationId'] : null; $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; + $this->container['transactionUUID'] = isset($data['transactionUUID']) ? $data['transactionUUID'] : null; } /** @@ -241,6 +247,9 @@ public function listInvalidProperties() if ($this->container['recipientIntegrationId'] === null) { $invalidProperties[] = "'recipientIntegrationId' can't be null"; } + if ($this->container['transactionUUID'] === null) { + $invalidProperties[] = "'transactionUUID' can't be null"; + } return $invalidProperties; } @@ -423,6 +432,30 @@ public function setExpiryDate($expiryDate) return $this; } + + /** + * Gets transactionUUID + * + * @return string + */ + public function getTransactionUUID() + { + return $this->container['transactionUUID']; + } + + /** + * Sets transactionUUID + * + * @param string $transactionUUID The identifier of this addition in the loyalty ledger + * + * @return $this + */ + public function setTransactionUUID($transactionUUID) + { + $this->container['transactionUUID'] = $transactionUUID; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Application.php b/lib/Model/Application.php index 07840fea..c77a09ad 100644 --- a/lib/Model/Application.php +++ b/lib/Model/Application.php @@ -71,6 +71,7 @@ class Application implements ModelInterface, ArrayAccess 'limits' => '\TalonOne\Client\Model\LimitConfig[]', 'campaignPriority' => 'string', 'exclusiveCampaignsStrategy' => 'string', + 'defaultDiscountScope' => 'string', 'enableCascadingDiscounts' => 'bool', 'enableFlattenedCartItems' => 'bool', 'attributesSettings' => '\TalonOne\Client\Model\AttributesSettings', @@ -97,6 +98,7 @@ class Application implements ModelInterface, ArrayAccess 'limits' => null, 'campaignPriority' => null, 'exclusiveCampaignsStrategy' => null, + 'defaultDiscountScope' => null, 'enableCascadingDiscounts' => null, 'enableFlattenedCartItems' => null, 'attributesSettings' => null, @@ -144,6 +146,7 @@ public static function openAPIFormats() 'limits' => 'limits', 'campaignPriority' => 'campaignPriority', 'exclusiveCampaignsStrategy' => 'exclusiveCampaignsStrategy', + 'defaultDiscountScope' => 'defaultDiscountScope', 'enableCascadingDiscounts' => 'enableCascadingDiscounts', 'enableFlattenedCartItems' => 'enableFlattenedCartItems', 'attributesSettings' => 'attributesSettings', @@ -170,6 +173,7 @@ public static function openAPIFormats() 'limits' => 'setLimits', 'campaignPriority' => 'setCampaignPriority', 'exclusiveCampaignsStrategy' => 'setExclusiveCampaignsStrategy', + 'defaultDiscountScope' => 'setDefaultDiscountScope', 'enableCascadingDiscounts' => 'setEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'setEnableFlattenedCartItems', 'attributesSettings' => 'setAttributesSettings', @@ -196,6 +200,7 @@ public static function openAPIFormats() 'limits' => 'getLimits', 'campaignPriority' => 'getCampaignPriority', 'exclusiveCampaignsStrategy' => 'getExclusiveCampaignsStrategy', + 'defaultDiscountScope' => 'getDefaultDiscountScope', 'enableCascadingDiscounts' => 'getEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'getEnableFlattenedCartItems', 'attributesSettings' => 'getAttributesSettings', @@ -253,6 +258,9 @@ public function getModelName() 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'; @@ -298,6 +306,20 @@ public function getExclusiveCampaignsStrategyAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDefaultDiscountScopeAllowableValues() + { + return [ + self::DEFAULT_DISCOUNT_SCOPE_SESSION_TOTAL, + self::DEFAULT_DISCOUNT_SCOPE_CART_ITEMS, + self::DEFAULT_DISCOUNT_SCOPE_ADDITIONAL_COSTS, + ]; + } + /** * Associative array for storing property values @@ -327,6 +349,7 @@ public function __construct(array $data = null) $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; $this->container['campaignPriority'] = isset($data['campaignPriority']) ? $data['campaignPriority'] : null; $this->container['exclusiveCampaignsStrategy'] = isset($data['exclusiveCampaignsStrategy']) ? $data['exclusiveCampaignsStrategy'] : null; + $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; $this->container['attributesSettings'] = isset($data['attributesSettings']) ? $data['attributesSettings'] : null; @@ -400,6 +423,14 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getDefaultDiscountScopeAllowableValues(); + if (!is_null($this->container['defaultDiscountScope']) && !in_array($this->container['defaultDiscountScope'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'defaultDiscountScope', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + if ($this->container['loyaltyPrograms'] === null) { $invalidProperties[] = "'loyaltyPrograms' can't be null"; } @@ -772,6 +803,39 @@ public function setExclusiveCampaignsStrategy($exclusiveCampaignsStrategy) return $this; } + /** + * Gets defaultDiscountScope + * + * @return string|null + */ + public function getDefaultDiscountScope() + { + return $this->container['defaultDiscountScope']; + } + + /** + * Sets defaultDiscountScope + * + * @param string|null $defaultDiscountScope The default scope to apply \"setDiscount\" effects on if no scope was provided with the effect. + * + * @return $this + */ + public function setDefaultDiscountScope($defaultDiscountScope) + { + $allowedValues = $this->getDefaultDiscountScopeAllowableValues(); + if (!is_null($defaultDiscountScope) && !in_array($defaultDiscountScope, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'defaultDiscountScope', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['defaultDiscountScope'] = $defaultDiscountScope; + + return $this; + } + /** * Gets enableCascadingDiscounts * diff --git a/lib/Model/ApplicationAPIKey.php b/lib/Model/ApplicationAPIKey.php index 91e503ae..cc61fc89 100644 --- a/lib/Model/ApplicationAPIKey.php +++ b/lib/Model/ApplicationAPIKey.php @@ -198,6 +198,7 @@ public function getModelName() const PLATFORM_SEGMENT = 'segment'; const PLATFORM_BRAZE = 'braze'; const PLATFORM_MPARTICLE = 'mparticle'; + const PLATFORM_SELLIGENT = 'selligent'; @@ -213,6 +214,7 @@ public function getPlatformAllowableValues() self::PLATFORM_SEGMENT, self::PLATFORM_BRAZE, self::PLATFORM_MPARTICLE, + self::PLATFORM_SELLIGENT, ]; } diff --git a/lib/Model/ApplicationEvent.php b/lib/Model/ApplicationEvent.php index 33d7fbc4..35154cc7 100644 --- a/lib/Model/ApplicationEvent.php +++ b/lib/Model/ApplicationEvent.php @@ -65,7 +65,8 @@ class ApplicationEvent implements ModelInterface, ArrayAccess 'sessionId' => 'int', 'type' => 'string', 'attributes' => 'object', - 'effects' => 'object[]' + 'effects' => 'object[]', + 'ruleFailureReasons' => '\TalonOne\Client\Model\RuleFailureReason[]' ]; /** @@ -81,7 +82,8 @@ class ApplicationEvent implements ModelInterface, ArrayAccess 'sessionId' => null, 'type' => null, 'attributes' => null, - 'effects' => null + 'effects' => null, + 'ruleFailureReasons' => null ]; /** @@ -118,7 +120,8 @@ public static function openAPIFormats() 'sessionId' => 'sessionId', 'type' => 'type', 'attributes' => 'attributes', - 'effects' => 'effects' + 'effects' => 'effects', + 'ruleFailureReasons' => 'ruleFailureReasons' ]; /** @@ -134,7 +137,8 @@ public static function openAPIFormats() 'sessionId' => 'setSessionId', 'type' => 'setType', 'attributes' => 'setAttributes', - 'effects' => 'setEffects' + 'effects' => 'setEffects', + 'ruleFailureReasons' => 'setRuleFailureReasons' ]; /** @@ -150,7 +154,8 @@ public static function openAPIFormats() 'sessionId' => 'getSessionId', 'type' => 'getType', 'attributes' => 'getAttributes', - 'effects' => 'getEffects' + 'effects' => 'getEffects', + 'ruleFailureReasons' => 'getRuleFailureReasons' ]; /** @@ -221,6 +226,7 @@ public function __construct(array $data = null) $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['effects'] = isset($data['effects']) ? $data['effects'] : null; + $this->container['ruleFailureReasons'] = isset($data['ruleFailureReasons']) ? $data['ruleFailureReasons'] : null; } /** @@ -456,6 +462,30 @@ public function setEffects($effects) 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 An array containing the rule failure reasons which happened during this event. + * + * @return $this + */ + public function setRuleFailureReasons($ruleFailureReasons) + { + $this->container['ruleFailureReasons'] = $ruleFailureReasons; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Binding.php b/lib/Model/Binding.php index 5364f568..5446e38c 100644 --- a/lib/Model/Binding.php +++ b/lib/Model/Binding.php @@ -58,6 +58,7 @@ class Binding implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'name' => 'string', + 'type' => 'string', 'expression' => 'object[]' ]; @@ -68,6 +69,7 @@ class Binding implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'name' => null, + 'type' => null, 'expression' => null ]; @@ -99,6 +101,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'name' => 'name', + 'type' => 'type', 'expression' => 'expression' ]; @@ -109,6 +112,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'name' => 'setName', + 'type' => 'setType', 'expression' => 'setExpression' ]; @@ -119,6 +123,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'name' => 'getName', + 'type' => 'getType', 'expression' => 'getExpression' ]; @@ -183,6 +188,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['expression'] = isset($data['expression']) ? $data['expression'] : null; } @@ -240,6 +246,30 @@ public function setName($name) return $this; } + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The kind of binding. Possible values are cartItemFilter, subledgerBalance. + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + /** * Gets expression * diff --git a/lib/Model/Campaign.php b/lib/Model/Campaign.php index 1d192e19..72ae072b 100644 --- a/lib/Model/Campaign.php +++ b/lib/Model/Campaign.php @@ -77,9 +77,14 @@ class Campaign implements ModelInterface, ArrayAccess 'campaignGroups' => 'int[]', 'couponRedemptionCount' => 'int', 'referralRedemptionCount' => 'int', - 'discountCount' => 'int', + 'discountCount' => 'float', 'discountEffectCount' => 'int', 'couponCreationCount' => 'int', + 'referralCreationCount' => 'int', + 'createdLoyaltyPointsCount' => 'float', + 'createdLoyaltyPointsEffectCount' => 'int', + 'redeemedLoyaltyPointsCount' => 'float', + 'redeemedLoyaltyPointsEffectCount' => 'int', 'lastActivity' => '\DateTime', 'updated' => '\DateTime', 'createdBy' => 'string', @@ -114,6 +119,11 @@ class Campaign implements ModelInterface, ArrayAccess 'discountCount' => null, 'discountEffectCount' => null, 'couponCreationCount' => null, + 'referralCreationCount' => null, + 'createdLoyaltyPointsCount' => null, + 'createdLoyaltyPointsEffectCount' => null, + 'redeemedLoyaltyPointsCount' => null, + 'redeemedLoyaltyPointsEffectCount' => null, 'lastActivity' => 'date-time', 'updated' => 'date-time', 'createdBy' => null, @@ -169,6 +179,11 @@ public static function openAPIFormats() 'discountCount' => 'discountCount', 'discountEffectCount' => 'discountEffectCount', 'couponCreationCount' => 'couponCreationCount', + 'referralCreationCount' => 'referralCreationCount', + 'createdLoyaltyPointsCount' => 'createdLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'createdLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'redeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'redeemedLoyaltyPointsEffectCount', 'lastActivity' => 'lastActivity', 'updated' => 'updated', 'createdBy' => 'createdBy', @@ -203,6 +218,11 @@ public static function openAPIFormats() 'discountCount' => 'setDiscountCount', 'discountEffectCount' => 'setDiscountEffectCount', 'couponCreationCount' => 'setCouponCreationCount', + 'referralCreationCount' => 'setReferralCreationCount', + 'createdLoyaltyPointsCount' => 'setCreatedLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'setCreatedLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'setRedeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'setRedeemedLoyaltyPointsEffectCount', 'lastActivity' => 'setLastActivity', 'updated' => 'setUpdated', 'createdBy' => 'setCreatedBy', @@ -237,6 +257,11 @@ public static function openAPIFormats() 'discountCount' => 'getDiscountCount', 'discountEffectCount' => 'getDiscountEffectCount', 'couponCreationCount' => 'getCouponCreationCount', + 'referralCreationCount' => 'getReferralCreationCount', + 'createdLoyaltyPointsCount' => 'getCreatedLoyaltyPointsCount', + 'createdLoyaltyPointsEffectCount' => 'getCreatedLoyaltyPointsEffectCount', + 'redeemedLoyaltyPointsCount' => 'getRedeemedLoyaltyPointsCount', + 'redeemedLoyaltyPointsEffectCount' => 'getRedeemedLoyaltyPointsEffectCount', 'lastActivity' => 'getLastActivity', 'updated' => 'getUpdated', 'createdBy' => 'getCreatedBy', @@ -359,6 +384,11 @@ public function __construct(array $data = 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['referralCreationCount'] = isset($data['referralCreationCount']) ? $data['referralCreationCount'] : 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['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; @@ -913,7 +943,7 @@ public function setReferralRedemptionCount($referralRedemptionCount) /** * Gets discountCount * - * @return int|null + * @return float|null */ public function getDiscountCount() { @@ -923,7 +953,7 @@ public function getDiscountCount() /** * Sets discountCount * - * @param int|null $discountCount Total amount of discounts redeemed in the campaign. + * @param float|null $discountCount Total amount of discounts redeemed in the campaign. * * @return $this */ @@ -982,6 +1012,126 @@ public function setCouponCreationCount($couponCreationCount) return $this; } + /** + * Gets referralCreationCount + * + * @return int|null + */ + public function getReferralCreationCount() + { + return $this->container['referralCreationCount']; + } + + /** + * Sets referralCreationCount + * + * @param int|null $referralCreationCount Total number of referrals created by rules in this campaign. + * + * @return $this + */ + public function setReferralCreationCount($referralCreationCount) + { + $this->container['referralCreationCount'] = $referralCreationCount; + + return $this; + } + + /** + * Gets createdLoyaltyPointsCount + * + * @return float|null + */ + public function getCreatedLoyaltyPointsCount() + { + return $this->container['createdLoyaltyPointsCount']; + } + + /** + * Sets createdLoyaltyPointsCount + * + * @param float|null $createdLoyaltyPointsCount 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 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 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 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 lastActivity * diff --git a/lib/Model/CartItem.php b/lib/Model/CartItem.php index 7c786507..852e9a68 100644 --- a/lib/Model/CartItem.php +++ b/lib/Model/CartItem.php @@ -67,8 +67,7 @@ class CartItem implements ModelInterface, ArrayAccess 'width' => 'float', 'length' => 'float', 'position' => 'float', - 'attributes' => 'object', - 'adjustment' => '\TalonOne\Client\Model\CartItemAdjustment' + 'attributes' => 'object' ]; /** @@ -87,8 +86,7 @@ class CartItem implements ModelInterface, ArrayAccess 'width' => null, 'length' => null, 'position' => null, - 'attributes' => null, - 'adjustment' => null + 'attributes' => null ]; /** @@ -128,8 +126,7 @@ public static function openAPIFormats() 'width' => 'width', 'length' => 'length', 'position' => 'position', - 'attributes' => 'attributes', - 'adjustment' => 'adjustment' + 'attributes' => 'attributes' ]; /** @@ -148,8 +145,7 @@ public static function openAPIFormats() 'width' => 'setWidth', 'length' => 'setLength', 'position' => 'setPosition', - 'attributes' => 'setAttributes', - 'adjustment' => 'setAdjustment' + 'attributes' => 'setAttributes' ]; /** @@ -168,8 +164,7 @@ public static function openAPIFormats() 'width' => 'getWidth', 'length' => 'getLength', 'position' => 'getPosition', - 'attributes' => 'getAttributes', - 'adjustment' => 'getAdjustment' + 'attributes' => 'getAttributes' ]; /** @@ -243,7 +238,6 @@ public function __construct(array $data = null) $this->container['length'] = isset($data['length']) ? $data['length'] : null; $this->container['position'] = isset($data['position']) ? $data['position'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; - $this->container['adjustment'] = isset($data['adjustment']) ? $data['adjustment'] : null; } /** @@ -572,30 +566,6 @@ public function setAttributes($attributes) return $this; } - - /** - * Gets adjustment - * - * @return \TalonOne\Client\Model\CartItemAdjustment|null - */ - public function getAdjustment() - { - return $this->container['adjustment']; - } - - /** - * Sets adjustment - * - * @param \TalonOne\Client\Model\CartItemAdjustment|null $adjustment adjustment - * - * @return $this - */ - public function setAdjustment($adjustment) - { - $this->container['adjustment'] = $adjustment; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Change.php b/lib/Model/Change.php index feba7893..ebd298fe 100644 --- a/lib/Model/Change.php +++ b/lib/Model/Change.php @@ -61,6 +61,7 @@ class Change implements ModelInterface, ArrayAccess 'id' => 'int', 'created' => '\DateTime', 'userId' => 'int', + 'applicationId' => 'int', 'entity' => 'string', 'old' => 'object', 'new' => 'object' @@ -75,6 +76,7 @@ class Change implements ModelInterface, ArrayAccess 'id' => null, 'created' => 'date-time', 'userId' => null, + 'applicationId' => null, 'entity' => null, 'old' => null, 'new' => null @@ -110,6 +112,7 @@ public static function openAPIFormats() 'id' => 'id', 'created' => 'created', 'userId' => 'userId', + 'applicationId' => 'applicationId', 'entity' => 'entity', 'old' => 'old', 'new' => 'new' @@ -124,6 +127,7 @@ public static function openAPIFormats() 'id' => 'setId', 'created' => 'setCreated', 'userId' => 'setUserId', + 'applicationId' => 'setApplicationId', 'entity' => 'setEntity', 'old' => 'setOld', 'new' => 'setNew' @@ -138,6 +142,7 @@ public static function openAPIFormats() 'id' => 'getId', 'created' => 'getCreated', 'userId' => 'getUserId', + 'applicationId' => 'getApplicationId', 'entity' => 'getEntity', 'old' => 'getOld', 'new' => 'getNew' @@ -206,6 +211,7 @@ 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['userId'] = isset($data['userId']) ? $data['userId'] : null; + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; $this->container['entity'] = isset($data['entity']) ? $data['entity'] : null; $this->container['old'] = isset($data['old']) ? $data['old'] : null; $this->container['new'] = isset($data['new']) ? $data['new'] : null; @@ -319,6 +325,30 @@ public function setUserId($userId) return $this; } + /** + * Gets applicationId + * + * @return int|null + */ + public function getApplicationId() + { + return $this->container['applicationId']; + } + + /** + * Sets applicationId + * + * @param int|null $applicationId ID of application associated with change + * + * @return $this + */ + public function setApplicationId($applicationId) + { + $this->container['applicationId'] = $applicationId; + + return $this; + } + /** * Gets entity * diff --git a/lib/Model/CodeGeneratorSettings.php b/lib/Model/CodeGeneratorSettings.php index a968d382..13f6f45f 100644 --- a/lib/Model/CodeGeneratorSettings.php +++ b/lib/Model/CodeGeneratorSettings.php @@ -201,6 +201,10 @@ public function listInvalidProperties() if ($this->container['couponPattern'] === null) { $invalidProperties[] = "'couponPattern' can't be null"; } + if ((mb_strlen($this->container['couponPattern']) > 100)) { + $invalidProperties[] = "invalid value for 'couponPattern', the character length must be smaller than or equal to 100."; + } + if ((mb_strlen($this->container['couponPattern']) < 3)) { $invalidProperties[] = "invalid value for 'couponPattern', the character length must be bigger than or equal to 3."; } @@ -263,7 +267,9 @@ public function getCouponPattern() */ public function setCouponPattern($couponPattern) { - + if ((mb_strlen($couponPattern) > 100)) { + throw new \InvalidArgumentException('invalid length for $couponPattern when calling CodeGeneratorSettings., must be smaller than or equal to 100.'); + } if ((mb_strlen($couponPattern) < 3)) { throw new \InvalidArgumentException('invalid length for $couponPattern when calling CodeGeneratorSettings., must be bigger than or equal to 3.'); } diff --git a/lib/Model/CreateApplicationAPIKey.php b/lib/Model/CreateApplicationAPIKey.php index 26b0e083..a87ac627 100644 --- a/lib/Model/CreateApplicationAPIKey.php +++ b/lib/Model/CreateApplicationAPIKey.php @@ -172,6 +172,7 @@ public function getModelName() const PLATFORM_SEGMENT = 'segment'; const PLATFORM_BRAZE = 'braze'; const PLATFORM_MPARTICLE = 'mparticle'; + const PLATFORM_SELLIGENT = 'selligent'; @@ -187,6 +188,7 @@ public function getPlatformAllowableValues() self::PLATFORM_SEGMENT, self::PLATFORM_BRAZE, self::PLATFORM_MPARTICLE, + self::PLATFORM_SELLIGENT, ]; } diff --git a/lib/Model/CustomerProfileIntegrationRequestV2.php b/lib/Model/CustomerProfileIntegrationRequestV2.php index 9971fc41..f86ef02a 100644 --- a/lib/Model/CustomerProfileIntegrationRequestV2.php +++ b/lib/Model/CustomerProfileIntegrationRequestV2.php @@ -59,6 +59,7 @@ class CustomerProfileIntegrationRequestV2 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'attributes' => 'object', + 'audiencesChanges' => '\TalonOne\Client\Model\ProfileAudiencesChanges', 'responseContent' => 'string[]' ]; @@ -69,6 +70,7 @@ class CustomerProfileIntegrationRequestV2 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'attributes' => null, + 'audiencesChanges' => null, 'responseContent' => null ]; @@ -100,6 +102,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'attributes' => 'attributes', + 'audiencesChanges' => 'audiencesChanges', 'responseContent' => 'responseContent' ]; @@ -110,6 +113,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'attributes' => 'setAttributes', + 'audiencesChanges' => 'setAudiencesChanges', 'responseContent' => 'setResponseContent' ]; @@ -120,6 +124,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'attributes' => 'getAttributes', + 'audiencesChanges' => 'getAudiencesChanges', 'responseContent' => 'getResponseContent' ]; @@ -168,6 +173,7 @@ public function getModelName() const RESPONSE_CONTENT_TRIGGERED_CAMPAIGNS = 'triggeredCampaigns'; const RESPONSE_CONTENT_LOYALTY = 'loyalty'; const RESPONSE_CONTENT_EVENT = 'event'; + const RESPONSE_CONTENT_RULE_FAILURE_REASONS = 'ruleFailureReasons'; @@ -183,6 +189,7 @@ public function getResponseContentAllowableValues() self::RESPONSE_CONTENT_TRIGGERED_CAMPAIGNS, self::RESPONSE_CONTENT_LOYALTY, self::RESPONSE_CONTENT_EVENT, + self::RESPONSE_CONTENT_RULE_FAILURE_REASONS, ]; } @@ -203,6 +210,7 @@ public function getResponseContentAllowableValues() public function __construct(array $data = null) { $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['audiencesChanges'] = isset($data['audiencesChanges']) ? $data['audiencesChanges'] : null; $this->container['responseContent'] = isset($data['responseContent']) ? $data['responseContent'] : null; } @@ -254,6 +262,30 @@ public function setAttributes($attributes) return $this; } + /** + * Gets audiencesChanges + * + * @return \TalonOne\Client\Model\ProfileAudiencesChanges|null + */ + public function getAudiencesChanges() + { + return $this->container['audiencesChanges']; + } + + /** + * Sets audiencesChanges + * + * @param \TalonOne\Client\Model\ProfileAudiencesChanges|null $audiencesChanges audiencesChanges + * + * @return $this + */ + public function setAudiencesChanges($audiencesChanges) + { + $this->container['audiencesChanges'] = $audiencesChanges; + + return $this; + } + /** * Gets responseContent * @@ -267,7 +299,7 @@ public function getResponseContent() /** * Sets responseContent * - * @param string[]|null $responseContent Optional list of requested information to be present on the response related to the customer profile update. Currently supported: \"customerProfile\", \"triggeredCampaigns\", \"loyalty\" and \"event\". + * @param string[]|null $responseContent Optional list of requested information to be present on the response related to the customer profile update. Currently supported: \"customerProfile\", \"triggeredCampaigns\", \"loyalty\", \"event\" and \"ruleFailureReasons\". * * @return $this */ diff --git a/lib/Model/CustomerSession.php b/lib/Model/CustomerSession.php index 2529c531..ea4515e4 100644 --- a/lib/Model/CustomerSession.php +++ b/lib/Model/CustomerSession.php @@ -294,9 +294,17 @@ public function listInvalidProperties() if ($this->container['coupon'] === null) { $invalidProperties[] = "'coupon' can't be null"; } + if ((mb_strlen($this->container['coupon']) > 100)) { + $invalidProperties[] = "invalid value for 'coupon', the character length must be smaller than or equal to 100."; + } + if ($this->container['referral'] === null) { $invalidProperties[] = "'referral' can't be null"; } + if ((mb_strlen($this->container['referral']) > 100)) { + $invalidProperties[] = "invalid value for 'referral', the character length must be smaller than or equal to 100."; + } + if ($this->container['state'] === null) { $invalidProperties[] = "'state' can't be null"; } @@ -453,6 +461,10 @@ public function getCoupon() */ public function setCoupon($coupon) { + if ((mb_strlen($coupon) > 100)) { + throw new \InvalidArgumentException('invalid length for $coupon when calling CustomerSession., must be smaller than or equal to 100.'); + } + $this->container['coupon'] = $coupon; return $this; @@ -477,6 +489,10 @@ public function getReferral() */ public function setReferral($referral) { + if ((mb_strlen($referral) > 100)) { + throw new \InvalidArgumentException('invalid length for $referral when calling CustomerSession., must be smaller than or equal to 100.'); + } + $this->container['referral'] = $referral; return $this; diff --git a/lib/Model/CustomerSessionV2.php b/lib/Model/CustomerSessionV2.php index e0afbcff..fd47072f 100644 --- a/lib/Model/CustomerSessionV2.php +++ b/lib/Model/CustomerSessionV2.php @@ -303,6 +303,10 @@ public function listInvalidProperties() if ($this->container['profileId'] === null) { $invalidProperties[] = "'profileId' can't be null"; } + 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."; + } + if ($this->container['state'] === null) { $invalidProperties[] = "'state' can't be null"; } @@ -486,6 +490,10 @@ public function getReferralCode() */ public function setReferralCode($referralCode) { + if (!is_null($referralCode) && (mb_strlen($referralCode) > 100)) { + throw new \InvalidArgumentException('invalid length for $referralCode when calling CustomerSessionV2., must be smaller than or equal to 100.'); + } + $this->container['referralCode'] = $referralCode; return $this; diff --git a/lib/Model/DeductLoyaltyPointsEffectProps.php b/lib/Model/DeductLoyaltyPointsEffectProps.php index 0278e64f..a54bcc63 100644 --- a/lib/Model/DeductLoyaltyPointsEffectProps.php +++ b/lib/Model/DeductLoyaltyPointsEffectProps.php @@ -61,7 +61,8 @@ class DeductLoyaltyPointsEffectProps implements ModelInterface, ArrayAccess 'ruleTitle' => 'string', 'programId' => 'int', 'subLedgerId' => 'string', - 'value' => 'float' + 'value' => 'float', + 'transactionUUID' => 'string' ]; /** @@ -73,7 +74,8 @@ class DeductLoyaltyPointsEffectProps implements ModelInterface, ArrayAccess 'ruleTitle' => null, 'programId' => null, 'subLedgerId' => null, - 'value' => null + 'value' => null, + 'transactionUUID' => null ]; /** @@ -106,7 +108,8 @@ public static function openAPIFormats() 'ruleTitle' => 'ruleTitle', 'programId' => 'programId', 'subLedgerId' => 'subLedgerId', - 'value' => 'value' + 'value' => 'value', + 'transactionUUID' => 'transactionUUID' ]; /** @@ -118,7 +121,8 @@ public static function openAPIFormats() 'ruleTitle' => 'setRuleTitle', 'programId' => 'setProgramId', 'subLedgerId' => 'setSubLedgerId', - 'value' => 'setValue' + 'value' => 'setValue', + 'transactionUUID' => 'setTransactionUUID' ]; /** @@ -130,7 +134,8 @@ public static function openAPIFormats() 'ruleTitle' => 'getRuleTitle', 'programId' => 'getProgramId', 'subLedgerId' => 'getSubLedgerId', - 'value' => 'getValue' + 'value' => 'getValue', + 'transactionUUID' => 'getTransactionUUID' ]; /** @@ -197,6 +202,7 @@ public function __construct(array $data = null) $this->container['programId'] = isset($data['programId']) ? $data['programId'] : null; $this->container['subLedgerId'] = isset($data['subLedgerId']) ? $data['subLedgerId'] : null; $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['transactionUUID'] = isset($data['transactionUUID']) ? $data['transactionUUID'] : null; } /** @@ -220,6 +226,9 @@ public function listInvalidProperties() if ($this->container['value'] === null) { $invalidProperties[] = "'value' can't be null"; } + if ($this->container['transactionUUID'] === null) { + $invalidProperties[] = "'transactionUUID' can't be null"; + } return $invalidProperties; } @@ -330,6 +339,30 @@ public function setValue($value) return $this; } + + /** + * Gets transactionUUID + * + * @return string + */ + public function getTransactionUUID() + { + return $this->container['transactionUUID']; + } + + /** + * Sets transactionUUID + * + * @param string $transactionUUID The identifier of this deduction in the loyalty ledger + * + * @return $this + */ + public function setTransactionUUID($transactionUUID) + { + $this->container['transactionUUID'] = $transactionUUID; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Effect.php b/lib/Model/Effect.php index 54066a6c..575cd622 100644 --- a/lib/Model/Effect.php +++ b/lib/Model/Effect.php @@ -63,6 +63,7 @@ class Effect implements ModelInterface, ArrayAccess 'ruleIndex' => 'int', 'ruleName' => 'string', 'effectType' => 'string', + 'triggeredByCoupon' => 'int', 'props' => 'object' ]; @@ -77,6 +78,7 @@ class Effect implements ModelInterface, ArrayAccess 'ruleIndex' => null, 'ruleName' => null, 'effectType' => null, + 'triggeredByCoupon' => null, 'props' => null ]; @@ -112,6 +114,7 @@ public static function openAPIFormats() 'ruleIndex' => 'ruleIndex', 'ruleName' => 'ruleName', 'effectType' => 'effectType', + 'triggeredByCoupon' => 'triggeredByCoupon', 'props' => 'props' ]; @@ -126,6 +129,7 @@ public static function openAPIFormats() 'ruleIndex' => 'setRuleIndex', 'ruleName' => 'setRuleName', 'effectType' => 'setEffectType', + 'triggeredByCoupon' => 'setTriggeredByCoupon', 'props' => 'setProps' ]; @@ -140,6 +144,7 @@ public static function openAPIFormats() 'ruleIndex' => 'getRuleIndex', 'ruleName' => 'getRuleName', 'effectType' => 'getEffectType', + 'triggeredByCoupon' => 'getTriggeredByCoupon', 'props' => 'getProps' ]; @@ -208,6 +213,7 @@ public function __construct(array $data = null) $this->container['ruleIndex'] = isset($data['ruleIndex']) ? $data['ruleIndex'] : null; $this->container['ruleName'] = isset($data['ruleName']) ? $data['ruleName'] : null; $this->container['effectType'] = isset($data['effectType']) ? $data['effectType'] : null; + $this->container['triggeredByCoupon'] = isset($data['triggeredByCoupon']) ? $data['triggeredByCoupon'] : null; $this->container['props'] = isset($data['props']) ? $data['props'] : null; } @@ -373,6 +379,30 @@ public function setEffectType($effectType) return $this; } + /** + * Gets triggeredByCoupon + * + * @return int|null + */ + public function getTriggeredByCoupon() + { + return $this->container['triggeredByCoupon']; + } + + /** + * Sets triggeredByCoupon + * + * @param int|null $triggeredByCoupon The ID of the coupon that was being evaluated when this effect was triggered + * + * @return $this + */ + public function setTriggeredByCoupon($triggeredByCoupon) + { + $this->container['triggeredByCoupon'] = $triggeredByCoupon; + + return $this; + } + /** * Gets props * diff --git a/lib/Model/EffectEntity.php b/lib/Model/EffectEntity.php index eb59a2ba..ee888ce0 100644 --- a/lib/Model/EffectEntity.php +++ b/lib/Model/EffectEntity.php @@ -62,7 +62,8 @@ class EffectEntity implements ModelInterface, ArrayAccess 'rulesetId' => 'int', 'ruleIndex' => 'int', 'ruleName' => 'string', - 'effectType' => 'string' + 'effectType' => 'string', + 'triggeredByCoupon' => 'int' ]; /** @@ -75,7 +76,8 @@ class EffectEntity implements ModelInterface, ArrayAccess 'rulesetId' => null, 'ruleIndex' => null, 'ruleName' => null, - 'effectType' => null + 'effectType' => null, + 'triggeredByCoupon' => null ]; /** @@ -109,7 +111,8 @@ public static function openAPIFormats() 'rulesetId' => 'rulesetId', 'ruleIndex' => 'ruleIndex', 'ruleName' => 'ruleName', - 'effectType' => 'effectType' + 'effectType' => 'effectType', + 'triggeredByCoupon' => 'triggeredByCoupon' ]; /** @@ -122,7 +125,8 @@ public static function openAPIFormats() 'rulesetId' => 'setRulesetId', 'ruleIndex' => 'setRuleIndex', 'ruleName' => 'setRuleName', - 'effectType' => 'setEffectType' + 'effectType' => 'setEffectType', + 'triggeredByCoupon' => 'setTriggeredByCoupon' ]; /** @@ -135,7 +139,8 @@ public static function openAPIFormats() 'rulesetId' => 'getRulesetId', 'ruleIndex' => 'getRuleIndex', 'ruleName' => 'getRuleName', - 'effectType' => 'getEffectType' + 'effectType' => 'getEffectType', + 'triggeredByCoupon' => 'getTriggeredByCoupon' ]; /** @@ -203,6 +208,7 @@ public function __construct(array $data = null) $this->container['ruleIndex'] = isset($data['ruleIndex']) ? $data['ruleIndex'] : null; $this->container['ruleName'] = isset($data['ruleName']) ? $data['ruleName'] : null; $this->container['effectType'] = isset($data['effectType']) ? $data['effectType'] : null; + $this->container['triggeredByCoupon'] = isset($data['triggeredByCoupon']) ? $data['triggeredByCoupon'] : null; } /** @@ -363,6 +369,30 @@ public function setEffectType($effectType) return $this; } + + /** + * Gets triggeredByCoupon + * + * @return int|null + */ + public function getTriggeredByCoupon() + { + return $this->container['triggeredByCoupon']; + } + + /** + * Sets triggeredByCoupon + * + * @param int|null $triggeredByCoupon The ID of the coupon that was being evaluated when this effect was triggered + * + * @return $this + */ + public function setTriggeredByCoupon($triggeredByCoupon) + { + $this->container['triggeredByCoupon'] = $triggeredByCoupon; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Import.php b/lib/Model/Import.php index 248018ff..53e86fba 100644 --- a/lib/Model/Import.php +++ b/lib/Model/Import.php @@ -184,22 +184,9 @@ public function getModelName() return self::$openAPIModelName; } - const ENTITY_COUPON = 'Coupon'; - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getEntityAllowableValues() - { - return [ - self::ENTITY_COUPON, - ]; - } - /** * Associative array for storing property values @@ -248,14 +235,6 @@ public function listInvalidProperties() if ($this->container['entity'] === null) { $invalidProperties[] = "'entity' can't be null"; } - $allowedValues = $this->getEntityAllowableValues(); - if (!is_null($this->container['entity']) && !in_array($this->container['entity'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'entity', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - if ($this->container['amount'] === null) { $invalidProperties[] = "'amount' can't be null"; } @@ -387,21 +366,12 @@ public function getEntity() /** * Sets entity * - * @param string $entity The name of the entity that was imported. + * @param string $entity The name of the entity that was imported. Possible values are Coupons and LoyaltyPoints. * * @return $this */ public function setEntity($entity) { - $allowedValues = $this->getEntityAllowableValues(); - if (!in_array($entity, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'entity', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } $this->container['entity'] = $entity; return $this; diff --git a/lib/Model/InlineResponse20020.php b/lib/Model/InlineResponse20020.php index 1c6078ba..32c835e5 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\Attribute[]' + 'data' => '\TalonOne\Client\Model\Audience[]' ]; /** @@ -195,9 +195,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 +216,7 @@ public function valid() /** * Gets totalResultSize * - * @return int + * @return int|null */ public function getTotalResultSize() { @@ -229,7 +226,7 @@ public function getTotalResultSize() /** * Sets totalResultSize * - * @param int $totalResultSize totalResultSize + * @param int|null $totalResultSize totalResultSize * * @return $this */ @@ -243,7 +240,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Attribute[] + * @return \TalonOne\Client\Model\Audience[] */ public function getData() { @@ -253,7 +250,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Attribute[] $data data + * @param \TalonOne\Client\Model\Audience[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20021.php b/lib/Model/InlineResponse20021.php index da228047..8ec6d0b1 100644 --- a/lib/Model/InlineResponse20021.php +++ b/lib/Model/InlineResponse20021.php @@ -58,7 +58,7 @@ class InlineResponse20021 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/InlineResponse20022.php b/lib/Model/InlineResponse20022.php index dddd43f0..1913da03 100644 --- a/lib/Model/InlineResponse20022.php +++ b/lib/Model/InlineResponse20022.php @@ -58,7 +58,7 @@ class InlineResponse20022 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Webhook[]' + 'data' => '\TalonOne\Client\Model\AccountAdditionalCost[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Webhook[] + * @return \TalonOne\Client\Model\AccountAdditionalCost[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Webhook[] $data data + * @param \TalonOne\Client\Model\AccountAdditionalCost[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20023.php b/lib/Model/InlineResponse20023.php index 6264b2ec..ac9c259d 100644 --- a/lib/Model/InlineResponse20023.php +++ b/lib/Model/InlineResponse20023.php @@ -58,7 +58,7 @@ class InlineResponse20023 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\WebhookActivationLogEntry[]' + 'data' => '\TalonOne\Client\Model\Webhook[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\WebhookActivationLogEntry[] + * @return \TalonOne\Client\Model\Webhook[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\WebhookActivationLogEntry[] $data data + * @param \TalonOne\Client\Model\Webhook[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20024.php b/lib/Model/InlineResponse20024.php index 683a83e9..c692058d 100644 --- a/lib/Model/InlineResponse20024.php +++ b/lib/Model/InlineResponse20024.php @@ -58,7 +58,7 @@ class InlineResponse20024 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\WebhookLogEntry[]' + 'data' => '\TalonOne\Client\Model\WebhookActivationLogEntry[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\WebhookLogEntry[] + * @return \TalonOne\Client\Model\WebhookActivationLogEntry[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\WebhookLogEntry[] $data data + * @param \TalonOne\Client\Model\WebhookActivationLogEntry[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20025.php b/lib/Model/InlineResponse20025.php index d81c3e06..96f333a7 100644 --- a/lib/Model/InlineResponse20025.php +++ b/lib/Model/InlineResponse20025.php @@ -58,7 +58,7 @@ class InlineResponse20025 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\EventType[]' + 'data' => '\TalonOne\Client\Model\WebhookLogEntry[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\EventType[] + * @return \TalonOne\Client\Model\WebhookLogEntry[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\EventType[] $data data + * @param \TalonOne\Client\Model\WebhookLogEntry[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20026.php b/lib/Model/InlineResponse20026.php index 1d3e56dd..e35fed3b 100644 --- a/lib/Model/InlineResponse20026.php +++ b/lib/Model/InlineResponse20026.php @@ -58,7 +58,7 @@ class InlineResponse20026 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\User[]' + 'data' => '\TalonOne\Client\Model\EventType[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\User[] + * @return \TalonOne\Client\Model\EventType[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\User[] $data data + * @param \TalonOne\Client\Model\EventType[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20027.php b/lib/Model/InlineResponse20027.php index d53d7f0a..f04a8444 100644 --- a/lib/Model/InlineResponse20027.php +++ b/lib/Model/InlineResponse20027.php @@ -58,8 +58,7 @@ class InlineResponse20027 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\Change[]' + 'data' => '\TalonOne\Client\Model\User[]' ]; /** @@ -69,7 +68,6 @@ class InlineResponse20027 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\User[] */ public function getData() { @@ -280,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Change[] $data data + * @param \TalonOne\Client\Model\User[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20028.php b/lib/Model/InlineResponse20028.php index 8fb8402b..133a6dcb 100644 --- a/lib/Model/InlineResponse20028.php +++ b/lib/Model/InlineResponse20028.php @@ -58,7 +58,8 @@ class InlineResponse20028 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Export[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\Change[]' ]; /** @@ -68,6 +69,7 @@ class InlineResponse20028 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\Export[] + * @return \TalonOne\Client\Model\Change[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Export[] $data data + * @param \TalonOne\Client\Model\Change[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20029.php b/lib/Model/InlineResponse20029.php index c24c4f27..5c0f6c84 100644 --- a/lib/Model/InlineResponse20029.php +++ b/lib/Model/InlineResponse20029.php @@ -58,7 +58,7 @@ class InlineResponse20029 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Import[]' + 'data' => '\TalonOne\Client\Model\Export[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Import[] + * @return \TalonOne\Client\Model\Export[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Import[] $data data + * @param \TalonOne\Client\Model\Export[] $data data * * @return $this */ diff --git a/lib/Model/IntegrationRequest.php b/lib/Model/IntegrationRequest.php index d8dc618d..62557ecd 100644 --- a/lib/Model/IntegrationRequest.php +++ b/lib/Model/IntegrationRequest.php @@ -171,6 +171,7 @@ public function getModelName() const RESPONSE_CONTENT_REFERRAL = 'referral'; const RESPONSE_CONTENT_LOYALTY = 'loyalty'; const RESPONSE_CONTENT_EVENT = 'event'; + const RESPONSE_CONTENT_RULE_FAILURE_REASONS = 'ruleFailureReasons'; @@ -189,6 +190,7 @@ public function getResponseContentAllowableValues() self::RESPONSE_CONTENT_REFERRAL, self::RESPONSE_CONTENT_LOYALTY, self::RESPONSE_CONTENT_EVENT, + self::RESPONSE_CONTENT_RULE_FAILURE_REASONS, ]; } @@ -276,7 +278,7 @@ public function getResponseContent() /** * Sets responseContent * - * @param string[]|null $responseContent Optional list of requested information to be present on the response related to the customer session update. Currently supported: \"customerSession\", \"customerProfile\", \"coupons\", \"triggeredCampaigns\", \"referral\", \"loyalty\" and \"event\". + * @param string[]|null $responseContent Optional list of requested information to be present on the response related to the customer session update. Currently supported: \"customerSession\", \"customerProfile\", \"coupons\", \"triggeredCampaigns\", \"referral\", \"loyalty\", \"event\" and \"ruleFailureReasons\". * * @return $this */ diff --git a/lib/Model/IntegrationStateV2.php b/lib/Model/IntegrationStateV2.php index fa50733f..cd7a9c36 100644 --- a/lib/Model/IntegrationStateV2.php +++ b/lib/Model/IntegrationStateV2.php @@ -66,6 +66,7 @@ class IntegrationStateV2 implements ModelInterface, ArrayAccess 'coupons' => '\TalonOne\Client\Model\Coupon[]', 'triggeredCampaigns' => '\TalonOne\Client\Model\Campaign[]', 'effects' => '\TalonOne\Client\Model\Effect[]', + 'ruleFailureReasons' => '\TalonOne\Client\Model\RuleFailureReason[]', 'createdCoupons' => '\TalonOne\Client\Model\Coupon[]', 'createdReferrals' => '\TalonOne\Client\Model\Referral[]' ]; @@ -84,6 +85,7 @@ class IntegrationStateV2 implements ModelInterface, ArrayAccess 'coupons' => null, 'triggeredCampaigns' => null, 'effects' => null, + 'ruleFailureReasons' => null, 'createdCoupons' => null, 'createdReferrals' => null ]; @@ -123,6 +125,7 @@ public static function openAPIFormats() 'coupons' => 'coupons', 'triggeredCampaigns' => 'triggeredCampaigns', 'effects' => 'effects', + 'ruleFailureReasons' => 'ruleFailureReasons', 'createdCoupons' => 'createdCoupons', 'createdReferrals' => 'createdReferrals' ]; @@ -141,6 +144,7 @@ public static function openAPIFormats() 'coupons' => 'setCoupons', 'triggeredCampaigns' => 'setTriggeredCampaigns', 'effects' => 'setEffects', + 'ruleFailureReasons' => 'setRuleFailureReasons', 'createdCoupons' => 'setCreatedCoupons', 'createdReferrals' => 'setCreatedReferrals' ]; @@ -159,6 +163,7 @@ public static function openAPIFormats() 'coupons' => 'getCoupons', 'triggeredCampaigns' => 'getTriggeredCampaigns', 'effects' => 'getEffects', + 'ruleFailureReasons' => 'getRuleFailureReasons', 'createdCoupons' => 'getCreatedCoupons', 'createdReferrals' => 'getCreatedReferrals' ]; @@ -231,6 +236,7 @@ public function __construct(array $data = null) $this->container['coupons'] = isset($data['coupons']) ? $data['coupons'] : null; $this->container['triggeredCampaigns'] = isset($data['triggeredCampaigns']) ? $data['triggeredCampaigns'] : null; $this->container['effects'] = isset($data['effects']) ? $data['effects'] : null; + $this->container['ruleFailureReasons'] = isset($data['ruleFailureReasons']) ? $data['ruleFailureReasons'] : null; $this->container['createdCoupons'] = isset($data['createdCoupons']) ? $data['createdCoupons'] : null; $this->container['createdReferrals'] = isset($data['createdReferrals']) ? $data['createdReferrals'] : null; } @@ -460,6 +466,30 @@ public function setEffects($effects) 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 createdCoupons * diff --git a/lib/Model/LimitConfig.php b/lib/Model/LimitConfig.php index 646d6f86..ba32bdc0 100644 --- a/lib/Model/LimitConfig.php +++ b/lib/Model/LimitConfig.php @@ -168,11 +168,6 @@ public function getModelName() return self::$openAPIModelName; } - const ACTION_REDEEM_COUPON = 'redeemCoupon'; - const ACTION_REDEEM_REFERRAL = 'redeemReferral'; - const ACTION_SET_DISCOUNT = 'setDiscount'; - const ACTION_CREATE_COUPON = 'createCoupon'; - const ACTION_SET_DISCOUNT_EFFECT = 'setDiscountEffect'; const ENTITIES_COUPON = 'Coupon'; const ENTITIES_REFERRAL = 'Referral'; const ENTITIES_PROFILE = 'Profile'; @@ -180,22 +175,6 @@ public function getModelName() - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getActionAllowableValues() - { - return [ - self::ACTION_REDEEM_COUPON, - self::ACTION_REDEEM_REFERRAL, - self::ACTION_SET_DISCOUNT, - self::ACTION_CREATE_COUPON, - self::ACTION_SET_DISCOUNT_EFFECT, - ]; - } - /** * Gets allowable values of the enum * @@ -244,14 +223,6 @@ public function listInvalidProperties() if ($this->container['action'] === null) { $invalidProperties[] = "'action' can't be null"; } - $allowedValues = $this->getActionAllowableValues(); - if (!is_null($this->container['action']) && !in_array($this->container['action'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'action', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - if ($this->container['limit'] === null) { $invalidProperties[] = "'limit' can't be null"; } @@ -296,15 +267,6 @@ public function getAction() */ public function setAction($action) { - $allowedValues = $this->getActionAllowableValues(); - if (!in_array($action, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'action', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } $this->container['action'] = $action; return $this; diff --git a/lib/Model/LoyaltyPoints.php b/lib/Model/LoyaltyPoints.php index 15b3f5e0..d7eb08df 100644 --- a/lib/Model/LoyaltyPoints.php +++ b/lib/Model/LoyaltyPoints.php @@ -217,6 +217,14 @@ public function listInvalidProperties() if ($this->container['points'] === null) { $invalidProperties[] = "'points' can't be null"; } + if (($this->container['points'] >= 1E+8)) { + $invalidProperties[] = "invalid value for 'points', must be smaller than 1E+8."; + } + + if (($this->container['points'] <= 0)) { + $invalidProperties[] = "invalid value for 'points', must be bigger than 0."; + } + return $invalidProperties; } @@ -251,6 +259,14 @@ public function getPoints() */ public function setPoints($points) { + + if (($points >= 1E+8)) { + throw new \InvalidArgumentException('invalid value for $points when calling LoyaltyPoints., must be smaller than 1E+8.'); + } + if (($points <= 0)) { + throw new \InvalidArgumentException('invalid value for $points when calling LoyaltyPoints., must be bigger than 0.'); + } + $this->container['points'] = $points; return $this; diff --git a/lib/Model/LoyaltyProgramBalance.php b/lib/Model/LoyaltyProgramBalance.php index 1c5a0fdd..45a7cc0d 100644 --- a/lib/Model/LoyaltyProgramBalance.php +++ b/lib/Model/LoyaltyProgramBalance.php @@ -58,7 +58,11 @@ class LoyaltyProgramBalance implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'currentBalance' => 'float' + 'currentBalance' => 'float', + 'pendingBalance' => 'float', + 'expiredBalance' => 'float', + 'spentBalance' => 'float', + 'tentativeCurrentBalance' => 'float' ]; /** @@ -67,7 +71,11 @@ class LoyaltyProgramBalance implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'currentBalance' => null + 'currentBalance' => null, + 'pendingBalance' => null, + 'expiredBalance' => null, + 'spentBalance' => null, + 'tentativeCurrentBalance' => null ]; /** @@ -97,7 +105,11 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'currentBalance' => 'currentBalance' + 'currentBalance' => 'currentBalance', + 'pendingBalance' => 'pendingBalance', + 'expiredBalance' => 'expiredBalance', + 'spentBalance' => 'spentBalance', + 'tentativeCurrentBalance' => 'tentativeCurrentBalance' ]; /** @@ -106,7 +118,11 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'currentBalance' => 'setCurrentBalance' + 'currentBalance' => 'setCurrentBalance', + 'pendingBalance' => 'setPendingBalance', + 'expiredBalance' => 'setExpiredBalance', + 'spentBalance' => 'setSpentBalance', + 'tentativeCurrentBalance' => 'setTentativeCurrentBalance' ]; /** @@ -115,7 +131,11 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'currentBalance' => 'getCurrentBalance' + 'currentBalance' => 'getCurrentBalance', + 'pendingBalance' => 'getPendingBalance', + 'expiredBalance' => 'getExpiredBalance', + 'spentBalance' => 'getSpentBalance', + 'tentativeCurrentBalance' => 'getTentativeCurrentBalance' ]; /** @@ -179,6 +199,10 @@ public function getModelName() public function __construct(array $data = null) { $this->container['currentBalance'] = isset($data['currentBalance']) ? $data['currentBalance'] : null; + $this->container['pendingBalance'] = isset($data['pendingBalance']) ? $data['pendingBalance'] : null; + $this->container['expiredBalance'] = isset($data['expiredBalance']) ? $data['expiredBalance'] : null; + $this->container['spentBalance'] = isset($data['spentBalance']) ? $data['spentBalance'] : null; + $this->container['tentativeCurrentBalance'] = isset($data['tentativeCurrentBalance']) ? $data['tentativeCurrentBalance'] : null; } /** @@ -193,6 +217,18 @@ public function listInvalidProperties() if ($this->container['currentBalance'] === null) { $invalidProperties[] = "'currentBalance' can't be null"; } + if ($this->container['pendingBalance'] === null) { + $invalidProperties[] = "'pendingBalance' can't be null"; + } + if ($this->container['expiredBalance'] === null) { + $invalidProperties[] = "'expiredBalance' can't be null"; + } + if ($this->container['spentBalance'] === null) { + $invalidProperties[] = "'spentBalance' can't be null"; + } + if ($this->container['tentativeCurrentBalance'] === null) { + $invalidProperties[] = "'tentativeCurrentBalance' can't be null"; + } return $invalidProperties; } @@ -221,7 +257,7 @@ public function getCurrentBalance() /** * Sets currentBalance * - * @param float $currentBalance currentBalance + * @param float $currentBalance Sum of current active points amounts * * @return $this */ @@ -231,6 +267,102 @@ public function setCurrentBalance($currentBalance) return $this; } + + /** + * Gets pendingBalance + * + * @return float + */ + public function getPendingBalance() + { + return $this->container['pendingBalance']; + } + + /** + * Sets pendingBalance + * + * @param float $pendingBalance Sum of pending points amounts + * + * @return $this + */ + public function setPendingBalance($pendingBalance) + { + $this->container['pendingBalance'] = $pendingBalance; + + return $this; + } + + /** + * Gets expiredBalance + * + * @return float + */ + public function getExpiredBalance() + { + return $this->container['expiredBalance']; + } + + /** + * Sets expiredBalance + * + * @param float $expiredBalance Sum of expired points amounts + * + * @return $this + */ + public function setExpiredBalance($expiredBalance) + { + $this->container['expiredBalance'] = $expiredBalance; + + return $this; + } + + /** + * Gets spentBalance + * + * @return float + */ + public function getSpentBalance() + { + return $this->container['spentBalance']; + } + + /** + * Sets spentBalance + * + * @param float $spentBalance Sum of spent points amounts + * + * @return $this + */ + public function setSpentBalance($spentBalance) + { + $this->container['spentBalance'] = $spentBalance; + + return $this; + } + + /** + * Gets tentativeCurrentBalance + * + * @return float + */ + public function getTentativeCurrentBalance() + { + return $this->container['tentativeCurrentBalance']; + } + + /** + * Sets tentativeCurrentBalance + * + * @param float $tentativeCurrentBalance Sum of current active points amounts, including additions and deductions on open sessions + * + * @return $this + */ + public function setTentativeCurrentBalance($tentativeCurrentBalance) + { + $this->container['tentativeCurrentBalance'] = $tentativeCurrentBalance; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LoyaltyProgramLedgers.php b/lib/Model/LoyaltyProgramLedgers.php index 8afa5e00..9b516343 100644 --- a/lib/Model/LoyaltyProgramLedgers.php +++ b/lib/Model/LoyaltyProgramLedgers.php @@ -58,6 +58,7 @@ class LoyaltyProgramLedgers implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ + 'id' => 'int', 'title' => 'string', 'name' => 'string', 'ledger' => '\TalonOne\Client\Model\LoyaltyProgramBalance', @@ -70,6 +71,7 @@ class LoyaltyProgramLedgers implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ + 'id' => null, 'title' => null, 'name' => null, 'ledger' => null, @@ -103,6 +105,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'id' => 'id', 'title' => 'title', 'name' => 'name', 'ledger' => 'ledger', @@ -115,6 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'id' => 'setId', 'title' => 'setTitle', 'name' => 'setName', 'ledger' => 'setLedger', @@ -127,6 +131,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'id' => 'getId', 'title' => 'getTitle', 'name' => 'getName', 'ledger' => 'getLedger', @@ -193,6 +198,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['title'] = isset($data['title']) ? $data['title'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['ledger'] = isset($data['ledger']) ? $data['ledger'] : null; @@ -208,6 +214,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } @@ -232,6 +241,30 @@ public function valid() } + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id The internal ID of loyalty program + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** * Gets title * diff --git a/lib/Model/LoyaltySubLedger.php b/lib/Model/LoyaltySubLedger.php index 4bbc67f4..58a593c8 100644 --- a/lib/Model/LoyaltySubLedger.php +++ b/lib/Model/LoyaltySubLedger.php @@ -287,7 +287,7 @@ public function getTotal() /** * Sets total * - * @param float $total ⚠️ Deprecated: Please use 'totalActivePoints' property instead. Total amount of currently active and available points in the customer's balance + * @param float $total ⚠️ Deprecated: Use 'totalActivePoints' property instead. Total amount of currently active and available points in the customer's balance * * @return $this */ diff --git a/lib/Model/NewApplication.php b/lib/Model/NewApplication.php index e94987ec..9314ec73 100644 --- a/lib/Model/NewApplication.php +++ b/lib/Model/NewApplication.php @@ -67,6 +67,7 @@ class NewApplication implements ModelInterface, ArrayAccess 'limits' => '\TalonOne\Client\Model\LimitConfig[]', 'campaignPriority' => 'string', 'exclusiveCampaignsStrategy' => 'string', + 'defaultDiscountScope' => 'string', 'enableCascadingDiscounts' => 'bool', 'enableFlattenedCartItems' => 'bool', 'attributesSettings' => '\TalonOne\Client\Model\AttributesSettings', @@ -89,6 +90,7 @@ class NewApplication implements ModelInterface, ArrayAccess 'limits' => null, 'campaignPriority' => null, 'exclusiveCampaignsStrategy' => null, + 'defaultDiscountScope' => null, 'enableCascadingDiscounts' => null, 'enableFlattenedCartItems' => null, 'attributesSettings' => null, @@ -132,6 +134,7 @@ public static function openAPIFormats() 'limits' => 'limits', 'campaignPriority' => 'campaignPriority', 'exclusiveCampaignsStrategy' => 'exclusiveCampaignsStrategy', + 'defaultDiscountScope' => 'defaultDiscountScope', 'enableCascadingDiscounts' => 'enableCascadingDiscounts', 'enableFlattenedCartItems' => 'enableFlattenedCartItems', 'attributesSettings' => 'attributesSettings', @@ -154,6 +157,7 @@ public static function openAPIFormats() 'limits' => 'setLimits', 'campaignPriority' => 'setCampaignPriority', 'exclusiveCampaignsStrategy' => 'setExclusiveCampaignsStrategy', + 'defaultDiscountScope' => 'setDefaultDiscountScope', 'enableCascadingDiscounts' => 'setEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'setEnableFlattenedCartItems', 'attributesSettings' => 'setAttributesSettings', @@ -176,6 +180,7 @@ public static function openAPIFormats() 'limits' => 'getLimits', 'campaignPriority' => 'getCampaignPriority', 'exclusiveCampaignsStrategy' => 'getExclusiveCampaignsStrategy', + 'defaultDiscountScope' => 'getDefaultDiscountScope', 'enableCascadingDiscounts' => 'getEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'getEnableFlattenedCartItems', 'attributesSettings' => 'getAttributesSettings', @@ -233,6 +238,9 @@ public function getModelName() 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'; @@ -278,6 +286,20 @@ public function getExclusiveCampaignsStrategyAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDefaultDiscountScopeAllowableValues() + { + return [ + self::DEFAULT_DISCOUNT_SCOPE_SESSION_TOTAL, + self::DEFAULT_DISCOUNT_SCOPE_CART_ITEMS, + self::DEFAULT_DISCOUNT_SCOPE_ADDITIONAL_COSTS, + ]; + } + /** * Associative array for storing property values @@ -303,6 +325,7 @@ public function __construct(array $data = null) $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; $this->container['campaignPriority'] = isset($data['campaignPriority']) ? $data['campaignPriority'] : null; $this->container['exclusiveCampaignsStrategy'] = isset($data['exclusiveCampaignsStrategy']) ? $data['exclusiveCampaignsStrategy'] : null; + $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; $this->container['attributesSettings'] = isset($data['attributesSettings']) ? $data['attributesSettings'] : null; @@ -364,6 +387,14 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getDefaultDiscountScopeAllowableValues(); + if (!is_null($this->container['defaultDiscountScope']) && !in_array($this->container['defaultDiscountScope'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'defaultDiscountScope', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + if (!is_null($this->container['key']) && !preg_match("/^[a-fA-F0-9]{16}$/", $this->container['key'])) { $invalidProperties[] = "invalid value for 'key', must be conform to the pattern /^[a-fA-F0-9]{16}$/."; } @@ -641,6 +672,39 @@ public function setExclusiveCampaignsStrategy($exclusiveCampaignsStrategy) return $this; } + /** + * Gets defaultDiscountScope + * + * @return string|null + */ + public function getDefaultDiscountScope() + { + return $this->container['defaultDiscountScope']; + } + + /** + * Sets defaultDiscountScope + * + * @param string|null $defaultDiscountScope The default scope to apply \"setDiscount\" effects on if no scope was provided with the effect. + * + * @return $this + */ + public function setDefaultDiscountScope($defaultDiscountScope) + { + $allowedValues = $this->getDefaultDiscountScopeAllowableValues(); + if (!is_null($defaultDiscountScope) && !in_array($defaultDiscountScope, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'defaultDiscountScope', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['defaultDiscountScope'] = $defaultDiscountScope; + + return $this; + } + /** * Gets enableCascadingDiscounts * diff --git a/lib/Model/NewApplicationAPIKey.php b/lib/Model/NewApplicationAPIKey.php index cd61d9e3..e719911a 100644 --- a/lib/Model/NewApplicationAPIKey.php +++ b/lib/Model/NewApplicationAPIKey.php @@ -203,6 +203,7 @@ public function getModelName() const PLATFORM_SEGMENT = 'segment'; const PLATFORM_BRAZE = 'braze'; const PLATFORM_MPARTICLE = 'mparticle'; + const PLATFORM_SELLIGENT = 'selligent'; @@ -218,6 +219,7 @@ public function getPlatformAllowableValues() self::PLATFORM_SEGMENT, self::PLATFORM_BRAZE, self::PLATFORM_MPARTICLE, + self::PLATFORM_SELLIGENT, ]; } diff --git a/lib/Model/NewCoupons.php b/lib/Model/NewCoupons.php index 0fe4ee82..c8cbef2d 100644 --- a/lib/Model/NewCoupons.php +++ b/lib/Model/NewCoupons.php @@ -62,12 +62,12 @@ class NewCoupons implements ModelInterface, ArrayAccess 'discountLimit' => 'float', 'startDate' => '\DateTime', 'expiryDate' => '\DateTime', - 'validCharacters' => 'string[]', - 'couponPattern' => 'string', 'numberOfCoupons' => 'int', 'uniquePrefix' => 'string', 'attributes' => 'object', - 'recipientIntegrationId' => 'string' + 'recipientIntegrationId' => 'string', + 'validCharacters' => 'string[]', + 'couponPattern' => 'string' ]; /** @@ -80,12 +80,12 @@ class NewCoupons implements ModelInterface, ArrayAccess 'discountLimit' => null, 'startDate' => 'date-time', 'expiryDate' => 'date-time', - 'validCharacters' => null, - 'couponPattern' => null, 'numberOfCoupons' => null, 'uniquePrefix' => null, 'attributes' => null, - 'recipientIntegrationId' => null + 'recipientIntegrationId' => null, + 'validCharacters' => null, + 'couponPattern' => null ]; /** @@ -119,12 +119,12 @@ public static function openAPIFormats() 'discountLimit' => 'discountLimit', 'startDate' => 'startDate', 'expiryDate' => 'expiryDate', - 'validCharacters' => 'validCharacters', - 'couponPattern' => 'couponPattern', 'numberOfCoupons' => 'numberOfCoupons', 'uniquePrefix' => 'uniquePrefix', 'attributes' => 'attributes', - 'recipientIntegrationId' => 'recipientIntegrationId' + 'recipientIntegrationId' => 'recipientIntegrationId', + 'validCharacters' => 'validCharacters', + 'couponPattern' => 'couponPattern' ]; /** @@ -137,12 +137,12 @@ public static function openAPIFormats() 'discountLimit' => 'setDiscountLimit', 'startDate' => 'setStartDate', 'expiryDate' => 'setExpiryDate', - 'validCharacters' => 'setValidCharacters', - 'couponPattern' => 'setCouponPattern', 'numberOfCoupons' => 'setNumberOfCoupons', 'uniquePrefix' => 'setUniquePrefix', 'attributes' => 'setAttributes', - 'recipientIntegrationId' => 'setRecipientIntegrationId' + 'recipientIntegrationId' => 'setRecipientIntegrationId', + 'validCharacters' => 'setValidCharacters', + 'couponPattern' => 'setCouponPattern' ]; /** @@ -155,12 +155,12 @@ public static function openAPIFormats() 'discountLimit' => 'getDiscountLimit', 'startDate' => 'getStartDate', 'expiryDate' => 'getExpiryDate', - 'validCharacters' => 'getValidCharacters', - 'couponPattern' => 'getCouponPattern', 'numberOfCoupons' => 'getNumberOfCoupons', 'uniquePrefix' => 'getUniquePrefix', 'attributes' => 'getAttributes', - 'recipientIntegrationId' => 'getRecipientIntegrationId' + 'recipientIntegrationId' => 'getRecipientIntegrationId', + 'validCharacters' => 'getValidCharacters', + 'couponPattern' => 'getCouponPattern' ]; /** @@ -227,12 +227,12 @@ public function __construct(array $data = null) $this->container['discountLimit'] = isset($data['discountLimit']) ? $data['discountLimit'] : null; $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; - $this->container['validCharacters'] = isset($data['validCharacters']) ? $data['validCharacters'] : null; - $this->container['couponPattern'] = isset($data['couponPattern']) ? $data['couponPattern'] : null; $this->container['numberOfCoupons'] = isset($data['numberOfCoupons']) ? $data['numberOfCoupons'] : null; $this->container['uniquePrefix'] = isset($data['uniquePrefix']) ? $data['uniquePrefix'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['recipientIntegrationId'] = isset($data['recipientIntegrationId']) ? $data['recipientIntegrationId'] : null; + $this->container['validCharacters'] = isset($data['validCharacters']) ? $data['validCharacters'] : null; + $this->container['couponPattern'] = isset($data['couponPattern']) ? $data['couponPattern'] : null; } /** @@ -263,19 +263,17 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'discountLimit', must be bigger than or equal to 0."; } - if ($this->container['validCharacters'] === null) { - $invalidProperties[] = "'validCharacters' can't be null"; + if ($this->container['numberOfCoupons'] === null) { + $invalidProperties[] = "'numberOfCoupons' can't be null"; } - if ($this->container['couponPattern'] === null) { - $invalidProperties[] = "'couponPattern' can't be null"; + if (!is_null($this->container['couponPattern']) && (mb_strlen($this->container['couponPattern']) > 100)) { + $invalidProperties[] = "invalid value for 'couponPattern', the character length must be smaller than or equal to 100."; } - if ((mb_strlen($this->container['couponPattern']) < 3)) { + + if (!is_null($this->container['couponPattern']) && (mb_strlen($this->container['couponPattern']) < 3)) { $invalidProperties[] = "invalid value for 'couponPattern', the character length must be bigger than or equal to 3."; } - if ($this->container['numberOfCoupons'] === null) { - $invalidProperties[] = "'numberOfCoupons' can't be null"; - } return $invalidProperties; } @@ -404,150 +402,152 @@ public function setExpiryDate($expiryDate) } /** - * Gets validCharacters + * Gets numberOfCoupons * - * @return string[] + * @return int */ - public function getValidCharacters() + public function getNumberOfCoupons() { - return $this->container['validCharacters']; + return $this->container['numberOfCoupons']; } /** - * Sets validCharacters + * Sets numberOfCoupons * - * @param string[] $validCharacters Set of characters to be used when generating random part of code. Defaults to [A-Z, 0-9] (in terms of RegExp). + * @param int $numberOfCoupons The number of new coupon codes to generate for the campaign. Must be at least 1. * * @return $this */ - public function setValidCharacters($validCharacters) + public function setNumberOfCoupons($numberOfCoupons) { - $this->container['validCharacters'] = $validCharacters; + $this->container['numberOfCoupons'] = $numberOfCoupons; return $this; } /** - * Gets couponPattern + * Gets uniquePrefix * - * @return string + * @return string|null */ - public function getCouponPattern() + public function getUniquePrefix() { - return $this->container['couponPattern']; + return $this->container['uniquePrefix']; } /** - * Sets couponPattern + * Sets uniquePrefix * - * @param string $couponPattern The pattern that will be used to generate coupon codes. The character `#` acts as a placeholder and will be replaced by a random character from the `validCharacters` set. + * @param string|null $uniquePrefix A unique prefix to prepend to all generated coupons. * * @return $this */ - public function setCouponPattern($couponPattern) + public function setUniquePrefix($uniquePrefix) { - - if ((mb_strlen($couponPattern) < 3)) { - throw new \InvalidArgumentException('invalid length for $couponPattern when calling NewCoupons., must be bigger than or equal to 3.'); - } - - $this->container['couponPattern'] = $couponPattern; + $this->container['uniquePrefix'] = $uniquePrefix; return $this; } /** - * Gets numberOfCoupons + * Gets attributes * - * @return int + * @return object|null */ - public function getNumberOfCoupons() + public function getAttributes() { - return $this->container['numberOfCoupons']; + return $this->container['attributes']; } /** - * Sets numberOfCoupons + * Sets attributes * - * @param int $numberOfCoupons The number of new coupon codes to generate for the campaign. Must be at least 1. + * @param object|null $attributes Arbitrary properties associated with this item * * @return $this */ - public function setNumberOfCoupons($numberOfCoupons) + public function setAttributes($attributes) { - $this->container['numberOfCoupons'] = $numberOfCoupons; + $this->container['attributes'] = $attributes; return $this; } /** - * Gets uniquePrefix + * Gets recipientIntegrationId * * @return string|null */ - public function getUniquePrefix() + public function getRecipientIntegrationId() { - return $this->container['uniquePrefix']; + return $this->container['recipientIntegrationId']; } /** - * Sets uniquePrefix + * Sets recipientIntegrationId * - * @param string|null $uniquePrefix A unique prefix to prepend to all generated coupons. + * @param string|null $recipientIntegrationId The integration ID for this coupon's beneficiary's profile * * @return $this */ - public function setUniquePrefix($uniquePrefix) + public function setRecipientIntegrationId($recipientIntegrationId) { - $this->container['uniquePrefix'] = $uniquePrefix; + $this->container['recipientIntegrationId'] = $recipientIntegrationId; return $this; } /** - * Gets attributes + * Gets validCharacters * - * @return object|null + * @return string[]|null */ - public function getAttributes() + public function getValidCharacters() { - return $this->container['attributes']; + return $this->container['validCharacters']; } /** - * Sets attributes + * Sets validCharacters * - * @param object|null $attributes Arbitrary properties associated with this item + * @param string[]|null $validCharacters Set of characters to be used when generating random part of code. Defaults to [A-Z, 0-9] (in terms of RegExp). * * @return $this */ - public function setAttributes($attributes) + public function setValidCharacters($validCharacters) { - $this->container['attributes'] = $attributes; + $this->container['validCharacters'] = $validCharacters; return $this; } /** - * Gets recipientIntegrationId + * Gets couponPattern * * @return string|null */ - public function getRecipientIntegrationId() + public function getCouponPattern() { - return $this->container['recipientIntegrationId']; + return $this->container['couponPattern']; } /** - * Sets recipientIntegrationId + * Sets couponPattern * - * @param string|null $recipientIntegrationId The integration ID for this coupon's beneficiary's profile + * @param string|null $couponPattern The pattern that will be used to generate coupon codes. The character `#` acts as a placeholder and will be replaced by a random character from the `validCharacters` set. * * @return $this */ - public function setRecipientIntegrationId($recipientIntegrationId) + public function setCouponPattern($couponPattern) { - $this->container['recipientIntegrationId'] = $recipientIntegrationId; + if (!is_null($couponPattern) && (mb_strlen($couponPattern) > 100)) { + throw new \InvalidArgumentException('invalid length for $couponPattern when calling NewCoupons., must be smaller than or equal to 100.'); + } + if (!is_null($couponPattern) && (mb_strlen($couponPattern) < 3)) { + throw new \InvalidArgumentException('invalid length for $couponPattern when calling NewCoupons., must be bigger than or equal to 3.'); + } + + $this->container['couponPattern'] = $couponPattern; return $this; } diff --git a/lib/Model/NewCouponsForMultipleRecipients.php b/lib/Model/NewCouponsForMultipleRecipients.php new file mode 100644 index 00000000..9337212e --- /dev/null +++ b/lib/Model/NewCouponsForMultipleRecipients.php @@ -0,0 +1,571 @@ + 'int', + 'discountLimit' => 'float', + 'startDate' => '\DateTime', + 'expiryDate' => '\DateTime', + 'attributes' => 'object', + 'recipientsIntegrationIds' => 'string[]', + 'validCharacters' => 'string[]', + 'couponPattern' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'usageLimit' => null, + 'discountLimit' => null, + 'startDate' => 'date-time', + 'expiryDate' => 'date-time', + 'attributes' => null, + 'recipientsIntegrationIds' => null, + 'validCharacters' => null, + 'couponPattern' => 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 = [ + 'usageLimit' => 'usageLimit', + 'discountLimit' => 'discountLimit', + 'startDate' => 'startDate', + 'expiryDate' => 'expiryDate', + 'attributes' => 'attributes', + 'recipientsIntegrationIds' => 'recipientsIntegrationIds', + 'validCharacters' => 'validCharacters', + 'couponPattern' => 'couponPattern' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'usageLimit' => 'setUsageLimit', + 'discountLimit' => 'setDiscountLimit', + 'startDate' => 'setStartDate', + 'expiryDate' => 'setExpiryDate', + 'attributes' => 'setAttributes', + 'recipientsIntegrationIds' => 'setRecipientsIntegrationIds', + 'validCharacters' => 'setValidCharacters', + 'couponPattern' => 'setCouponPattern' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'usageLimit' => 'getUsageLimit', + 'discountLimit' => 'getDiscountLimit', + 'startDate' => 'getStartDate', + 'expiryDate' => 'getExpiryDate', + 'attributes' => 'getAttributes', + 'recipientsIntegrationIds' => 'getRecipientsIntegrationIds', + 'validCharacters' => 'getValidCharacters', + 'couponPattern' => 'getCouponPattern' + ]; + + /** + * 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['usageLimit'] = isset($data['usageLimit']) ? $data['usageLimit'] : null; + $this->container['discountLimit'] = isset($data['discountLimit']) ? $data['discountLimit'] : null; + $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; + $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['recipientsIntegrationIds'] = isset($data['recipientsIntegrationIds']) ? $data['recipientsIntegrationIds'] : null; + $this->container['validCharacters'] = isset($data['validCharacters']) ? $data['validCharacters'] : null; + $this->container['couponPattern'] = isset($data['couponPattern']) ? $data['couponPattern'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['usageLimit'] === null) { + $invalidProperties[] = "'usageLimit' can't be null"; + } + if (($this->container['usageLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'usageLimit', must be smaller than or equal to 999999."; + } + + if (($this->container['usageLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'usageLimit', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['discountLimit']) && ($this->container['discountLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'discountLimit', must be smaller than or equal to 999999."; + } + + if (!is_null($this->container['discountLimit']) && ($this->container['discountLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'discountLimit', must be bigger than or equal to 0."; + } + + if ($this->container['recipientsIntegrationIds'] === null) { + $invalidProperties[] = "'recipientsIntegrationIds' can't be null"; + } + if (!is_null($this->container['couponPattern']) && (mb_strlen($this->container['couponPattern']) > 100)) { + $invalidProperties[] = "invalid value for 'couponPattern', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['couponPattern']) && (mb_strlen($this->container['couponPattern']) < 3)) { + $invalidProperties[] = "invalid value for 'couponPattern', the character length must be bigger than or equal to 3."; + } + + 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 usageLimit + * + * @return int + */ + public function getUsageLimit() + { + return $this->container['usageLimit']; + } + + /** + * Sets usageLimit + * + * @param int $usageLimit The number of times a coupon code can be redeemed. This can be set to 0 for no limit, but any campaign usage limits will still apply. + * + * @return $this + */ + public function setUsageLimit($usageLimit) + { + + if (($usageLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $usageLimit when calling NewCouponsForMultipleRecipients., must be smaller than or equal to 999999.'); + } + if (($usageLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $usageLimit when calling NewCouponsForMultipleRecipients., must be bigger than or equal to 0.'); + } + + $this->container['usageLimit'] = $usageLimit; + + return $this; + } + + /** + * Gets discountLimit + * + * @return float|null + */ + public function getDiscountLimit() + { + return $this->container['discountLimit']; + } + + /** + * Sets discountLimit + * + * @param float|null $discountLimit The amount of discounts that can be given with this coupon code. + * + * @return $this + */ + public function setDiscountLimit($discountLimit) + { + + if (!is_null($discountLimit) && ($discountLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $discountLimit when calling NewCouponsForMultipleRecipients., must be smaller than or equal to 999999.'); + } + if (!is_null($discountLimit) && ($discountLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $discountLimit when calling NewCouponsForMultipleRecipients., must be bigger than or equal to 0.'); + } + + $this->container['discountLimit'] = $discountLimit; + + return $this; + } + + /** + * Gets startDate + * + * @return \DateTime|null + */ + public function getStartDate() + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param \DateTime|null $startDate Timestamp at which point the coupon becomes valid. + * + * @return $this + */ + public function setStartDate($startDate) + { + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets expiryDate + * + * @return \DateTime|null + */ + public function getExpiryDate() + { + return $this->container['expiryDate']; + } + + /** + * Sets expiryDate + * + * @param \DateTime|null $expiryDate Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. + * + * @return $this + */ + public function setExpiryDate($expiryDate) + { + $this->container['expiryDate'] = $expiryDate; + + 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 item + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets recipientsIntegrationIds + * + * @return string[] + */ + public function getRecipientsIntegrationIds() + { + return $this->container['recipientsIntegrationIds']; + } + + /** + * Sets recipientsIntegrationIds + * + * @param string[] $recipientsIntegrationIds The integration IDs for recipients + * + * @return $this + */ + public function setRecipientsIntegrationIds($recipientsIntegrationIds) + { + $this->container['recipientsIntegrationIds'] = $recipientsIntegrationIds; + + return $this; + } + + /** + * Gets validCharacters + * + * @return string[]|null + */ + public function getValidCharacters() + { + return $this->container['validCharacters']; + } + + /** + * Sets validCharacters + * + * @param string[]|null $validCharacters Set of characters to be used when generating random part of code. Defaults to [A-Z, 0-9] (in terms of RegExp). + * + * @return $this + */ + public function setValidCharacters($validCharacters) + { + $this->container['validCharacters'] = $validCharacters; + + return $this; + } + + /** + * Gets couponPattern + * + * @return string|null + */ + public function getCouponPattern() + { + return $this->container['couponPattern']; + } + + /** + * Sets couponPattern + * + * @param string|null $couponPattern The pattern that will be used to generate coupon codes. The character `#` acts as a placeholder and will be replaced by a random character from the `validCharacters` set. + * + * @return $this + */ + public function setCouponPattern($couponPattern) + { + if (!is_null($couponPattern) && (mb_strlen($couponPattern) > 100)) { + throw new \InvalidArgumentException('invalid length for $couponPattern when calling NewCouponsForMultipleRecipients., must be smaller than or equal to 100.'); + } + if (!is_null($couponPattern) && (mb_strlen($couponPattern) < 3)) { + throw new \InvalidArgumentException('invalid length for $couponPattern when calling NewCouponsForMultipleRecipients., must be bigger than or equal to 3.'); + } + + $this->container['couponPattern'] = $couponPattern; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + 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/NewCustomerSession.php b/lib/Model/NewCustomerSession.php index 5f7c632e..74936977 100644 --- a/lib/Model/NewCustomerSession.php +++ b/lib/Model/NewCustomerSession.php @@ -249,6 +249,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['coupon']) && (mb_strlen($this->container['coupon']) > 100)) { + $invalidProperties[] = "invalid value for 'coupon', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['referral']) && (mb_strlen($this->container['referral']) > 100)) { + $invalidProperties[] = "invalid value for 'referral', the character length must be smaller than or equal to 100."; + } + $allowedValues = $this->getStateAllowableValues(); if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -315,6 +323,10 @@ public function getCoupon() */ public function setCoupon($coupon) { + if (!is_null($coupon) && (mb_strlen($coupon) > 100)) { + throw new \InvalidArgumentException('invalid length for $coupon when calling NewCustomerSession., must be smaller than or equal to 100.'); + } + $this->container['coupon'] = $coupon; return $this; @@ -339,6 +351,10 @@ public function getReferral() */ public function setReferral($referral) { + if (!is_null($referral) && (mb_strlen($referral) > 100)) { + throw new \InvalidArgumentException('invalid length for $referral when calling NewCustomerSession., must be smaller than or equal to 100.'); + } + $this->container['referral'] = $referral; return $this; diff --git a/lib/Model/NewCustomerSessionV2.php b/lib/Model/NewCustomerSessionV2.php index c54666fb..e4864b09 100644 --- a/lib/Model/NewCustomerSessionV2.php +++ b/lib/Model/NewCustomerSessionV2.php @@ -249,6 +249,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + $allowedValues = $this->getStateAllowableValues(); if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -339,6 +343,10 @@ public function getReferralCode() */ public function setReferralCode($referralCode) { + if (!is_null($referralCode) && (mb_strlen($referralCode) > 100)) { + throw new \InvalidArgumentException('invalid length for $referralCode when calling NewCustomerSessionV2., must be smaller than or equal to 100.'); + } + $this->container['referralCode'] = $referralCode; return $this; diff --git a/lib/Model/NewImport.php b/lib/Model/ProfileAudiencesChanges.php similarity index 78% rename from lib/Model/NewImport.php rename to lib/Model/ProfileAudiencesChanges.php index 8b6ed200..e5e7879f 100644 --- a/lib/Model/NewImport.php +++ b/lib/Model/ProfileAudiencesChanges.php @@ -1,6 +1,6 @@ 'string' + 'adds' => 'int[]', + 'deletes' => 'int[]' ]; /** @@ -67,7 +67,8 @@ class NewImport implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'entity' => null + 'adds' => null, + 'deletes' => null ]; /** @@ -97,7 +98,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'entity' => 'entity' + 'adds' => 'adds', + 'deletes' => 'deletes' ]; /** @@ -106,7 +108,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'entity' => 'setEntity' + 'adds' => 'setAdds', + 'deletes' => 'setDeletes' ]; /** @@ -115,7 +118,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'entity' => 'getEntity' + 'adds' => 'getAdds', + 'deletes' => 'getDeletes' ]; /** @@ -159,22 +163,9 @@ public function getModelName() return self::$openAPIModelName; } - const ENTITY_COUPON = 'Coupon'; - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getEntityAllowableValues() - { - return [ - self::ENTITY_COUPON, - ]; - } - /** * Associative array for storing property values @@ -191,7 +182,8 @@ public function getEntityAllowableValues() */ public function __construct(array $data = null) { - $this->container['entity'] = isset($data['entity']) ? $data['entity'] : null; + $this->container['adds'] = isset($data['adds']) ? $data['adds'] : null; + $this->container['deletes'] = isset($data['deletes']) ? $data['deletes'] : null; } /** @@ -203,17 +195,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['entity'] === null) { - $invalidProperties[] = "'entity' can't be null"; + if ($this->container['adds'] === null) { + $invalidProperties[] = "'adds' can't be null"; } - $allowedValues = $this->getEntityAllowableValues(); - if (!is_null($this->container['entity']) && !in_array($this->container['entity'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'entity', must be one of '%s'", - implode("', '", $allowedValues) - ); + if ($this->container['deletes'] === null) { + $invalidProperties[] = "'deletes' can't be null"; } - return $invalidProperties; } @@ -230,34 +217,49 @@ public function valid() /** - * Gets entity + * Gets adds * - * @return string + * @return int[] */ - public function getEntity() + public function getAdds() { - return $this->container['entity']; + return $this->container['adds']; } /** - * Sets entity + * Sets adds * - * @param string $entity The name of the entity that was imported. + * @param int[] $adds The IDs of the audiences for the customer to join. * * @return $this */ - public function setEntity($entity) + public function setAdds($adds) { - $allowedValues = $this->getEntityAllowableValues(); - if (!in_array($entity, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'entity', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['entity'] = $entity; + $this->container['adds'] = $adds; + + return $this; + } + + /** + * Gets deletes + * + * @return int[] + */ + public function getDeletes() + { + return $this->container['deletes']; + } + + /** + * Sets deletes + * + * @param int[] $deletes The IDs of the audiences for the customer to leave. + * + * @return $this + */ + public function setDeletes($deletes) + { + $this->container['deletes'] = $deletes; return $this; } diff --git a/lib/Model/RejectCouponEffectProps.php b/lib/Model/RejectCouponEffectProps.php index c45fa26f..3501c218 100644 --- a/lib/Model/RejectCouponEffectProps.php +++ b/lib/Model/RejectCouponEffectProps.php @@ -59,7 +59,10 @@ class RejectCouponEffectProps implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'value' => 'string', - 'rejectionReason' => 'string' + 'rejectionReason' => 'string', + 'conditionIndex' => 'int', + 'effectIndex' => 'int', + 'details' => 'string' ]; /** @@ -69,7 +72,10 @@ class RejectCouponEffectProps implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'value' => null, - 'rejectionReason' => null + 'rejectionReason' => null, + 'conditionIndex' => null, + 'effectIndex' => null, + 'details' => null ]; /** @@ -100,7 +106,10 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'value' => 'value', - 'rejectionReason' => 'rejectionReason' + 'rejectionReason' => 'rejectionReason', + 'conditionIndex' => 'conditionIndex', + 'effectIndex' => 'effectIndex', + 'details' => 'details' ]; /** @@ -110,7 +119,10 @@ public static function openAPIFormats() */ protected static $setters = [ 'value' => 'setValue', - 'rejectionReason' => 'setRejectionReason' + 'rejectionReason' => 'setRejectionReason', + 'conditionIndex' => 'setConditionIndex', + 'effectIndex' => 'setEffectIndex', + 'details' => 'setDetails' ]; /** @@ -120,7 +132,10 @@ public static function openAPIFormats() */ protected static $getters = [ 'value' => 'getValue', - 'rejectionReason' => 'getRejectionReason' + 'rejectionReason' => 'getRejectionReason', + 'conditionIndex' => 'getConditionIndex', + 'effectIndex' => 'getEffectIndex', + 'details' => 'getDetails' ]; /** @@ -185,6 +200,9 @@ public function __construct(array $data = null) { $this->container['value'] = isset($data['value']) ? $data['value'] : null; $this->container['rejectionReason'] = isset($data['rejectionReason']) ? $data['rejectionReason'] : null; + $this->container['conditionIndex'] = isset($data['conditionIndex']) ? $data['conditionIndex'] : null; + $this->container['effectIndex'] = isset($data['effectIndex']) ? $data['effectIndex'] : null; + $this->container['details'] = isset($data['details']) ? $data['details'] : null; } /** @@ -264,6 +282,78 @@ public function setRejectionReason($rejectionReason) 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 caused the rejection of the coupon + * + * @return $this + */ + public function setConditionIndex($conditionIndex) + { + $this->container['conditionIndex'] = $conditionIndex; + + return $this; + } + + /** + * Gets effectIndex + * + * @return int|null + */ + public function getEffectIndex() + { + return $this->container['effectIndex']; + } + + /** + * Sets effectIndex + * + * @param int|null $effectIndex The index of the effect that caused the rejection of the coupon + * + * @return $this + */ + public function setEffectIndex($effectIndex) + { + $this->container['effectIndex'] = $effectIndex; + + return $this; + } + + /** + * Gets details + * + * @return string|null + */ + public function getDetails() + { + return $this->container['details']; + } + + /** + * Sets details + * + * @param string|null $details More details about the failure + * + * @return $this + */ + public function setDetails($details) + { + $this->container['details'] = $details; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/RejectReferralEffectProps.php b/lib/Model/RejectReferralEffectProps.php index 1ebde056..a38b02d9 100644 --- a/lib/Model/RejectReferralEffectProps.php +++ b/lib/Model/RejectReferralEffectProps.php @@ -59,7 +59,10 @@ class RejectReferralEffectProps implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'value' => 'string', - 'rejectionReason' => 'string' + 'rejectionReason' => 'string', + 'conditionIndex' => 'int', + 'effectIndex' => 'int', + 'details' => 'string' ]; /** @@ -69,7 +72,10 @@ class RejectReferralEffectProps implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'value' => null, - 'rejectionReason' => null + 'rejectionReason' => null, + 'conditionIndex' => null, + 'effectIndex' => null, + 'details' => null ]; /** @@ -100,7 +106,10 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'value' => 'value', - 'rejectionReason' => 'rejectionReason' + 'rejectionReason' => 'rejectionReason', + 'conditionIndex' => 'conditionIndex', + 'effectIndex' => 'effectIndex', + 'details' => 'details' ]; /** @@ -110,7 +119,10 @@ public static function openAPIFormats() */ protected static $setters = [ 'value' => 'setValue', - 'rejectionReason' => 'setRejectionReason' + 'rejectionReason' => 'setRejectionReason', + 'conditionIndex' => 'setConditionIndex', + 'effectIndex' => 'setEffectIndex', + 'details' => 'setDetails' ]; /** @@ -120,7 +132,10 @@ public static function openAPIFormats() */ protected static $getters = [ 'value' => 'getValue', - 'rejectionReason' => 'getRejectionReason' + 'rejectionReason' => 'getRejectionReason', + 'conditionIndex' => 'getConditionIndex', + 'effectIndex' => 'getEffectIndex', + 'details' => 'getDetails' ]; /** @@ -185,6 +200,9 @@ public function __construct(array $data = null) { $this->container['value'] = isset($data['value']) ? $data['value'] : null; $this->container['rejectionReason'] = isset($data['rejectionReason']) ? $data['rejectionReason'] : null; + $this->container['conditionIndex'] = isset($data['conditionIndex']) ? $data['conditionIndex'] : null; + $this->container['effectIndex'] = isset($data['effectIndex']) ? $data['effectIndex'] : null; + $this->container['details'] = isset($data['details']) ? $data['details'] : null; } /** @@ -264,6 +282,78 @@ public function setRejectionReason($rejectionReason) 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 caused the rejection of the referral + * + * @return $this + */ + public function setConditionIndex($conditionIndex) + { + $this->container['conditionIndex'] = $conditionIndex; + + return $this; + } + + /** + * Gets effectIndex + * + * @return int|null + */ + public function getEffectIndex() + { + return $this->container['effectIndex']; + } + + /** + * Sets effectIndex + * + * @param int|null $effectIndex The index of the effect that caused the rejection of the referral + * + * @return $this + */ + public function setEffectIndex($effectIndex) + { + $this->container['effectIndex'] = $effectIndex; + + return $this; + } + + /** + * Gets details + * + * @return string|null + */ + public function getDetails() + { + return $this->container['details']; + } + + /** + * Sets details + * + * @param string|null $details More details about the failure + * + * @return $this + */ + public function setDetails($details) + { + $this->container['details'] = $details; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CartItemAdjustment.php b/lib/Model/RollbackAddedLoyaltyPointsEffectProps.php similarity index 57% rename from lib/Model/CartItemAdjustment.php rename to lib/Model/RollbackAddedLoyaltyPointsEffectProps.php index 3c69a8d2..5b5b17d1 100644 --- a/lib/Model/CartItemAdjustment.php +++ b/lib/Model/RollbackAddedLoyaltyPointsEffectProps.php @@ -1,6 +1,6 @@ 'int', - 'pointPayment' => 'int', - 'remainingPrice' => 'float' + 'programId' => 'int', + 'subLedgerId' => 'string', + 'value' => 'float', + 'recipientIntegrationId' => 'string', + 'transactionUUID' => 'string' ]; /** @@ -68,9 +71,11 @@ class CartItemAdjustment implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'payFromLoyaltyProgram' => null, - 'pointPayment' => null, - 'remainingPrice' => null + 'programId' => null, + 'subLedgerId' => null, + 'value' => null, + 'recipientIntegrationId' => null, + 'transactionUUID' => null ]; /** @@ -100,9 +105,11 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'payFromLoyaltyProgram' => 'payFromLoyaltyProgram', - 'pointPayment' => 'pointPayment', - 'remainingPrice' => 'remainingPrice' + 'programId' => 'programId', + 'subLedgerId' => 'subLedgerId', + 'value' => 'value', + 'recipientIntegrationId' => 'recipientIntegrationId', + 'transactionUUID' => 'transactionUUID' ]; /** @@ -111,9 +118,11 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'payFromLoyaltyProgram' => 'setPayFromLoyaltyProgram', - 'pointPayment' => 'setPointPayment', - 'remainingPrice' => 'setRemainingPrice' + 'programId' => 'setProgramId', + 'subLedgerId' => 'setSubLedgerId', + 'value' => 'setValue', + 'recipientIntegrationId' => 'setRecipientIntegrationId', + 'transactionUUID' => 'setTransactionUUID' ]; /** @@ -122,9 +131,11 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'payFromLoyaltyProgram' => 'getPayFromLoyaltyProgram', - 'pointPayment' => 'getPointPayment', - 'remainingPrice' => 'getRemainingPrice' + 'programId' => 'getProgramId', + 'subLedgerId' => 'getSubLedgerId', + 'value' => 'getValue', + 'recipientIntegrationId' => 'getRecipientIntegrationId', + 'transactionUUID' => 'getTransactionUUID' ]; /** @@ -187,9 +198,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['payFromLoyaltyProgram'] = isset($data['payFromLoyaltyProgram']) ? $data['payFromLoyaltyProgram'] : null; - $this->container['pointPayment'] = isset($data['pointPayment']) ? $data['pointPayment'] : null; - $this->container['remainingPrice'] = isset($data['remainingPrice']) ? $data['remainingPrice'] : null; + $this->container['programId'] = isset($data['programId']) ? $data['programId'] : null; + $this->container['subLedgerId'] = isset($data['subLedgerId']) ? $data['subLedgerId'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['recipientIntegrationId'] = isset($data['recipientIntegrationId']) ? $data['recipientIntegrationId'] : null; + $this->container['transactionUUID'] = isset($data['transactionUUID']) ? $data['transactionUUID'] : null; } /** @@ -201,20 +214,21 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['payFromLoyaltyProgram'] === null) { - $invalidProperties[] = "'payFromLoyaltyProgram' can't be null"; + if ($this->container['programId'] === null) { + $invalidProperties[] = "'programId' can't be null"; } - if ($this->container['pointPayment'] === null) { - $invalidProperties[] = "'pointPayment' can't be null"; + if ($this->container['subLedgerId'] === null) { + $invalidProperties[] = "'subLedgerId' can't be null"; } - if (($this->container['pointPayment'] < 1)) { - $invalidProperties[] = "invalid value for 'pointPayment', must be bigger than or equal to 1."; + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; } - - if (!is_null($this->container['remainingPrice']) && ($this->container['remainingPrice'] < 0)) { - $invalidProperties[] = "invalid value for 'remainingPrice', must be bigger than or equal to 0."; + if ($this->container['recipientIntegrationId'] === null) { + $invalidProperties[] = "'recipientIntegrationId' can't be null"; + } + if ($this->container['transactionUUID'] === null) { + $invalidProperties[] = "'transactionUUID' can't be null"; } - return $invalidProperties; } @@ -231,83 +245,121 @@ public function valid() /** - * Gets payFromLoyaltyProgram + * Gets programId * * @return int */ - public function getPayFromLoyaltyProgram() + public function getProgramId() { - return $this->container['payFromLoyaltyProgram']; + return $this->container['programId']; } /** - * Sets payFromLoyaltyProgram + * Sets programId * - * @param int $payFromLoyaltyProgram Loyalty Program to be used for payment + * @param int $programId The ID of the loyalty program where the points were originally added * * @return $this */ - public function setPayFromLoyaltyProgram($payFromLoyaltyProgram) + public function setProgramId($programId) { - $this->container['payFromLoyaltyProgram'] = $payFromLoyaltyProgram; + $this->container['programId'] = $programId; return $this; } /** - * Gets pointPayment + * Gets subLedgerId * - * @return int + * @return string */ - public function getPointPayment() + public function getSubLedgerId() { - return $this->container['pointPayment']; + return $this->container['subLedgerId']; } /** - * Sets pointPayment + * Sets subLedgerId * - * @param int $pointPayment Amount of points to be spend + * @param string $subLedgerId The ID of the subledger within the loyalty program where these points were originally added * * @return $this */ - public function setPointPayment($pointPayment) + public function setSubLedgerId($subLedgerId) { + $this->container['subLedgerId'] = $subLedgerId; - if (($pointPayment < 1)) { - throw new \InvalidArgumentException('invalid value for $pointPayment when calling CartItemAdjustment., must be bigger than or equal to 1.'); - } + return $this; + } - $this->container['pointPayment'] = $pointPayment; + /** + * Gets value + * + * @return float + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param float $value The amount of points that were rolled back + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; return $this; } /** - * Gets remainingPrice + * Gets recipientIntegrationId * - * @return float|null + * @return string */ - public function getRemainingPrice() + public function getRecipientIntegrationId() { - return $this->container['remainingPrice']; + return $this->container['recipientIntegrationId']; } /** - * Sets remainingPrice + * Sets recipientIntegrationId * - * @param float|null $remainingPrice Remaining price in currency after payment in points has been made + * @param string $recipientIntegrationId The user for whom these points were originally added * * @return $this */ - public function setRemainingPrice($remainingPrice) + public function setRecipientIntegrationId($recipientIntegrationId) { + $this->container['recipientIntegrationId'] = $recipientIntegrationId; - if (!is_null($remainingPrice) && ($remainingPrice < 0)) { - throw new \InvalidArgumentException('invalid value for $remainingPrice when calling CartItemAdjustment., must be bigger than or equal to 0.'); - } + return $this; + } + + /** + * Gets transactionUUID + * + * @return string + */ + public function getTransactionUUID() + { + return $this->container['transactionUUID']; + } - $this->container['remainingPrice'] = $remainingPrice; + /** + * Sets transactionUUID + * + * @param string $transactionUUID The identifier of 'deduction' entry added to the ledger as the `addLoyaltyPoints` effect is rolled back. + * + * @return $this + */ + public function setTransactionUUID($transactionUUID) + { + $this->container['transactionUUID'] = $transactionUUID; return $this; } diff --git a/lib/Model/RollbackDeductedLoyaltyPointsEffectProps.php b/lib/Model/RollbackDeductedLoyaltyPointsEffectProps.php new file mode 100644 index 00000000..0cfb4104 --- /dev/null +++ b/lib/Model/RollbackDeductedLoyaltyPointsEffectProps.php @@ -0,0 +1,503 @@ + 'int', + 'subLedgerId' => 'string', + 'value' => 'float', + 'recipientIntegrationId' => 'string', + 'startDate' => '\DateTime', + 'expiryDate' => '\DateTime', + 'transactionUUID' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'programId' => null, + 'subLedgerId' => null, + 'value' => null, + 'recipientIntegrationId' => null, + 'startDate' => 'date-time', + 'expiryDate' => 'date-time', + 'transactionUUID' => 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 = [ + 'programId' => 'programId', + 'subLedgerId' => 'subLedgerId', + 'value' => 'value', + 'recipientIntegrationId' => 'recipientIntegrationId', + 'startDate' => 'startDate', + 'expiryDate' => 'expiryDate', + 'transactionUUID' => 'transactionUUID' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'programId' => 'setProgramId', + 'subLedgerId' => 'setSubLedgerId', + 'value' => 'setValue', + 'recipientIntegrationId' => 'setRecipientIntegrationId', + 'startDate' => 'setStartDate', + 'expiryDate' => 'setExpiryDate', + 'transactionUUID' => 'setTransactionUUID' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'programId' => 'getProgramId', + 'subLedgerId' => 'getSubLedgerId', + 'value' => 'getValue', + 'recipientIntegrationId' => 'getRecipientIntegrationId', + 'startDate' => 'getStartDate', + 'expiryDate' => 'getExpiryDate', + 'transactionUUID' => 'getTransactionUUID' + ]; + + /** + * 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['programId'] = isset($data['programId']) ? $data['programId'] : null; + $this->container['subLedgerId'] = isset($data['subLedgerId']) ? $data['subLedgerId'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['recipientIntegrationId'] = isset($data['recipientIntegrationId']) ? $data['recipientIntegrationId'] : null; + $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; + $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; + $this->container['transactionUUID'] = isset($data['transactionUUID']) ? $data['transactionUUID'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['programId'] === null) { + $invalidProperties[] = "'programId' can't be null"; + } + if ($this->container['subLedgerId'] === null) { + $invalidProperties[] = "'subLedgerId' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + if ($this->container['recipientIntegrationId'] === null) { + $invalidProperties[] = "'recipientIntegrationId' can't be null"; + } + if ($this->container['transactionUUID'] === null) { + $invalidProperties[] = "'transactionUUID' 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 programId + * + * @return int + */ + public function getProgramId() + { + return $this->container['programId']; + } + + /** + * Sets programId + * + * @param int $programId The ID of the loyalty program where these points were reimbursed + * + * @return $this + */ + public function setProgramId($programId) + { + $this->container['programId'] = $programId; + + return $this; + } + + /** + * Gets subLedgerId + * + * @return string + */ + public function getSubLedgerId() + { + return $this->container['subLedgerId']; + } + + /** + * Sets subLedgerId + * + * @param string $subLedgerId The ID of the subledger within the loyalty program where these points were reimbursed + * + * @return $this + */ + public function setSubLedgerId($subLedgerId) + { + $this->container['subLedgerId'] = $subLedgerId; + + return $this; + } + + /** + * Gets value + * + * @return float + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param float $value The amount of reimbursed points that were added + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets recipientIntegrationId + * + * @return string + */ + public function getRecipientIntegrationId() + { + return $this->container['recipientIntegrationId']; + } + + /** + * Sets recipientIntegrationId + * + * @param string $recipientIntegrationId The user for whom these points were reimbursed + * + * @return $this + */ + public function setRecipientIntegrationId($recipientIntegrationId) + { + $this->container['recipientIntegrationId'] = $recipientIntegrationId; + + return $this; + } + + /** + * Gets startDate + * + * @return \DateTime|null + */ + public function getStartDate() + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param \DateTime|null $startDate Date after which the reimbursed points will be valid + * + * @return $this + */ + public function setStartDate($startDate) + { + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets expiryDate + * + * @return \DateTime|null + */ + public function getExpiryDate() + { + return $this->container['expiryDate']; + } + + /** + * Sets expiryDate + * + * @param \DateTime|null $expiryDate Date after which the reimbursed points will expire + * + * @return $this + */ + public function setExpiryDate($expiryDate) + { + $this->container['expiryDate'] = $expiryDate; + + return $this; + } + + /** + * Gets transactionUUID + * + * @return string + */ + public function getTransactionUUID() + { + return $this->container['transactionUUID']; + } + + /** + * Sets transactionUUID + * + * @param string $transactionUUID The identifier of 'addition' entries added to the ledger as the `deductLoyaltyPoints` effect is rolled back + * + * @return $this + */ + public function setTransactionUUID($transactionUUID) + { + $this->container['transactionUUID'] = $transactionUUID; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + 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/ImportCoupons.php b/lib/Model/RollbackReferralEffectProps.php similarity index 85% rename from lib/Model/ImportCoupons.php rename to lib/Model/RollbackReferralEffectProps.php index f45eaf0c..7515ee55 100644 --- a/lib/Model/ImportCoupons.php +++ b/lib/Model/RollbackReferralEffectProps.php @@ -1,6 +1,6 @@ 'string' + 'value' => 'string' ]; /** @@ -66,7 +67,7 @@ class ImportCoupons implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'coupons' => null + 'value' => null ]; /** @@ -96,7 +97,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'coupons' => 'coupons' + 'value' => 'value' ]; /** @@ -105,7 +106,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'coupons' => 'setCoupons' + 'value' => 'setValue' ]; /** @@ -114,7 +115,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'coupons' => 'getCoupons' + 'value' => 'getValue' ]; /** @@ -177,7 +178,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['coupons'] = isset($data['coupons']) ? $data['coupons'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; } /** @@ -189,8 +190,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['coupons'] === null) { - $invalidProperties[] = "'coupons' can't be null"; + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; } return $invalidProperties; } @@ -208,25 +209,25 @@ public function valid() /** - * Gets coupons + * Gets value * * @return string */ - public function getCoupons() + public function getValue() { - return $this->container['coupons']; + return $this->container['value']; } /** - * Sets coupons + * Sets value * - * @param string $coupons coupons + * @param string $value The referral code whose usage has been rolled back * * @return $this */ - public function setCoupons($coupons) + public function setValue($value) { - $this->container['coupons'] = $coupons; + $this->container['value'] = $value; return $this; } diff --git a/lib/Model/RuleFailureReason.php b/lib/Model/RuleFailureReason.php new file mode 100644 index 00000000..c5d5907f --- /dev/null +++ b/lib/Model/RuleFailureReason.php @@ -0,0 +1,653 @@ + 'int', + 'campaignName' => 'string', + 'rulesetID' => 'int', + 'couponID' => 'int', + 'couponValue' => 'string', + 'referralID' => 'int', + 'referralValue' => 'string', + 'ruleIndex' => 'int', + 'ruleName' => 'string', + 'conditionIndex' => 'int', + 'effectIndex' => 'int', + 'details' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'campaignID' => null, + 'campaignName' => null, + 'rulesetID' => null, + 'couponID' => null, + 'couponValue' => null, + 'referralID' => null, + 'referralValue' => null, + 'ruleIndex' => null, + 'ruleName' => null, + 'conditionIndex' => null, + 'effectIndex' => null, + 'details' => 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 = [ + 'campaignID' => 'campaignID', + 'campaignName' => 'campaignName', + 'rulesetID' => 'rulesetID', + 'couponID' => 'couponID', + 'couponValue' => 'couponValue', + 'referralID' => 'referralID', + 'referralValue' => 'referralValue', + 'ruleIndex' => 'ruleIndex', + 'ruleName' => 'ruleName', + 'conditionIndex' => 'conditionIndex', + 'effectIndex' => 'effectIndex', + 'details' => 'details' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaignID' => 'setCampaignID', + 'campaignName' => 'setCampaignName', + 'rulesetID' => 'setRulesetID', + 'couponID' => 'setCouponID', + 'couponValue' => 'setCouponValue', + 'referralID' => 'setReferralID', + 'referralValue' => 'setReferralValue', + 'ruleIndex' => 'setRuleIndex', + 'ruleName' => 'setRuleName', + 'conditionIndex' => 'setConditionIndex', + 'effectIndex' => 'setEffectIndex', + 'details' => 'setDetails' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaignID' => 'getCampaignID', + 'campaignName' => 'getCampaignName', + 'rulesetID' => 'getRulesetID', + 'couponID' => 'getCouponID', + 'couponValue' => 'getCouponValue', + 'referralID' => 'getReferralID', + 'referralValue' => 'getReferralValue', + 'ruleIndex' => 'getRuleIndex', + 'ruleName' => 'getRuleName', + 'conditionIndex' => 'getConditionIndex', + 'effectIndex' => 'getEffectIndex', + 'details' => 'getDetails' + ]; + + /** + * 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['campaignID'] = isset($data['campaignID']) ? $data['campaignID'] : null; + $this->container['campaignName'] = isset($data['campaignName']) ? $data['campaignName'] : null; + $this->container['rulesetID'] = isset($data['rulesetID']) ? $data['rulesetID'] : null; + $this->container['couponID'] = isset($data['couponID']) ? $data['couponID'] : null; + $this->container['couponValue'] = isset($data['couponValue']) ? $data['couponValue'] : null; + $this->container['referralID'] = isset($data['referralID']) ? $data['referralID'] : null; + $this->container['referralValue'] = isset($data['referralValue']) ? $data['referralValue'] : null; + $this->container['ruleIndex'] = isset($data['ruleIndex']) ? $data['ruleIndex'] : null; + $this->container['ruleName'] = isset($data['ruleName']) ? $data['ruleName'] : null; + $this->container['conditionIndex'] = isset($data['conditionIndex']) ? $data['conditionIndex'] : null; + $this->container['effectIndex'] = isset($data['effectIndex']) ? $data['effectIndex'] : null; + $this->container['details'] = isset($data['details']) ? $data['details'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['campaignID'] === null) { + $invalidProperties[] = "'campaignID' can't be null"; + } + if ($this->container['campaignName'] === null) { + $invalidProperties[] = "'campaignName' can't be null"; + } + if ($this->container['rulesetID'] === null) { + $invalidProperties[] = "'rulesetID' can't be null"; + } + if ($this->container['ruleIndex'] === null) { + $invalidProperties[] = "'ruleIndex' can't be null"; + } + if ($this->container['ruleName'] === null) { + $invalidProperties[] = "'ruleName' 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 campaignID + * + * @return int + */ + public function getCampaignID() + { + return $this->container['campaignID']; + } + + /** + * Sets campaignID + * + * @param int $campaignID The ID of the campaign that contains the rule that failed + * + * @return $this + */ + public function setCampaignID($campaignID) + { + $this->container['campaignID'] = $campaignID; + + return $this; + } + + /** + * Gets campaignName + * + * @return string + */ + public function getCampaignName() + { + return $this->container['campaignName']; + } + + /** + * Sets campaignName + * + * @param string $campaignName The name of the campaign that contains the rule that failed + * + * @return $this + */ + public function setCampaignName($campaignName) + { + $this->container['campaignName'] = $campaignName; + + return $this; + } + + /** + * Gets rulesetID + * + * @return int + */ + public function getRulesetID() + { + return $this->container['rulesetID']; + } + + /** + * Sets rulesetID + * + * @param int $rulesetID The ID of the ruleset that contains the rule that failed + * + * @return $this + */ + public function setRulesetID($rulesetID) + { + $this->container['rulesetID'] = $rulesetID; + + return $this; + } + + /** + * Gets couponID + * + * @return int|null + */ + public function getCouponID() + { + return $this->container['couponID']; + } + + /** + * Sets couponID + * + * @param int|null $couponID The ID of the coupon that was being evaluated at the time of the rule failure + * + * @return $this + */ + public function setCouponID($couponID) + { + $this->container['couponID'] = $couponID; + + return $this; + } + + /** + * Gets couponValue + * + * @return string|null + */ + public function getCouponValue() + { + return $this->container['couponValue']; + } + + /** + * Sets couponValue + * + * @param string|null $couponValue The value of the coupon that was being evaluated at the time of the rule failure + * + * @return $this + */ + public function setCouponValue($couponValue) + { + $this->container['couponValue'] = $couponValue; + + return $this; + } + + /** + * Gets referralID + * + * @return int|null + */ + public function getReferralID() + { + return $this->container['referralID']; + } + + /** + * Sets referralID + * + * @param int|null $referralID The ID of the referral that was being evaluated at the time of the rule failure + * + * @return $this + */ + public function setReferralID($referralID) + { + $this->container['referralID'] = $referralID; + + return $this; + } + + /** + * Gets referralValue + * + * @return string|null + */ + public function getReferralValue() + { + return $this->container['referralValue']; + } + + /** + * Sets referralValue + * + * @param string|null $referralValue The value of the referral that was being evaluated at the time of the rule failure + * + * @return $this + */ + public function setReferralValue($referralValue) + { + $this->container['referralValue'] = $referralValue; + + return $this; + } + + /** + * Gets ruleIndex + * + * @return int + */ + public function getRuleIndex() + { + return $this->container['ruleIndex']; + } + + /** + * Sets ruleIndex + * + * @param int $ruleIndex The index of the rule that failed within the ruleset + * + * @return $this + */ + public function setRuleIndex($ruleIndex) + { + $this->container['ruleIndex'] = $ruleIndex; + + return $this; + } + + /** + * Gets ruleName + * + * @return string + */ + public function getRuleName() + { + return $this->container['ruleName']; + } + + /** + * Sets ruleName + * + * @param string $ruleName The name of the rule that failed within the ruleset + * + * @return $this + */ + public function setRuleName($ruleName) + { + $this->container['ruleName'] = $ruleName; + + 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 failed + * + * @return $this + */ + public function setConditionIndex($conditionIndex) + { + $this->container['conditionIndex'] = $conditionIndex; + + return $this; + } + + /** + * Gets effectIndex + * + * @return int|null + */ + public function getEffectIndex() + { + return $this->container['effectIndex']; + } + + /** + * Sets effectIndex + * + * @param int|null $effectIndex The index of the effect that failed + * + * @return $this + */ + public function setEffectIndex($effectIndex) + { + $this->container['effectIndex'] = $effectIndex; + + return $this; + } + + /** + * Gets details + * + * @return string|null + */ + public function getDetails() + { + return $this->container['details']; + } + + /** + * Sets details + * + * @param string|null $details More details about the failure + * + * @return $this + */ + public function setDetails($details) + { + $this->container['details'] = $details; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + 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 aaa77b62..eb82d872 100644 --- a/lib/Model/UpdateApplication.php +++ b/lib/Model/UpdateApplication.php @@ -66,6 +66,7 @@ class UpdateApplication implements ModelInterface, ArrayAccess 'limits' => '\TalonOne\Client\Model\LimitConfig[]', 'campaignPriority' => 'string', 'exclusiveCampaignsStrategy' => 'string', + 'defaultDiscountScope' => 'string', 'enableCascadingDiscounts' => 'bool', 'enableFlattenedCartItems' => 'bool', 'attributesSettings' => '\TalonOne\Client\Model\AttributesSettings', @@ -87,6 +88,7 @@ class UpdateApplication implements ModelInterface, ArrayAccess 'limits' => null, 'campaignPriority' => null, 'exclusiveCampaignsStrategy' => null, + 'defaultDiscountScope' => null, 'enableCascadingDiscounts' => null, 'enableFlattenedCartItems' => null, 'attributesSettings' => null, @@ -129,6 +131,7 @@ public static function openAPIFormats() 'limits' => 'limits', 'campaignPriority' => 'campaignPriority', 'exclusiveCampaignsStrategy' => 'exclusiveCampaignsStrategy', + 'defaultDiscountScope' => 'defaultDiscountScope', 'enableCascadingDiscounts' => 'enableCascadingDiscounts', 'enableFlattenedCartItems' => 'enableFlattenedCartItems', 'attributesSettings' => 'attributesSettings', @@ -150,6 +153,7 @@ public static function openAPIFormats() 'limits' => 'setLimits', 'campaignPriority' => 'setCampaignPriority', 'exclusiveCampaignsStrategy' => 'setExclusiveCampaignsStrategy', + 'defaultDiscountScope' => 'setDefaultDiscountScope', 'enableCascadingDiscounts' => 'setEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'setEnableFlattenedCartItems', 'attributesSettings' => 'setAttributesSettings', @@ -171,6 +175,7 @@ public static function openAPIFormats() 'limits' => 'getLimits', 'campaignPriority' => 'getCampaignPriority', 'exclusiveCampaignsStrategy' => 'getExclusiveCampaignsStrategy', + 'defaultDiscountScope' => 'getDefaultDiscountScope', 'enableCascadingDiscounts' => 'getEnableCascadingDiscounts', 'enableFlattenedCartItems' => 'getEnableFlattenedCartItems', 'attributesSettings' => 'getAttributesSettings', @@ -227,6 +232,9 @@ public function getModelName() 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'; @@ -272,6 +280,20 @@ public function getExclusiveCampaignsStrategyAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDefaultDiscountScopeAllowableValues() + { + return [ + self::DEFAULT_DISCOUNT_SCOPE_SESSION_TOTAL, + self::DEFAULT_DISCOUNT_SCOPE_CART_ITEMS, + self::DEFAULT_DISCOUNT_SCOPE_ADDITIONAL_COSTS, + ]; + } + /** * Associative array for storing property values @@ -297,6 +319,7 @@ public function __construct(array $data = null) $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; $this->container['campaignPriority'] = isset($data['campaignPriority']) ? $data['campaignPriority'] : null; $this->container['exclusiveCampaignsStrategy'] = isset($data['exclusiveCampaignsStrategy']) ? $data['exclusiveCampaignsStrategy'] : null; + $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; $this->container['attributesSettings'] = isset($data['attributesSettings']) ? $data['attributesSettings'] : null; @@ -357,6 +380,14 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getDefaultDiscountScopeAllowableValues(); + if (!is_null($this->container['defaultDiscountScope']) && !in_array($this->container['defaultDiscountScope'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'defaultDiscountScope', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -630,6 +661,39 @@ public function setExclusiveCampaignsStrategy($exclusiveCampaignsStrategy) return $this; } + /** + * Gets defaultDiscountScope + * + * @return string|null + */ + public function getDefaultDiscountScope() + { + return $this->container['defaultDiscountScope']; + } + + /** + * Sets defaultDiscountScope + * + * @param string|null $defaultDiscountScope The default scope to apply \"setDiscount\" effects on if no scope was provided with the effect. + * + * @return $this + */ + public function setDefaultDiscountScope($defaultDiscountScope) + { + $allowedValues = $this->getDefaultDiscountScopeAllowableValues(); + if (!is_null($defaultDiscountScope) && !in_array($defaultDiscountScope, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'defaultDiscountScope', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['defaultDiscountScope'] = $defaultDiscountScope; + + return $this; + } + /** * Gets enableCascadingDiscounts * diff --git a/test/Api/IntegrationApiTest.php b/test/Api/IntegrationApiTest.php index 53ca6f70..78f3b962 100644 --- a/test/Api/IntegrationApiTest.php +++ b/test/Api/IntegrationApiTest.php @@ -105,7 +105,7 @@ public function testDeleteCouponReservation() /** * Test case for deleteCustomerData * - * Delete the personal data of a customer.. + * Delete the personal data of a customer. * */ public function testDeleteCustomerData() @@ -115,7 +115,7 @@ public function testDeleteCustomerData() /** * Test case for getCustomerInventory * - * Get an inventory of all data associated with a specific customer profile.. + * Get an inventory of all data associated with a specific customer profile. * */ public function testGetCustomerInventory() diff --git a/test/Api/ManagementApiTest.php b/test/Api/ManagementApiTest.php index ac341f8c..3f7457b8 100644 --- a/test/Api/ManagementApiTest.php +++ b/test/Api/ManagementApiTest.php @@ -132,6 +132,16 @@ public function testCreateCoupons() { } + /** + * Test case for createCouponsForMultipleRecipients + * + * Create Coupons for Multiple Recipients. + * + */ + public function testCreateCouponsForMultipleRecipients() + { + } + /** * Test case for createPasswordRecoveryEmail * @@ -212,6 +222,66 @@ public function testDeleteRuleset() { } + /** + * Test case for destroySession + * + * Destroy a Session. + * + */ + public function testDestroySession() + { + } + + /** + * Test case for exportCoupons + * + * Export Coupons to a CSV file. + * + */ + public function testExportCoupons() + { + } + + /** + * Test case for exportCustomerSessions + * + * Export Customer Sessions to a CSV file. + * + */ + public function testExportCustomerSessions() + { + } + + /** + * Test case for exportEffects + * + * Export triggered Effects to a CSV file. + * + */ + public function testExportEffects() + { + } + + /** + * Test case for exportLoyaltyBalance + * + * Export customer loyalty balance to a CSV file. + * + */ + public function testExportLoyaltyBalance() + { + } + + /** + * Test case for exportLoyaltyLedger + * + * Export a customer's loyalty ledger log to a CSV file. + * + */ + public function testExportLoyaltyLedger() + { + } + /** * Test case for getAccessLogs * @@ -285,7 +355,7 @@ public function testGetAllAccessLogs() /** * Test case for getAllRoles * - * Get all roles.. + * Get all roles. * */ public function testGetAllRoles() @@ -422,6 +492,16 @@ public function testGetAttributes() { } + /** + * Test case for getAudiences + * + * Get all audiences. + * + */ + public function testGetAudiences() + { + } + /** * Test case for getCampaign * @@ -602,16 +682,6 @@ public function testGetExports() { } - /** - * Test case for getImports - * - * Get Imports. - * - */ - public function testGetImports() - { - } - /** * Test case for getLoyaltyPoints * @@ -675,7 +745,7 @@ public function testGetReferralsWithoutTotalCount() /** * Test case for getRole * - * Get information for the specified role.. + * Get information for the specified role. * */ public function testGetRole() diff --git a/test/Model/AddLoyaltyPointsEffectPropsTest.php b/test/Model/AddLoyaltyPointsEffectPropsTest.php index 2bb5ae55..ec116ab1 100644 --- a/test/Model/AddLoyaltyPointsEffectPropsTest.php +++ b/test/Model/AddLoyaltyPointsEffectPropsTest.php @@ -126,4 +126,11 @@ public function testPropertyStartDate() public function testPropertyExpiryDate() { } + + /** + * Test attribute "transactionUUID" + */ + public function testPropertyTransactionUUID() + { + } } diff --git a/test/Model/ApplicationEventTest.php b/test/Model/ApplicationEventTest.php index 8b07d17a..32f44265 100644 --- a/test/Model/ApplicationEventTest.php +++ b/test/Model/ApplicationEventTest.php @@ -133,4 +133,11 @@ public function testPropertyAttributes() public function testPropertyEffects() { } + + /** + * Test attribute "ruleFailureReasons" + */ + public function testPropertyRuleFailureReasons() + { + } } diff --git a/test/Model/ApplicationTest.php b/test/Model/ApplicationTest.php index 05372198..c90acafd 100644 --- a/test/Model/ApplicationTest.php +++ b/test/Model/ApplicationTest.php @@ -169,6 +169,13 @@ public function testPropertyExclusiveCampaignsStrategy() { } + /** + * Test attribute "defaultDiscountScope" + */ + public function testPropertyDefaultDiscountScope() + { + } + /** * Test attribute "enableCascadingDiscounts" */ diff --git a/test/Model/BindingTest.php b/test/Model/BindingTest.php index 5737e089..7fa59f3c 100644 --- a/test/Model/BindingTest.php +++ b/test/Model/BindingTest.php @@ -85,6 +85,13 @@ public function testPropertyName() { } + /** + * Test attribute "type" + */ + public function testPropertyType() + { + } + /** * Test attribute "expression" */ diff --git a/test/Model/CampaignTest.php b/test/Model/CampaignTest.php index ae69f56a..94d95e7f 100644 --- a/test/Model/CampaignTest.php +++ b/test/Model/CampaignTest.php @@ -232,6 +232,41 @@ public function testPropertyCouponCreationCount() { } + /** + * Test attribute "referralCreationCount" + */ + public function testPropertyReferralCreationCount() + { + } + + /** + * Test attribute "createdLoyaltyPointsCount" + */ + public function testPropertyCreatedLoyaltyPointsCount() + { + } + + /** + * Test attribute "createdLoyaltyPointsEffectCount" + */ + public function testPropertyCreatedLoyaltyPointsEffectCount() + { + } + + /** + * Test attribute "redeemedLoyaltyPointsCount" + */ + public function testPropertyRedeemedLoyaltyPointsCount() + { + } + + /** + * Test attribute "redeemedLoyaltyPointsEffectCount" + */ + public function testPropertyRedeemedLoyaltyPointsEffectCount() + { + } + /** * Test attribute "lastActivity" */ diff --git a/test/Model/CartItemTest.php b/test/Model/CartItemTest.php index 450a4067..6fe45d75 100644 --- a/test/Model/CartItemTest.php +++ b/test/Model/CartItemTest.php @@ -154,11 +154,4 @@ public function testPropertyPosition() public function testPropertyAttributes() { } - - /** - * Test attribute "adjustment" - */ - public function testPropertyAdjustment() - { - } } diff --git a/test/Model/ChangeTest.php b/test/Model/ChangeTest.php index 91cc7cf4..784e8062 100644 --- a/test/Model/ChangeTest.php +++ b/test/Model/ChangeTest.php @@ -99,6 +99,13 @@ public function testPropertyUserId() { } + /** + * Test attribute "applicationId" + */ + public function testPropertyApplicationId() + { + } + /** * Test attribute "entity" */ diff --git a/test/Model/CustomerProfileIntegrationRequestV2Test.php b/test/Model/CustomerProfileIntegrationRequestV2Test.php index 2413cc83..d7289ccc 100644 --- a/test/Model/CustomerProfileIntegrationRequestV2Test.php +++ b/test/Model/CustomerProfileIntegrationRequestV2Test.php @@ -85,6 +85,13 @@ public function testPropertyAttributes() { } + /** + * Test attribute "audiencesChanges" + */ + public function testPropertyAudiencesChanges() + { + } + /** * Test attribute "responseContent" */ diff --git a/test/Model/DeductLoyaltyPointsEffectPropsTest.php b/test/Model/DeductLoyaltyPointsEffectPropsTest.php index 94165f90..9bda1f32 100644 --- a/test/Model/DeductLoyaltyPointsEffectPropsTest.php +++ b/test/Model/DeductLoyaltyPointsEffectPropsTest.php @@ -105,4 +105,11 @@ public function testPropertySubLedgerId() public function testPropertyValue() { } + + /** + * Test attribute "transactionUUID" + */ + public function testPropertyTransactionUUID() + { + } } diff --git a/test/Model/EffectEntityTest.php b/test/Model/EffectEntityTest.php index a4904661..4dc9cb5f 100644 --- a/test/Model/EffectEntityTest.php +++ b/test/Model/EffectEntityTest.php @@ -112,4 +112,11 @@ public function testPropertyRuleName() public function testPropertyEffectType() { } + + /** + * Test attribute "triggeredByCoupon" + */ + public function testPropertyTriggeredByCoupon() + { + } } diff --git a/test/Model/EffectTest.php b/test/Model/EffectTest.php index 4d89f9d6..97c13e2b 100644 --- a/test/Model/EffectTest.php +++ b/test/Model/EffectTest.php @@ -113,6 +113,13 @@ public function testPropertyEffectType() { } + /** + * Test attribute "triggeredByCoupon" + */ + public function testPropertyTriggeredByCoupon() + { + } + /** * Test attribute "props" */ diff --git a/test/Model/InlineResponse20027Test.php b/test/Model/InlineResponse20027Test.php index d286684c..71d32aa0 100644 --- a/test/Model/InlineResponse20027Test.php +++ b/test/Model/InlineResponse20027Test.php @@ -85,13 +85,6 @@ public function testPropertyTotalResultSize() { } - /** - * Test attribute "hasMore" - */ - public function testPropertyHasMore() - { - } - /** * Test attribute "data" */ diff --git a/test/Model/InlineResponse20028Test.php b/test/Model/InlineResponse20028Test.php index 8544bc84..7b0e2fd3 100644 --- a/test/Model/InlineResponse20028Test.php +++ b/test/Model/InlineResponse20028Test.php @@ -85,6 +85,13 @@ public function testPropertyTotalResultSize() { } + /** + * Test attribute "hasMore" + */ + public function testPropertyHasMore() + { + } + /** * Test attribute "data" */ diff --git a/test/Model/IntegrationStateV2Test.php b/test/Model/IntegrationStateV2Test.php index 8217c3e9..0778d96b 100644 --- a/test/Model/IntegrationStateV2Test.php +++ b/test/Model/IntegrationStateV2Test.php @@ -134,6 +134,13 @@ public function testPropertyEffects() { } + /** + * Test attribute "ruleFailureReasons" + */ + public function testPropertyRuleFailureReasons() + { + } + /** * Test attribute "createdCoupons" */ diff --git a/test/Model/LoyaltyProgramBalanceTest.php b/test/Model/LoyaltyProgramBalanceTest.php index 84bef422..e639f094 100644 --- a/test/Model/LoyaltyProgramBalanceTest.php +++ b/test/Model/LoyaltyProgramBalanceTest.php @@ -84,4 +84,32 @@ public function testLoyaltyProgramBalance() public function testPropertyCurrentBalance() { } + + /** + * Test attribute "pendingBalance" + */ + public function testPropertyPendingBalance() + { + } + + /** + * Test attribute "expiredBalance" + */ + public function testPropertyExpiredBalance() + { + } + + /** + * Test attribute "spentBalance" + */ + public function testPropertySpentBalance() + { + } + + /** + * Test attribute "tentativeCurrentBalance" + */ + public function testPropertyTentativeCurrentBalance() + { + } } diff --git a/test/Model/LoyaltyProgramLedgersTest.php b/test/Model/LoyaltyProgramLedgersTest.php index 866c40c1..7136905a 100644 --- a/test/Model/LoyaltyProgramLedgersTest.php +++ b/test/Model/LoyaltyProgramLedgersTest.php @@ -78,6 +78,13 @@ public function testLoyaltyProgramLedgers() { } + /** + * Test attribute "id" + */ + public function testPropertyId() + { + } + /** * Test attribute "title" */ diff --git a/test/Model/NewApplicationTest.php b/test/Model/NewApplicationTest.php index 0ac69f5b..b7ccd12f 100644 --- a/test/Model/NewApplicationTest.php +++ b/test/Model/NewApplicationTest.php @@ -141,6 +141,13 @@ public function testPropertyExclusiveCampaignsStrategy() { } + /** + * Test attribute "defaultDiscountScope" + */ + public function testPropertyDefaultDiscountScope() + { + } + /** * Test attribute "enableCascadingDiscounts" */ diff --git a/test/Model/NewCouponsForMultipleRecipientsTest.php b/test/Model/NewCouponsForMultipleRecipientsTest.php new file mode 100644 index 00000000..6d4d837e --- /dev/null +++ b/test/Model/NewCouponsForMultipleRecipientsTest.php @@ -0,0 +1,136 @@ +